@orbit-build/cli 3.3.0 → 3.4.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/README.md +5 -2
- package/dist/Orbit Browser.app/Contents/Info.plist +12 -0
- package/dist/Orbit Browser.app/Contents/MacOS/OrbitBrowser +0 -0
- package/dist/Orbit Browser.app/Contents/Resources/Targets.js +58 -0
- package/dist/Orbit Browser.app/Contents/_CodeSignature/CodeResources +128 -0
- package/dist/index.js +5426 -4157
- package/dist/safari-extension/page.js +1 -1
- package/dist/safari-extension/popup.css +14 -10
- package/dist/safari-extension/popup.js +18 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -66,7 +66,9 @@ For automation, `orbit exec - --max-turns 8 --jsonl < task.md` reads a multiline
|
|
|
66
66
|
|
|
67
67
|
### Safari workspace
|
|
68
68
|
|
|
69
|
-
On macOS
|
|
69
|
+
On macOS 14+, run `orbit webui --browser` to open the bundled Orbit Browser with chat and a native WebKit page in one window. Choose **Allow agent** on the desired site for the current chat to inspect and click visible links and buttons. Choose **Take over** to return to manual control.
|
|
70
|
+
|
|
71
|
+
In the workspace, open **Add context → Safari** to browse an HTTPS site or a localhost preview beside your chat. For sharing selected text or reviewing form drafts on the original site, connect the workspace from the Safari extension. On a website, use the toolbar to bring its title, address and selected text into an editable Orbit draft. The address omits its query and fragment. You decide when to send. For a form, select the relevant field, request a draft, review the proposed values and submit on the website. Use `orbit webui --safari-extension-path` to locate the extension.
|
|
70
72
|
|
|
71
73
|
## Reusable prompt workflows
|
|
72
74
|
|
|
@@ -369,7 +371,8 @@ orbit backup restore <file> # refuses existing files without --force
|
|
|
369
371
|
orbit clean --project # preview project-owned cleanup
|
|
370
372
|
orbit clean --user # preview user-owned cleanup
|
|
371
373
|
orbit sessions retention --older-than 30 --max-bytes 1073741824 # preview session retention
|
|
372
|
-
|
|
374
|
+
orbit uninstall # optionally erase credentials, user data and all registered projects’ Orbit data
|
|
375
|
+
orbit uninstall --yes # remove the program and keep all data
|
|
373
376
|
```
|
|
374
377
|
|
|
375
378
|
Cleanup never removes source files, `ORBIT.md`, or `orbit.config.yaml`.
|
|
@@ -0,0 +1,12 @@
|
|
|
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"><dict>
|
|
4
|
+
<key>CFBundleIdentifier</key><string>org.orbit-build.browser</string>
|
|
5
|
+
<key>CFBundleName</key><string>Orbit Browser</string>
|
|
6
|
+
<key>CFBundleExecutable</key><string>OrbitBrowser</string>
|
|
7
|
+
<key>CFBundlePackageType</key><string>APPL</string>
|
|
8
|
+
<key>CFBundleVersion</key><string>1</string>
|
|
9
|
+
<key>LSMinimumSystemVersion</key><string>14.0</string>
|
|
10
|
+
<key>NSHighResolutionCapable</key><true/>
|
|
11
|
+
<key>NSAppTransportSecurity</key><dict><key>NSAllowsLocalNetworking</key><true/></dict>
|
|
12
|
+
</dict></plist>
|
|
Binary file
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// Runs in a WebKit isolated content world. The page and model cannot supply scripts.
|
|
2
|
+
(() => {
|
|
3
|
+
const targets = new Map();
|
|
4
|
+
let observedURL;
|
|
5
|
+
function visible(el) {
|
|
6
|
+
if (!el?.isConnected || el.closest("[inert],[hidden],[aria-hidden=true]")) return false;
|
|
7
|
+
for (let parent = el; parent; parent = parent.parentElement) {
|
|
8
|
+
const style = getComputedStyle(parent);
|
|
9
|
+
if (style.opacity === "0" || style.visibility !== "visible" || style.display === "none") return false;
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
function labelOf(el) {
|
|
14
|
+
const refs = (el.getAttribute("aria-labelledby") || "").trim().split(/\s+/).slice(0, 8);
|
|
15
|
+
const editable = "input,textarea,select,[contenteditable]:not([contenteditable=false])";
|
|
16
|
+
const named = refs.filter(Boolean).map(id => document.getElementById(id))
|
|
17
|
+
.filter(node => visible(node) && !node.closest(editable) && !node.querySelector(editable))
|
|
18
|
+
.map(node => node.innerText?.trim().slice(0, 120)).filter(Boolean).join(" ");
|
|
19
|
+
const icon = el.querySelector("img[alt],svg");
|
|
20
|
+
const iconName = visible(icon) && (icon.getAttribute("alt") || icon.querySelector("title")?.textContent);
|
|
21
|
+
return (named || el.getAttribute("aria-label")?.trim() || el.innerText?.trim() || iconName || el.title || "")
|
|
22
|
+
.replace(/[\u202a-\u202e\u2066-\u2069]/g, "").replace(/\s+/g, " ").trim().slice(0, 120);
|
|
23
|
+
}
|
|
24
|
+
function inspect(el) {
|
|
25
|
+
if (!visible(el) || el.matches(":disabled,[aria-disabled=true]")) return;
|
|
26
|
+
const r = el.getBoundingClientRect();
|
|
27
|
+
const x = (Math.max(0, r.left) + Math.min(innerWidth, r.right)) / 2;
|
|
28
|
+
const y = (Math.max(0, r.top) + Math.min(innerHeight, r.bottom)) / 2;
|
|
29
|
+
if (r.width < 2 || r.height < 2 || !el.contains(document.elementFromPoint(x, y))) return;
|
|
30
|
+
const role = el.matches("a[href]") ? "link" : "button";
|
|
31
|
+
const label = labelOf(el);
|
|
32
|
+
return label && { role, label, href: role === "link" ? el.href : "" };
|
|
33
|
+
}
|
|
34
|
+
globalThis.orbitObserve = () => {
|
|
35
|
+
targets.clear();
|
|
36
|
+
observedURL = location.href;
|
|
37
|
+
const controls = [];
|
|
38
|
+
let inspected = 0;
|
|
39
|
+
for (const el of document.querySelectorAll("button,a[href],[role=button]")) {
|
|
40
|
+
if (++inspected > 2000) break;
|
|
41
|
+
const info = inspect(el);
|
|
42
|
+
if (!info) continue;
|
|
43
|
+
const id = crypto.randomUUID();
|
|
44
|
+
targets.set(id, { el, ...info });
|
|
45
|
+
controls.push({ id, label: info.label, role: info.role });
|
|
46
|
+
if (controls.length === 48) break;
|
|
47
|
+
}
|
|
48
|
+
return { site: location.origin, title: document.title.slice(0, 160), controls };
|
|
49
|
+
};
|
|
50
|
+
globalThis.orbitClick = id => {
|
|
51
|
+
const target = targets.get(id);
|
|
52
|
+
targets.clear();
|
|
53
|
+
const now = observedURL === location.href && target && inspect(target.el);
|
|
54
|
+
if (!now || now.label !== target.label || now.role !== target.role || now.href !== target.href) return false;
|
|
55
|
+
target.el.click();
|
|
56
|
+
return now.label;
|
|
57
|
+
};
|
|
58
|
+
})();
|
|
@@ -0,0 +1,128 @@
|
|
|
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/Targets.js</key>
|
|
8
|
+
<data>
|
|
9
|
+
Seal+2209HbXZcmvbMWwmj4etMs=
|
|
10
|
+
</data>
|
|
11
|
+
</dict>
|
|
12
|
+
<key>files2</key>
|
|
13
|
+
<dict>
|
|
14
|
+
<key>Resources/Targets.js</key>
|
|
15
|
+
<dict>
|
|
16
|
+
<key>hash2</key>
|
|
17
|
+
<data>
|
|
18
|
+
NT+b9ocvCWjqlLY6cXjFNkzSfaqQavsiQructQpl7+o=
|
|
19
|
+
</data>
|
|
20
|
+
</dict>
|
|
21
|
+
</dict>
|
|
22
|
+
<key>rules</key>
|
|
23
|
+
<dict>
|
|
24
|
+
<key>^Resources/</key>
|
|
25
|
+
<true/>
|
|
26
|
+
<key>^Resources/.*\.lproj/</key>
|
|
27
|
+
<dict>
|
|
28
|
+
<key>optional</key>
|
|
29
|
+
<true/>
|
|
30
|
+
<key>weight</key>
|
|
31
|
+
<real>1000</real>
|
|
32
|
+
</dict>
|
|
33
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
34
|
+
<dict>
|
|
35
|
+
<key>omit</key>
|
|
36
|
+
<true/>
|
|
37
|
+
<key>weight</key>
|
|
38
|
+
<real>1100</real>
|
|
39
|
+
</dict>
|
|
40
|
+
<key>^Resources/Base\.lproj/</key>
|
|
41
|
+
<dict>
|
|
42
|
+
<key>weight</key>
|
|
43
|
+
<real>1010</real>
|
|
44
|
+
</dict>
|
|
45
|
+
<key>^version.plist$</key>
|
|
46
|
+
<true/>
|
|
47
|
+
</dict>
|
|
48
|
+
<key>rules2</key>
|
|
49
|
+
<dict>
|
|
50
|
+
<key>.*\.dSYM($|/)</key>
|
|
51
|
+
<dict>
|
|
52
|
+
<key>weight</key>
|
|
53
|
+
<real>11</real>
|
|
54
|
+
</dict>
|
|
55
|
+
<key>^(.*/)?\.DS_Store$</key>
|
|
56
|
+
<dict>
|
|
57
|
+
<key>omit</key>
|
|
58
|
+
<true/>
|
|
59
|
+
<key>weight</key>
|
|
60
|
+
<real>2000</real>
|
|
61
|
+
</dict>
|
|
62
|
+
<key>^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/</key>
|
|
63
|
+
<dict>
|
|
64
|
+
<key>nested</key>
|
|
65
|
+
<true/>
|
|
66
|
+
<key>weight</key>
|
|
67
|
+
<real>10</real>
|
|
68
|
+
</dict>
|
|
69
|
+
<key>^.*</key>
|
|
70
|
+
<true/>
|
|
71
|
+
<key>^Info\.plist$</key>
|
|
72
|
+
<dict>
|
|
73
|
+
<key>omit</key>
|
|
74
|
+
<true/>
|
|
75
|
+
<key>weight</key>
|
|
76
|
+
<real>20</real>
|
|
77
|
+
</dict>
|
|
78
|
+
<key>^PkgInfo$</key>
|
|
79
|
+
<dict>
|
|
80
|
+
<key>omit</key>
|
|
81
|
+
<true/>
|
|
82
|
+
<key>weight</key>
|
|
83
|
+
<real>20</real>
|
|
84
|
+
</dict>
|
|
85
|
+
<key>^Resources/</key>
|
|
86
|
+
<dict>
|
|
87
|
+
<key>weight</key>
|
|
88
|
+
<real>20</real>
|
|
89
|
+
</dict>
|
|
90
|
+
<key>^Resources/.*\.lproj/</key>
|
|
91
|
+
<dict>
|
|
92
|
+
<key>optional</key>
|
|
93
|
+
<true/>
|
|
94
|
+
<key>weight</key>
|
|
95
|
+
<real>1000</real>
|
|
96
|
+
</dict>
|
|
97
|
+
<key>^Resources/.*\.lproj/locversion.plist$</key>
|
|
98
|
+
<dict>
|
|
99
|
+
<key>omit</key>
|
|
100
|
+
<true/>
|
|
101
|
+
<key>weight</key>
|
|
102
|
+
<real>1100</real>
|
|
103
|
+
</dict>
|
|
104
|
+
<key>^Resources/Base\.lproj/</key>
|
|
105
|
+
<dict>
|
|
106
|
+
<key>weight</key>
|
|
107
|
+
<real>1010</real>
|
|
108
|
+
</dict>
|
|
109
|
+
<key>^[^/]+$</key>
|
|
110
|
+
<dict>
|
|
111
|
+
<key>nested</key>
|
|
112
|
+
<true/>
|
|
113
|
+
<key>weight</key>
|
|
114
|
+
<real>10</real>
|
|
115
|
+
</dict>
|
|
116
|
+
<key>^embedded\.provisionprofile$</key>
|
|
117
|
+
<dict>
|
|
118
|
+
<key>weight</key>
|
|
119
|
+
<real>20</real>
|
|
120
|
+
</dict>
|
|
121
|
+
<key>^version\.plist$</key>
|
|
122
|
+
<dict>
|
|
123
|
+
<key>weight</key>
|
|
124
|
+
<real>20</real>
|
|
125
|
+
</dict>
|
|
126
|
+
</dict>
|
|
127
|
+
</dict>
|
|
128
|
+
</plist>
|