mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 08:02:28 +00:00
aee98ccaa0cc09b8152d64589cf891897a5f12d2
10
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
aee98ccaa0 |
fix(browser): make the browser identity one process-wide choice (#13822) (#20767)
* feat(browser): process-wide browser identity, chosen before ready
Electron resolves worker identity from a single process-global default, so two
coherent identities cannot coexist in one process. This makes clean/native one
app-wide decision read before `ready`, instead of a per-profile one that leaves
documents on one identity and every worker request on the other.
Both identities are load-bearing, measured across four origins at five reps:
the cleaned identity clears an embedded Turnstile widget and WhatsApp's browser
check where native is refused; native clears a full-page Cloudflare interstitial
that the cleaned identity never clears.
Base commit only: removing the per-profile field, its settings surface, and the
migration notice follow.
* test(browser): cover cross-context UA wire identity
* refactor(browser): make user agent identity app-wide
* test(browser): repair process identity wire fixture
* Fix browser identity startup migration failures
* WIP: rescue in-flight reduced-design work from a dead worker
Worker ctx_cb5b1262d7fe stopped ~2h ago mid-implementation (last heartbeat
2026-09-14T22:48:06Z) leaving this uncommitted. Committed unverified to make it
recoverable; not reviewed, not necessarily green.
* fix(browser): repair the rescued identity work so it typechecks
Finishes the interrupted edits in
|
||
|
|
b8d5b0486e |
Fix opening HTTPS URLs from headless runtimes (#17467)
* fix(runtime): open headless browser URLs on paired client * fix(pty): tolerate runtimes without browser relay probe * fix(browser): require automation-capable client host * fix(browser): map client URL opener in sidecar --------- Co-authored-by: Merge Sim <sim@local> |
||
|
|
0ce108d935 |
fix(browser): add native-UA session profiles (#12608)
* fix(browser): add native-UA session profiles * test(browser): add Google sign-in UA probe * fix(browser): preserve native profile UA identity |
||
|
|
9de1fb8d16 |
Cli destructive suggest (#8352)
* fix(cli): don't recover benign typos into destructive commands CLI did-you-mean ranked purely by Levenshtein, so `orca worktree move` sole-suggested `orca worktree remove` (distance 2) — an alias of the destructive `worktree rm`. Suggestions also flow into --json error.data.nextSteps, the agent recovery channel, so a blind retry could delete a clean worktree. Make destructiveness a declared property of the command instead of a verb heuristic: add `destructive?: true` to CommandSpec and mark the irreversible commands (worktree rm, environment rm, automations remove, project setup-delete, tab profile delete, cookie delete, storage local/session clear). The suggestion ranker excludes destructive candidates unless the input token is itself a near-miss (distance <=1) of a destructive verb, so `worktree remov` still recovers `rm`/`remove` while `worktree move` no longer does. The guard tracks the registry, so it also covers destructive verbs outside the delete family (e.g. kill). Fixes #6303 Co-authored-by: Orca <help@stably.ai> * fix(cli): use Array.at(-1) to satisfy oxlint prefer-at Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Orca <help@stably.ai> |
||
|
|
ffbc4c3cfb | fix: tighten CLI contract validation (#3874) | ||
|
|
1f43346c5f |
fix(resource-usage): hydrate pty-registry at boot; render · remote only for SSH repos (#1667)
* WIP: Changes before auto-review fixes Co-authored-by: Orca <help@stably.ai> * fix: address auto-review-fix-multi-agent findings - Replace local ORCA_WORKTREE_ID_SEPARATOR with shared WORKTREE_ID_SEPARATOR - Make hydrateLocalPtyRegistryAtBoot idempotent (one-shot per process, but stays retry-eligible until daemon provider is available) - Strengthen daemon-pty-adapter strict-parser test to actually exercise the new short-circuit (test would have passed under the old loose parser too without the change) - Add eslint-disable max-lines directive to oversized merge test file Co-authored-by: Orca <help@stably.ai> * chore: archive auto-review context to .context/ Co-authored-by: Orca <help@stably.ai> * fix: address auto-review-fix findings Drop the destructive reconcileOnStartup call from boot-time PTY registry hydration: a transient listRepoWorktrees failure (returns [] and only warns) would otherwise let the reconcile pass kill live local sessions. The boot path is now read-only against the daemon — listSessions() only. Also: tighten parsePtySessionId to reject degenerate `::` halves; replace stale pty.ts:1005 references and a misleading local-unknown comment in the hydrate module; narrow Store dependency to Pick<Store, 'getRepos'>; log adapter listSessions failures instead of silently swallowing them; re-anchor design-doc references on stable symbols and align §1b/§1c/§1d with the implementation. Co-authored-by: Orca <help@stably.ai> * docs(resource-usage): update remote badge spec Co-authored-by: Orca <help@stably.ai> * test(resource-usage): cover boot hydration failure modes + warm-reattach e2e Adds the regression coverage flagged in PR #1667's test plan that wasn't already locked down. vitest (`hydrate-local-pty-registry.test.ts`): - daemon offline at first call → no-op, hasHydrated stays false so a later macOS dock re-activation can retry. - listSessions rejection caught and logged, does not throw. - pid-write ordering: a pre-existing registry entry with pid=12345 is not clobbered by a stale `pid: null` from listSessions (§1d). - SSH-gate: a session whose repo has a non-null connectionId stays out of the registry, mirroring the spawn-time gate in pty.ts. - Happy-path: a local session is registered with the daemon's pid. Playwright e2e (`resource-usage-warm-reattach.spec.ts`): Full quit→relaunch cycle against the same userDataDir; asserts that on the second launch the snapshot includes the warm-reattached PTY with a real pid before any pane mount, and that the seeded repo resolves as local (no connectionId). Mirrors the existing terminal-restart-persistence pattern. Co-authored-by: Orca <help@stably.ai> * fix(test): satisfy Pick<Store, 'getRepos'> in hydrator vitest CI typecheck failed because FakeStore's getRepos returned objects missing Repo's required fields (path, displayName, badgeColor, addedAt). Fill with placeholder values; the hydrator only reads id + connectionId, but the type signature still has to line up. Co-authored-by: Orca <help@stably.ai> * chore(resource-usage): drop bug-doc files; strip dead doc refs from comments Remove docs/resource-usage-remote-mislabel.md (new in this PR) and revert docs/resource-usage-merge-spec.md to the PR-base state. Strip the matching `docs/...md §N` pointers from code/test comments, keeping the surrounding "why" explanations intact so readers still get the warm-reattach mislabel context. Co-authored-by: Orca <help@stably.ai> --------- Co-authored-by: Orca <help@stably.ai> |
||
|
|
7fb5363296 |
feat(cli): tab switch --focus surfaces the browser pane (#1498)
Co-authored-by: Orca <help@stably.ai> Co-authored-by: Maciej Kobuszewski <maciej.kobuszewski@pergam.in> Co-authored-by: Neil <4138956+nwparker@users.noreply.github.com> Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> |
||
|
|
e623372cdb |
feat(cli): add tab profile controls and automation primitives (#1396)
* feat(cli): add browser tab profile controls * feat(cli): add tab profile automation primitives * refactor(cli): narrow tab profile automation scope * chore: retrigger PR checks * review: harden tab profile automation CLI - Wait for tab re-registration after browser.tabSetProfile so a follow-up tab list --show-profile reads the new sessionProfileId from BrowserManager instead of the stale one from the previous webview - Wait for tab registration after browser.tabProfileClone, matching browser.tabCreate, so the cloned browserPageId is operable when the CLI returns - Short-circuit browser.tabSetProfile when the tab is already on the requested profile so we do not tear down and remount the webview for a no-op switch - Switch TabShow.worktree from OptionalPlainString to OptionalString to match every other tab schema; empty --worktree should fall back to the active worktree, not pass through as the empty string - Add max-lines disable to browser.test.ts (file grew past 300 lines after adding the new tab-profile and tab-show tests) * review: fix useIpcEvents test setup for tab profile API CI failure: useIpcEvents.test.ts threw at module load with TypeError: window.addEventListener is not a function. The chain: the rebased useIpcEvents.ts imports destroyPersistentWebview from webview-registry, which calls window.addEventListener at module load. The test stubs window via vi.stubGlobal as a plain object without addEventListener, so the typeof window check passes but the call throws. - webview-registry.ts: tighten the module-load guard to also check that window.addEventListener is callable, so importing this module from a non-DOM-ish test env (vitest node env with stubbed window) does not throw at module load - useIpcEvents.test.ts: add the new onRequestTabSetProfile and replyTabSetProfile stubs to all 8 window.api.ui mocks so the new IPC subscription registered by useIpcEvents resolves * review: restore profile CRUD lost during rebase onto 1397-merged main The rebase brought commit 3242aa27 (refactor: narrow tab profile automation scope) onto a main that already had the lifecycle CRUD from 1397. The refactor commit removes BrowserProfileList/Create/Delete types, runtime methods, RPC registrations and schemas, plus the help/specs entries, because those were the precursor versions in commit 1 of this branch. Post-rebase those removals land on the hardened versions inherited from main, breaking 1397. Restore: - runtime-types.ts: BrowserSessionProfile import; ProfileList/Create/Delete result types - orca-runtime.ts: ProfileList/Create/Delete result type imports; browserProfileList/Create/Delete methods - browser-core.ts: ProfileCreate, ProfileDelete schema imports; browser.profileList/profileCreate/profileDelete RPC registrations - browser-schemas.ts: ProfileCreate, ProfileDelete zod schemas - help.ts: list/create/delete subcommand lines under Browser Automation - specs/browser-basic.ts: list/create/delete spec entries --------- Co-authored-by: Nikolatesla-lj <Nikolatesla-lj@users.noreply.github.com> Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> |
||
|
|
9bf339eeb9 |
feat(cli): add tab profile lifecycle commands (#1397)
Co-authored-by: Orca <help@stably.ai> Co-authored-by: Nikolatesla-lj <Nikolatesla-lj@users.noreply.github.com> Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com> |
||
|
|
36c6a9241f | refactor(cli): split index.ts into per-verb handler modules (#1089) |