Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,13 @@ jobs:
timeout-minutes: 5
continue-on-error: true

- name: Run TypeScript browser script bridge workflow
Comment thread
Excellencedev marked this conversation as resolved.
run: |
Write-Host "Running comprehensive TypeScript workflow to test browser script bridge..."
cargo run --bin terminator -- mcp run examples/browser_script_bridge_workflow --skip-type-check
shell: pwsh
timeout-minutes: 15
continue-on-error: true

- name: Run Rust tests
run: cargo test --workspace --verbose -- --test-threads=1
28 changes: 28 additions & 0 deletions examples/browser_script_bridge_workflow/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Browser Script Bridge Workflow (TypeScript)

This workflow exercises the Terminator browser script bridge (`executeBrowserScript`) across success and failure scenarios, ensuring the Chrome extension path works reliably and surfaces errors consistently.

What it covers:
- Open Chrome and navigate to `about:blank`
- Execute inline string scripts (e.g., `document.title`)
- Execute function-based scripts with JSON return (auto-parsed by the Node wrapper)
- Execute scripts from file with `env` parameters
- Handle Promise rejections from browser scripts (maps to PlatformError)
- Handle structured failure objects (e.g., `{ success: false, message: "..." }`)
- Validate bridge retry/reset (simulated transient issue, then success)

Run locally with Terminator CLI (one-liner):

```
cargo run --bin terminator -- mcp run examples/browser_script_bridge_workflow
```

Or point directly to the entry file:

```
cargo run --bin terminator -- mcp run examples/browser_script_bridge_workflow/src/terminator.ts
```

Notes:
- Requires the Terminator Chrome extension installed and active. The CI installs it automatically.
- Type-checking is performed by the CLI using `tsc --noEmit` via bun/npx/tsc.
87 changes: 87 additions & 0 deletions examples/browser_script_bridge_workflow/bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading