This removes the last no-op in the Matter Brief chain. A
matter.created event now claims the frame job, invokes Vega's
AgentCore runtime, consumes the terminal stream, and writes the returned
FrameOutput through the existing Story-1996 ingest boundary.
| Surface | Change |
|---|---|
framer_trigger.handler |
Replaces the logging stub with bedrock-agentcore.invoke_agent_runtime against AGENT_RUNTIME_ARN_FRAMER, using text/event-stream. |
framer_trigger.processor |
Assembles Vega's real FramerInput, marks the run running, ingests the terminal frame, and stamps succeeded or failed. |
MatterFrameService.ingest_agent_frame |
Remains the only write path: validates FrameOutput, overlays locks, honors generation CAS, appends business.matter_frames, audits, and emits matter_frame.updated. |
matter.created -> framer_trigger firm-scoped claim -> agents.agent_run status=running -> InvokeAgentRuntime(AGENT_RUNTIME_ARN_FRAMER) -> Vega agent_event_stream.v1 turn.completed(frame) -> MatterFrameService.ingest_agent_frame -> business.matter_frames row -> agents.agent_run status=succeeded
uv run pytest tests/unit/test_framer_trigger_processor.py tests/unit/test_framer_trigger_handler.py -q uv run ruff check src/workers/framer_trigger/handler.py src/workers/framer_trigger/processor.py src/shared/settings.py tests/unit/test_framer_trigger_handler.py tests/unit/test_framer_trigger_processor.py tests/integration/test_framer_trigger_jobs.py uv run mypy --follow-imports=skip src/workers/framer_trigger/handler.py src/workers/framer_trigger/processor.py set -a; . ./.env.test-db; set +a; uv run pytest tests/integration/test_framer_trigger_jobs.py -q
Deployment note: after merge, run deploy-framer-trigger.yml so
the stale framer-trigger Lambda artifact receives this invoke code.