vamp-mcp 0.1.9 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of vamp-mcp might be problematic. Click here for more details.
- package/LICENSE +21 -21
- package/README.md +144 -107
- package/THIRD_PARTY_NOTICES.md +32 -27
- package/bin/vamp-mcp.mjs +37 -37
- package/notices/mcp-virtualbox-LICENSE +21 -21
- package/notices/mcp-virtualbox-PROVENANCE.json +37 -37
- package/package.json +51 -17
- package/runtime/backends/common/Test-Environment.ps1 +7 -6
- package/runtime/backends/common/guest-install.json +58 -0
- package/runtime/backends/common/guest_install.py +57 -0
- package/runtime/backends/common/host-support.cjs +16 -0
- package/runtime/backends/common/packer.cjs +16 -0
- package/runtime/backends/hyperv/scripts/Manage-Desktop.ps1 +40 -67
- package/runtime/backends/hyperv/scripts/Send-InstallerBoot.ps1 +25 -0
- package/runtime/backends/kvm/debian-preseed.cfg +35 -35
- package/runtime/backends/library/registry.py +77 -77
- package/runtime/backends/library/replay.py +154 -154
- package/runtime/backends/packer/answer_media.py +16 -0
- package/runtime/backends/packer/deploy-hyperv.ps1 +10 -0
- package/runtime/backends/packer/drivers.py +49 -0
- package/runtime/backends/packer/hyperv-network.ps1 +10 -0
- package/runtime/backends/packer/images.py +75 -0
- package/runtime/backends/packer/osinfo.py +113 -0
- package/runtime/backends/packer/policy.json +15 -0
- package/runtime/backends/packer/runner.py +224 -0
- package/runtime/backends/packer/templates.py +118 -0
- package/runtime/backends/packer/toolchain.py +80 -0
- package/runtime/backends/remote_ssh/server.mjs +321 -94
- package/runtime/backends/virtualbox/desktop.cjs +37 -0
- package/runtime/backends/virtualbox/display.py +101 -101
- package/runtime/backends/virtualbox/history.py +139 -139
- package/runtime/backends/virtualbox/mouse_click.py +15 -15
- package/runtime/backends/virtualbox/mouse_move.py +18 -18
- package/runtime/backends/virtualbox/profiles.json +46 -46
- package/runtime/backends/virtualbox/provision.py +238 -184
- package/runtime/backends/virtualbox/recording_listener.py +29 -29
- package/runtime/backends/virtualbox/recordings.py +39 -39
- package/runtime/backends/virtualbox/requirements.txt +7 -7
- package/runtime/backends/virtualbox/rpas/debian_first_boot/manifest.json +1 -1
- package/runtime/backends/virtualbox/rpas/debian_first_boot/run.robot +13 -13
- package/runtime/backends/virtualbox/rpas/debian_first_boot/workflow.py +75 -75
- package/runtime/backends/virtualbox/rpas/observe/manifest.json +7 -7
- package/runtime/backends/virtualbox/rpas/observe/run.robot +13 -13
- package/runtime/backends/virtualbox/rpas/observe/workflow.py +14 -14
- package/runtime/backends/virtualbox/server.mjs +440 -63
- package/runtime/backends/virtualbox/setup_windows_sdk.py +58 -58
- package/runtime/backends/virtualbox/shares.py +68 -68
- package/runtime/backends/virtualbox/snapshots.py +53 -53
- package/runtime/backends/virtualbox/transfers.py +89 -89
- package/runtime/backends/virtualbox/vnc.py +61 -61
- package/runtime/guest_keys.py +13 -13
- package/runtime/guest_setup/http/debian-preseed.cfg +39 -0
- package/runtime/guest_setup/http/postdeb.sh +94 -0
- package/runtime/guest_setup/http/postwin.ps1 +53 -0
- package/runtime/guest_setup/http/setup-all.ps1 +25 -0
- package/runtime/guest_setup/http/setup-win.cmd +7 -0
- package/runtime/guest_setup/http/setup.ps1 +44 -0
- package/runtime/guest_setup/http/setup.sh +50 -0
- package/runtime/guest_setup/kvm/setup-debian.sh +73 -0
- package/runtime/guest_setup/kvm/setup-windows.ps1 +52 -0
- package/runtime/guest_setup/recorder/README.txt +12 -8
- package/runtime/guest_setup/recorder/RECORDER-LICENSE +674 -674
- package/runtime/guest_setup/recorder/RECORDING-GUIDE.txt +31 -31
- package/runtime/guest_setup/recorder/apply-display.py +41 -41
- package/runtime/guest_setup/recorder/configure-debian-mirrors.py +62 -62
- package/runtime/guest_setup/recorder/configure-gdm.py +23 -0
- package/runtime/guest_setup/recorder/configure-session.ps1 +14 -0
- package/runtime/guest_setup/recorder/gnome-display.py +60 -60
- package/runtime/guest_setup/recorder/install-display-startup.py +67 -39
- package/runtime/guest_setup/recorder/install-hypervisor-drivers.ps1 +34 -0
- package/runtime/guest_setup/recorder/install-resolution-shortcut.ps1 +36 -0
- package/runtime/guest_setup/recorder/postwin.cmd +10 -10
- package/runtime/guest_setup/recorder/prepare-recording.py +30 -30
- package/runtime/guest_setup/recorder/recorder.zip +0 -0
- package/runtime/guest_setup/recorder/requirements-recorder.txt +2 -2
- package/runtime/guest_setup/recorder/session-policy.py +22 -0
- package/runtime/guest_setup/recorder/set-resolution-registry.ps1 +40 -0
- package/runtime/guest_setup/recorder/setup-user.py +53 -35
- package/runtime/guest_setup/recorder/setup-win.cmd +4 -11
- package/runtime/guest_setup/recorder/setup.ps1 +112 -30
- package/runtime/guest_setup/recorder/setup.sh +19 -1
- package/runtime/guest_setup/recorder/vamp-recorder.py +148 -148
- package/runtime/guest_setup/recorder/verify-recorder.py +4 -4
- package/runtime/guest_setup/recorder/windows-display.py +76 -76
- package/runtime/guest_setup/requirements.txt +2 -0
- package/runtime/guest_setup/setup-all.ps1 +35 -0
- package/runtime/guest_setup/setup-all.sh +22 -0
- package/runtime/guest_setup/vault/Install-VCRuntime.ps1 +26 -0
- package/runtime/guest_setup/vault/setup-guest-vault.ps1 +148 -0
- package/runtime/guest_setup/vault/setup-guest-vault.sh +75 -0
- package/runtime/recording_converter.py +230 -230
- package/runtime/requirements-mcp.txt +11 -11
- package/runtime/rpas/README.md +161 -161
- package/runtime/rpas/captcha_handoff/manifest.json +27 -27
- package/runtime/rpas/captcha_handoff/run.robot +16 -16
- package/runtime/rpas/captcha_handoff/workflow.py +11 -11
- package/runtime/rpas/common.resource +26 -26
- package/runtime/rpas/debian_update/manifest.json +27 -27
- package/runtime/rpas/debian_update/run.robot +17 -17
- package/runtime/rpas/debian_update/workflow.py +13 -13
- package/runtime/rpas/desktop_control/manifest.json +26 -26
- package/runtime/rpas/desktop_control/run.robot +27 -27
- package/runtime/rpas/desktop_control/workflow.py +51 -51
- package/runtime/rpas/firefox_launch/manifest.json +27 -27
- package/runtime/rpas/firefox_launch/run.robot +15 -15
- package/runtime/rpas/firefox_launch/workflow.py +25 -25
- package/runtime/rpas/firefox_naver/manifest.json +27 -27
- package/runtime/rpas/firefox_naver/run.robot +21 -21
- package/runtime/rpas/firefox_naver/workflow.py +28 -28
- package/runtime/rpas/kvm_validation/README.md +11 -11
- package/runtime/rpas/kvm_validation/manifest.json +28 -28
- package/runtime/rpas/kvm_validation/run.robot +30 -30
- package/runtime/rpas/kvm_validation/workflow.py +91 -91
- package/runtime/rpas/manifest.schema.json +105 -105
- package/runtime/rpas/naver_login/login.robot +25 -25
- package/runtime/rpas/naver_login/manifest.json +33 -33
- package/runtime/rpas/naver_login/run.robot +20 -20
- package/runtime/rpas/naver_login/workflow.py +32 -32
- package/runtime/rpas/windows_naver_recorded/README.md +24 -24
- package/runtime/rpas/windows_naver_recorded/conversion.json +25 -25
- package/runtime/rpas/windows_naver_recorded/manifest.json +28 -28
- package/runtime/rpas/windows_naver_recorded/run.robot +37 -37
- package/runtime/rpas/windows_naver_recorded/workflow.py +32 -32
- package/runtime/scripts/build_recorder_media.py +39 -39
- package/runtime/scripts/macos/setup-host.sh +126 -0
- package/runtime/scripts/remote_host_setup.sh +7 -4
- package/runtime/scripts/script_server.py +571 -0
- package/runtime/skills/vamp-rpa-ui-checks/SKILL.md +26 -0
- package/runtime/skills/vamp-rpa-ui-checks/agents/openai.yaml +4 -0
- package/runtime/skills/vamp-rpa-ui-checks/references/display.md +12 -0
- package/runtime/skills/vamp-rpa-ui-checks/references/user-guide.md +51 -0
- package/runtime/skills/vamp-ui-cleanup/SKILL.md +15 -0
- package/runtime/skills/vamp-ui-cleanup/agents/openai.yaml +4 -0
- package/runtime/skills/vamp-ui-validation/SKILL.md +27 -0
- package/runtime/skills/vamp-ui-validation/agents/openai.yaml +4 -0
- package/runtime/third_party/mcp-virtualbox/scripts/mouse_click.py +65 -65
- package/runtime/third_party/pyautogui-recorder/LICENSE +674 -674
- package/runtime/third_party/pyautogui-recorder/PROVENANCE.json +16 -16
- package/runtime/third_party/pyautogui-recorder/PyAutoGuiRecorder.py +169 -169
- package/runtime/third_party/pyautogui-recorder/README.md +53 -53
- package/runtime/scripts/build_debian_installer.py +0 -48
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
"""VNC desktop checks with positive on-screen assertions and local-only fixture."""
|
|
2
|
-
import json
|
|
3
|
-
import re
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
import time
|
|
6
|
-
from robot.api.deco import keyword, library
|
|
7
|
-
from robot.libraries.BuiltIn import BuiltIn
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
@library(scope='SUITE', auto_keywords=False)
|
|
11
|
-
class Workflow:
|
|
12
|
-
def __init__(self):
|
|
13
|
-
self.sequence = 0
|
|
14
|
-
|
|
15
|
-
@property
|
|
16
|
-
def guest(self):
|
|
17
|
-
return BuiltIn().get_library_instance('Spice')
|
|
18
|
-
|
|
19
|
-
@property
|
|
20
|
-
def output(self):
|
|
21
|
-
return Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
22
|
-
|
|
23
|
-
@keyword
|
|
24
|
-
def wait_for_visible_text(self, text, timeout=45):
|
|
25
|
-
from vision import run_ocr
|
|
26
|
-
deadline = time.monotonic()+float(timeout)
|
|
27
|
-
while time.monotonic() < deadline:
|
|
28
|
-
self.sequence += 1
|
|
29
|
-
image = self.guest.capture_guest_screen(self.output/f'screen-{self.sequence:03}.png')
|
|
30
|
-
lines = run_ocr(self.guest, image, 'en', self.output/f'ocr-{self.sequence:03}.json')
|
|
31
|
-
normalize=lambda value: re.sub(r'\s*-\s*','-',value).casefold()
|
|
32
|
-
found = [line for line in lines if normalize(text) in normalize(line['text']) and line['confidence'] >= .7]
|
|
33
|
-
if found:
|
|
34
|
-
return found
|
|
35
|
-
self.guest._pump(.5)
|
|
36
|
-
raise AssertionError(f'Expected visible text {text!r}; inspect saved screen/OCR evidence')
|
|
37
|
-
|
|
38
|
-
@keyword
|
|
39
|
-
def terminal_keyboard_scenario(self):
|
|
40
|
-
# The prepared Openbox desktop owns an xterm. Bring that existing
|
|
41
|
-
# application forward; desktop icon positions and GNOME launchers vary.
|
|
42
|
-
self.guest.guest_hotkey('alt','tab')
|
|
43
|
-
self.guest._pump(.3)
|
|
44
|
-
self.guest.guest_hotkey('ctrl','c')
|
|
45
|
-
marker='VAMP VERIFIED '+time.strftime('%H%M%S')
|
|
46
|
-
encoded=''.join('\\'+format(ord(c),'03o') for c in marker+'\n')
|
|
47
|
-
self.guest.guest_write("clear; printf '"+encoded+"'")
|
|
48
|
-
self.guest.guest_hotkey('enter')
|
|
49
|
-
self.wait_for_visible_text(marker)
|
|
50
|
-
return {'status':'succeeded','verification':'ocr_only','scenario':'terminal_keyboard'}
|
|
51
|
-
|
|
52
|
-
@keyword
|
|
53
|
-
def launch_local_browser(self):
|
|
54
|
-
self.guest.guest_write('firefox-esr --new-window http://127.0.0.1:8080 &')
|
|
55
|
-
self.guest.guest_hotkey('enter')
|
|
56
|
-
self.wait_for_visible_text('VAMP KVM Validation', 90)
|
|
57
|
-
self.guest.guest_hotkey('alt','f10')
|
|
58
|
-
self.guest._pump(1)
|
|
59
|
-
self.wait_for_visible_text('Browser ready')
|
|
60
|
-
return {'status':'succeeded','verification':'ocr_only','scenario':'browser_launch'}
|
|
61
|
-
|
|
62
|
-
@keyword
|
|
63
|
-
def click_local_button(self):
|
|
64
|
-
lines = self.wait_for_visible_text('Verify click')
|
|
65
|
-
if len(lines) != 1:
|
|
66
|
-
raise AssertionError('Click target is ambiguous')
|
|
67
|
-
line = lines[0]
|
|
68
|
-
box = line['xyxy']
|
|
69
|
-
self.guest.guest_click((box[0]+box[2])//2, (box[1]+box[3])//2)
|
|
70
|
-
self.wait_for_visible_text('CLICK VERIFIED')
|
|
71
|
-
return {'status':'succeeded','verification':'ocr_only','scenario':'mouse_click'}
|
|
72
|
-
|
|
73
|
-
@keyword
|
|
74
|
-
def type_into_local_page(self):
|
|
75
|
-
self.guest.guest_hotkey('ctrl','l')
|
|
76
|
-
self.guest.guest_write('http://127.0.0.1:8080')
|
|
77
|
-
self.guest.guest_hotkey('enter')
|
|
78
|
-
self.guest._pump(1)
|
|
79
|
-
self.wait_for_visible_text('Browser ready')
|
|
80
|
-
self.guest.guest_hotkey('tab')
|
|
81
|
-
self.guest.guest_write('VNC-SHARED-INPUT-VERIFIED')
|
|
82
|
-
self.wait_for_visible_text('VNC-SHARED-INPUT-VERIFIED')
|
|
83
|
-
return {'status':'succeeded','verification':'ocr_only','scenario':'browser_keyboard'}
|
|
84
|
-
|
|
85
|
-
@keyword
|
|
86
|
-
def analyze_local_page(self):
|
|
87
|
-
result = self.guest.analyze_guest_ui(str(self.output/'ui-analysis.json'), 'en', 'auto')
|
|
88
|
-
assert result['elements'], 'YOLO/OCR produced no elements'
|
|
89
|
-
assert any('VAMP' in e.get('text','') for e in result['elements']), 'Expected page title missing from visual analysis'
|
|
90
|
-
return {'status':'succeeded','verification':'yolo_ocr','scenario':'visual_analysis',
|
|
91
|
-
'element_count':len(result['elements']),'details_path':str(self.output/'ui-analysis.json')}
|
|
1
|
+
"""VNC desktop checks with positive on-screen assertions and local-only fixture."""
|
|
2
|
+
import json
|
|
3
|
+
import re
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import time
|
|
6
|
+
from robot.api.deco import keyword, library
|
|
7
|
+
from robot.libraries.BuiltIn import BuiltIn
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@library(scope='SUITE', auto_keywords=False)
|
|
11
|
+
class Workflow:
|
|
12
|
+
def __init__(self):
|
|
13
|
+
self.sequence = 0
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def guest(self):
|
|
17
|
+
return BuiltIn().get_library_instance('Spice')
|
|
18
|
+
|
|
19
|
+
@property
|
|
20
|
+
def output(self):
|
|
21
|
+
return Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))
|
|
22
|
+
|
|
23
|
+
@keyword
|
|
24
|
+
def wait_for_visible_text(self, text, timeout=45):
|
|
25
|
+
from vision import run_ocr
|
|
26
|
+
deadline = time.monotonic()+float(timeout)
|
|
27
|
+
while time.monotonic() < deadline:
|
|
28
|
+
self.sequence += 1
|
|
29
|
+
image = self.guest.capture_guest_screen(self.output/f'screen-{self.sequence:03}.png')
|
|
30
|
+
lines = run_ocr(self.guest, image, 'en', self.output/f'ocr-{self.sequence:03}.json')
|
|
31
|
+
normalize=lambda value: re.sub(r'\s*-\s*','-',value).casefold()
|
|
32
|
+
found = [line for line in lines if normalize(text) in normalize(line['text']) and line['confidence'] >= .7]
|
|
33
|
+
if found:
|
|
34
|
+
return found
|
|
35
|
+
self.guest._pump(.5)
|
|
36
|
+
raise AssertionError(f'Expected visible text {text!r}; inspect saved screen/OCR evidence')
|
|
37
|
+
|
|
38
|
+
@keyword
|
|
39
|
+
def terminal_keyboard_scenario(self):
|
|
40
|
+
# The prepared Openbox desktop owns an xterm. Bring that existing
|
|
41
|
+
# application forward; desktop icon positions and GNOME launchers vary.
|
|
42
|
+
self.guest.guest_hotkey('alt','tab')
|
|
43
|
+
self.guest._pump(.3)
|
|
44
|
+
self.guest.guest_hotkey('ctrl','c')
|
|
45
|
+
marker='VAMP VERIFIED '+time.strftime('%H%M%S')
|
|
46
|
+
encoded=''.join('\\'+format(ord(c),'03o') for c in marker+'\n')
|
|
47
|
+
self.guest.guest_write("clear; printf '"+encoded+"'")
|
|
48
|
+
self.guest.guest_hotkey('enter')
|
|
49
|
+
self.wait_for_visible_text(marker)
|
|
50
|
+
return {'status':'succeeded','verification':'ocr_only','scenario':'terminal_keyboard'}
|
|
51
|
+
|
|
52
|
+
@keyword
|
|
53
|
+
def launch_local_browser(self):
|
|
54
|
+
self.guest.guest_write('firefox-esr --new-window http://127.0.0.1:8080 &')
|
|
55
|
+
self.guest.guest_hotkey('enter')
|
|
56
|
+
self.wait_for_visible_text('VAMP KVM Validation', 90)
|
|
57
|
+
self.guest.guest_hotkey('alt','f10')
|
|
58
|
+
self.guest._pump(1)
|
|
59
|
+
self.wait_for_visible_text('Browser ready')
|
|
60
|
+
return {'status':'succeeded','verification':'ocr_only','scenario':'browser_launch'}
|
|
61
|
+
|
|
62
|
+
@keyword
|
|
63
|
+
def click_local_button(self):
|
|
64
|
+
lines = self.wait_for_visible_text('Verify click')
|
|
65
|
+
if len(lines) != 1:
|
|
66
|
+
raise AssertionError('Click target is ambiguous')
|
|
67
|
+
line = lines[0]
|
|
68
|
+
box = line['xyxy']
|
|
69
|
+
self.guest.guest_click((box[0]+box[2])//2, (box[1]+box[3])//2)
|
|
70
|
+
self.wait_for_visible_text('CLICK VERIFIED')
|
|
71
|
+
return {'status':'succeeded','verification':'ocr_only','scenario':'mouse_click'}
|
|
72
|
+
|
|
73
|
+
@keyword
|
|
74
|
+
def type_into_local_page(self):
|
|
75
|
+
self.guest.guest_hotkey('ctrl','l')
|
|
76
|
+
self.guest.guest_write('http://127.0.0.1:8080')
|
|
77
|
+
self.guest.guest_hotkey('enter')
|
|
78
|
+
self.guest._pump(1)
|
|
79
|
+
self.wait_for_visible_text('Browser ready')
|
|
80
|
+
self.guest.guest_hotkey('tab')
|
|
81
|
+
self.guest.guest_write('VNC-SHARED-INPUT-VERIFIED')
|
|
82
|
+
self.wait_for_visible_text('VNC-SHARED-INPUT-VERIFIED')
|
|
83
|
+
return {'status':'succeeded','verification':'ocr_only','scenario':'browser_keyboard'}
|
|
84
|
+
|
|
85
|
+
@keyword
|
|
86
|
+
def analyze_local_page(self):
|
|
87
|
+
result = self.guest.analyze_guest_ui(str(self.output/'ui-analysis.json'), 'en', 'auto')
|
|
88
|
+
assert result['elements'], 'YOLO/OCR produced no elements'
|
|
89
|
+
assert any('VAMP' in e.get('text','') for e in result['elements']), 'Expected page title missing from visual analysis'
|
|
90
|
+
return {'status':'succeeded','verification':'yolo_ocr','scenario':'visual_analysis',
|
|
91
|
+
'element_count':len(result['elements']),'details_path':str(self.output/'ui-analysis.json')}
|
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"title": "SPICE RPA package manifest",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"required": [
|
|
7
|
-
"format_version",
|
|
8
|
-
"id",
|
|
9
|
-
"name",
|
|
10
|
-
"version",
|
|
11
|
-
"default_entrypoint",
|
|
12
|
-
"entrypoints",
|
|
13
|
-
"python_libraries",
|
|
14
|
-
"dependencies",
|
|
15
|
-
"skill",
|
|
16
|
-
"outputs"
|
|
17
|
-
],
|
|
18
|
-
"properties": {
|
|
19
|
-
"format_version": {
|
|
20
|
-
"const": 1
|
|
21
|
-
},
|
|
22
|
-
"id": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"pattern": "^[a-z][a-z0-9_]*$"
|
|
25
|
-
},
|
|
26
|
-
"name": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"minLength": 1
|
|
29
|
-
},
|
|
30
|
-
"version": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
33
|
-
},
|
|
34
|
-
"default_entrypoint": {
|
|
35
|
-
"type": "string"
|
|
36
|
-
},
|
|
37
|
-
"skill": {
|
|
38
|
-
"type": "string"
|
|
39
|
-
},
|
|
40
|
-
"python_libraries": {
|
|
41
|
-
"type": "array",
|
|
42
|
-
"minItems": 1,
|
|
43
|
-
"items": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"pattern": "\\.py$"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"dependencies": {
|
|
49
|
-
"type": "array",
|
|
50
|
-
"items": {
|
|
51
|
-
"type": "string"
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
"entrypoints": {
|
|
55
|
-
"type": "array",
|
|
56
|
-
"minItems": 1,
|
|
57
|
-
"items": {
|
|
58
|
-
"type": "object",
|
|
59
|
-
"additionalProperties": false,
|
|
60
|
-
"required": [
|
|
61
|
-
"name",
|
|
62
|
-
"file",
|
|
63
|
-
"credentials"
|
|
64
|
-
],
|
|
65
|
-
"properties": {
|
|
66
|
-
"name": {
|
|
67
|
-
"type": "string",
|
|
68
|
-
"minLength": 1
|
|
69
|
-
},
|
|
70
|
-
"file": {
|
|
71
|
-
"type": "string",
|
|
72
|
-
"pattern": "\\.robot$"
|
|
73
|
-
},
|
|
74
|
-
"credentials": {
|
|
75
|
-
"enum": [
|
|
76
|
-
"none",
|
|
77
|
-
"environment_or_prompt",
|
|
78
|
-
"public_sandbox_config"
|
|
79
|
-
]
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"outputs": {
|
|
85
|
-
"type": "object",
|
|
86
|
-
"additionalProperties": false,
|
|
87
|
-
"required": [
|
|
88
|
-
"summary",
|
|
89
|
-
"robot_log",
|
|
90
|
-
"robot_report"
|
|
91
|
-
],
|
|
92
|
-
"properties": {
|
|
93
|
-
"summary": {
|
|
94
|
-
"type": "string"
|
|
95
|
-
},
|
|
96
|
-
"robot_log": {
|
|
97
|
-
"type": "string"
|
|
98
|
-
},
|
|
99
|
-
"robot_report": {
|
|
100
|
-
"type": "string"
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"title": "SPICE RPA package manifest",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"required": [
|
|
7
|
+
"format_version",
|
|
8
|
+
"id",
|
|
9
|
+
"name",
|
|
10
|
+
"version",
|
|
11
|
+
"default_entrypoint",
|
|
12
|
+
"entrypoints",
|
|
13
|
+
"python_libraries",
|
|
14
|
+
"dependencies",
|
|
15
|
+
"skill",
|
|
16
|
+
"outputs"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"format_version": {
|
|
20
|
+
"const": 1
|
|
21
|
+
},
|
|
22
|
+
"id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
25
|
+
},
|
|
26
|
+
"name": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"version": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"pattern": "^\\d+\\.\\d+\\.\\d+$"
|
|
33
|
+
},
|
|
34
|
+
"default_entrypoint": {
|
|
35
|
+
"type": "string"
|
|
36
|
+
},
|
|
37
|
+
"skill": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"python_libraries": {
|
|
41
|
+
"type": "array",
|
|
42
|
+
"minItems": 1,
|
|
43
|
+
"items": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"pattern": "\\.py$"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"dependencies": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "string"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"entrypoints": {
|
|
55
|
+
"type": "array",
|
|
56
|
+
"minItems": 1,
|
|
57
|
+
"items": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"additionalProperties": false,
|
|
60
|
+
"required": [
|
|
61
|
+
"name",
|
|
62
|
+
"file",
|
|
63
|
+
"credentials"
|
|
64
|
+
],
|
|
65
|
+
"properties": {
|
|
66
|
+
"name": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1
|
|
69
|
+
},
|
|
70
|
+
"file": {
|
|
71
|
+
"type": "string",
|
|
72
|
+
"pattern": "\\.robot$"
|
|
73
|
+
},
|
|
74
|
+
"credentials": {
|
|
75
|
+
"enum": [
|
|
76
|
+
"none",
|
|
77
|
+
"environment_or_prompt",
|
|
78
|
+
"public_sandbox_config"
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"outputs": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"additionalProperties": false,
|
|
87
|
+
"required": [
|
|
88
|
+
"summary",
|
|
89
|
+
"robot_log",
|
|
90
|
+
"robot_report"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"summary": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"robot_log": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
},
|
|
99
|
+
"robot_report": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
*** Settings ***
|
|
2
|
-
Resource ${CURDIR}/../common.resource
|
|
3
|
-
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
-
Suite Setup Start RPA
|
|
5
|
-
Suite Teardown Stop RPA
|
|
6
|
-
Task Teardown Finish RPA Task
|
|
7
|
-
|
|
8
|
-
*** Variables ***
|
|
9
|
-
${RPA_ID} naver_login
|
|
10
|
-
${LANGUAGES} en
|
|
11
|
-
${DEVICE} auto
|
|
12
|
-
${CREDENTIAL_SOURCE} environment
|
|
13
|
-
|
|
14
|
-
*** Tasks ***
|
|
15
|
-
Sign In To Naver
|
|
16
|
-
${state}= Workflow.Detect Naver Login ${LANGUAGES} ${DEVICE}
|
|
17
|
-
${detected}= Workflow.Summarize Login State ${state}
|
|
18
|
-
Contract.Publish Result ${detected}
|
|
19
|
-
Pause For User Verification ${detected}
|
|
20
|
-
Should Be Equal ${detected}[status] needs_credentials
|
|
21
|
-
Should Be True ${detected}[origin_verified]
|
|
22
|
-
${result}= Workflow.Submit Login ${state} ${CREDENTIAL_SOURCE}
|
|
23
|
-
Contract.Publish Result ${result}
|
|
24
|
-
Pause For User Verification ${result}
|
|
25
|
-
Should Be Equal ${result}[status] logged_in
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Resource ${CURDIR}/../common.resource
|
|
3
|
+
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
+
Suite Setup Start RPA
|
|
5
|
+
Suite Teardown Stop RPA
|
|
6
|
+
Task Teardown Finish RPA Task
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${RPA_ID} naver_login
|
|
10
|
+
${LANGUAGES} en
|
|
11
|
+
${DEVICE} auto
|
|
12
|
+
${CREDENTIAL_SOURCE} environment
|
|
13
|
+
|
|
14
|
+
*** Tasks ***
|
|
15
|
+
Sign In To Naver
|
|
16
|
+
${state}= Workflow.Detect Naver Login ${LANGUAGES} ${DEVICE}
|
|
17
|
+
${detected}= Workflow.Summarize Login State ${state}
|
|
18
|
+
Contract.Publish Result ${detected}
|
|
19
|
+
Pause For User Verification ${detected}
|
|
20
|
+
Should Be Equal ${detected}[status] needs_credentials
|
|
21
|
+
Should Be True ${detected}[origin_verified]
|
|
22
|
+
${result}= Workflow.Submit Login ${state} ${CREDENTIAL_SOURCE}
|
|
23
|
+
Contract.Publish Result ${result}
|
|
24
|
+
Pause For User Verification ${result}
|
|
25
|
+
Should Be Equal ${result}[status] logged_in
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"format_version": 1,
|
|
3
|
-
"id": "naver_login",
|
|
4
|
-
"name": "네이버 로그인",
|
|
5
|
-
"version": "1.0.0",
|
|
6
|
-
"default_entrypoint": "run",
|
|
7
|
-
"entrypoints": [
|
|
8
|
-
{
|
|
9
|
-
"name": "run",
|
|
10
|
-
"file": "run.robot",
|
|
11
|
-
"credentials": "none"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
"name": "login",
|
|
15
|
-
"file": "login.robot",
|
|
16
|
-
"credentials": "environment_or_prompt"
|
|
17
|
-
}
|
|
18
|
-
],
|
|
19
|
-
"python_libraries": [
|
|
20
|
-
"workflow.py"
|
|
21
|
-
],
|
|
22
|
-
"dependencies": [
|
|
23
|
-
"spice",
|
|
24
|
-
"yolo",
|
|
25
|
-
"paddleocr"
|
|
26
|
-
],
|
|
27
|
-
"skill": "spice-naver-login",
|
|
28
|
-
"outputs": {
|
|
29
|
-
"summary": "${OUTPUT DIR}/summary.json",
|
|
30
|
-
"robot_log": "${OUTPUT DIR}/log.html",
|
|
31
|
-
"robot_report": "${OUTPUT DIR}/report.html"
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"format_version": 1,
|
|
3
|
+
"id": "naver_login",
|
|
4
|
+
"name": "네이버 로그인",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"default_entrypoint": "run",
|
|
7
|
+
"entrypoints": [
|
|
8
|
+
{
|
|
9
|
+
"name": "run",
|
|
10
|
+
"file": "run.robot",
|
|
11
|
+
"credentials": "none"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "login",
|
|
15
|
+
"file": "login.robot",
|
|
16
|
+
"credentials": "environment_or_prompt"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"python_libraries": [
|
|
20
|
+
"workflow.py"
|
|
21
|
+
],
|
|
22
|
+
"dependencies": [
|
|
23
|
+
"spice",
|
|
24
|
+
"yolo",
|
|
25
|
+
"paddleocr"
|
|
26
|
+
],
|
|
27
|
+
"skill": "spice-naver-login",
|
|
28
|
+
"outputs": {
|
|
29
|
+
"summary": "${OUTPUT DIR}/summary.json",
|
|
30
|
+
"robot_log": "${OUTPUT DIR}/log.html",
|
|
31
|
+
"robot_report": "${OUTPUT DIR}/report.html"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
*** Settings ***
|
|
2
|
-
Resource ${CURDIR}/../common.resource
|
|
3
|
-
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
-
Suite Setup Start RPA
|
|
5
|
-
Suite Teardown Stop RPA
|
|
6
|
-
Task Teardown Finish RPA Task
|
|
7
|
-
|
|
8
|
-
*** Variables ***
|
|
9
|
-
${RPA_ID} naver_login
|
|
10
|
-
${LANGUAGES} en
|
|
11
|
-
${DEVICE} auto
|
|
12
|
-
|
|
13
|
-
*** Tasks ***
|
|
14
|
-
Detect Naver Login Form
|
|
15
|
-
${state}= Workflow.Detect Naver Login ${LANGUAGES} ${DEVICE}
|
|
16
|
-
${result}= Workflow.Summarize Login State ${state}
|
|
17
|
-
Contract.Publish Result ${result}
|
|
18
|
-
Pause For User Verification ${result}
|
|
19
|
-
Should Be Equal ${result}[status] needs_credentials
|
|
20
|
-
Should Be True ${result}[origin_verified]
|
|
1
|
+
*** Settings ***
|
|
2
|
+
Resource ${CURDIR}/../common.resource
|
|
3
|
+
Library ${CURDIR}/workflow.py WITH NAME Workflow
|
|
4
|
+
Suite Setup Start RPA
|
|
5
|
+
Suite Teardown Stop RPA
|
|
6
|
+
Task Teardown Finish RPA Task
|
|
7
|
+
|
|
8
|
+
*** Variables ***
|
|
9
|
+
${RPA_ID} naver_login
|
|
10
|
+
${LANGUAGES} en
|
|
11
|
+
${DEVICE} auto
|
|
12
|
+
|
|
13
|
+
*** Tasks ***
|
|
14
|
+
Detect Naver Login Form
|
|
15
|
+
${state}= Workflow.Detect Naver Login ${LANGUAGES} ${DEVICE}
|
|
16
|
+
${result}= Workflow.Summarize Login State ${state}
|
|
17
|
+
Contract.Publish Result ${result}
|
|
18
|
+
Pause For User Verification ${result}
|
|
19
|
+
Should Be Equal ${result}[status] needs_credentials
|
|
20
|
+
Should Be True ${result}[origin_verified]
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"""Visual login package. Credentials stay inside Python, outside Robot arguments."""
|
|
2
|
-
from pathlib import Path
|
|
3
|
-
from robot.api.deco import keyword,library
|
|
4
|
-
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
-
class Workflow:
|
|
9
|
-
@keyword
|
|
10
|
-
def detect_naver_login(self,languages='en',device='auto'):
|
|
11
|
-
from login_flow import prepare
|
|
12
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
13
|
-
output=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))/'login'
|
|
14
|
-
return prepare(spice,languages,device,output=str(output))
|
|
15
|
-
|
|
16
|
-
@keyword
|
|
17
|
-
def summarize_login_state(self,state):
|
|
18
|
-
result={key:state[key] for key in ['status','origin_verified','message','action','matched_rules'] if key in state}
|
|
19
|
-
result['details_path']=str((Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))/'login/state.json').resolve())
|
|
20
|
-
return result
|
|
21
|
-
|
|
22
|
-
@keyword
|
|
23
|
-
def submit_login(self,state,credential_source='environment'):
|
|
24
|
-
from login_flow import read_credentials,fill_and_submit
|
|
25
|
-
if credential_source not in ('environment','prompt'):
|
|
26
|
-
raise ValueError('CREDENTIAL_SOURCE must be environment or prompt')
|
|
27
|
-
spice=BuiltIn().get_library_instance('Spice')
|
|
28
|
-
username,password=read_credentials(credential_source=='prompt',spice)
|
|
29
|
-
try:
|
|
30
|
-
return fill_and_submit(spice,state,username,password)
|
|
31
|
-
finally:
|
|
32
|
-
username=password=None
|
|
1
|
+
"""Visual login package. Credentials stay inside Python, outside Robot arguments."""
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from robot.api.deco import keyword,library
|
|
4
|
+
from robot.libraries.BuiltIn import BuiltIn
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@library(scope='SUITE',auto_keywords=False)
|
|
8
|
+
class Workflow:
|
|
9
|
+
@keyword
|
|
10
|
+
def detect_naver_login(self,languages='en',device='auto'):
|
|
11
|
+
from login_flow import prepare
|
|
12
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
13
|
+
output=Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))/'login'
|
|
14
|
+
return prepare(spice,languages,device,output=str(output))
|
|
15
|
+
|
|
16
|
+
@keyword
|
|
17
|
+
def summarize_login_state(self,state):
|
|
18
|
+
result={key:state[key] for key in ['status','origin_verified','message','action','matched_rules'] if key in state}
|
|
19
|
+
result['details_path']=str((Path(BuiltIn().get_variable_value('${OUTPUT DIR}'))/'login/state.json').resolve())
|
|
20
|
+
return result
|
|
21
|
+
|
|
22
|
+
@keyword
|
|
23
|
+
def submit_login(self,state,credential_source='environment'):
|
|
24
|
+
from login_flow import read_credentials,fill_and_submit
|
|
25
|
+
if credential_source not in ('environment','prompt'):
|
|
26
|
+
raise ValueError('CREDENTIAL_SOURCE must be environment or prompt')
|
|
27
|
+
spice=BuiltIn().get_library_instance('Spice')
|
|
28
|
+
username,password=read_credentials(credential_source=='prompt',spice)
|
|
29
|
+
try:
|
|
30
|
+
return fill_and_submit(spice,state,username,password)
|
|
31
|
+
finally:
|
|
32
|
+
username=password=None
|