Commit graph

26 commits

Author SHA1 Message Date
CREDO23
8bdfd00a15 Merge upstream/dev 2026-06-05 19:18:12 +02:00
CREDO23
f2a61bc0ef refactor(agents): consolidate chat runtime infra under chat/runtime
Move the lower-level runtime/infra modules out of multi_agent_chat/shared/
(they were never used by subagents, so they failed the shared-by-all-siblings
rule) and unify them with the already-relocated checkpointer:

  agents/runtime/                      -> agents/chat/runtime/
  mac/shared/errors.py                 -> chat/runtime/errors.py
  mac/shared/llm_config.py             -> chat/runtime/llm_config.py
  mac/shared/prompt_caching.py         -> chat/runtime/prompt_caching.py
  mac/shared/mention_resolver.py       -> chat/runtime/mention_resolver.py
  mac/shared/path_resolver.py          -> chat/runtime/path_resolver.py

These sit below the agent packages: the boundary + agent factory + shared
middleware depend on them, and they import no agent code (acyclic).
2026-06-05 13:19:24 +02:00
CREDO23
24b62a63b4 refactor(agents): introduce chat/ category; dissolve top-level agents/shared
Recursive shared-folder rule: a shared/ must be shared by ALL siblings at its
level. The kernel (context, compaction, retry_after, web_search) was shared by
only 2 of the agents -- anonymous_chat + multi_agent_chat -- never by podcaster
or video_presentation. Those 2 are the "chat" category, so their shared code
belongs in that category's shared/, not the top-level one.

  app/agents/anonymous_chat/   -> app/agents/chat/anonymous_chat/
  app/agents/multi_agent_chat/ -> app/agents/chat/multi_agent_chat/
  app/agents/shared/           -> app/agents/chat/shared/   (anon<->mac kernel)

Top-level app/agents/shared/ is gone: nothing was shared across all three
categories (chat / podcaster / video_presentation).

~289 import sites rewritten (app.agents.{anonymous_chat,multi_agent_chat,shared}
-> app.agents.chat.*); all moves are git renames (history preserved).
app/agents/ now: chat/, podcaster/, video_presentation/, runtime/.
2026-06-05 12:54:02 +02:00
CREDO23
82c5dc5b02 refactor(agents): move mac-only modules out of the cross-agent shared kernel
app/agents/shared/ is a sibling of anonymous_chat/podcaster/multi_agent_chat/
video_presentation, so it should only hold code shared across 2+ of those
agents. In practice podcaster and video_presentation import nothing from it,
and anonymous_chat needs only context + compaction + retry_after + web_search.
Everything else was multi_agent_chat-only (the boundary just passes through).

Move the multi_agent_chat-only cluster into multi_agent_chat/shared/ (files
moved verbatim via git rename; ~116 import sites rewritten):

  errors, feature_flags, filesystem_selection, path_resolver, prompt_caching,
  sandbox, llm_config, mention_resolver
  middleware/busy_mutex, middleware/kb_persistence

busy_mutex/llm_config/mention_resolver are boundary-only but import the moved
modules, so they were folded in to avoid a backwards shared -> multi_agent_chat
dependency. main_agent builders now import the impls directly; the shared
middleware barrel keeps only the genuinely-shared compaction + retry_after.

Also delete the dead leftover shared/plugins and shared/skills dirs (live
copies already live under main_agent/).

Remaining in app/agents/shared/: context, system_prompt(+prompts), checkpointer,
middleware/{compaction,retry_after,dedup_tool_calls}, tools/. checkpointer and
system_prompt are boundary-only infra pending a dedicated home decision.
2026-06-05 12:30:15 +02:00
CREDO23
5b45f78a16 refactor(chat): delete legacy stream_new_chat monolith (cutover complete)
The flows orchestrators (new_chat/resume_chat) are now the sole live path
after the byte-for-byte differential proof, so the monolith and its
monolith-vs-flows parity scaffolding are removed.

- Repoint the last live importer (anonymous_chat_routes) to
  streaming.agent.event_loop.stream_agent_events + shared.stream_result.StreamResult
  (drop-in; the keyword-only fallback-commit params default to inert for anon).
