* feat(core): add git-backed memory repos and block manager Introduce a GCS-backed git repository per agent as the source of truth for core memory blocks. Add a GitEnabledBlockManager that writes block updates to git and syncs values back into Postgres as a cache. Default newly-created memory repos to the `main` branch. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * feat(core): serve memory repos over git smart HTTP Run dulwich's WSGI HTTPGitApplication on a local sidecar port and proxy /v1/git/* through FastAPI to support git clone/fetch/push directly against GCS-backed memory repos. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): create memory repos on demand and stabilize git HTTP - Ensure MemoryRepoManager creates the git repo on first write (instead of 500ing) and avoids rewriting history by only auto-creating on FileNotFoundError. - Simplify dulwich-thread async execution and auto-create empty repos on first git clone. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): make dulwich optional for CI installs Guard dulwich imports in the git smart HTTP router so the core server can boot (and CI tests can run) without installing the memory-repo extra. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): guard git HTTP WSGI init when dulwich missing Avoid instantiating dulwich's HTTPGitApplication at import time when dulwich isn't installed (common in CI installs). 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): avoid masking send_message errors in finally Initialize `result` before the agent loop so error paths (e.g. approval validation) don't raise UnboundLocalError in the run-tracking finally block. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): stop event loop watchdog on FastAPI shutdown Ensure the EventLoopWatchdog thread is stopped during FastAPI lifespan shutdown to avoid daemon threads logging during interpreter teardown (seen in CI unit tests). 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * chore(core): remove send_*_message_to_agent from SyncServer Drop send_message_to_agent and send_group_message_to_agent from SyncServer and route internal fire-and-forget messaging through send_messages helpers instead. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): backfill git memory repo when tag added When an agent is updated to include the git-memory-enabled tag, ensure the git-backed memory repo is created and initialized from the agent's current blocks. Also support configuring the memory repo object store via LETTA_OBJECT_STORE_URI. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): preserve block tags on git-enabled updates When updating a block for a git-memory-enabled agent, keep block tags in sync with PostgreSQL (tags are not currently stored in the git repo). 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * chore(core): remove git-state legacy shims - Rename optional dependency extra from memory-repo to git-state - Drop legacy object-store env aliases and unused region config - Simplify memory repo metadata to a single canonical format - Remove unused repo-cache invalidation helper 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> * fix(core): keep PR scope for git-backed blocks - Revert unrelated change in fire-and-forget multi-agent send helper - Route agent block updates-by-label through injected block manager only when needed 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta <noreply@letta.com> --------- Co-authored-by: Letta <noreply@letta.com>
67 lines
3.2 KiB
Python
67 lines
3.2 KiB
Python
from letta.server.rest_api.routers.v1.agents import router as agents_router
|
|
from letta.server.rest_api.routers.v1.anthropic import router as anthropic_router
|
|
from letta.server.rest_api.routers.v1.archives import router as archives_router
|
|
from letta.server.rest_api.routers.v1.blocks import router as blocks_router
|
|
from letta.server.rest_api.routers.v1.chat_completions import router as chat_completions_router, router as openai_chat_completions_router
|
|
from letta.server.rest_api.routers.v1.conversations import router as conversations_router
|
|
from letta.server.rest_api.routers.v1.embeddings import router as embeddings_router
|
|
from letta.server.rest_api.routers.v1.folders import router as folders_router
|
|
from letta.server.rest_api.routers.v1.git_http import router as git_http_router
|
|
from letta.server.rest_api.routers.v1.groups import router as groups_router
|
|
from letta.server.rest_api.routers.v1.health import router as health_router
|
|
from letta.server.rest_api.routers.v1.identities import router as identities_router
|
|
from letta.server.rest_api.routers.v1.internal_agents import router as internal_agents_router
|
|
from letta.server.rest_api.routers.v1.internal_blocks import router as internal_blocks_router
|
|
from letta.server.rest_api.routers.v1.internal_runs import router as internal_runs_router
|
|
from letta.server.rest_api.routers.v1.internal_templates import router as internal_templates_router
|
|
from letta.server.rest_api.routers.v1.jobs import router as jobs_router
|
|
from letta.server.rest_api.routers.v1.llms import router as llm_router
|
|
from letta.server.rest_api.routers.v1.mcp_servers import router as mcp_servers_router
|
|
from letta.server.rest_api.routers.v1.messages import router as messages_router
|
|
from letta.server.rest_api.routers.v1.passages import router as passages_router
|
|
from letta.server.rest_api.routers.v1.providers import router as providers_router
|
|
from letta.server.rest_api.routers.v1.runs import router as runs_router
|
|
from letta.server.rest_api.routers.v1.sandbox_configs import router as sandbox_configs_router
|
|
from letta.server.rest_api.routers.v1.sources import router as sources_router
|
|
from letta.server.rest_api.routers.v1.steps import router as steps_router
|
|
from letta.server.rest_api.routers.v1.tags import router as tags_router
|
|
from letta.server.rest_api.routers.v1.telemetry import router as telemetry_router
|
|
from letta.server.rest_api.routers.v1.tools import router as tools_router
|
|
from letta.server.rest_api.routers.v1.voice import router as voice_router
|
|
from letta.server.rest_api.routers.v1.zai import router as zai_router
|
|
|
|
ROUTERS = [
|
|
anthropic_router,
|
|
zai_router,
|
|
archives_router,
|
|
tools_router,
|
|
sources_router,
|
|
folders_router,
|
|
agents_router,
|
|
conversations_router,
|
|
chat_completions_router,
|
|
git_http_router,
|
|
groups_router,
|
|
identities_router,
|
|
internal_agents_router,
|
|
internal_blocks_router,
|
|
internal_runs_router,
|
|
internal_templates_router,
|
|
llm_router,
|
|
mcp_servers_router,
|
|
blocks_router,
|
|
jobs_router,
|
|
health_router,
|
|
sandbox_configs_router,
|
|
providers_router,
|
|
runs_router,
|
|
steps_router,
|
|
tags_router,
|
|
telemetry_router,
|
|
messages_router,
|
|
passages_router,
|
|
voice_router,
|
|
embeddings_router,
|
|
openai_chat_completions_router,
|
|
]
|