opensteer 0.6.13 → 0.7.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 +256 -184
- package/dist/chunk-PQYA6IX2.js +32571 -0
- package/dist/chunk-PQYA6IX2.js.map +1 -0
- package/dist/cli/bin.cjs +38201 -0
- package/dist/cli/bin.cjs.map +1 -0
- package/dist/cli/bin.d.cts +1 -0
- package/dist/cli/bin.d.ts +1 -0
- package/dist/cli/bin.js +5612 -0
- package/dist/cli/bin.js.map +1 -0
- package/dist/index.cjs +31309 -16009
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +4440 -670
- package/dist/index.d.ts +4440 -670
- package/dist/index.js +438 -378
- package/dist/index.js.map +1 -0
- package/package.json +56 -62
- package/skills/README.md +21 -20
- package/skills/opensteer/SKILL.md +60 -194
- package/skills/opensteer/references/cli-reference.md +69 -113
- package/skills/opensteer/references/request-workflow.md +81 -0
- package/skills/opensteer/references/sdk-reference.md +101 -154
- package/CHANGELOG.md +0 -75
- package/bin/opensteer.mjs +0 -1423
- package/dist/browser-profile-client-CGXc0-P9.d.cts +0 -228
- package/dist/browser-profile-client-DHLzMf-K.d.ts +0 -228
- package/dist/chunk-2ES46WCO.js +0 -1437
- package/dist/chunk-3H5RRIMZ.js +0 -69
- package/dist/chunk-AVXUMEDG.js +0 -62
- package/dist/chunk-DN3GI5CH.js +0 -57
- package/dist/chunk-FAHE5DB2.js +0 -190
- package/dist/chunk-HBTSQ2V4.js +0 -15259
- package/dist/chunk-K5CL76MG.js +0 -81
- package/dist/chunk-U724TBY6.js +0 -1262
- package/dist/chunk-ZRCFF546.js +0 -77
- package/dist/cli/auth.cjs +0 -2022
- package/dist/cli/auth.d.cts +0 -114
- package/dist/cli/auth.d.ts +0 -114
- package/dist/cli/auth.js +0 -15
- package/dist/cli/local-profile.cjs +0 -197
- package/dist/cli/local-profile.d.cts +0 -18
- package/dist/cli/local-profile.d.ts +0 -18
- package/dist/cli/local-profile.js +0 -97
- package/dist/cli/profile.cjs +0 -18548
- package/dist/cli/profile.d.cts +0 -79
- package/dist/cli/profile.d.ts +0 -79
- package/dist/cli/profile.js +0 -1328
- package/dist/cli/server.cjs +0 -17232
- package/dist/cli/server.d.cts +0 -2
- package/dist/cli/server.d.ts +0 -2
- package/dist/cli/server.js +0 -977
- package/dist/cli/skills-installer.cjs +0 -230
- package/dist/cli/skills-installer.d.cts +0 -28
- package/dist/cli/skills-installer.d.ts +0 -28
- package/dist/cli/skills-installer.js +0 -201
- package/dist/extractor-4Q3TFZJB.js +0 -8
- package/dist/resolver-MGN64KCP.js +0 -7
- package/dist/types-Cr10igF3.d.cts +0 -345
- package/dist/types-Cr10igF3.d.ts +0 -345
- package/skills/electron/SKILL.md +0 -87
- package/skills/electron/references/opensteer-electron-recipes.md +0 -88
- package/skills/electron/references/opensteer-electron-workflow.md +0 -85
- package/skills/opensteer/references/examples.md +0 -118
package/skills/electron/SKILL.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: electron
|
|
3
|
-
description: "Automate Electron desktop apps (Slack, VS Code, Discord, Notion, and other Chromium-based desktop apps) with Opensteer by connecting to a running Chrome DevTools endpoint. Use when tasks require interacting with Electron UI, testing desktop app workflows, extracting structured data from app windows, or capturing Electron screenshots."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Electron App Automation with Opensteer
|
|
7
|
-
|
|
8
|
-
Use this skill when a task targets an Electron desktop app instead of a normal browser tab.
|
|
9
|
-
|
|
10
|
-
Read [opensteer-electron-workflow.md](references/opensteer-electron-workflow.md) first for the Opensteer connection model and execution flow.
|
|
11
|
-
|
|
12
|
-
## Core Workflow
|
|
13
|
-
|
|
14
|
-
1. Launch the Electron app with `--remote-debugging-port=<port>`.
|
|
15
|
-
2. Connect Opensteer with `open --cdp-url http://127.0.0.1:<port>`.
|
|
16
|
-
3. List windows/webviews with `tabs`, then switch with `tab-switch`.
|
|
17
|
-
4. Run `snapshot action`, interact (`click`, `input`, `press`), then re-snapshot.
|
|
18
|
-
5. Use `snapshot extraction` and `extract` for structured data.
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# Connect Opensteer to a running Electron app on port 9222
|
|
22
|
-
opensteer open --cdp-url http://127.0.0.1:9222 --session slack-desktop --name slack-desktop
|
|
23
|
-
|
|
24
|
-
# Discover available windows/webviews
|
|
25
|
-
opensteer tabs --session slack-desktop
|
|
26
|
-
opensteer tab-switch 0 --session slack-desktop
|
|
27
|
-
|
|
28
|
-
# Standard action loop
|
|
29
|
-
opensteer snapshot action --session slack-desktop
|
|
30
|
-
opensteer click 12 --session slack-desktop
|
|
31
|
-
opensteer input 8 "release notes" --pressEnter --session slack-desktop
|
|
32
|
-
opensteer snapshot action --session slack-desktop
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Launching Electron Apps
|
|
36
|
-
|
|
37
|
-
If the app is already running, quit it first, then relaunch with the debugging flag.
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# macOS examples
|
|
41
|
-
open -a "Slack" --args --remote-debugging-port=9222
|
|
42
|
-
open -a "Visual Studio Code" --args --remote-debugging-port=9223
|
|
43
|
-
open -a "Discord" --args --remote-debugging-port=9224
|
|
44
|
-
|
|
45
|
-
# Linux examples
|
|
46
|
-
slack --remote-debugging-port=9222
|
|
47
|
-
code --remote-debugging-port=9223
|
|
48
|
-
discord --remote-debugging-port=9224
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
## Structured Extraction Pattern
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
opensteer snapshot extraction --session slack-desktop
|
|
55
|
-
|
|
56
|
-
opensteer extract '{"channels":[{"name":{"element":21},"unread":{"element":22}}]}' \
|
|
57
|
-
--description "sidebar channels with unread state" \
|
|
58
|
-
--session slack-desktop
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Use `--description` when possible so selector paths persist for replay.
|
|
62
|
-
|
|
63
|
-
## Multiple Apps at Once
|
|
64
|
-
|
|
65
|
-
Use one Opensteer session per app:
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
opensteer open --cdp-url http://127.0.0.1:9222 --session slack --name slack-electron
|
|
69
|
-
opensteer open --cdp-url http://127.0.0.1:9223 --session vscode --name vscode-electron
|
|
70
|
-
|
|
71
|
-
opensteer snapshot action --session slack
|
|
72
|
-
opensteer snapshot action --session vscode
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Guardrails
|
|
76
|
-
|
|
77
|
-
- Prefer Opensteer commands over raw Playwright for interaction/extraction.
|
|
78
|
-
- Re-snapshot after each navigation or large UI change before reusing counters.
|
|
79
|
-
- Keep `--name` stable inside a session for deterministic selector replay.
|
|
80
|
-
- Close sessions when done: `opensteer close --session <id>`.
|
|
81
|
-
- If the app has no visible page targets, Opensteer creates one automatically.
|
|
82
|
-
- If `--cdp-url` connection fails, verify with `curl -s http://127.0.0.1:<port>/json/version`.
|
|
83
|
-
|
|
84
|
-
## References
|
|
85
|
-
|
|
86
|
-
- [opensteer-electron-workflow.md](references/opensteer-electron-workflow.md)
|
|
87
|
-
- [opensteer-electron-recipes.md](references/opensteer-electron-recipes.md)
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# Opensteer Electron Recipes
|
|
2
|
-
|
|
3
|
-
## Launch Commands
|
|
4
|
-
|
|
5
|
-
Relaunch the app with a debugging port before connecting.
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
# macOS
|
|
9
|
-
open -a "Slack" --args --remote-debugging-port=9222
|
|
10
|
-
open -a "Visual Studio Code" --args --remote-debugging-port=9223
|
|
11
|
-
open -a "Discord" --args --remote-debugging-port=9224
|
|
12
|
-
|
|
13
|
-
# Linux
|
|
14
|
-
slack --remote-debugging-port=9222
|
|
15
|
-
code --remote-debugging-port=9223
|
|
16
|
-
discord --remote-debugging-port=9224
|
|
17
|
-
|
|
18
|
-
# Windows (PowerShell examples)
|
|
19
|
-
"$env:LOCALAPPDATA\slack\slack.exe" --remote-debugging-port=9222
|
|
20
|
-
"$env:LOCALAPPDATA\Programs\Microsoft VS Code\Code.exe" --remote-debugging-port=9223
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Optional health check:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
curl -s http://127.0.0.1:9222/json/version
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
## Connect and Select Target
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
opensteer open --cdp-url http://127.0.0.1:9222 --session electron --name electron
|
|
33
|
-
opensteer tabs --session electron
|
|
34
|
-
opensteer tab-switch 0 --session electron
|
|
35
|
-
opensteer snapshot action --session electron
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
If the wrong content appears, iterate with `tab-switch` and `snapshot action` until you reach the correct window/webview.
|
|
39
|
-
|
|
40
|
-
## Navigation and Interaction
|
|
41
|
-
|
|
42
|
-
```bash
|
|
43
|
-
opensteer snapshot action --session electron
|
|
44
|
-
opensteer click 11 --description "left sidebar channel" --session electron
|
|
45
|
-
opensteer input 7 "deployment notes" --pressEnter --description "search input" --session electron
|
|
46
|
-
opensteer press Enter --session electron
|
|
47
|
-
opensteer screenshot electron-state.png --session electron
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Structured Data Extraction
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# Inspect extraction-focused DOM
|
|
54
|
-
opensteer snapshot extraction --session electron
|
|
55
|
-
|
|
56
|
-
# Build schema from observed counters
|
|
57
|
-
opensteer extract '{"items":[{"title":{"element":15},"meta":{"element":16}}]}' \
|
|
58
|
-
--description "visible item list with metadata" \
|
|
59
|
-
--session electron
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Multi-App Pattern
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
# Slack
|
|
66
|
-
opensteer open --cdp-url http://127.0.0.1:9222 --session slack --name slack-electron
|
|
67
|
-
|
|
68
|
-
# VS Code
|
|
69
|
-
opensteer open --cdp-url http://127.0.0.1:9223 --session vscode --name vscode-electron
|
|
70
|
-
|
|
71
|
-
opensteer snapshot action --session slack
|
|
72
|
-
opensteer snapshot action --session vscode
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Troubleshooting
|
|
76
|
-
|
|
77
|
-
- `connection refused`:
|
|
78
|
-
- App was not launched with `--remote-debugging-port`.
|
|
79
|
-
- Port is wrong or blocked by another process.
|
|
80
|
-
- Empty or incorrect snapshot:
|
|
81
|
-
- You are in the wrong target window; use `tabs` and `tab-switch`.
|
|
82
|
-
- The app has not finished rendering; wait briefly and snapshot again.
|
|
83
|
-
- Counter failures (`element not found`):
|
|
84
|
-
- UI changed and counters are stale; take a fresh `snapshot action`.
|
|
85
|
-
- Wrong selectors on replay:
|
|
86
|
-
- `--description` string differs from the original text; use exact wording.
|
|
87
|
-
- Connection works but extraction returns empty:
|
|
88
|
-
- The Electron app may render in a webview. Use `opensteer tabs` + `opensteer tab-switch` to find the correct target.
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# Opensteer Electron Workflow
|
|
2
|
-
|
|
3
|
-
This document describes the Opensteer-native flow for automating Electron apps.
|
|
4
|
-
|
|
5
|
-
## 1. Connection Model
|
|
6
|
-
|
|
7
|
-
Electron apps embed Chromium. Opensteer connects through Chrome DevTools Protocol (CDP):
|
|
8
|
-
|
|
9
|
-
- Launch app with `--remote-debugging-port=<port>`
|
|
10
|
-
- Attach with `opensteer open --cdp-url http://127.0.0.1:<port>`
|
|
11
|
-
|
|
12
|
-
Example:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
opensteer open --cdp-url http://127.0.0.1:9222 --session electron --name electron
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
`--session` controls runtime routing (which daemon/browser instance handles commands).
|
|
19
|
-
`--name` controls selector cache namespace for deterministic replay.
|
|
20
|
-
|
|
21
|
-
## 2. Window/Webview Targeting
|
|
22
|
-
|
|
23
|
-
Electron apps often expose multiple targets. After connecting:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
opensteer tabs --session electron
|
|
27
|
-
opensteer tab-switch 0 --session electron
|
|
28
|
-
opensteer snapshot action --session electron
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Iterate `tab-switch` + `snapshot action` until you are on the correct app window/webview.
|
|
32
|
-
|
|
33
|
-
## 3. Action Loop
|
|
34
|
-
|
|
35
|
-
Use this loop for all interactions:
|
|
36
|
-
|
|
37
|
-
1. `snapshot action`
|
|
38
|
-
2. `click` / `input` / `press`
|
|
39
|
-
3. re-run `snapshot action`
|
|
40
|
-
|
|
41
|
-
Example:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
opensteer snapshot action --session electron
|
|
45
|
-
opensteer click 10 --description "navigation item" --session electron
|
|
46
|
-
opensteer input 6 "release checklist" --pressEnter --description "search input" --session electron
|
|
47
|
-
opensteer snapshot action --session electron
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## 4. Extraction Loop
|
|
51
|
-
|
|
52
|
-
For structured data:
|
|
53
|
-
|
|
54
|
-
1. `snapshot extraction`
|
|
55
|
-
2. build schema from element counters
|
|
56
|
-
3. `extract <schema-json>`
|
|
57
|
-
|
|
58
|
-
Example:
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
opensteer snapshot extraction --session electron
|
|
62
|
-
opensteer extract '{"rows":[{"title":{"element":14},"status":{"element":15}}]}' \
|
|
63
|
-
--description "current visible rows with status" \
|
|
64
|
-
--session electron
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## 5. Replay Stability
|
|
68
|
-
|
|
69
|
-
- Keep `--name` stable for the same automation namespace.
|
|
70
|
-
- Keep `--description` text exact across runs.
|
|
71
|
-
- Re-snapshot after meaningful UI changes before reusing counters.
|
|
72
|
-
|
|
73
|
-
## 6. Session Cleanup
|
|
74
|
-
|
|
75
|
-
Close the session when done:
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
opensteer close --session electron
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Or list active sessions:
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
opensteer sessions
|
|
85
|
-
```
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# Opensteer Examples
|
|
2
|
-
|
|
3
|
-
## Full Workflow: CLI Exploration to Scraper Script
|
|
4
|
-
|
|
5
|
-
### Step 1: Explore and cache with CLI
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
export OPENSTEER_SESSION=eures-session
|
|
9
|
-
|
|
10
|
-
opensteer open https://europa.eu/eures/portal/jv-se/home --name "eures-jobs"
|
|
11
|
-
|
|
12
|
-
opensteer snapshot action
|
|
13
|
-
opensteer input 5 "software engineer" --pressEnter --description "the job search input"
|
|
14
|
-
opensteer click 12 --description "the search button"
|
|
15
|
-
|
|
16
|
-
# Wait for results, then extract job listings
|
|
17
|
-
opensteer snapshot extraction
|
|
18
|
-
opensteer extract '{"jobs":[{"title":{"element":20},"company":{"element":22},"url":{"element":20,"attribute":"href"}},{"title":{"element":35},"company":{"element":37},"url":{"element":35,"attribute":"href"}},{"title":{"element":50},"company":{"element":52},"url":{"element":50,"attribute":"href"}}]}' \
|
|
19
|
-
--description "job listing with title company and url"
|
|
20
|
-
|
|
21
|
-
# Cache detail page extraction too
|
|
22
|
-
opensteer click 20 --description "first job link"
|
|
23
|
-
opensteer snapshot extraction
|
|
24
|
-
opensteer extract '{"title":{"element":3},"company":{"element":7},"location":{"element":12},"description":{"element":18}}' \
|
|
25
|
-
--description "job detail page"
|
|
26
|
-
|
|
27
|
-
opensteer close
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Step 2: Generate replay script (same namespace, same descriptions)
|
|
31
|
-
|
|
32
|
-
```typescript
|
|
33
|
-
import { Opensteer } from "opensteer";
|
|
34
|
-
|
|
35
|
-
async function run() {
|
|
36
|
-
const opensteer = new Opensteer({
|
|
37
|
-
name: "eures-jobs",
|
|
38
|
-
storage: { rootDir: process.cwd() },
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
await opensteer.launch({ headless: false });
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
await opensteer.goto("https://europa.eu/eures/portal/jv-se/home");
|
|
45
|
-
|
|
46
|
-
await opensteer.input({
|
|
47
|
-
text: "software engineer",
|
|
48
|
-
description: "the job search input",
|
|
49
|
-
});
|
|
50
|
-
await opensteer.click({ description: "the search button" });
|
|
51
|
-
|
|
52
|
-
await opensteer.waitForText("Showing 1 to 10");
|
|
53
|
-
|
|
54
|
-
// Extract all job listings using cached description — no schema needed
|
|
55
|
-
const listings = await opensteer.extract({
|
|
56
|
-
description: "job listing with title company and url",
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
// Visit each detail page and extract using cached description
|
|
60
|
-
for (const job of listings.jobs) {
|
|
61
|
-
await opensteer.goto(job.url);
|
|
62
|
-
await opensteer.waitForText(job.title || "Job details");
|
|
63
|
-
|
|
64
|
-
const detail = await opensteer.extract({
|
|
65
|
-
description: "job detail page",
|
|
66
|
-
});
|
|
67
|
-
console.log(JSON.stringify(detail, null, 2));
|
|
68
|
-
}
|
|
69
|
-
} finally {
|
|
70
|
-
await opensteer.close();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
run().catch((err) => {
|
|
75
|
-
console.error(err);
|
|
76
|
-
process.exit(1);
|
|
77
|
-
});
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Advanced: API-Based Extraction (uses direct page access)
|
|
81
|
-
|
|
82
|
-
> This is a rare pattern. Only use it when the site has internal REST/GraphQL endpoints and DOM extraction via `opensteer.extract()` is insufficient.
|
|
83
|
-
|
|
84
|
-
```typescript
|
|
85
|
-
import { Opensteer } from "opensteer";
|
|
86
|
-
|
|
87
|
-
async function run() {
|
|
88
|
-
const opensteer = new Opensteer({
|
|
89
|
-
name: "api-scraper",
|
|
90
|
-
storage: { rootDir: process.cwd() },
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
await opensteer.launch({ headless: false });
|
|
94
|
-
|
|
95
|
-
try {
|
|
96
|
-
// Navigate first to establish session cookies
|
|
97
|
-
await opensteer.goto("https://example.com");
|
|
98
|
-
|
|
99
|
-
const data = await opensteer.page.evaluate(async () => {
|
|
100
|
-
const res = await fetch("https://api.example.com/search?q=shoes&limit=100", {
|
|
101
|
-
headers: { "Content-Type": "application/json" },
|
|
102
|
-
});
|
|
103
|
-
return res.json();
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
console.log(JSON.stringify(data, null, 2));
|
|
107
|
-
} finally {
|
|
108
|
-
await opensteer.close();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
run().catch((err) => {
|
|
113
|
-
console.error(err);
|
|
114
|
-
process.exit(1);
|
|
115
|
-
});
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
> **SDK Rule**: For all other data extraction, use `opensteer.extract()`.
|