Implements the intent of open PRs #48, #49, and part of #47 (all reviewed against the working tree — none of the three bugs were fixed yet): - #48 append_event returned cur.lastrowid (global row id) as the event's seq, while the INSERT allocates a per-session seq. The two only agree on a single-session DB, so ask_user's question_seq never matched latest_open_question() on a real install — card clicks never recorded an approval. The allocated seq is now read back from the inserted row; the atomic single-INSERT allocation is unchanged. - #49 the agent.message SSE echo carried the raw agent_messages row (tool_args_json / tool_result_json strings, no parsed keys), while GET /sessions/{id} hands clients the parsed shape. _persist_message now returns parsed tool_args / tool_result alongside the raw keys, so the ask_user question card renders live instead of after a reload. - #47 (partial) main.py carried the version as two literals that drifted from pyproject twice (1.3.2 reported 1.2.1; 1.4.1 reported 1.4.0). The version is now single-sourced in calliope.__version__, consumed by both FastAPI and /api/health; pyproject uses hatchling dynamic version. The PR's importlib.metadata approach was avoided: the venv's editable dist-info still says 0.1.0, which would report a third stale version. - Vision attachments: user-attached images now project as OpenAI image_url content parts (data URLs read from disk), so vision-capable models see the actual pixels instead of a path line (derive_chat_rows / project_user_content, tested in test_agent_event_log). Regression tests: per-session seq with a diverging second session, the full card-answer flow across sessions, and the health version matching the single-sourced metadata (tests/test_agent_interaction.py, tests/test_projects.py).
42 lines
936 B
TOML
42 lines
936 B
TOML
[project]
|
|
name = "calliope"
|
|
# Single-sourced from src/calliope/__init__.py (__version__) — PR #47: the
|
|
# static literal here drifted from main.py twice.
|
|
dynamic = ["version"]
|
|
description = "Local-first AI story-to-video studio"
|
|
requires-python = ">=3.11"
|
|
dependencies = [
|
|
"fastapi>=0.115.0",
|
|
"uvicorn[standard]>=0.32.0",
|
|
"aiosqlite>=0.20.0",
|
|
"pydantic>=2.9.0",
|
|
"pydantic-settings>=2.6.0",
|
|
"httpx>=0.27.0",
|
|
"python-multipart>=0.0.12",
|
|
"comfy-mcp>=0.10.0",
|
|
"mcp>=2.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = ["pytest>=8.3.0", "pytest-asyncio>=0.24.0", "ruff>=0.8.0"]
|
|
|
|
[project.scripts]
|
|
calliope = "calliope.main:main"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.version]
|
|
path = "src/calliope/__init__.py"
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
src = ["src"]
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "N", "W"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|