diff --git a/README.md b/README.md index f580955..a7b8ff4 100644 --- a/README.md +++ b/README.md @@ -324,8 +324,9 @@ curl --unix-socket amduatd.sock \ `/v1/space/workspace` returns a deterministic, read-only snapshot for the effective space. It aggregates the manifest, mount resolution, per-mount cursor -status, store backend metadata, federation flags, and store capabilities into -one JSON response. It performs no network I/O and does not mutate storage. +status, store backend metadata, federation flags, and store capabilities +(`capabilities.supported_ops`) into one JSON response. It performs no network +I/O and does not mutate storage. This is a local snapshot that complements: - `/v1/space/manifest` (manifest root + canonical manifest) @@ -342,9 +343,12 @@ curl --unix-socket amduatd.sock \ ## Workspace UI `/workspace` serves a minimal, human-facing page that consumes -`/v1/space/workspace` and `/v1/space/mounts/sync/until`. It is a convenience -view for inspection and manual sync control, not a stable API. For -programmatic use, call the `/v1/*` endpoints directly. +`/v1/space/workspace` and `/v1/space/mounts/sync/until`, plus read-only +health panels for `/v1/space/doctor`, `/v1/space/roots`, +`/v1/space/sync/status`, `/v1/space/mounts/resolve`, and +`/v1/space/manifest`. It is a convenience view for inspection and manual sync +control, not a stable API. For programmatic use, call the `/v1/*` endpoints +directly. ## Space mounts sync (track mounts) diff --git a/registry/amduatd-api-contract.v1.json b/registry/amduatd-api-contract.v1.json index e895acc..7d655ed 100644 --- a/registry/amduatd-api-contract.v1.json +++ b/registry/amduatd-api-contract.v1.json @@ -384,6 +384,59 @@ }, "peers": {"type": "array", "items": {"$ref": "#/schemas/space_sync_status_peer"}} } + }, + "space_workspace_response": { + "type": "object", + "required": ["effective_space", "store_backend", "federation", "capabilities", "manifest_ref", "manifest", "mounts"], + "properties": { + "effective_space": {"type": "object"}, + "store_backend": {"type": "string"}, + "federation": { + "type": "object", + "required": ["enabled", "transport"], + "properties": { + "enabled": {"type": "boolean"}, + "transport": {"type": "string"} + } + }, + "capabilities": { + "type": "object", + "required": ["supported_ops"], + "properties": { + "supported_ops": { + "type": "object", + "properties": { + "put": {"type": "boolean"}, + "get": {"type": "boolean"}, + "put_indexed": {"type": "boolean"}, + "get_indexed": {"type": "boolean"}, + "tombstone": {"type": "boolean"}, + "tombstone_lift": {"type": "boolean"}, + "log_scan": {"type": "boolean"}, + "current_state": {"type": "boolean"}, + "validate_config": {"type": "boolean"} + } + }, + "implemented_ops": { + "type": "object", + "properties": { + "put": {"type": "boolean"}, + "get": {"type": "boolean"}, + "put_indexed": {"type": "boolean"}, + "get_indexed": {"type": "boolean"}, + "tombstone": {"type": "boolean"}, + "tombstone_lift": {"type": "boolean"}, + "log_scan": {"type": "boolean"}, + "current_state": {"type": "boolean"}, + "validate_config": {"type": "boolean"} + } + } + } + }, + "manifest_ref": {"type": "string"}, + "manifest": {"type": "object"}, + "mounts": {"type": "array"} + } } } } diff --git a/registry/api-contract.jsonl b/registry/api-contract.jsonl index e688dc0..12abf41 100644 --- a/registry/api-contract.jsonl +++ b/registry/api-contract.jsonl @@ -1 +1 @@ -{"registry":"AMDUATD/API","contract":"AMDUATD/API/1","handle":"amduat.api.amduatd.contract.v1@1","media_type":"application/json","status":"active","bytes_sha256":"88c7e93034dacc34318b0771f1bae232bb4a34913f7274d7e99b007fe4f697c3","notes":"Seeded into the ASL store at amduatd startup; ref is advertised via /v1/meta."} +{"registry":"AMDUATD/API","contract":"AMDUATD/API/1","handle":"amduat.api.amduatd.contract.v1@1","media_type":"application/json","status":"active","bytes_sha256":"38cb6beb6bb525d892538dad7aa584b3f2aeaaff177757fd9432fce9602f877b","notes":"Seeded into the ASL store at amduatd startup; ref is advertised via /v1/meta."} diff --git a/src/amduatd.c b/src/amduatd.c index 453c4f6..7c722bc 100644 --- a/src/amduatd.c +++ b/src/amduatd.c @@ -233,7 +233,79 @@ static const char k_amduatd_workspace_html[] = "
Fetch read-only diagnostics for the current space.
\n" + "\n" + "