58 Commits
Author SHA1 Message Date
haikdc 7c66cb977d [haik]: overhaul docs/gen_pages.py: replace hardcoded reference/guides/frontend output dirs with a dynamic per-folder section model where every top-level repo folder becomes its own sidebar section and root-level Markdown groups under a synthetic general/ section; switch file discovery from rglob to git ls-files so .gitignore exclusions (venvs, caches, build output) apply automatically; introduce a SourceRule dataclass pattern for declaring discover/dest/render per source type; add docs/.gen_manifest for precise cleanup of previously generated files instead of wiping entire directories; update docs/.gitignore to use content/* with explicit preserves; update zensical.toml comments and site_name to Open Swarm -- Developer Documentation; change content/index.md title to match; fix broken relative links in backend/CLAUDE.md, electron/CLAUDE.md, frontend/CLAUDE.md (link syntax to backtick); escape square brackets in backend/ENV_README.md; add init.py for dashboards, health, nine_router, settings backend apps 2026-06-16 05:59:51 -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 87f09e9695 [haik]: refactor naming convention and clean up dead code across backend outputs and service modules. Replace all leading-underscore private names with explicit p_/P_ prefix for module-internal symbols and drop the underscore for cross-module public APIs (load_all, save, load, walk_directory, find_free_port, etc). Rename the runtime module singleton from manager to RUNTIME_MANAGER. Remove unused legacy shims from client.py (submit_event, submit_session_close, record, set_test_sink, set_user_id, update_identity), drop clear() from ring_buffer.py and buffer.py, and remove the VIEW_BUILDER_SKILL backward-compat alias. Switch runtime.py from relative to absolute imports, rename the _d route param to data, and add public-usage comments to clarify cross-module API boundaries 2026-06-13 22:01:17 -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 c8c6117d64 [haik]: remove dead code and modernize test infrastructure: drop unused functions (validate_credentials, get_provider_credentials, submit_state), remove unused imports and parameters across outputs, buffer, client, settings, credentials, service, auth, main, and tools_lib; replace hand-rolled async fakes in browser agent tests with pytest-mock mocker fixture and AsyncMock, switch to SimpleNamespace over ad-hoc test classes, adopt pytest.mark.usefixtures for unused fixture params, and add pytest-mock to dev dependencies 2026-06-13 13:01:11 -07:00
ciregenz e47a3dbf35 [eric] settings: boot reconciles managed 9router keys so a cleared key drops the stale connection 2026-06-12 14:02:58 -07:00
ciregenz a126c42a07 [eric] free-trial: hand the wheel back when a real model is connected mid-trial (key or 9router sub) 2026-06-10 16:32:25 -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 ed2aa322ca [eric] backend: PUT settings preserves server-owned fields, stale drafts wiped pro bearers 2026-06-09 15:10:55 -07:00
ciregenz 1d57ee6680 [eric] settings: new agent chats spawn expanded by default (toggle off in Settings > Interface) 2026-06-08 13:15:48 -07:00
ciregenz 249f425a2d [eric] backend: stat-validated caches for settings.json and tools dir, disk parse only on change 2026-06-05 16:45:33 -07:00
eric 11b7d9b7a4 [eric] perf+ui: shrink runs chunks in parallel (5min -> ~1min) and shows a live pulsing label so users know its working 2026-05-31 18:50:46 -07:00
eric 56caabebbc [eric] fix: popup uses full width and matches app surface, error toast no longer red wall, summarize chunks small enough for dense pdf tokenization 2026-05-31 18:40:33 -07:00
eric 1372130d28 [eric] fix: summarize big files by chunking when source exceeds aux model window then merging 2026-05-31 18:33:02 -07:00
Eric 41031a7790 [eric] backend: load_settings never bricks boot on a corrupt or version-drifted settings.json - preserve unparseable files aside and drop only the invalid fields instead of raising, plus a migration test suite 2026-05-28 21:41:01 -07:00
Eric e8fd9ceb5a [eric] backend: add preflight_enabled (default true) and preflight_rollout_pct (default 100) to AppSettings so the runtime preflight can be killed per-install via the existing settings sync or staged 5/25/100 by the cloud cohort gate without a release 2026-05-28 02:49:06 -07:00
ciregenz 33aa485a12 [eric] cycles: extract settings persistence into store leaf 2026-05-23 07:12:19 -07:00
ciregenz a30229bbda [eric] attach: native PDFs on Claude/Gemini/OR, cost calc, meter fix, 9router bypass for image blocks 2026-05-22 23:43:54 -07:00
ciregenz f59bf0db9b defluff (frontend + backend): strip em-dashes + shorten docstrings + drop dead UI files (cosmetic only, no schedule code) 2026-05-20 05:36:17 -07:00
ciregenz 49e0ed3d2f experimental updates: opt-in prerelease channel via settings toggle + semver-suffix auto-detect in publish 2026-05-19 22:10:22 -07:00
ciregenz ae54680635 [eric] WIP polish — app builder runtime + react-vite template tweaks, dashboard toolbar/card refinements, PixelBlast accent, runtime-preview hook,
sign-in gate + settings updates
2026-05-13 18:30:55 -07:00
ciregenz 1b0e6c35eb [eric] App Builder polish + onboarding fix 2026-05-13 00:24:51 -07:00
ciregenz 54be1e8ba1 [eric] onboarding 1.0.31 + Settings draft persistence + LM Studio fix 2026-05-10 17:57:01 -07:00
ciregenz b3428a736b [eric] custom OpenAI-compatible provider support, youtube bug fix (windows) 2026-05-07 21:22:40 -07:00
ciregenz 5bac52266c [eric] sign-in flow polish, account UI, port-targeting fix 2026-05-07 16:48:22 -07:00
ciregenz fb78f013f3 [eric] account UI + proxy URL fix 2026-05-07 11:17:01 -07:00
ciregenz 7a6a49655c [eric] account flow + settings tweaks 2026-05-07 09:57:49 -07:00
ciregenz fae2806124 [eric] make non-Anthropic API keys actually work end-to-end, fix the wildly wrong cost numbers, multi model ux/ui improvements 2026-05-06 21:05:57 -07:00
ciregenz 49c649e3d9 [eric] single sync function for all state syncing 2026-05-05 12:11:07 -07:00
ciregenz 3c42d8738f [eric] refactor internal service layer 2026-05-04 19:39:19 -07:00
ciregenz b7a1faee38 [eric] delete miscelaneous scrapped code 2026-05-04 19:15:42 -07:00
ciregenz 5d69215739 [eric] phase 2+3: outputs gate, smart compaction, slash commands, preflight + auto-continue, bumped Anthropic SDK 2026-04-28 19:55:06 -04:00
ciregenz f5cc3a36fb [eric] remove vendored 9router (now fetched from npm at build), remove Copilot, and fix subs + tools 2026-04-25 02:26:08 -07:00
Eric 744a14dc47 [eric] 1.0.26 windows-only: fix subscription OAuth + perf pass
Connecting→Connect mid-flow on Windows: 9router callback hardcoded
  localhost:8324 (dies when backend lands on 8325+)
2026-04-22 16:33:00 -07:00
ciregenz b9f7698b0c [eric] default-model + thinking-mode settings overhaul: Settings dropdown mirrors the in-session picker (provider-grouped from
state.models.byProvider, disambiguates same-named models by · Provider), toolbar now honors the stored default_model instead of snapping to
  stale Redux initial 'sonnet' and re-syncs on every reopen so last-used picks don't leak, smart fallback per priority Anthropic > OpenAI >
  Gemini > OpenSwarm Pro > OpenSwarm with Snackbar warning when the user's default becomes unreachable, new Default thinking mode setting
  (Auto/Off/Low/Medium/High) added to AppSettings and threaded into AgentSession on launch, onboarding flow for user intuitive-ness slight tweaks
2026-04-20 14:56:09 -07:00
ciregenz 828dfdb18b [eric] OpenSwarm Pro lifecycle fixes: cancel-in-grace shows access-until-X with Resubscribe, distinct ended and reconnect states, app-launch /sync reconciles
with Stripe, auto-revert to own_key on revoke/expire, PostHog identify segments events by plan, browser agent + capacity UX: browser sub-agents inherit the parent's Anthropic
  pick properly, spawned browser cards auto-close on natural completion, OpenSwarm-servers-maxed card with Discord waitlist CTA, auto-clear local subscription state on cloud
  revoke/expire
2026-04-16 13:56:34 -07:00
ciregenz 1a68ccfc7b [eric] OpenSwarm Pro: new managed plan alongside BYO — deep-link activation from billing checkout, onboarding + Settings card with live usage, gradient OpenSwarm Pro group in
the model picker, inline error cards for rate-limit/connection failures, debugger startup fix
2026-04-15 23:05:02 -07:00
ciregenz bee3f48bb3 [eric] rewrite system prompt to prioritize action over narration, add adaptability directive, remove hardcoded service names, guide
ToolSearch discovery
2026-04-10 14:19:26 -07:00
ciregenz a5fc29351e [eric] stop tab clicks in browser cards from triggering card auto-focus (stopPropagation on tab click events), fix broken PostHog identify (SDK has no .identify(), use .set()), send referral_source to PostHog 2026-04-10 09:26:18 -07:00
ciregenz ee54e56893 [eric] specify to always askuserquestions instead of plain text 2026-04-07 20:12:51 -07:00
ciregenz 6db2d24f78 [eric] add referral question + back button to onboarding, fix flash + jumping 2026-04-07 00:42:12 -07:00
ciregenz 6d8154d5f0 [eric] tweak prompt to always prioritize mcps over browser use 2026-04-06 11:57:34 -07:00
ciregenz 57465a919f [eric] analytics: fix cost tracking, onboarding profile, and data accuracy, also janky titles 2026-04-02 11:18:46 -07:00
ciregenz 97622f87e0 [eric] fix API key priority over 9Router, fix OAuth callback 500, polish Settings UI 2026-03-27 13:06:17 -07:00
ciregenz 7c3da1ab4c [eric] fix 9Router CLI auth for subscription users, add analytics, update models 2026-03-27 00:21:19 -07:00
ciregenz e04eb2fb74 [eric] fix browser agent for 9Router, subscription-first priority, uvx fallback for non-dev users
- browser_agent.py: use get_anthropic_client instead of raw api_key, fix model map for 9Router
  - credentials.py + agent_manager.py: subscription (9Router) checked before API key everywhere
  - main.py: clean browser-agent endpoint, no credential params
  - tools_lib.py: when uvx not found, fall back to pip-installed binary from venv
  - requirements.txt: add google-workspace-mcp so it works without uvx
2026-03-26 12:17:37 -07:00
ciregenz cf775b4977 [eric] - build-app.sh: pre-build 9Router, bundle .next/standalone into Electron
- electron/package.json: add 9router to extraResources
2026-03-25 13:35:23 -07:00
ciregenz ebea25f0c2 [eric] [eric] add PostHog analytics, 9Router subscription proxy, unified usage tracking
- PostHog integration: collector, analytics subapp, opt-in UI, Analytics page
  - 9Router: auto-start, OAuth subscription flow, /v1/messages Anthropic format support
  - Settings overhaul: multi-provider API keys, subscription connect UI, onboarding modal
  - Unified usage: merge 9Router cost/token data into Settings Usage tab
  - Provider system: providers/, agent_loop, tools/ (unused, for future non-Anthropic support)
  - Agent SDK: restored as primary with 9Router ANTHROPIC_BASE_URL fallback
  - Updated system prompt, credential resolution, dashboard analytics
2026-03-24 14:02:58 -07:00
ciregenz 8d09e46df5 [eric] add PostHog analytics integration 2026-03-24 11:48:50 -07:00