- Repoint e2e launcher patch targets to flows.shared.llm_bundle.
- Repoint helper unit tests (chunk_parts, thinking-step ids, tool-input
  streaming) to their flows homes to preserve coverage.
- Delete the monolith, the contract test, and the parity tests
  (parallel_refactor, stage_1, stage_2, orchestrator_frame) whose sole
  purpose was comparing against the now-removed monolith.

Full suite green (2622 passed, 1 skipped); the two excluded live-app dirs
(document_upload, composio) have a pre-existing, env-gated registration 404
unrelated to this change.
2026-06-04 14:35:45 +02:00
CREDO23
946f8a8c5d refactor(agents): move llm_config + prompt_caching to app/agents/shared (slice 4b)
Relocate the mutually-dependent LLM config layer and the LiteLLM prompt-caching
helper to the shared kernel as one unit, rewiring their internal cross-reference
to the shared paths. Flip 21 non-frozen importers. Re-export shims remain at
new_chat/{llm_config,prompt_caching}.py for the frozen single-agent stack
(chat_deepagent); they will be removed when that stack is retired.
2026-06-04 12:41:52 +02:00
Anish Sarkar
ddfe60c2f0 feat(tests): Update tests for summary-free indexing 2026-06-04 00:53:51 +05:30
Anish Sarkar
275e2c9e83 chore: fix linting 2026-05-12 04:00:04 +05:30
Anish Sarkar
650b691a39 chore: enhance E2E tests by adding synthetic global LLM config and updating environment variables for Google OAuth 2026-05-12 02:37:39 +05:30
Anish Sarkar
c052fc9304 chore: add fake DoclingService for E2E tests and integrate into runtime fakes 2026-05-12 00:30:16 +05:30
Anish Sarkar
b247ff37df chore: implement test-only token mint endpoint and update E2E test authentication flow 2026-05-11 19:48:18 +05:30
Anish Sarkar
68f45335bc chore: implement E2E testing setup with Docker Compose and update workflow for backend and Redis services 2026-05-11 03:09:01 +05:30
Anish Sarkar
2f540ee065 refactor(tests): simplify logging messages and enhance manual upload journey tests 2026-05-09 05:10:05 +05:30
Anish Sarkar
e211028866 test(e2e): add ClickUp MCP backend fake 2026-05-08 13:12:34 +05:30
Anish Sarkar
69437b1fe4 test(e2e): add Dropbox backend fake 2026-05-08 12:27:45 +05:30
Anish Sarkar
da8b151634 test(e2e): wire OneDrive fake into harness 2026-05-08 03:48:35 +05:30
Anish Sarkar
73b6375688 test(e2e): wire Slack fake into harness 2026-05-08 03:08:36 +05:30
Anish Sarkar
640ae03030 test(backend): add Confluence OAuth E2E fakes 2026-05-08 01:02:52 +05:30
Anish Sarkar
369f0aaff3 test(backend): add Jira MCP E2E fakes 2026-05-08 00:15:08 +05:30
Anish Sarkar
2cbedf2eb4 test(backend): add Linear MCP E2E fakes 2026-05-07 23:15:20 +05:30
Anish Sarkar
15709b82f7 test(backend): add Notion E2E fakes 2026-05-07 22:21:52 +05:30
Anish Sarkar
d81f5a1d2a fix(tests): update LLM bindings in E2E tests for document processors 2026-05-07 04:27:46 +05:30
Anish Sarkar
a5c04cb38d test(backend): generalize native Google E2E fakes for Gmail 2026-05-07 04:22:59 +05:30
Anish Sarkar
3f2912a4ca test(backend): add native Google Drive E2E fakes 2026-05-07 03:59:40 +05:30
Anish Sarkar
55c33ca1c8 test(backend): add deterministic chat fake LLM 2026-05-06 21:35:57 +05:30
Anish Sarkar
58ba95fad2 test(backend): add E2E harness foundation (entrypoints, middleware, LLM/embedding fakes) 2026-05-06 17:17:42 +05:30