feat: keep what agents deliver and serve it at signed links (ADR-0004)

The Orchestration engine keeps every completed agent Execution it relays,
by tenant, Customer case and Execution, and serves its record and files at
signed, expiring links. A KAB workflow step, which takes one output per
step, is given one JSON document of links (`deliver: links`); other callers
still get each file, and what they are given is kept either way.

- store.py, links.py, delivery.py, serving.py; the relay keeps and links
- the card declares `deliver`, `sources` and an output schema
- image: STORE_DIR on a /data volume; PUBLIC_URL and LINK_SECRET settings
- option 1's tests replaced by tests of the links document

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 20:05:47 +01:00
parent ce5e2f20cd
commit 6d32bc696d
17 changed files with 1235 additions and 205 deletions

View File

@@ -26,3 +26,15 @@ class OrchestrationSettings(BaseSettings):
# How long to wait to connect to an agent. Reading waits as long as the
# agent's work takes.
CONNECT_TIMEOUT_SECONDS: float = 10
# What agents deliver is kept here and served at signed links (ADR-0004).
# Unset: nothing is kept, and a caller asking for links gets none.
STORE_DIR: str | None = None
# The base of every link: the address a browser reaches this service at, which
# is not its address inside the platform's network. Unset: A2A_PUBLIC_URL.
PUBLIC_URL: str | None = None
# The secret links are signed with. Unset: one is made at start-up, and links
# stop working when the service restarts.
LINK_SECRET: str | None = None
# How long a link works; 0 for always.
LINK_TTL_SECONDS: int = 30 * 24 * 3600