Commit Graph
88 Commits
Author SHA1 Message Date
haikdc 6a9dd59eec [hAIk]: refactor AgentCard and BrowserCard into subdirectory modules, plumb dashboard_id from launch through Agent/AgentSnapshot, add on_done auto-persist callback, fix get_all_sessions to use GET query params, atomic PydanticStore writes, graceful backend shutdown in local.sh, and add mode config JSONs 2026-04-18 12:05:50 -07:00
haikdc f98c56ab7e [hAIk]: Holy fucking shit the agent finally works in the frontend: align frontend/backend naming: rename AgentSession.id→session_id across agentsTypes, agentsReducers, agentsExtraReducers, AgentCard, BrowserAgentOverlay, DashboardCanvas, useAgentChat, useToolbarActions, useDashboardKeyboard, MessageActions, and backend-bridge agents/dashboards; rename CardPosition.zOrder→z_order in dashboardLayoutTypes, dashboardLayoutReducers, dashboardLayoutSlice, and DashboardCanvas; fix circular import between dashboards.py and agents.py by deferring imports; add NINE_ROUTER_MODEL_MAP for sonnet/opus/haiku alias resolution in launch_agent; make build_agent_toolkit async and pass load_dashboard/save_dashboard into browser delegation toolkit; fix PromptMsgDict to use TypedDict, fix zip type hint bug, and fix browser agent model reference (parent.model→parent.config.model); add p_on_task_done callback with traceback logging on Agent, capture stderr and full tracebacks in run_agent_loop; add unwrages helper in agentsExtraReducers to normalize nested message payloads; pipe frontend console-message events to Electron stdout; enable ws:true on Vite proxy; add diagnostic console.logs across WS handlers, session lifecycle, and dashboard updates 2026-04-18 10:26:51 -07:00
haikdc d6d6bc2271 [hAIk]: added in debug statements instead of printing/logging 2026-04-18 07:43:31 -07:00
haikdc ad8add82fd [hAIk]: replace HTTP file upload with native Electron showOpenDialog: remove uploadAndAttachFiles fetch-based upload in useChatSubmit and useComposerAttachments, add browseAndAttachFiles using window.openswarm.showOpenDialog with ContextPath-based attachment, declare showOpenDialog in electron.d.ts, remove hidden file input refs and upload spinner from ChatInput/ModelModeSelector/OpenSwarmComposer. Rename WebSocket from /ws/dashboard to /ws on backend and rename dashboardWs to agentsWs across WebSocketManager, useDashboardInit, and browserCommandHandler. Export AGENTS_WS_API from agents bridge. Disable modelsSlice (delete file, comment out store registration and fetchModels dispatches) and stub mcpRegistrySlice thunks with not-implemented errors, move clearDetail to local action creator in useToolsState 2026-04-18 06:52:50 -07:00
haikdc c329c0f837 [Haik]: migrate launchAndSendFirstMessage and searchHistory from agentsSlice to backend-bridge thunks (META_LAUNCH_AND_SEND, GET_HISTORY); wire up new thunks in useAgentChat, useToolbarActions, useDashboardToolbar, agentsExtraReducers, and dashboardLayoutSlice; normalize backend response key from SESSIONS to sessions; remove dashboardId param from history search calls; replace any types with AgentSession, CardPosition, and AgentConfig; remove stale settingsApplied useEffect; split image payload into separate data and media_type arrays for SEND_MESSAGE 2026-04-18 04:04:44 -07:00
haikdc 2a898f3f08 [Haik]: refactor: overhaul agents API contract and frontend backend layer — rename all backend agent routes from RESTful path-param style (e.g. /sessions/{id}/message) to flat action-named endpoints (e.g. /send_message), replace Pydantic BaseModel request classes (LaunchBody, MessageBody, etc.) with inline FastAPI Body() parameters, delete the scattered frontend shared/routes/ directory (11 files) and agentsThunks.ts, and replace them with a co-located shared/backend/apps/ structure where each backend app has its routes, fetch functions, and async thunks in a single file 2026-04-18 02:23:44 -07:00
haikdc dbfa1a3c7d [Haik]: Fixed all pydantic instance attribute violations 2026-04-17 23:34:15 -07:00
haikdc a9e0b5ac1c [Haik]: added websocket connection to frontend for the agents subapp 2026-04-05 20:10:18 -07:00
haikdc 5536c0e60e [Haik]: tools subapp done, some touch ups may be done tho 2026-04-05 14:24:16 -07:00
haikdc f9b1c8277a [Haik]: ckpt, pulled out shared mode resolution logic into its own helper class 2026-04-05 12:03:25 -07:00
haikdc 76a0b7c3ca [Haik]: integrated modes subapp into the agents subapp so now modes are acctually functional 2026-04-05 11:51:53 -07:00
haikdc c71e25d37b [Haik]: ckpt, dashboards subapp now done fully. Also made the resolve_sdk_env which is used now both for normal agents and quick llm calls, also modded the agents subapp to properly make use of this helper, also modded the run_browser_agent to inheret this from its parent agent 2026-04-05 11:09:15 -07:00
haikdc 84a87b715e [Haik]: ckpt on dashboard subapp, largely done, but now i gotta finick around w some of the llm abstractions (especially around keys/subscription) 2026-04-05 10:39:04 -07:00
haikdc 5906c9d113 [Haik]: Made a COMMS_MANAGER singelton which handles all high level frontend comm concerns used by the agents subapp 2026-04-05 09:37:10 -07:00
haikdc 48098966a7 [Haik]: renamed ws to FrontendBroadcaster (bc thats what it is conceptually). Made it into a singelton, and better abstracted it for seperation of concerns. 2026-04-05 09:24:23 -07:00
haikdc 9899d37c64 [Haik]: removed old agentsd.py websocket wrapper bc it seemed like bs (may have to re add in some bits later). Now gonna add in some singeltons where applicable 2026-04-05 09:11:44 -07:00
haikdc 1cd5eaa496 [Haik]: ckpt on agents.py abstraction, looking good so far but we can do more 2026-04-05 08:37:38 -07:00
haikdc eca8cccf1a [Haik]: ckpt, copied over health and dashboard sub apps. Also made a generic PydanticStore and swapped the agents subapp to use this instead. Now gonna abstract and clean up this agents sub app a bit, then gonna make the dashboards sub app functional via the new codebase not the legacy shit 2026-04-05 08:21:13 -07:00
haikdc ef688f0a2e [Haik]: minor type specing/checking tweaks 2026-04-05 07:16:21 -07:00
haikdc c2d0c4d28e [Haik]: ckpt, sdk hooks & approval flow don 2026-04-02 22:46:54 -07:00
haikdc 4fa52be69e [Haik]: ckpt, fixed some minor lingering bug tweaks. Onto sdk hooks and approval flow 2026-04-02 21:32:26 -07:00
haikdc d3afc6fcac [Haik]: ckpt, mcp server dict builder and tool permission lists done 2026-04-02 21:05:33 -07:00
haikdc af8cf01c33 [Haik]: ckpt prompt building done (both the recursive system prompt and the actual prompt construction when a user adds context paths, forced tools, or skills) 2026-04-02 20:22:41 -07:00
haikdc 498aa8aa0d [Haik]: ckpt, pulled out the BrowserCommandFn also re implemented ws.has_global_connections 2026-04-02 19:09:07 -07:00
haikdc 70a60b861f [Haik]: initial implementation of browser bridge, this push used some ai so ima clean up a couple things 2026-04-02 19:02:29 -07:00
haikdc 892841b4f2 [Haik]: ckpt, moved shared_structs into the core folder. Also moved some legacy browser related structs into here. Now onto the remaining integration of the browser bridge 2026-04-02 18:45:11 -07:00
haikdc 51a3ddbd76 [Haik]: ckpt, connection manager and feature bridge seem to be done, still gotta integrate the browser bridge to browser related tools tho 2026-04-02 18:33:24 -07:00
haikdc c6b9859521 [Haik]: fixed imports in agents.py 2026-04-02 18:12:21 -07:00
haikdc 3d79ac8f0a [Haik]: moved Agent, events, and tools to a new dir called /core which is parallel to /apps so that /apps only handles endpoint typa shit yk 2026-04-02 17:53:47 -07:00
haikdc 7c5ed2557e [Haik]: ok ik this looks like alot but basically all i did was move the HaikFix folder to the backend root, then irenamed the apps folder to OLDapps, then i renamed HaikFix to apps 2026-04-02 17:50:29 -07:00
haikdc df07f82253 [Haik]: ckpt, swapped the HaikFix folder to be parallel to the agents folder bc ima start the full replacement process i think 2026-04-02 15:54:42 -07:00
haikdc 71845cc0ae [Haik]: tiny lil push here, only making it to comment on my last msg - didnt end up having to rename anything 2026-04-02 15:49:20 -07:00
haikdc 576f9d4d70 [Haik]: swapped run_browser_loop to run_browser_agent and it now uses the browser_actions_toolkit and the Agent class. Next push is gonna slightly rename some stuff, then idk what ill move on to yet 2026-04-02 15:44:33 -07:00
haikdc d0a636cf7e [Haik]: ckpt, rremoved legacy ref to old create_browser_card. Now gonna revamp the run_browser_loop function to use the new browser actions toolkit 2026-04-02 15:22:34 -07:00
haikdc 607165b866 [Haik]: refactored the browser toolkit into 2 sub toolkits (one for delegation and one for actions) 2026-04-02 15:13:14 -07:00
haikdc 804aeb74f9 [Haik]: ckpt, removed legacy deps from run_browser_loop. Now gonna refactor the new schemas.py to behave more like every other toolkit 2026-04-02 14:54:28 -07:00
haikdc 91fc6377ec [Haik]: browser toolkit seems done, now gonna work on the rest of the browser stuff maybe? 2026-04-02 14:32:37 -07:00
haikdc b27bd1bbd7 [Haik]: refactored the toolkits folder 2026-04-02 14:08:02 -07:00
haikdc dcb6f9e337 [Haik]: ckpt, boilerplate for browser actions added. Pushing rn bc next gonna abstract the bultin toolkits folder a bit then gonna finish up implementing this 2026-04-02 13:58:56 -07:00
haikdc 175806bf89 [Haik]: ckpt, agent toolkit done. Onto browser 2026-04-02 13:48:25 -07:00
haikdc fcaa15a0d9 [Haik]: Message and output classes refactored. Handlers for creating and invoking agents done. Now onto their actual tools, then the browser agent 2026-04-02 13:44:12 -07:00
haikdc 83a9e5759f [Haik]: ckpt on MCP tools, laregly done with the core and starting to add in custom tools, now gotta tweak the Message class stuff a bit more bc its too legacy 2026-04-02 13:00:36 -07:00
haikdc c9862394b0 [Haik]: ckpt, added toolkit nesting, also reorganized folder structure 2026-04-02 11:20:29 -07:00
haikdc 2bc4c42626 [Haik]: new Tool and Toolkit classes, also a folder containing all builtin toolkits 2026-04-02 11:07:54 -07:00
haikdc 7f92a8d384 [Haik]: fixed linter errors 2026-04-02 10:35:42 -07:00
haikdc d508324324 [Haik]: moved stuff out into its own folder 2026-04-02 10:34:38 -07:00
haikdc 371db12265 [Haik]: ok so new Agent class shld be done. In next push ima swap around the folder struct, then im gonna move onto other stuff bc the current agent manager shit seems like bs that can just be removed entirely 2026-04-02 10:27:39 -07:00
haikdc 1c54df9f32 [Haik]: satisfactory Agent class abstraction for now (altho im sure it doesnt fully work in the current setup yet), onto the AgentManager abstraction 2026-04-02 08:59:41 -07:00
haikdc ecdd215fe5 [Haik]: ckpt, largely done w the initial Agent class refactor. Now gonna add sub agent references for recursive cancels, then im gonna clean up the Agent folder for better downward abstraction 2026-04-02 08:07:38 -07:00
haikdc b228b5cf72 [Haik]: ckpt, started working on an abstraction for Agent. Starting to understand the slop, honestly im not mad, not even disapointed, im just kinda sad tbh. Ima go to sleep and hopefully wake up less sad :( I think tmr ima just pull an all nigher to deslop the backend entirely. 2026-04-01 01:59:41 -07:00