102 Commits
Author SHA1 Message Date
haikdc a28ac6b642 [haik]: refactor: apply p_/P_ naming convention to browser_agent.py and 31 test files. In browser_agent.py, rename 6 module-internal functions from leading-underscore to p_ prefix (_strip_lone_surrogates -> p_strip_lone_surrogates, _format_tool_result -> p_format_tool_result, _delta_state -> p_delta_state, _send_index_in_state -> p_send_index_in_state, _is_composer_fill -> p_is_composer_fill) and update all call sites. Across 31 test files, rename test helper functions from _func to p_func or descriptive names (_tu -> p_tu, _rp -> p_rp, _install -> p_install, _log -> action_log, _isolated_skills -> isolated_skills), drop leading underscores from local variables (_nm -> nm, _send_browser_command -> send_browser_command), and update module attribute references from BH._browser_history/BH._domain_notes to BH.BROWSER_HISTORY/BH.P_DOMAIN_NOTES. ~1023 insertions, ~1024 deletions, no behavioral changes 2026-06-14 01:11:48 -07:00
haikdc d7349cce18 [haik]: refactor: rename ws_manager singleton to WS_MANAGER and await_reconnect to await_reconnect across 8 files. Module-level ConnectionManager instance follows P/uppercase constant convention (ws_manager -> WS_MANAGER in ws_manager.py). Cross-module helper _await_reconnect drops leading underscore since browser_agent.py imports it directly. Updated all ~80 call sites in agent_manager.py, agents.py, browser_agent.py, main.py, and ws_manager.py; updated monkeypatch targets in test_browser_agent_loop.py, test_browser_fast_path.py, and test_disconnect_resilience.py. 176 insertions, 176 deletions, no behavioral changes. 2026-06-13 23:51:26 -07:00
haikdc 67fce8ee89 [haik]: refactor: canonicalize settings imports and public API naming - move all load_settings imports from backend.apps.settings.settings to backend.apps.settings.store (agent_manager, agents, browser_agent, mcp_preflight, anthropic_proxy, auth/router, dashboards, outputs, service, subscription/router, web) so consumers point at the source module instead of the re-export; rename _atomic_write_settings to atomic_write_settings and _has_own_model to has_own_model since both are called across module boundaries; rename _summarize_block to summarize_block and UPLOAD_DIR to P_UPLOAD_DIR in settings.py; clean up unused var names (_base to _, _ext to _, _httpx to httpx); update test_auth_router.py imports and _save_settings references to match 2026-06-13 22:22:31 -07:00
haikdc fafbe45187 [haik]: refactor backend naming conventions across 14 files: rename module-internal functions from _fn to p_fn, module-level constants from _CONST to P_CONST, and cross-module public functions from _fn to fn (e.g. _load/_save to load/save in dashboards, _pending_oauth to PENDING_OAUTH in oauth_state, _nr to nr in sync, _process to P_PROCESS in process); hoist inline import json to module-level in modes.py; clean up redundant import subprocess alias and unused _aux_base variable; update all import sites in browser_agent, prompt_context, main, sync, and sync_custom 2026-06-13 20:34:25 -07:00
haikdc 211f939560 [haik]: refactor: standardize naming convention across browser agent modules — replace _CONSTANT/_func leading-underscore privates with P_PREFIX for module-level constants and p_func for internal helpers, promote public API functions (safe_resp_text, detect_loop, hash_tool_call, clean_bullet, etc.) by dropping the underscore, switch module-level imports to explicit function-level imports in browser_agent.py and agents.py, and add browser_skills.py to the linter no-underscore-names exception list 2026-06-13 17:30:35 -07:00
haikdc 07199caf34 [haik]: refactor: adopt P-prefix naming convention for module-level private symbols, replacing leading underscores with P_ prefix (e.g. _STEP_TOOLS -> P_STEP_TOOLS, _BROWSY_RE -> P_BROWSY_RE, _domain_notes -> P_DOMAIN_NOTES) and removing underscores from public API functions (e.g. _trim_history_by_turns -> trim_history_by_turns, _validate_message_pairing -> validate_message_pairing). Updated across browser_history, browser_agent, browser_batch_replay, browser_fast_path, browser_fast_read, browser_extract, browser_agent_mcp_server, and aux_llm. Added linter no-underscore-names exclusions for agent_manager, agents, and browser_agent 2026-06-13 16:49:37 -07:00
haikdc d89fb7d870 [haik]: backend cleanup: remove unused imports (anthropic, json, time, sys, HTTPException, ws_manager, etc.), drop unused context params from tool hooks and execute methods, delete dead _resolve_model helper and entire thinking.py module, prune multi-provider subagent model fallback block in agent_manager, fix session_store to import SESSIONS_DIR directly from config.paths, re-home compute_tiers/compute_billing_kind imports from registry to pricing in agents.py, add google-workspace-mcp==2.0.1 to requirements-dev 2026-06-13 11:45:55 -07:00
ciregenz a1f390ef0f [eric] browser: claim only the user-picked card, not every dashboard card (fix 5cf6e2a) 2026-06-12 20:06:56 -07:00
ciregenz 5cf6e2a4b1 [eric] browser: honor the user's selected browser card instead of spawning a new one (selection now reaches sub-agent dispatch + is claimed for the task) 2026-06-12 17:31:46 -07:00
ciregenz bfcad98b76 [eric] browser: BrowserSaveData writes a big page dataset to one sandboxed file, ending the dispatch-per-chunk waste 2026-06-09 02:05:26 -07:00
ciregenz 9eb0e2cb2b [eric] browser: new gathered data resets the spin backstop, so a page-by-page gather runs to completion instead of getting cut with partial results 2026-06-08 23:47:26 -07:00
ciregenz ba41409577 [eric] browser: spin backstop nudges a clean Done wrap-up, not a mid-thought cutoff 2026-06-08 23:26:15 -07:00
ciregenz 438d1e36d4 [eric] browser: arm the send-completion shortcut only for send tasks, not gathers (cookie click faked a send) 2026-06-08 23:02:55 -07:00
ciregenz 07f911d200 [eric] browser: a clean success needs an explicit Done; recognize gather asks, steer them to BrowserExtract 2026-06-08 22:37:33 -07:00
ciregenz 91073becec [eric] browser: finish via a Done(message) tool so the user gets a plain conversational reply, not the OUTCOME tag 2026-06-08 22:15:52 -07:00
ciregenz b634638677 [eric] browser: poll the interactives list for the real Send button after a composer fill so the handoff actually fires (was 0/10, racing the lazy render) 2026-06-08 12:42:18 -07:00
ciregenz 8d9c75803c [eric] browser: restore the Send-button handoff (points the model at the Send index after a fill); deleting it brought the Send-hunt back, it was NOT redundant with the wait 2026-06-08 00:58:38 -07:00
ciregenz bf5f95573a [eric] browser: wait up to 6s (not 2.5s) for the lazy-rendering Send button after a composer fill, kills the re-list turn and the late-Send miss 2026-06-08 00:44:26 -07:00
ciregenz 2d59a0fbf1 [eric] browser: stall-path completion text is a plain confirmation, never the raw action-log proof (indices/coords) 2026-06-08 00:15:39 -07:00
ciregenz f8c812353e [eric] browser: agent writes a plain human final message (no UI jargon/OUTCOME mechanics); delete the leaky send-ready advisory, dead prefix flag, and humanize aux experiment 2026-06-08 00:09:50 -07:00
ciregenz ce8e74b96a [eric] browser: skill-replay returns a normal OUTCOME line so the parent translates it, no more 'learned skill replay (N steps, no LLM)' leaking to users 2026-06-07 23:49:21 -07:00
ciregenz d5fc146123 [eric] browser: never leave a tool_use unanswered (backfill mid-turn + validate both directions) so a 30s upstream reset stops 400-killing the run 2026-06-07 23:04:59 -07:00
ciregenz 6ef7b33667 [eric] browser: cross-site meta-playbook (tier 3) + self-audit of the learning machinery (tier 4, proposes for human review, never self-edits) 2026-06-07 21:20:40 -07:00
ciregenz 7ec05613fe [eric] browser: hand the Send button to the model after a composer fill, and commit to an already-open thread instead of re-verifying 2026-06-07 19:28:51 -07:00
ciregenz 1204e733b5 [eric] browser: stall backstop only fires after a real action, never cuts short early orientation 2026-06-07 19:12:43 -07:00
ciregenz e19def1ae5 [eric] browser: a clean Send-class click ends the run; bound the look-only spin even when the send cant be auto-detected 2026-06-07 19:07:34 -07:00
ciregenz 0f63697765 [eric] browser: confirm waits for the target to actually render so a send isnt falsely 'not confirmed' under load 2026-06-07 18:58:43 -07:00
ciregenz 889c7707e4 [eric] browser: a confirmed send ends the run, no more stalling to re-verify what the confirm proved 2026-06-07 18:52:20 -07:00
ciregenz a54b4c0452 [eric] browser: run the action and remind on a missing ReportProgress instead of rejecting the turn 2026-06-07 18:19:39 -07:00
ciregenz a588645a96 [eric] browser: ride out a momentary dashboard WS drop instead of failing the run under load 2026-06-07 17:37:19 -07:00
ciregenz 0d66e318a1 [eric] browser: only the Send ends a skill's replay prefix, not the composer opener 2026-06-07 15:38:56 -07:00
ciregenz 7d2d8ea8b1 [eric] browser: pin why send-skill prefix replay stays parked (opener mis-flagged as Send) 2026-06-07 15:12:58 -07:00
ciregenz 59658ddb46 [eric] browser: strip orphan surrogates from webview text so emoji pages don't crash a turn 2026-06-06 22:06:07 -07:00
ciregenz 4664065767 [eric] browser: converge speed-lever A/B, ship the winners, cut the dead-end flags 2026-06-06 18:29:03 -07:00
ciregenz 6380480502 [eric] browser: on a recoverable error (stale index/occlusion) attach fresh page state so the model recovers in one turn, never retries the action 2026-06-06 18:03:52 -07:00
ciregenz d542ef28aa [eric] browser: compose helper also fires when the fill is a batched click_index sub-action, not only solo 2026-06-06 13:53:05 -07:00
ciregenz 13baf94545 [eric] browser: compose helper polls for the late-rendering Send button (diagnosed: AX surfaces it a few seconds after typing, not instantly) 2026-06-06 13:49:18 -07:00
ciregenz 07ea7d0098 [eric] browser: compose helper settles and re-lists once when Send renders after the text lands 2026-06-06 12:45:54 -07:00
ciregenz 5741e8f946 [eric] browser: endgame helper locates Send after a composer fill (never clicks it), behind OSW_BROWSER_COMPOSE_HELPER 2026-06-06 12:41:08 -07:00
ciregenz 9972171c05 [eric] browser: cheap-model laps behind OSW_BROWSER_CHEAP_LAPS, escalate to primary at the irreversible endgame 2026-06-06 12:32:04 -07:00
ciregenz 01ec866c2a [eric] browser: OSW_BROWSER_NO_LEVERS bench flag to A/B the speed levers on/off 2026-06-06 12:12:38 -07:00
ciregenz 581af5b128 [eric] browser: auto-dismiss junk interstitials (cookie/upsell/coachmark) by generic close-vocabulary, conservative 2026-06-06 12:05:37 -07:00
ciregenz d4e4327f78 [eric] browser: settle on the click target before a replay step so a recorded click never fires before paint 2026-06-06 05:01:25 -07:00
ciregenz cdbdec775b [eric] browser: merge-verify, a confirmed send is the proof, no separate verify turn + trailing-read telemetry 2026-06-06 04:35:03 -07:00
ciregenz 6dc00e40b5 [eric] browser: think-shorter, no redundant prose beside action tools + output telemetry 2026-06-06 04:14:46 -07:00
ciregenz 852968d7b2 [eric] browser: candidate scan also covers the pre-nav landing, shared helper 2026-06-06 00:21:31 -07:00
ciregenz 56eea88153 [eric] browser: wire route hints, entry pre-nav, auto candidate scan and llm_ms timing into the loop 2026-06-06 00:17:05 -07:00
ciregenz 92df6ea4f0 [eric] browser: send-probe gate catches focus-type payloads, batched Enter blocked while composer pending 2026-06-05 23:30:23 -07:00
ciregenz fcc02ce77a [eric] browser: evaluation_previous optional, output tokens drive turn latency and the field restates attached state 2026-06-05 22:23:18 -07:00
ciregenz 042e7db7d5 [eric] browser: pruning-safe incremental cache marker, transcript finally cache-hits past the system prompt 2026-06-05 22:22:06 -07:00