You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(run): image attachment passthrough with provenance
Adds the operator-facing --attach surface and the spawn-time
provenance contract: each attached image is anchored to the run via
an HMAC-chained audit event, the content-addressed blob store, and
the worker's lineage v1 receipt parents.
Changes:
- Add Task.attachments list field and plumb it through Task.from_dict.
- New module src/bernstein/core/agents/multimodal_attestation.py:
build_attachment_context() reads paths, stores bytes in CAS,
records the audit event, and returns a MultiModalContext.
- New module src/bernstein/core/security/audit_chain.py: AuditChainStore
facade over AuditLog plus the additive multimodal.attach event type
and the record_multimodal_attach() helper.
- Additive helpers in core/persistence/lineage_signer.py for the
attachment-as-parent URI scheme.
- CLI: --attach option on bernstein run, repeatable, validated path,
with capability gating before any process is launched.
- Adapters: Claude and Gemini accept multimodal_context= and inline
base64-encoded attachments with the documented wire format.
- YAML plan loader honours an attachments: list on each step.
- Worktree pinning enforced at resolve time; cross-worktree attempts
raise WorktreeAccessDenied.
- Documentation in docs/operations/run.md.
- Tests:
- tests/unit/test_multimodal_attestation.py: 23 cases covering
Task model field, capability gating, sha256 stability, audit
record shape, lineage parents, worktree isolation, replay,
tamper detection, chain continuity, and YAML plan loader.
- tests/integration/test_run_attach.py: end-to-end stub-adapter
round-trip plus CLI option validation.
Closes#1797
0 commit comments