18 Commits
Author SHA1 Message Date
haikdc 5c99dbbd80 [haik]: stop importing TERMINAL_STATUSES from seq_log.py and define it as a local constant in ws_manager.py — seq_log renamed it to P_TERMINAL_STATUSES (private), so ws_manager now owns its own copy to avoid a cross-module coupling on session lifecycle states 2026-06-14 00:05:55 -07:00
haikdc 0a7ae03405 [haik]: refactor(ws_manager): rename private constants and methods from underscore to P_ prefix — convert _BROWSER_CMD_TIMEOUT_DEFAULT, _BROWSER_CMD_TIMEOUTS, _BROWSER_CMD_REBROADCAST_S, WS_RECONNECT_WAIT_S to P prefix and _strip_replayed_closes, filter_stale_approvals to p prefix, updating all internal references 2026-06-13 23:58:15 -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 08eb4b561f [haik]: refactor: systematize naming conventions across 20+ backend modules. Private module-level vars renamed _foo to P_FOO, private funcs _foo to p_foo, cross-module public funcs drop leading underscores entirely (e.g. _discover_mcp_tools_http -> discover_mcp_tools_http, _load_all -> load_all_tools, _classify_services -> classify_services). Local vars inside functions lose underscores (_backend -> backend_dir, _port -> port). Unnecessary import aliases removed (import json as _json -> import json). Imports reorganized to proper source modules (derive_mcp_config from mcp_config, oauth refresh funcs from oauth_tokens). Added Public comments documenting cross-module API boundaries. Extracted PENDING_OAUTH to oauth_state.py to break circular import. No behavioral changes. 2026-06-13 23:38:39 -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 f0d3cabc47 [haik]: refactor: standardize backend naming and import structure - strip leading underscores from all internal functions/constants across agents, settings, session, and provider modules in favor of public names or P_ prefix for module-private symbols; replace nine_router/init.py barrel re-exports with direct submodule imports (process, sync, sync_custom, oauth); hoist inline stdlib imports to module level; delete dead openai_passthrough.py GPT-5 proxy and the redundant _save_settings alias 2026-06-13 19:30:34 -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 8c7f9a7016 [haik]: migrate error_classify.py from underscore-prefix to p_/P_ naming convention: rename _is_auth_error, _is_free_trial_exhausted, _is_long_context_error, _is_transient_capacity_error, _is_unknown_model_error to public (drop _), rename _TRANSIENT_CAPACITY_PATTERNS and NON_TRANSIENT_PATTERNS to P upper-snake. Update all call sites in agent_manager.py and test imports in test_v2_invariants.py. Enhance p-private linter: make is_p() case-insensitive so P UPPER_SNAKE constants are enforced, add # p-private-ignore inline suppression (bare and scoped forms), thread source lines through check functions. Enable no-underscore-names rule in config. Update README and config descriptions. 2026-06-13 16:28:03 -07:00
ciregenz ddd0641cac [eric] merge free-trial + value-first onboarding (flag off, reorder gated so no-trial = today's flow)
# Conflicts:
#	frontend/src/app/pages/AgentChat/bubbles/MessageBubble.tsx
2026-06-10 23:20:18 -07:00
ciregenz 100d6491f7 [eric] models: track model errors (diagnostic) + friendly 'not on your plan' card for the 1211 unknown-model wall 2026-06-10 19:10:57 -07:00
ciregenz fb178648df [eric] free-trial: backend dispatch injection, hardware fingerprint, mint/clear, exhaustion upsell 2026-06-09 23:54:10 -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 6ac76d3dbd [eric] backend: aux-generated names get squeezed short, refusals fall back instead of becoming titles 2026-06-05 15:49:13 -07:00
ciregenz 01e3e2be53 [eric] browser: re-broadcast ws commands lost in dead-socket gaps, refetch layout on reconnect 2026-06-04 23:03:20 -07:00
ciregenz 3d0dcca22f [eric] browser: per-action command timeouts (reads 12s, nav 20s) so a hung tab surfaces in seconds not 30s 2026-06-03 15:20:37 -07:00
ciregenz 4c0749d0db [eric] browser: subtle Remembered/Learned chip on the agent card so memory feels earned, zero clicks 2026-06-03 00:01:20 -07:00
ciregenz fa57be6bbb [eric] tree: group foundational agent modules under agents/core 2026-05-23 13:05:15 -07:00