v0.3.2: add GET /api/artifacts/{id}/raw for content read-back
Metadata (GET /api/artifacts/{id}) stays metadata-only; the full content now
has its own endpoint so an agent can verify exactly what it posted.
- New ArtifactRawView at /api/artifacts/{id}/raw: bearer-or-session auth,
owner-scoped. Serves exact source text (markdown/html_full/json/csv), file
bytes (image/pdf/binary), or 404 for render-only kinds (html_fragment/deck).
Reuses raw_artifact_path/safe_artifact_path.
- serialize_artifact exposes api_raw_url; /api/capabilities advertises the
route. (The old /a/{id}?raw= viewer stays session-only for browsers.)
- Docs + tests (exact content, owner-scoping, 403 unauth, 404 render-only).
Suite: 136 passing; verified live.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
2b901f7844
commit
f6f004c689
6 changed files with 102 additions and 15 deletions
13
CHANGELOG.md
13
CHANGELOG.md
|
|
@ -9,6 +9,16 @@ former name, "Daybook".)
|
|||
|
||||
_Nothing yet._
|
||||
|
||||
## [0.3.2] — 2026-09-04
|
||||
|
||||
### Added
|
||||
- `GET /api/artifacts/{id}/raw` — the artifact's full content, separate from the
|
||||
metadata detail endpoint. Bearer-token (or session) auth, owner-scoped, so an
|
||||
agent can read back and verify exactly what it posted: exact source text for
|
||||
`markdown`/`html_full`/`json`/`csv`, file bytes for `image`/`pdf`/`binary`,
|
||||
`404` for render-only `html_fragment`/`deck`. The metadata response now
|
||||
includes `api_raw_url`, and `/api/capabilities` advertises the route.
|
||||
|
||||
## [0.3.1] — 2026-09-04
|
||||
|
||||
### Changed
|
||||
|
|
@ -128,7 +138,8 @@ First tagged release.
|
|||
- Dockerised (Gunicorn + whitenoise), SQLite, `git`-based deploy with a
|
||||
runbook (`deploy/cloud_agent_deploy.md`) and health check.
|
||||
|
||||
[Unreleased]: https://git.cygnus.systems/peter/daybook/compare/v0.3.1...HEAD
|
||||
[Unreleased]: https://git.cygnus.systems/peter/daybook/compare/v0.3.2...HEAD
|
||||
[0.3.2]: https://git.cygnus.systems/peter/daybook/compare/v0.3.1...v0.3.2
|
||||
[0.3.1]: https://git.cygnus.systems/peter/daybook/compare/v0.3.0...v0.3.1
|
||||
[0.3.0]: https://git.cygnus.systems/peter/daybook/compare/v0.2.1...v0.3.0
|
||||
[0.2.1]: https://git.cygnus.systems/peter/daybook/compare/v0.2.0...v0.2.1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue