agent-chat-fastapi-langgraph-assistant-ui 0.3.4__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/README.md → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/PKG-INFO +44 -1
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/PKG-INFO → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/README.md +17 -18
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/pyproject.toml +18 -2
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/scripts/smoke_test_wheel.sh +1 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/scripts/stage_ui.sh +32 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/__init__.py +28 -3
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/adapters/__init__.py +15 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/adapters/langgraph_sqlite.py +101 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/adapters/memory.py +140 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/adapters/sqlite.py +513 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/capabilities.py +35 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/composition.py +130 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/config.py +111 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/docs/agents.md +5 -2
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/docs/configuration.md +113 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/docs/persistence.md +109 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/docs/threads.md +27 -10
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/docs/transport.md +38 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/docs.py +10 -1
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/domain.py +143 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/identity.py +49 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/migrations/__init__.py +1 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/migrations/env.py +30 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/migrations/versions/0001_sessions_messages_feedback.py +89 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/migrations/versions/__init__.py +1 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/ports.py +67 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/registry.py +9 -5
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/server.py +814 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/services.py +273 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/static_ui.py +81 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/transport.py +41 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/404/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/404.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/__next.__PAGE__.txt +2 -2
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/__next._full.txt +2 -2
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/__next._head.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/__next._index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/__next._tree.txt +1 -1
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web/_next/static/chunks/e54de45640ef90a8.js → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web/_next/static/chunks/782fe0b06f3be391.js +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/__next._full.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/__next._head.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/__next._index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/__next._not-found.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/__next._tree.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_not-found/index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/index.txt +2 -2
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/_not-found → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/404}/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/404.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/__next.__PAGE__.txt +2 -2
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/__next._full.txt +2 -2
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/__next._head.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/_not-found → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full}/__next._index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/__next._tree.txt +1 -1
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/_next/static/chunks/1f69191700b503ef.js → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/_next/static/chunks/0f5b2bd35837e49e.js +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_not-found/__next._full.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_not-found/__next._head.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/_not-found}/__next._index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_not-found/__next._not-found.__PAGE__.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_not-found/__next._not-found.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_not-found/__next._tree.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/404 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/_not-found}/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_not-found/index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/__next._full.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/__next._head.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/__next._index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/__next._tree.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/__next.admin.__PAGE__.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/__next.admin.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/admin/index.txt +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/index.html +1 -1
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/index.txt +2 -2
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/checkpoint_contract.py +71 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/fixtures/protocol_custom.txt +1 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/fixtures/protocol_graph.txt +1 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/fixtures/protocol_state.txt +3 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/fixtures/protocol_tool.txt +4 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/repository_contract.py +122 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_app_factory.py +81 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_compatibility_contract.py +273 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_config_state.py +20 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_docs.py +1 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_domain_boundary.py +34 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_langgraph_sqlite_checkpoints.py +121 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_memory_repositories.py +8 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_registry.py +51 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_services.py +160 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_serving.py +6 -1
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_sqlite_repositories.py +175 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_transport_boundary.py +36 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.4.0/tests/test_transport_protocol.py +122 -0
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/config.py +0 -52
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/docs/configuration.md +0 -60
- agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/server.py +0 -656
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/.gitignore +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/Dockerfile +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/scripts/build_wheel.sh +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/demo_agent/__init__.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/demo_agent/agent_factory.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/demo_agent/calculator.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/demo_agent/get_graph.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/demo_agent/tools/__init__.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/demo_agent/tools/graph_tool.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/docs/index.md +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/docs/providers.md +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/docs/quickstart.md +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/threads.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/01753452ac5baafa.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/30d8e87dcbdddc4d.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/339892169798c284.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/4a95dc46ade64fde.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/8c25bd17dcc24038.css +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/a09b0e81b13178b3.css +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/a6dad97d9634a72d.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/a6dad97d9634a72d.js.map +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/c1f433e6da65e45d.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web/_next/static/chunks/turbopack-6a8c15a03bc4b465.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web/_next/static/-DDDHvgvmdQB7wFAJ3c_w → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web/_next/static/xIbjf0yUmHl01IKAjaTMk}/_buildManifest.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web/_next/static/-DDDHvgvmdQB7wFAJ3c_w → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web/_next/static/xIbjf0yUmHl01IKAjaTMk}/_clientMiddlewareManifest.json +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web/_next/static/-DDDHvgvmdQB7wFAJ3c_w → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web/_next/static/xIbjf0yUmHl01IKAjaTMk}/_ssgManifest.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/_next/static/ZAwmajpTVjq_VWh3OQH5f → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/_next/static/UoGNN_WgJKuECWIMDn5cV}/_buildManifest.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/_next/static/ZAwmajpTVjq_VWh3OQH5f → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/_next/static/UoGNN_WgJKuECWIMDn5cV}/_clientMiddlewareManifest.json +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4/src/agent_chat_minimal/web_full/_next/static/ZAwmajpTVjq_VWh3OQH5f → agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/web_full/_next/static/UoGNN_WgJKuECWIMDn5cV}/_ssgManifest.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/3ace7f114fa1f091.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/4d2c63e33cdf7066.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/7c80bf5e80113a8b.css +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/8c25bd17dcc24038.css +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/a53a0fc1920ff4e8.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/a6dad97d9634a72d.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/a9779bfdd3066160.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/c4faa8443adcf05d.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/c7d807cf58f04d9d.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/d3d30b9a6eebcdc0.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/f258a48c9462f5ff.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/chunks/turbopack-ff4ab21e688d1749.js +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/4fa387ec64143e14-s.3b336396.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/53b9e256198e5412-s.853d50a3.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/5ce348bf30bf5439-s.56c1f21e.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/6306c77e7c8268e4-s.e3369375.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/7178b3e590c64307-s.55554cd0.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/797e433ab948586e-s.p.29207c2f.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/7d817b4c03b0c5f1-s.a40b9a8b.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/8a480f0b521d4e75-s.ea323500.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/bbc41e54d2fcbd21-s.fe42ddf4.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/caa3a2e1cccd8315-s.p.3b6cae6d.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/favicon.0b3bf435.ico +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/_next/static/media/fef07dbb0973bf53-s.518e079e.woff2 +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/src/agent_chat_minimal/web_full/favicon.ico +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_full_ui.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_injectable_graph.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_provider_agnostic.py +0 -0
- {agent_chat_fastapi_langgraph_assistant_ui-0.3.4 → agent_chat_fastapi_langgraph_assistant_ui-0.4.0}/tests/test_threads.py +0 -0
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agent-chat-fastapi-langgraph-assistant-ui
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Portable FastAPI and LangGraph chat with a bundled static UI
|
|
5
|
+
Requires-Python: >=3.11
|
|
6
|
+
Requires-Dist: assistant-stream-ce==0.0.2
|
|
7
|
+
Requires-Dist: fastapi>=0.127.0
|
|
8
|
+
Requires-Dist: langchain-openai>=0.2.0
|
|
9
|
+
Requires-Dist: langchain>=1.2.0
|
|
10
|
+
Requires-Dist: langgraph>=1.0.5
|
|
11
|
+
Requires-Dist: typing-extensions>=4.8.0
|
|
12
|
+
Requires-Dist: uvicorn>=0.34.0
|
|
13
|
+
Provides-Extra: persistence
|
|
14
|
+
Requires-Dist: aiosqlite>=0.20.0; extra == 'persistence'
|
|
15
|
+
Requires-Dist: alembic>=1.14.0; extra == 'persistence'
|
|
16
|
+
Requires-Dist: langgraph-checkpoint-sqlite<4,>=3.1.1; extra == 'persistence'
|
|
17
|
+
Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.36; extra == 'persistence'
|
|
18
|
+
Provides-Extra: test
|
|
19
|
+
Requires-Dist: aiosqlite>=0.20.0; extra == 'test'
|
|
20
|
+
Requires-Dist: alembic>=1.14.0; extra == 'test'
|
|
21
|
+
Requires-Dist: build>=1.2.2; extra == 'test'
|
|
22
|
+
Requires-Dist: httpx>=0.27.0; extra == 'test'
|
|
23
|
+
Requires-Dist: langgraph-checkpoint-sqlite<4,>=3.1.1; extra == 'test'
|
|
24
|
+
Requires-Dist: pytest>=8.0.0; extra == 'test'
|
|
25
|
+
Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.36; extra == 'test'
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
1
28
|
# Agent Chat Minimal
|
|
2
29
|
|
|
3
30
|
This local Python distribution bundles the fixed weather/graph demo agent,
|
|
@@ -21,6 +48,13 @@ pip install agent-chat-fastapi-langgraph-assistant-ui
|
|
|
21
48
|
minimal-chat-serve --port 8011
|
|
22
49
|
```
|
|
23
50
|
|
|
51
|
+
Install durable application persistence separately when needed:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
pip install "agent-chat-fastapi-langgraph-assistant-ui[persistence]"
|
|
55
|
+
minimal-chat-migrate ./agent-chat.db
|
|
56
|
+
```
|
|
57
|
+
|
|
24
58
|
Or install and serve the locally built wheel with:
|
|
25
59
|
|
|
26
60
|
```bash
|
|
@@ -57,7 +91,7 @@ app = create_app(graph=make_my_agent("anthropic:claude-sonnet-4-5"))
|
|
|
57
91
|
|
|
58
92
|
## Documentation (in the wheel)
|
|
59
93
|
|
|
60
|
-
|
|
94
|
+
Guides ship inside the package and are readable at runtime:
|
|
61
95
|
|
|
62
96
|
```python
|
|
63
97
|
from agent_chat_minimal import docs
|
|
@@ -72,6 +106,8 @@ docs.show("threads")
|
|
|
72
106
|
| `providers` | OpenAI / Anthropic / Ollama specs & creds |
|
|
73
107
|
| `configuration` | env vars, CLI flags, hooks, 503 semantics |
|
|
74
108
|
| `threads` | multi-thread chats, frontend-full compat |
|
|
109
|
+
| `transport` | pinned Python/frontend protocol boundary and replacement criteria |
|
|
110
|
+
| `persistence` | principal, domain ports, service authorization, and deletion semantics |
|
|
75
111
|
|
|
76
112
|
## Threads (frontend-full compatible)
|
|
77
113
|
|
|
@@ -87,6 +123,13 @@ PORT=8011 # uvicorn bind port
|
|
|
87
123
|
MODEL=openai:gpt-4o-mini # provider:model spec
|
|
88
124
|
DEFAULT_AGENT=weather # registry id aliased by POST /assistant
|
|
89
125
|
MINIMAL_WEB_DIR= # override bundled web/ (empty = bundled)
|
|
126
|
+
FULL_WEB_DIR= # override bundled web_full/ (empty = bundled)
|
|
127
|
+
UI_PRESET=minimal # runtime UI preset: minimal or full
|
|
128
|
+
DATABASE_PATH=agent-chat.db # default application SQLite file
|
|
129
|
+
DATABASE_URL= # SQLAlchemy URL; overrides DATABASE_PATH
|
|
130
|
+
CHECKPOINT_DATABASE_PATH=agent-chat-checkpoints.db # graph checkpoint SQLite file
|
|
131
|
+
CHECKPOINT_DATABASE_URL= # SQLite URL; overrides checkpoint path
|
|
132
|
+
AUTO_MIGRATE=true # migration policy for a future composition root
|
|
90
133
|
OPENAI_API_KEY= # credential for the default openai model
|
|
91
134
|
ANTHROPIC_API_KEY= # credential when MODEL uses anthropic:
|
|
92
135
|
```
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.5
|
|
2
|
-
Name: agent-chat-fastapi-langgraph-assistant-ui
|
|
3
|
-
Version: 0.3.4
|
|
4
|
-
Summary: Portable FastAPI and LangGraph chat with a bundled static UI
|
|
5
|
-
Requires-Python: >=3.11
|
|
6
|
-
Requires-Dist: assistant-stream-ce>=0.0.2
|
|
7
|
-
Requires-Dist: fastapi>=0.127.0
|
|
8
|
-
Requires-Dist: langchain-openai>=0.2.0
|
|
9
|
-
Requires-Dist: langchain>=1.2.0
|
|
10
|
-
Requires-Dist: langgraph>=1.0.5
|
|
11
|
-
Requires-Dist: typing-extensions>=4.8.0
|
|
12
|
-
Requires-Dist: uvicorn>=0.34.0
|
|
13
|
-
Provides-Extra: test
|
|
14
|
-
Requires-Dist: httpx>=0.27.0; extra == 'test'
|
|
15
|
-
Requires-Dist: pytest>=8.0.0; extra == 'test'
|
|
16
|
-
Description-Content-Type: text/markdown
|
|
17
|
-
|
|
18
1
|
# Agent Chat Minimal
|
|
19
2
|
|
|
20
3
|
This local Python distribution bundles the fixed weather/graph demo agent,
|
|
@@ -38,6 +21,13 @@ pip install agent-chat-fastapi-langgraph-assistant-ui
|
|
|
38
21
|
minimal-chat-serve --port 8011
|
|
39
22
|
```
|
|
40
23
|
|
|
24
|
+
Install durable application persistence separately when needed:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install "agent-chat-fastapi-langgraph-assistant-ui[persistence]"
|
|
28
|
+
minimal-chat-migrate ./agent-chat.db
|
|
29
|
+
```
|
|
30
|
+
|
|
41
31
|
Or install and serve the locally built wheel with:
|
|
42
32
|
|
|
43
33
|
```bash
|
|
@@ -74,7 +64,7 @@ app = create_app(graph=make_my_agent("anthropic:claude-sonnet-4-5"))
|
|
|
74
64
|
|
|
75
65
|
## Documentation (in the wheel)
|
|
76
66
|
|
|
77
|
-
|
|
67
|
+
Guides ship inside the package and are readable at runtime:
|
|
78
68
|
|
|
79
69
|
```python
|
|
80
70
|
from agent_chat_minimal import docs
|
|
@@ -89,6 +79,8 @@ docs.show("threads")
|
|
|
89
79
|
| `providers` | OpenAI / Anthropic / Ollama specs & creds |
|
|
90
80
|
| `configuration` | env vars, CLI flags, hooks, 503 semantics |
|
|
91
81
|
| `threads` | multi-thread chats, frontend-full compat |
|
|
82
|
+
| `transport` | pinned Python/frontend protocol boundary and replacement criteria |
|
|
83
|
+
| `persistence` | principal, domain ports, service authorization, and deletion semantics |
|
|
92
84
|
|
|
93
85
|
## Threads (frontend-full compatible)
|
|
94
86
|
|
|
@@ -104,6 +96,13 @@ PORT=8011 # uvicorn bind port
|
|
|
104
96
|
MODEL=openai:gpt-4o-mini # provider:model spec
|
|
105
97
|
DEFAULT_AGENT=weather # registry id aliased by POST /assistant
|
|
106
98
|
MINIMAL_WEB_DIR= # override bundled web/ (empty = bundled)
|
|
99
|
+
FULL_WEB_DIR= # override bundled web_full/ (empty = bundled)
|
|
100
|
+
UI_PRESET=minimal # runtime UI preset: minimal or full
|
|
101
|
+
DATABASE_PATH=agent-chat.db # default application SQLite file
|
|
102
|
+
DATABASE_URL= # SQLAlchemy URL; overrides DATABASE_PATH
|
|
103
|
+
CHECKPOINT_DATABASE_PATH=agent-chat-checkpoints.db # graph checkpoint SQLite file
|
|
104
|
+
CHECKPOINT_DATABASE_URL= # SQLite URL; overrides checkpoint path
|
|
105
|
+
AUTO_MIGRATE=true # migration policy for a future composition root
|
|
107
106
|
OPENAI_API_KEY= # credential for the default openai model
|
|
108
107
|
ANTHROPIC_API_KEY= # credential when MODEL uses anthropic:
|
|
109
108
|
```
|
|
@@ -4,12 +4,12 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agent-chat-fastapi-langgraph-assistant-ui"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.4.0"
|
|
8
8
|
description = "Portable FastAPI and LangGraph chat with a bundled static UI"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
11
11
|
dependencies = [
|
|
12
|
-
"assistant-stream-ce
|
|
12
|
+
"assistant-stream-ce==0.0.2",
|
|
13
13
|
"fastapi>=0.127.0",
|
|
14
14
|
"langchain>=1.2.0",
|
|
15
15
|
"langchain-openai>=0.2.0",
|
|
@@ -19,13 +19,25 @@ dependencies = [
|
|
|
19
19
|
]
|
|
20
20
|
|
|
21
21
|
[project.optional-dependencies]
|
|
22
|
+
persistence = [
|
|
23
|
+
"SQLAlchemy[asyncio]>=2.0.36,<3",
|
|
24
|
+
"aiosqlite>=0.20.0",
|
|
25
|
+
"alembic>=1.14.0",
|
|
26
|
+
"langgraph-checkpoint-sqlite>=3.1.1,<4",
|
|
27
|
+
]
|
|
22
28
|
test = [
|
|
29
|
+
"SQLAlchemy[asyncio]>=2.0.36,<3",
|
|
30
|
+
"aiosqlite>=0.20.0",
|
|
31
|
+
"alembic>=1.14.0",
|
|
32
|
+
"langgraph-checkpoint-sqlite>=3.1.1,<4",
|
|
33
|
+
"build>=1.2.2",
|
|
23
34
|
"httpx>=0.27.0",
|
|
24
35
|
"pytest>=8.0.0",
|
|
25
36
|
]
|
|
26
37
|
|
|
27
38
|
[project.scripts]
|
|
28
39
|
minimal-chat-serve = "agent_chat_minimal.server:main"
|
|
40
|
+
minimal-chat-migrate = "agent_chat_minimal.adapters.sqlite:migration_main"
|
|
29
41
|
|
|
30
42
|
# Third-party agents register here, e.g.
|
|
31
43
|
# [project.entry-points."agent_chat.agents"]
|
|
@@ -33,6 +45,7 @@ minimal-chat-serve = "agent_chat_minimal.server:main"
|
|
|
33
45
|
|
|
34
46
|
[tool.hatch.build.targets.wheel]
|
|
35
47
|
packages = ["src/agent_chat_minimal"]
|
|
48
|
+
artifacts = ["src/agent_chat_minimal/migrations/**/*.py"]
|
|
36
49
|
# The tracked .gitkeep placeholders would otherwise be collected twice (once
|
|
37
50
|
# via `packages`, once via `force-include`) and fail the build with "A second
|
|
38
51
|
# file is being added to the wheel archive at the same path".
|
|
@@ -47,6 +60,9 @@ exclude = ["**/.gitkeep"]
|
|
|
47
60
|
# application/frontend/{frontend-minimal,frontend-full}/out before building).
|
|
48
61
|
# python -m build builds the wheel from the sdist, so without this the PyPI
|
|
49
62
|
# wheel would ship without the UIs.
|
|
63
|
+
[tool.hatch.build.targets.sdist]
|
|
64
|
+
artifacts = ["src/agent_chat_minimal/migrations/**/*.py"]
|
|
65
|
+
|
|
50
66
|
[tool.hatch.build.targets.sdist.force-include]
|
|
51
67
|
"src/agent_chat_minimal/web" = "src/agent_chat_minimal/web"
|
|
52
68
|
"src/agent_chat_minimal/web_full" = "src/agent_chat_minimal/web_full"
|
|
@@ -38,6 +38,7 @@ done
|
|
|
38
38
|
|
|
39
39
|
"$curl_bin" -sf "http://127.0.0.1:$port/health"
|
|
40
40
|
"$curl_bin" -sf "http://127.0.0.1:$port/" | /bin/grep -qi "<html"
|
|
41
|
+
"$curl_bin" -sf "http://127.0.0.1:$port/full/" | /bin/grep -qi "<html"
|
|
41
42
|
test "$("$curl_bin" -s -o /dev/null -w '%{http_code}' \
|
|
42
43
|
-X POST "http://127.0.0.1:$port/assistant" \
|
|
43
44
|
-H 'content-type: application/json' \
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Build both frontend static exports and stage them as package data so the
|
|
3
|
+
# library serves the UI from a source checkout (API-only mode otherwise).
|
|
4
|
+
# Staged output is gitignored; `build_wheel.sh` runs this implicitly.
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
|
|
8
|
+
frontend_minimal="$repo_root/application/frontend/frontend-minimal"
|
|
9
|
+
frontend_full="$repo_root/application/frontend/frontend-full"
|
|
10
|
+
package="$repo_root/packages/agent-chat-minimal"
|
|
11
|
+
web="$package/src/agent_chat_minimal/web"
|
|
12
|
+
web_full="$package/src/agent_chat_minimal/web_full"
|
|
13
|
+
|
|
14
|
+
pnpm --dir "$frontend_minimal" install --frozen-lockfile
|
|
15
|
+
pnpm --dir "$frontend_minimal" build
|
|
16
|
+
rm -rf "$web"
|
|
17
|
+
cp -R "$frontend_minimal/out" "$web"
|
|
18
|
+
test -f "$web/index.html"
|
|
19
|
+
|
|
20
|
+
# Full UI (thread sidebar) is namespaced under /full and talks same-origin.
|
|
21
|
+
pnpm --dir "$frontend_full" install --frozen-lockfile
|
|
22
|
+
NEXT_PUBLIC_API_BASE="" FULL_UI_BASE_PATH=/full pnpm --dir "$frontend_full" build
|
|
23
|
+
rm -rf "$web_full"
|
|
24
|
+
cp -R "$frontend_full/out" "$web_full"
|
|
25
|
+
test -f "$web_full/index.html"
|
|
26
|
+
|
|
27
|
+
# Restore tracked placeholders (staging wipes them; output itself is ignored).
|
|
28
|
+
git -C "$repo_root" checkout -- \
|
|
29
|
+
packages/agent-chat-minimal/src/agent_chat_minimal/web/.gitkeep \
|
|
30
|
+
packages/agent-chat-minimal/src/agent_chat_minimal/web_full/.gitkeep
|
|
31
|
+
|
|
32
|
+
echo "staged: $web $web_full"
|
|
@@ -14,35 +14,60 @@ Example:
|
|
|
14
14
|
"""
|
|
15
15
|
|
|
16
16
|
from . import docs
|
|
17
|
+
from .capabilities import CapabilityProvider
|
|
18
|
+
from .composition import create_app, create_default_app, main
|
|
17
19
|
from .config import ENV_DOC, Settings
|
|
20
|
+
from .domain import (
|
|
21
|
+
Feedback,
|
|
22
|
+
FeedbackRating,
|
|
23
|
+
MessageRole,
|
|
24
|
+
Principal,
|
|
25
|
+
Session,
|
|
26
|
+
SessionStatus,
|
|
27
|
+
StoredMessage,
|
|
28
|
+
)
|
|
29
|
+
from .identity import DefaultPrincipalResolver
|
|
30
|
+
from .ports import PrincipalResolver
|
|
18
31
|
from .registry import AGENT_REGISTRY, discover_agents
|
|
32
|
+
from .services import SessionService, TranscriptService
|
|
19
33
|
from .server import (
|
|
20
34
|
DEFAULT_WEB_DIR,
|
|
21
35
|
DEFAULT_WEB_FULL_DIR,
|
|
22
36
|
ChatGraph,
|
|
23
37
|
ScopedChatRequest,
|
|
24
|
-
create_app,
|
|
25
38
|
default_prepare_state,
|
|
26
|
-
main,
|
|
27
39
|
resolve_thread_id,
|
|
28
40
|
)
|
|
29
41
|
from .threads import ThreadManager, ThreadMessageStore, ThreadMetadata
|
|
30
42
|
|
|
31
|
-
__version__ = "0.
|
|
43
|
+
__version__ = "0.4.0"
|
|
32
44
|
|
|
33
45
|
__all__ = [
|
|
34
46
|
"__version__",
|
|
35
47
|
"AGENT_REGISTRY",
|
|
36
48
|
"ENV_DOC",
|
|
37
49
|
"ChatGraph",
|
|
50
|
+
"CapabilityProvider",
|
|
38
51
|
"DEFAULT_WEB_DIR",
|
|
52
|
+
"DefaultPrincipalResolver",
|
|
39
53
|
"DEFAULT_WEB_FULL_DIR",
|
|
54
|
+
"Feedback",
|
|
55
|
+
"FeedbackRating",
|
|
56
|
+
"MessageRole",
|
|
57
|
+
"Principal",
|
|
58
|
+
"PrincipalResolver",
|
|
40
59
|
"ScopedChatRequest",
|
|
60
|
+
"Session",
|
|
61
|
+
"SessionService",
|
|
62
|
+
"SessionStatus",
|
|
41
63
|
"Settings",
|
|
64
|
+
"StoredMessage",
|
|
65
|
+
"TranscriptService",
|
|
42
66
|
"ThreadManager",
|
|
43
67
|
"ThreadMessageStore",
|
|
44
68
|
"ThreadMetadata",
|
|
45
69
|
"create_app",
|
|
70
|
+
"create_default_app",
|
|
46
71
|
"default_prepare_state",
|
|
47
72
|
"discover_agents",
|
|
48
73
|
"docs",
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"""Reference adapters for the application ports."""
|
|
2
|
+
|
|
3
|
+
from .memory import (
|
|
4
|
+
InMemoryFeedbackRepository,
|
|
5
|
+
InMemoryRepositories,
|
|
6
|
+
InMemorySessionRepository,
|
|
7
|
+
InMemoryTranscriptRepository,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"InMemoryFeedbackRepository",
|
|
12
|
+
"InMemoryRepositories",
|
|
13
|
+
"InMemorySessionRepository",
|
|
14
|
+
"InMemoryTranscriptRepository",
|
|
15
|
+
]
|
agent_chat_fastapi_langgraph_assistant_ui-0.4.0/src/agent_chat_minimal/adapters/langgraph_sqlite.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"""Separate async lifecycle for LangGraph's SQLite checkpoint saver."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from contextlib import AbstractAsyncContextManager
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from types import TracebackType
|
|
8
|
+
|
|
9
|
+
from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
_SQLITE_URL_PREFIXES = ("sqlite+aiosqlite:///", "sqlite:///")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def _connection_string(database: str | Path) -> str:
|
|
16
|
+
if isinstance(database, Path):
|
|
17
|
+
return str(database.expanduser().resolve())
|
|
18
|
+
if database == ":memory:":
|
|
19
|
+
return database
|
|
20
|
+
for prefix in _SQLITE_URL_PREFIXES:
|
|
21
|
+
if database.startswith(prefix):
|
|
22
|
+
path = database.removeprefix(prefix)
|
|
23
|
+
if not path:
|
|
24
|
+
raise ValueError("checkpoint database URL must include a path")
|
|
25
|
+
if path == ":memory:":
|
|
26
|
+
return path
|
|
27
|
+
return str(Path(path).expanduser().resolve())
|
|
28
|
+
if "://" in database:
|
|
29
|
+
raise ValueError("checkpoint database must be a SQLite path or URL")
|
|
30
|
+
if not database.strip():
|
|
31
|
+
raise ValueError("checkpoint database path must not be empty")
|
|
32
|
+
return str(Path(database).expanduser().resolve())
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def _require_session_id(session_id: str) -> None:
|
|
36
|
+
if not session_id or not session_id.strip():
|
|
37
|
+
raise ValueError("session id must not be empty")
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class LangGraphSQLiteCheckpoints:
|
|
41
|
+
"""Own an ``AsyncSqliteSaver`` connection and implement CheckpointDeleter.
|
|
42
|
+
|
|
43
|
+
Callers authorize a session before handing its validated ID to this adapter.
|
|
44
|
+
The same ID is used as LangGraph's ``configurable.thread_id``.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
def __init__(
|
|
48
|
+
self,
|
|
49
|
+
context: AbstractAsyncContextManager[AsyncSqliteSaver],
|
|
50
|
+
saver: AsyncSqliteSaver,
|
|
51
|
+
) -> None:
|
|
52
|
+
self._context = context
|
|
53
|
+
self._saver = saver
|
|
54
|
+
self._disposed = False
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
async def open(cls, database: str | Path) -> LangGraphSQLiteCheckpoints:
|
|
58
|
+
"""Open the connection and eagerly create the official saver schema."""
|
|
59
|
+
context = AsyncSqliteSaver.from_conn_string(_connection_string(database))
|
|
60
|
+
saver = await context.__aenter__()
|
|
61
|
+
try:
|
|
62
|
+
await saver.setup()
|
|
63
|
+
except BaseException as exc:
|
|
64
|
+
await context.__aexit__(type(exc), exc, exc.__traceback__)
|
|
65
|
+
raise
|
|
66
|
+
return cls(context, saver)
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def checkpointer(self) -> AsyncSqliteSaver:
|
|
70
|
+
"""Return the saver accepted by LangGraph graph factories."""
|
|
71
|
+
if self._disposed:
|
|
72
|
+
raise RuntimeError("checkpoint adapter is disposed")
|
|
73
|
+
return self._saver
|
|
74
|
+
|
|
75
|
+
async def delete_session(self, session_id: str) -> None:
|
|
76
|
+
_require_session_id(session_id)
|
|
77
|
+
if self._disposed:
|
|
78
|
+
raise RuntimeError("checkpoint adapter is disposed")
|
|
79
|
+
await self._saver.adelete_thread(session_id)
|
|
80
|
+
|
|
81
|
+
async def dispose(self) -> None:
|
|
82
|
+
if self._disposed:
|
|
83
|
+
return
|
|
84
|
+
self._disposed = True
|
|
85
|
+
await self._context.__aexit__(None, None, None)
|
|
86
|
+
|
|
87
|
+
async def __aenter__(self) -> LangGraphSQLiteCheckpoints:
|
|
88
|
+
if self._disposed:
|
|
89
|
+
raise RuntimeError("checkpoint adapter is disposed")
|
|
90
|
+
return self
|
|
91
|
+
|
|
92
|
+
async def __aexit__(
|
|
93
|
+
self,
|
|
94
|
+
exc_type: type[BaseException] | None,
|
|
95
|
+
exc: BaseException | None,
|
|
96
|
+
traceback: TracebackType | None,
|
|
97
|
+
) -> None:
|
|
98
|
+
await self.dispose()
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
__all__ = ["LangGraphSQLiteCheckpoints"]
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""Async in-memory reference implementations of persistence ports."""
|
|
2
|
+
|
|
3
|
+
import asyncio
|
|
4
|
+
from copy import deepcopy
|
|
5
|
+
|
|
6
|
+
from ..domain import Feedback, Session, SessionStatus, StoredMessage
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class InMemorySessionRepository:
|
|
10
|
+
def __init__(self) -> None:
|
|
11
|
+
self._items: dict[str, Session] = {}
|
|
12
|
+
self._lock = asyncio.Lock()
|
|
13
|
+
|
|
14
|
+
async def add(self, session: Session) -> None:
|
|
15
|
+
async with self._lock:
|
|
16
|
+
if session.id in self._items:
|
|
17
|
+
raise ValueError(f"session {session.id!r} already exists")
|
|
18
|
+
self._items[session.id] = deepcopy(session)
|
|
19
|
+
|
|
20
|
+
async def get(self, session_id: str) -> Session | None:
|
|
21
|
+
async with self._lock:
|
|
22
|
+
return deepcopy(self._items.get(session_id))
|
|
23
|
+
|
|
24
|
+
async def list_by_owner(
|
|
25
|
+
self, owner_subject: str, *, include_archived: bool = False
|
|
26
|
+
) -> list[Session]:
|
|
27
|
+
async with self._lock:
|
|
28
|
+
items = [
|
|
29
|
+
item
|
|
30
|
+
for item in self._items.values()
|
|
31
|
+
if item.owner_subject == owner_subject
|
|
32
|
+
and (include_archived or item.status is SessionStatus.ACTIVE)
|
|
33
|
+
]
|
|
34
|
+
return deepcopy(sorted(items, key=lambda item: item.created_at))
|
|
35
|
+
|
|
36
|
+
async def update(self, session: Session) -> None:
|
|
37
|
+
async with self._lock:
|
|
38
|
+
if session.id not in self._items:
|
|
39
|
+
raise ValueError(f"session {session.id!r} does not exist")
|
|
40
|
+
self._items[session.id] = deepcopy(session)
|
|
41
|
+
|
|
42
|
+
async def delete(self, session_id: str) -> bool:
|
|
43
|
+
async with self._lock:
|
|
44
|
+
return self._items.pop(session_id, None) is not None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class InMemoryTranscriptRepository:
|
|
48
|
+
def __init__(self) -> None:
|
|
49
|
+
self._items: dict[str, StoredMessage] = {}
|
|
50
|
+
self._lock = asyncio.Lock()
|
|
51
|
+
|
|
52
|
+
async def add(self, message: StoredMessage) -> None:
|
|
53
|
+
async with self._lock:
|
|
54
|
+
if message.id in self._items:
|
|
55
|
+
raise ValueError(f"message {message.id!r} already exists")
|
|
56
|
+
if any(
|
|
57
|
+
item.session_id == message.session_id
|
|
58
|
+
and item.sequence == message.sequence
|
|
59
|
+
for item in self._items.values()
|
|
60
|
+
):
|
|
61
|
+
raise ValueError(
|
|
62
|
+
f"message sequence {message.sequence} already exists in session"
|
|
63
|
+
)
|
|
64
|
+
self._items[message.id] = deepcopy(message)
|
|
65
|
+
|
|
66
|
+
async def get(self, message_id: str) -> StoredMessage | None:
|
|
67
|
+
async with self._lock:
|
|
68
|
+
return deepcopy(self._items.get(message_id))
|
|
69
|
+
|
|
70
|
+
async def list_by_session(self, session_id: str) -> list[StoredMessage]:
|
|
71
|
+
async with self._lock:
|
|
72
|
+
items = [
|
|
73
|
+
item for item in self._items.values() if item.session_id == session_id
|
|
74
|
+
]
|
|
75
|
+
return deepcopy(sorted(items, key=lambda item: item.sequence))
|
|
76
|
+
|
|
77
|
+
async def delete_by_session(self, session_id: str) -> None:
|
|
78
|
+
async with self._lock:
|
|
79
|
+
self._items = {
|
|
80
|
+
key: item
|
|
81
|
+
for key, item in self._items.items()
|
|
82
|
+
if item.session_id != session_id
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class InMemoryFeedbackRepository:
|
|
87
|
+
def __init__(self) -> None:
|
|
88
|
+
self._items: dict[tuple[str, str], Feedback] = {}
|
|
89
|
+
self._lock = asyncio.Lock()
|
|
90
|
+
|
|
91
|
+
async def upsert(self, feedback: Feedback) -> Feedback:
|
|
92
|
+
key = (feedback.session_id, feedback.message_id)
|
|
93
|
+
async with self._lock:
|
|
94
|
+
existing = self._items.get(key)
|
|
95
|
+
if existing is not None and existing.id != feedback.id:
|
|
96
|
+
raise ValueError("feedback upsert must preserve its stable id")
|
|
97
|
+
self._items[key] = deepcopy(feedback)
|
|
98
|
+
return deepcopy(feedback)
|
|
99
|
+
|
|
100
|
+
async def get_for_message(
|
|
101
|
+
self, session_id: str, message_id: str
|
|
102
|
+
) -> Feedback | None:
|
|
103
|
+
async with self._lock:
|
|
104
|
+
return deepcopy(self._items.get((session_id, message_id)))
|
|
105
|
+
|
|
106
|
+
async def list_by_session(self, session_id: str) -> list[Feedback]:
|
|
107
|
+
async with self._lock:
|
|
108
|
+
items = [
|
|
109
|
+
item for item in self._items.values() if item.session_id == session_id
|
|
110
|
+
]
|
|
111
|
+
return deepcopy(sorted(items, key=lambda item: item.created_at))
|
|
112
|
+
|
|
113
|
+
async def delete_for_message(self, session_id: str, message_id: str) -> bool:
|
|
114
|
+
async with self._lock:
|
|
115
|
+
return self._items.pop((session_id, message_id), None) is not None
|
|
116
|
+
|
|
117
|
+
async def delete_by_session(self, session_id: str) -> None:
|
|
118
|
+
async with self._lock:
|
|
119
|
+
self._items = {
|
|
120
|
+
key: item
|
|
121
|
+
for key, item in self._items.items()
|
|
122
|
+
if item.session_id != session_id
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
class InMemoryRepositories:
|
|
127
|
+
"""Convenient bundle for composition roots and tests."""
|
|
128
|
+
|
|
129
|
+
def __init__(self) -> None:
|
|
130
|
+
self.sessions = InMemorySessionRepository()
|
|
131
|
+
self.transcripts = InMemoryTranscriptRepository()
|
|
132
|
+
self.feedback = InMemoryFeedbackRepository()
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
__all__ = [
|
|
136
|
+
"InMemoryFeedbackRepository",
|
|
137
|
+
"InMemoryRepositories",
|
|
138
|
+
"InMemorySessionRepository",
|
|
139
|
+
"InMemoryTranscriptRepository",
|
|
140
|
+
]
|