safari-pilot 0.1.0
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/.claude-plugin/plugin.json +35 -0
- package/.mcp.json +11 -0
- package/LICENSE +21 -0
- package/README.md +324 -0
- package/bin/.gitkeep +0 -0
- package/bin/Safari Pilot.app/Contents/CodeResources +0 -0
- package/bin/Safari Pilot.app/Contents/Info.plist +58 -0
- package/bin/Safari Pilot.app/Contents/MacOS/Safari Pilot +0 -0
- package/bin/Safari Pilot.app/Contents/PkgInfo +1 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Info.plist +55 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/MacOS/Safari Pilot Extension +0 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/background.js +294 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/content-isolated.js +80 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/content-main.js +310 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/icons/icon-128.png +0 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/icons/icon-48.png +0 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/icons/icon-96.png +0 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/Resources/manifest.json +39 -0
- package/bin/Safari Pilot.app/Contents/PlugIns/Safari Pilot Extension.appex/Contents/_CodeSignature/CodeResources +194 -0
- package/bin/Safari Pilot.app/Contents/Resources/AppIcon.icns +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Assets.car +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.html +19 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/Info.plist +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/MainMenu.nib +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Icon.png +0 -0
- package/bin/Safari Pilot.app/Contents/Resources/Script.js +22 -0
- package/bin/Safari Pilot.app/Contents/Resources/Style.css +45 -0
- package/bin/Safari Pilot.app/Contents/_CodeSignature/CodeResources +236 -0
- package/bin/Safari Pilot.zip +0 -0
- package/bin/SafariPilotd +0 -0
- package/dist/engine-selector.d.ts +10 -0
- package/dist/engine-selector.js +55 -0
- package/dist/engine-selector.js.map +1 -0
- package/dist/engines/applescript.d.ts +53 -0
- package/dist/engines/applescript.js +290 -0
- package/dist/engines/applescript.js.map +1 -0
- package/dist/engines/daemon.d.ts +19 -0
- package/dist/engines/daemon.js +187 -0
- package/dist/engines/daemon.js.map +1 -0
- package/dist/engines/engine.d.ts +15 -0
- package/dist/engines/engine.js +42 -0
- package/dist/engines/engine.js.map +1 -0
- package/dist/engines/extension.d.ts +34 -0
- package/dist/engines/extension.js +66 -0
- package/dist/engines/extension.js.map +1 -0
- package/dist/errors.d.ts +128 -0
- package/dist/errors.js +250 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/security/audit-log.d.ts +23 -0
- package/dist/security/audit-log.js +68 -0
- package/dist/security/audit-log.js.map +1 -0
- package/dist/security/circuit-breaker.d.ts +29 -0
- package/dist/security/circuit-breaker.js +114 -0
- package/dist/security/circuit-breaker.js.map +1 -0
- package/dist/security/domain-policy.d.ts +29 -0
- package/dist/security/domain-policy.js +96 -0
- package/dist/security/domain-policy.js.map +1 -0
- package/dist/security/human-approval.d.ts +20 -0
- package/dist/security/human-approval.js +150 -0
- package/dist/security/human-approval.js.map +1 -0
- package/dist/security/idpi-scanner.d.ts +20 -0
- package/dist/security/idpi-scanner.js +102 -0
- package/dist/security/idpi-scanner.js.map +1 -0
- package/dist/security/kill-switch.d.ts +51 -0
- package/dist/security/kill-switch.js +103 -0
- package/dist/security/kill-switch.js.map +1 -0
- package/dist/security/rate-limiter.d.ts +30 -0
- package/dist/security/rate-limiter.js +70 -0
- package/dist/security/rate-limiter.js.map +1 -0
- package/dist/security/screenshot-redaction.d.ts +42 -0
- package/dist/security/screenshot-redaction.js +134 -0
- package/dist/security/screenshot-redaction.js.map +1 -0
- package/dist/security/tab-ownership.d.ts +46 -0
- package/dist/security/tab-ownership.js +85 -0
- package/dist/security/tab-ownership.js.map +1 -0
- package/dist/server.d.ts +53 -0
- package/dist/server.js +347 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/clipboard.d.ts +15 -0
- package/dist/tools/clipboard.js +128 -0
- package/dist/tools/clipboard.js.map +1 -0
- package/dist/tools/compound.d.ts +68 -0
- package/dist/tools/compound.js +491 -0
- package/dist/tools/compound.js.map +1 -0
- package/dist/tools/extraction.d.ts +26 -0
- package/dist/tools/extraction.js +414 -0
- package/dist/tools/extraction.js.map +1 -0
- package/dist/tools/frames.d.ts +22 -0
- package/dist/tools/frames.js +165 -0
- package/dist/tools/frames.js.map +1 -0
- package/dist/tools/interaction.d.ts +30 -0
- package/dist/tools/interaction.js +651 -0
- package/dist/tools/interaction.js.map +1 -0
- package/dist/tools/navigation.d.ts +41 -0
- package/dist/tools/navigation.js +316 -0
- package/dist/tools/navigation.js.map +1 -0
- package/dist/tools/network.d.ts +27 -0
- package/dist/tools/network.js +721 -0
- package/dist/tools/network.js.map +1 -0
- package/dist/tools/performance.d.ts +16 -0
- package/dist/tools/performance.js +240 -0
- package/dist/tools/performance.js.map +1 -0
- package/dist/tools/permissions.d.ts +25 -0
- package/dist/tools/permissions.js +308 -0
- package/dist/tools/permissions.js.map +1 -0
- package/dist/tools/service-workers.d.ts +15 -0
- package/dist/tools/service-workers.js +136 -0
- package/dist/tools/service-workers.js.map +1 -0
- package/dist/tools/shadow.d.ts +21 -0
- package/dist/tools/shadow.js +126 -0
- package/dist/tools/shadow.js.map +1 -0
- package/dist/tools/storage.d.ts +30 -0
- package/dist/tools/storage.js +679 -0
- package/dist/tools/storage.js.map +1 -0
- package/dist/tools/structured-extraction.d.ts +22 -0
- package/dist/tools/structured-extraction.js +433 -0
- package/dist/tools/structured-extraction.js.map +1 -0
- package/dist/tools/wait.d.ts +18 -0
- package/dist/tools/wait.js +182 -0
- package/dist/tools/wait.js.map +1 -0
- package/dist/types.d.ts +85 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/extension/background.js +294 -0
- package/extension/content-isolated.js +80 -0
- package/extension/content-main.js +310 -0
- package/extension/icons/icon-128.png +0 -0
- package/extension/icons/icon-48.png +0 -0
- package/extension/icons/icon-96.png +0 -0
- package/extension/manifest.json +39 -0
- package/hooks/session-end.sh +67 -0
- package/hooks/session-start.sh +66 -0
- package/package.json +46 -0
- package/scripts/build-extension.sh +135 -0
- package/scripts/postinstall.sh +91 -0
- package/scripts/preuninstall.sh +25 -0
- package/scripts/update-daemon.sh +62 -0
- package/skills/safari-pilot/SKILL.md +157 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 3,
|
|
3
|
+
"name": "Safari Pilot",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Native Safari automation for AI agents",
|
|
6
|
+
"permissions": [
|
|
7
|
+
"activeTab",
|
|
8
|
+
"scripting",
|
|
9
|
+
"storage",
|
|
10
|
+
"cookies",
|
|
11
|
+
"declarativeNetRequest",
|
|
12
|
+
"nativeMessaging",
|
|
13
|
+
"tabs"
|
|
14
|
+
],
|
|
15
|
+
"host_permissions": ["<all_urls>"],
|
|
16
|
+
"background": {
|
|
17
|
+
"service_worker": "background.js",
|
|
18
|
+
"type": "module"
|
|
19
|
+
},
|
|
20
|
+
"content_scripts": [
|
|
21
|
+
{
|
|
22
|
+
"matches": ["<all_urls>"],
|
|
23
|
+
"js": ["content-isolated.js"],
|
|
24
|
+
"run_at": "document_idle",
|
|
25
|
+
"world": "ISOLATED"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"matches": ["<all_urls>"],
|
|
29
|
+
"js": ["content-main.js"],
|
|
30
|
+
"run_at": "document_idle",
|
|
31
|
+
"world": "MAIN"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"icons": {
|
|
35
|
+
"48": "icons/icon-48.png",
|
|
36
|
+
"96": "icons/icon-96.png",
|
|
37
|
+
"128": "icons/icon-128.png"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Resources/background.js</key>
|
|
8
|
+
<data>
|
|
9
|
+
IIGHqCWhaR5xSkkHbk6g1j6mywE=
|
|
10
|
+
</data>
|
|
11
|
+
<key>Resources/content-isolated.js</key>
|
|
12
|
+
<data>
|
|
13
|
+
fMoAYn+oYCJOSo/nWSLonOxT8vE=
|
|
14
|
+
</data>
|
|
15
|
+
<key>Resources/content-main.js</key>
|
|
16
|
+
<data>
|
|
17
|
+
ZO7Z2jtHRRssFOl3tmlVfjm0+kY=
|
|
18
|
+
</data>
|
|
19
|
+
<key>Resources/icons/icon-128.png</key>
|
|
20
|
+
<data>
|
|
21
|
+
0bJV02TeCwVKnrLRXPbeK5w9CWE=
|
|
22
|
+
</data>
|
|
23
|
+
<key>Resources/icons/icon-48.png</key>
|
|
24
|
+
<data>
|
|
25
|
+
ttHvZfqqouiptBESaQygNXmfjPk=
|
|
26
|
+
</data>
|
|
27
|
+
<key>Resources/icons/icon-96.png</key>
|
|
28
|
+
<data>
|
|
29
|
+
BIDpanaSN0Y3OQQEOwLyXND4SNk=
|
|
30
|
+
</data>
|
|
31
|
+
<key>Resources/manifest.json</key>
|
|
32
|
+
<data>
|
|
33
|
+
faqyT7ozgTX6yxruffIzdIDGx5o=
|
|
34
|
+
</data>
|
|
35
|
+
</dict>
|
|
36
|
+
<key>files2</key>
|
|
37
|
+
<dict>
|
|
38
|
+
<key>Resources/background.js</key>
|
|
39
|
+
<dict>
|
|
40
|
+
<key>hash2</key>
|
|
41
|
+
<data>
|
|
42
|
+
LvhT32gMdjJT/baOfo8UpVM7Geu8zPW0nuyzd+2v5X0=
|
|
43
|
+
</data>
|
|
44
|
+
</dict>
|
|
45
|
+
<key>Resources/content-isolated.js</key>
|
|
46
|
+
<dict>
|
|
47
|
+
<key>hash2</key>
|
|
48
|
+
<data>
|
|
49
|
+
wrGecOiOdHE9lYzN4y2UnEbbME9KlQrOE0huFGYQsbc=
|
|
50
|
+
</data>
|
|
51
|
+
</dict>
|
|
52
|
+
<key>Resources/content-main.js</key>
|
|
53
|
+
<dict>
|
|
54
|
+
<key>hash2</key>
|
|
55
|
+
<data>
|
|
56
|
+
F5NnGjkemslPrnIg9EFCHzYSXmHGadVa4c5fXsgIm4U=
|
|
57
|
+
</data>
|
|
58
|
+
</dict>
|
|
59
|
+
<key>Resources/icons/icon-128.png</key>
|
|
60
|
+
<dict>
|
|
61
|
+
<key>hash2</key>
|
|
62
|
+
<data>
|
|
63
|
+
n7wSLfe10Y/cLd5J1D1pTlDI/4sskPHlZkSuTHpHLmg=
|
|
64
|
+
</data>
|
|
65
|
+
</dict>
|
|
66
|
+
<key>Resources/icons/icon-48.png</key>
|
|
67
|
+
<dict>
|
|
68
|
+
<key>hash2</key>
|
|
69
|
+
<data>
|
|
70
|
+
39S1W3sJC0ookPikw7w9VNRO3kEhrr1WcWR0DTzvt24=
|
|
71
|
+
</data>
|
|
72
|
+
</dict>
|
|
73
|
+
<key>Resources/icons/icon-96.png</key>
|
|
74
|
+
<dict>
|
|
75
|
+
<key>hash2</key>
|
|
76
|
+
<data>
|
|
77
|
+
4fU0j7l5IFPvOhj3hoiPbx4gJfRTvSIdLfUccwqeOVE=
|
|
78
|
+
</data>
|
|
79
|
+
</dict>
|
|
80
|
+
<key>Resources/manifest.json</key>
|
|
81
|
+
<dict>
|
|
82
|
+
<key>hash2</key>
|
|
83
|
+
<data>
|
|
84
|
+
XUi1juiB1sdwbFL879wo8rcVO/GHryZs0DfXc5/FvKY=
|
|
85
|
+
</data>
|
|
86
|
+
</dict>
|
|
87
|
+
</dict>
|
|
88
|
+
<key>rules</key>
|
|
89
|
+
<dict>
|
|
90
|
+
<key>^Resources/</key>
|
|
91
|
+
<true/>
|
|
92
|
+
<key>^Resources/.*\.lproj/</key>
|
|
93
|
+
<dict>
|
|
94
|
+
<key>optional</key>
|
|
95
|
+
<true/>
|
|
96
|
+
<key>weight</key>
|
|
97
|
+
<real>1000</real>
|
|
98
|
+
</dict>
|
|
99
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
100
|
+
<dict>
|
|
101
|
+
<key>omit</key>
|
|
102
|
+
<true/>
|
|
103
|
+
<key>weight</key>
|
|
104
|
+
<real>1100</real>
|
|
105
|
+
</dict>
|
|
106
|
+
<key>^Resources/Base\.lproj/</key>
|
|
107
|
+
<dict>
|
|
108
|
+
<key>weight</key>
|
|
109
|
+
<real>1010</real>
|
|
110
|
+
</dict>
|
|
111
|
+
<key>^version.plist$</key>
|
|
112
|
+
<true/>
|
|
113
|
+
</dict>
|
|
114
|
+
<key>rules2</key>
|
|
115
|
+
<dict>
|
|
116
|
+
<key>.*\.dSYM($|/)</key>
|
|
117
|
+
<dict>
|
|
118
|
+
<key>weight</key>
|
|
119
|
+
<real>11</real>
|
|
120
|
+
</dict>
|
|
121
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
122
|
+
<dict>
|
|
123
|
+
<key>omit</key>
|
|
124
|
+
<true/>
|
|
125
|
+
<key>weight</key>
|
|
126
|
+
<real>2000</real>
|
|
127
|
+
</dict>
|
|
128
|
+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
|
129
|
+
<dict>
|
|
130
|
+
<key>nested</key>
|
|
131
|
+
<true/>
|
|
132
|
+
<key>weight</key>
|
|
133
|
+
<real>10</real>
|
|
134
|
+
</dict>
|
|
135
|
+
<key>^.*</key>
|
|
136
|
+
<true/>
|
|
137
|
+
<key>^Info\.plist$</key>
|
|
138
|
+
<dict>
|
|
139
|
+
<key>omit</key>
|
|
140
|
+
<true/>
|
|
141
|
+
<key>weight</key>
|
|
142
|
+
<real>20</real>
|
|
143
|
+
</dict>
|
|
144
|
+
<key>^PkgInfo$</key>
|
|
145
|
+
<dict>
|
|
146
|
+
<key>omit</key>
|
|
147
|
+
<true/>
|
|
148
|
+
<key>weight</key>
|
|
149
|
+
<real>20</real>
|
|
150
|
+
</dict>
|
|
151
|
+
<key>^Resources/</key>
|
|
152
|
+
<dict>
|
|
153
|
+
<key>weight</key>
|
|
154
|
+
<real>20</real>
|
|
155
|
+
</dict>
|
|
156
|
+
<key>^Resources/.*\.lproj/</key>
|
|
157
|
+
<dict>
|
|
158
|
+
<key>optional</key>
|
|
159
|
+
<true/>
|
|
160
|
+
<key>weight</key>
|
|
161
|
+
<real>1000</real>
|
|
162
|
+
</dict>
|
|
163
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
164
|
+
<dict>
|
|
165
|
+
<key>omit</key>
|
|
166
|
+
<true/>
|
|
167
|
+
<key>weight</key>
|
|
168
|
+
<real>1100</real>
|
|
169
|
+
</dict>
|
|
170
|
+
<key>^Resources/Base\.lproj/</key>
|
|
171
|
+
<dict>
|
|
172
|
+
<key>weight</key>
|
|
173
|
+
<real>1010</real>
|
|
174
|
+
</dict>
|
|
175
|
+
<key>^[^/]+$</key>
|
|
176
|
+
<dict>
|
|
177
|
+
<key>nested</key>
|
|
178
|
+
<true/>
|
|
179
|
+
<key>weight</key>
|
|
180
|
+
<real>10</real>
|
|
181
|
+
</dict>
|
|
182
|
+
<key>^embedded\.provisionprofile$</key>
|
|
183
|
+
<dict>
|
|
184
|
+
<key>weight</key>
|
|
185
|
+
<real>20</real>
|
|
186
|
+
</dict>
|
|
187
|
+
<key>^version\.plist$</key>
|
|
188
|
+
<dict>
|
|
189
|
+
<key>weight</key>
|
|
190
|
+
<real>20</real>
|
|
191
|
+
</dict>
|
|
192
|
+
</dict>
|
|
193
|
+
</dict>
|
|
194
|
+
</plist>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
5
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'">
|
|
6
|
+
|
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
8
|
+
|
|
9
|
+
<link rel="stylesheet" href="../Style.css">
|
|
10
|
+
<script src="../Script.js" defer></script>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<img src="../Icon.png" width="128" height="128" alt="Safari Pilot Icon">
|
|
14
|
+
<p class="state-unknown">You can turn on Safari Pilot’s extension in Safari Extensions preferences.</p>
|
|
15
|
+
<p class="state-on">Safari Pilot’s extension is currently on. You can turn it off in Safari Extensions preferences.</p>
|
|
16
|
+
<p class="state-off">Safari Pilot’s extension is currently off. You can turn it on in Safari Extensions preferences.</p>
|
|
17
|
+
<button class="open-preferences">Quit and Open Safari Extensions Preferences…</button>
|
|
18
|
+
</body>
|
|
19
|
+
</html>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function show(enabled, useSettingsInsteadOfPreferences) {
|
|
2
|
+
if (useSettingsInsteadOfPreferences) {
|
|
3
|
+
document.getElementsByClassName('state-on')[0].innerText = "Safari Pilot’s extension is currently on. You can turn it off in the Extensions section of Safari Settings.";
|
|
4
|
+
document.getElementsByClassName('state-off')[0].innerText = "Safari Pilot’s extension is currently off. You can turn it on in the Extensions section of Safari Settings.";
|
|
5
|
+
document.getElementsByClassName('state-unknown')[0].innerText = "You can turn on Safari Pilot’s extension in the Extensions section of Safari Settings.";
|
|
6
|
+
document.getElementsByClassName('open-preferences')[0].innerText = "Quit and Open Safari Settings…";
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
if (typeof enabled === "boolean") {
|
|
10
|
+
document.body.classList.toggle(`state-on`, enabled);
|
|
11
|
+
document.body.classList.toggle(`state-off`, !enabled);
|
|
12
|
+
} else {
|
|
13
|
+
document.body.classList.remove(`state-on`);
|
|
14
|
+
document.body.classList.remove(`state-off`);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function openPreferences() {
|
|
19
|
+
webkit.messageHandlers.controller.postMessage("open-preferences");
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
document.querySelector("button.open-preferences").addEventListener("click", openPreferences);
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
* {
|
|
2
|
+
-webkit-user-select: none;
|
|
3
|
+
-webkit-user-drag: none;
|
|
4
|
+
cursor: default;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
color-scheme: light dark;
|
|
9
|
+
|
|
10
|
+
--spacing: 20px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
html {
|
|
14
|
+
height: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: center;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
|
|
23
|
+
gap: var(--spacing);
|
|
24
|
+
margin: 0 calc(var(--spacing) * 2);
|
|
25
|
+
height: 100%;
|
|
26
|
+
|
|
27
|
+
font: -apple-system-short-body;
|
|
28
|
+
text-align: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
body:not(.state-on, .state-off) :is(.state-on, .state-off) {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body.state-on :is(.state-off, .state-unknown) {
|
|
36
|
+
display: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
body.state-off :is(.state-on, .state-unknown) {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
button {
|
|
44
|
+
font-size: 1em;
|
|
45
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>files</key>
|
|
6
|
+
<dict>
|
|
7
|
+
<key>Resources/AppIcon.icns</key>
|
|
8
|
+
<data>
|
|
9
|
+
6oPwtkN6V2P2IGtObXQCg25d12U=
|
|
10
|
+
</data>
|
|
11
|
+
<key>Resources/Assets.car</key>
|
|
12
|
+
<data>
|
|
13
|
+
P3s4SnQOfSO0S3OEo7ESicrla+E=
|
|
14
|
+
</data>
|
|
15
|
+
<key>Resources/Base.lproj/Main.html</key>
|
|
16
|
+
<data>
|
|
17
|
+
ck0or/hjnVtM10NoY8S6Kve7n58=
|
|
18
|
+
</data>
|
|
19
|
+
<key>Resources/Base.lproj/Main.storyboardc/Info.plist</key>
|
|
20
|
+
<data>
|
|
21
|
+
fsSXicvXuSgX4uqNLVj2Cc0jt0o=
|
|
22
|
+
</data>
|
|
23
|
+
<key>Resources/Base.lproj/Main.storyboardc/MainMenu.nib</key>
|
|
24
|
+
<data>
|
|
25
|
+
Ydw0ENnnCVTPKhxR12vF9bh5K90=
|
|
26
|
+
</data>
|
|
27
|
+
<key>Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib</key>
|
|
28
|
+
<data>
|
|
29
|
+
Am4HlE4kpa5zGAJAjaHJzmEbKXc=
|
|
30
|
+
</data>
|
|
31
|
+
<key>Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib</key>
|
|
32
|
+
<data>
|
|
33
|
+
IEB8o0QahsRIKP6JdWQykuYPsyM=
|
|
34
|
+
</data>
|
|
35
|
+
<key>Resources/Icon.png</key>
|
|
36
|
+
<data>
|
|
37
|
+
0bJV02TeCwVKnrLRXPbeK5w9CWE=
|
|
38
|
+
</data>
|
|
39
|
+
<key>Resources/Script.js</key>
|
|
40
|
+
<data>
|
|
41
|
+
yxJd7X0wpmjNDtAjC7Bb9GdVrtA=
|
|
42
|
+
</data>
|
|
43
|
+
<key>Resources/Style.css</key>
|
|
44
|
+
<data>
|
|
45
|
+
t+aBkmQ69W7040SLh12DsgyoDKc=
|
|
46
|
+
</data>
|
|
47
|
+
</dict>
|
|
48
|
+
<key>files2</key>
|
|
49
|
+
<dict>
|
|
50
|
+
<key>PlugIns/Safari Pilot Extension.appex</key>
|
|
51
|
+
<dict>
|
|
52
|
+
<key>cdhash</key>
|
|
53
|
+
<data>
|
|
54
|
+
cTYpRmTuK4nMu0eyyBx63jp4hzs=
|
|
55
|
+
</data>
|
|
56
|
+
<key>requirement</key>
|
|
57
|
+
<string>identifier "com.safari-pilot.app.Extension" and anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] /* exists */ and certificate leaf[field.1.2.840.113635.100.6.1.13] /* exists */ and certificate leaf[subject.OU] = V37WLKRXUJ</string>
|
|
58
|
+
</dict>
|
|
59
|
+
<key>Resources/AppIcon.icns</key>
|
|
60
|
+
<dict>
|
|
61
|
+
<key>hash2</key>
|
|
62
|
+
<data>
|
|
63
|
+
/CdlAnvX1/Pfr/kDJ9U+2fWlwd6DkY4kmPO+rd+Iwfw=
|
|
64
|
+
</data>
|
|
65
|
+
</dict>
|
|
66
|
+
<key>Resources/Assets.car</key>
|
|
67
|
+
<dict>
|
|
68
|
+
<key>hash2</key>
|
|
69
|
+
<data>
|
|
70
|
+
y3jWe2XXOUFTQJWLnRtZNBjpI2u13BvhFAOkDSekIrs=
|
|
71
|
+
</data>
|
|
72
|
+
</dict>
|
|
73
|
+
<key>Resources/Base.lproj/Main.html</key>
|
|
74
|
+
<dict>
|
|
75
|
+
<key>hash2</key>
|
|
76
|
+
<data>
|
|
77
|
+
VFXN2jf5qqpDXxemfbgNx0TJVZhpvEbdp7d/WPmWDT4=
|
|
78
|
+
</data>
|
|
79
|
+
</dict>
|
|
80
|
+
<key>Resources/Base.lproj/Main.storyboardc/Info.plist</key>
|
|
81
|
+
<dict>
|
|
82
|
+
<key>hash2</key>
|
|
83
|
+
<data>
|
|
84
|
+
DqnfX1/47/7tF4tqFw4faFQQ4ZY22JXxC6R6Tq1lz4Y=
|
|
85
|
+
</data>
|
|
86
|
+
</dict>
|
|
87
|
+
<key>Resources/Base.lproj/Main.storyboardc/MainMenu.nib</key>
|
|
88
|
+
<dict>
|
|
89
|
+
<key>hash2</key>
|
|
90
|
+
<data>
|
|
91
|
+
iP4l9avYR1vMxXTZXeN07PLg9l+mTly0rAUHrsrTK58=
|
|
92
|
+
</data>
|
|
93
|
+
</dict>
|
|
94
|
+
<key>Resources/Base.lproj/Main.storyboardc/NSWindowController-B8D-0N-5wS.nib</key>
|
|
95
|
+
<dict>
|
|
96
|
+
<key>hash2</key>
|
|
97
|
+
<data>
|
|
98
|
+
sLOJ8XsI4tMsytNqVBJt51fEdOQh9LVou7/WD9OWoVk=
|
|
99
|
+
</data>
|
|
100
|
+
</dict>
|
|
101
|
+
<key>Resources/Base.lproj/Main.storyboardc/XfG-lQ-9wD-view-m2S-Jp-Qdl.nib</key>
|
|
102
|
+
<dict>
|
|
103
|
+
<key>hash2</key>
|
|
104
|
+
<data>
|
|
105
|
+
nrPpjT/5jj8DSbrTOD0wCeMRdkk2EtRmIUSyV1eaQ20=
|
|
106
|
+
</data>
|
|
107
|
+
</dict>
|
|
108
|
+
<key>Resources/Icon.png</key>
|
|
109
|
+
<dict>
|
|
110
|
+
<key>hash2</key>
|
|
111
|
+
<data>
|
|
112
|
+
n7wSLfe10Y/cLd5J1D1pTlDI/4sskPHlZkSuTHpHLmg=
|
|
113
|
+
</data>
|
|
114
|
+
</dict>
|
|
115
|
+
<key>Resources/Script.js</key>
|
|
116
|
+
<dict>
|
|
117
|
+
<key>hash2</key>
|
|
118
|
+
<data>
|
|
119
|
+
j23x3EZjtyrq0skyeszlZL5lwlxAhlicZQmrtx5puEo=
|
|
120
|
+
</data>
|
|
121
|
+
</dict>
|
|
122
|
+
<key>Resources/Style.css</key>
|
|
123
|
+
<dict>
|
|
124
|
+
<key>hash2</key>
|
|
125
|
+
<data>
|
|
126
|
+
q+Wk9OtVBjA4Pn7yawKyU+jPnflb3EnjEXZQ/STfhS0=
|
|
127
|
+
</data>
|
|
128
|
+
</dict>
|
|
129
|
+
</dict>
|
|
130
|
+
<key>rules</key>
|
|
131
|
+
<dict>
|
|
132
|
+
<key>^Resources/</key>
|
|
133
|
+
<true/>
|
|
134
|
+
<key>^Resources/.*\.lproj/</key>
|
|
135
|
+
<dict>
|
|
136
|
+
<key>optional</key>
|
|
137
|
+
<true/>
|
|
138
|
+
<key>weight</key>
|
|
139
|
+
<real>1000</real>
|
|
140
|
+
</dict>
|
|
141
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
142
|
+
<dict>
|
|
143
|
+
<key>omit</key>
|
|
144
|
+
<true/>
|
|
145
|
+
<key>weight</key>
|
|
146
|
+
<real>1100</real>
|
|
147
|
+
</dict>
|
|
148
|
+
<key>^Resources/Base\.lproj/</key>
|
|
149
|
+
<dict>
|
|
150
|
+
<key>weight</key>
|
|
151
|
+
<real>1010</real>
|
|
152
|
+
</dict>
|
|
153
|
+
<key>^version.plist$</key>
|
|
154
|
+
<true/>
|
|
155
|
+
</dict>
|
|
156
|
+
<key>rules2</key>
|
|
157
|
+
<dict>
|
|
158
|
+
<key>.*\.dSYM($|/)</key>
|
|
159
|
+
<dict>
|
|
160
|
+
<key>weight</key>
|
|
161
|
+
<real>11</real>
|
|
162
|
+
</dict>
|
|
163
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
164
|
+
<dict>
|
|
165
|
+
<key>omit</key>
|
|
166
|
+
<true/>
|
|
167
|
+
<key>weight</key>
|
|
168
|
+
<real>2000</real>
|
|
169
|
+
</dict>
|
|
170
|
+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
|
171
|
+
<dict>
|
|
172
|
+
<key>nested</key>
|
|
173
|
+
<true/>
|
|
174
|
+
<key>weight</key>
|
|
175
|
+
<real>10</real>
|
|
176
|
+
</dict>
|
|
177
|
+
<key>^.*</key>
|
|
178
|
+
<true/>
|
|
179
|
+
<key>^Info\.plist$</key>
|
|
180
|
+
<dict>
|
|
181
|
+
<key>omit</key>
|
|
182
|
+
<true/>
|
|
183
|
+
<key>weight</key>
|
|
184
|
+
<real>20</real>
|
|
185
|
+
</dict>
|
|
186
|
+
<key>^PkgInfo$</key>
|
|
187
|
+
<dict>
|
|
188
|
+
<key>omit</key>
|
|
189
|
+
<true/>
|
|
190
|
+
<key>weight</key>
|
|
191
|
+
<real>20</real>
|
|
192
|
+
</dict>
|
|
193
|
+
<key>^Resources/</key>
|
|
194
|
+
<dict>
|
|
195
|
+
<key>weight</key>
|
|
196
|
+
<real>20</real>
|
|
197
|
+
</dict>
|
|
198
|
+
<key>^Resources/.*\.lproj/</key>
|
|
199
|
+
<dict>
|
|
200
|
+
<key>optional</key>
|
|
201
|
+
<true/>
|
|
202
|
+
<key>weight</key>
|
|
203
|
+
<real>1000</real>
|
|
204
|
+
</dict>
|
|
205
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
206
|
+
<dict>
|
|
207
|
+
<key>omit</key>
|
|
208
|
+
<true/>
|
|
209
|
+
<key>weight</key>
|
|
210
|
+
<real>1100</real>
|
|
211
|
+
</dict>
|
|
212
|
+
<key>^Resources/Base\.lproj/</key>
|
|
213
|
+
<dict>
|
|
214
|
+
<key>weight</key>
|
|
215
|
+
<real>1010</real>
|
|
216
|
+
</dict>
|
|
217
|
+
<key>^[^/]+$</key>
|
|
218
|
+
<dict>
|
|
219
|
+
<key>nested</key>
|
|
220
|
+
<true/>
|
|
221
|
+
<key>weight</key>
|
|
222
|
+
<real>10</real>
|
|
223
|
+
</dict>
|
|
224
|
+
<key>^embedded\.provisionprofile$</key>
|
|
225
|
+
<dict>
|
|
226
|
+
<key>weight</key>
|
|
227
|
+
<real>20</real>
|
|
228
|
+
</dict>
|
|
229
|
+
<key>^version\.plist$</key>
|
|
230
|
+
<dict>
|
|
231
|
+
<key>weight</key>
|
|
232
|
+
<real>20</real>
|
|
233
|
+
</dict>
|
|
234
|
+
</dict>
|
|
235
|
+
</dict>
|
|
236
|
+
</plist>
|
|
Binary file
|
package/bin/SafariPilotd
ADDED
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Engine, ToolRequirements, EngineCapabilities } from './types.js';
|
|
2
|
+
export declare class EngineUnavailableError extends Error {
|
|
3
|
+
readonly code = "EXTENSION_REQUIRED";
|
|
4
|
+
constructor(message: string);
|
|
5
|
+
}
|
|
6
|
+
export declare const ENGINE_CAPS: Record<Engine, EngineCapabilities>;
|
|
7
|
+
export declare function selectEngine(tool: ToolRequirements, available: {
|
|
8
|
+
daemon: boolean;
|
|
9
|
+
extension: boolean;
|
|
10
|
+
}): Engine;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
export class EngineUnavailableError extends Error {
|
|
2
|
+
code = 'EXTENSION_REQUIRED';
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = 'EngineUnavailableError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export const ENGINE_CAPS = {
|
|
9
|
+
extension: {
|
|
10
|
+
shadowDom: true,
|
|
11
|
+
cspBypass: true,
|
|
12
|
+
dialogIntercept: true,
|
|
13
|
+
networkIntercept: true,
|
|
14
|
+
cookieHttpOnly: true,
|
|
15
|
+
framesCrossOrigin: true,
|
|
16
|
+
latencyMs: 10,
|
|
17
|
+
},
|
|
18
|
+
daemon: {
|
|
19
|
+
shadowDom: false,
|
|
20
|
+
cspBypass: false,
|
|
21
|
+
dialogIntercept: false,
|
|
22
|
+
networkIntercept: false,
|
|
23
|
+
cookieHttpOnly: false,
|
|
24
|
+
framesCrossOrigin: false,
|
|
25
|
+
latencyMs: 5,
|
|
26
|
+
},
|
|
27
|
+
applescript: {
|
|
28
|
+
shadowDom: false,
|
|
29
|
+
cspBypass: false,
|
|
30
|
+
dialogIntercept: false,
|
|
31
|
+
networkIntercept: false,
|
|
32
|
+
cookieHttpOnly: false,
|
|
33
|
+
framesCrossOrigin: false,
|
|
34
|
+
latencyMs: 80,
|
|
35
|
+
},
|
|
36
|
+
};
|
|
37
|
+
export function selectEngine(tool, available) {
|
|
38
|
+
const needsExtension = tool.requiresShadowDom ||
|
|
39
|
+
tool.requiresCspBypass ||
|
|
40
|
+
tool.requiresDialogIntercept ||
|
|
41
|
+
tool.requiresNetworkIntercept ||
|
|
42
|
+
tool.requiresCookieHttpOnly ||
|
|
43
|
+
tool.requiresFramesCrossOrigin;
|
|
44
|
+
if (needsExtension) {
|
|
45
|
+
if (available.extension)
|
|
46
|
+
return 'extension';
|
|
47
|
+
throw new EngineUnavailableError('This operation requires the Safari Web Extension which is not available');
|
|
48
|
+
}
|
|
49
|
+
if (available.extension)
|
|
50
|
+
return 'extension';
|
|
51
|
+
if (available.daemon)
|
|
52
|
+
return 'daemon';
|
|
53
|
+
return 'applescript';
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=engine-selector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"engine-selector.js","sourceRoot":"","sources":["../src/engine-selector.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,sBAAuB,SAAQ,KAAK;IACtC,IAAI,GAAG,oBAAoB,CAAC;IACrC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AAED,MAAM,CAAC,MAAM,WAAW,GAAuC;IAC7D,SAAS,EAAE;QACT,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,IAAI;QACf,eAAe,EAAE,IAAI;QACrB,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE,IAAI;QACpB,iBAAiB,EAAE,IAAI;QACvB,SAAS,EAAE,EAAE;KACd;IACD,MAAM,EAAE;QACN,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;QACtB,gBAAgB,EAAE,KAAK;QACvB,cAAc,EAAE,KAAK;QACrB,iBAAiB,EAAE,KAAK;QACxB,SAAS,EAAE,CAAC;KACb;IACD,WAAW,EAAE;QACX,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,KAAK;QAChB,eAAe,EAAE,KAAK;QACtB,gBAAgB,EAAE,KAAK;QACvB,cAAc,EAAE,KAAK;QACrB,iBAAiB,EAAE,KAAK;QACxB,SAAS,EAAE,EAAE;KACd;CACF,CAAC;AAEF,MAAM,UAAU,YAAY,CAC1B,IAAsB,EACtB,SAAkD;IAElD,MAAM,cAAc,GAClB,IAAI,CAAC,iBAAiB;QACtB,IAAI,CAAC,iBAAiB;QACtB,IAAI,CAAC,uBAAuB;QAC5B,IAAI,CAAC,wBAAwB;QAC7B,IAAI,CAAC,sBAAsB;QAC3B,IAAI,CAAC,yBAAyB,CAAC;IAEjC,IAAI,cAAc,EAAE,CAAC;QACnB,IAAI,SAAS,CAAC,SAAS;YAAE,OAAO,WAAW,CAAC;QAC5C,MAAM,IAAI,sBAAsB,CAC9B,yEAAyE,CAC1E,CAAC;IACJ,CAAC;IAED,IAAI,SAAS,CAAC,SAAS;QAAE,OAAO,WAAW,CAAC;IAC5C,IAAI,SAAS,CAAC,MAAM;QAAE,OAAO,QAAQ,CAAC;IACtC,OAAO,aAAa,CAAC;AACvB,CAAC"}
|