kcode-k1-http-kmap-representation 0.1.0

Strict HTTP representation for profile-backed Kmap node creation
Documentation
1
2
3
4
5
6
7
8
9
10
11
# K1 HTTP Kmap representation

Version 0.1.0 provides the strict wire boundary for profile-backed Kmap node creation in David's private K1 source.

`parse_profile_id` accepts exactly 24 lowercase hexadecimal characters. `decode_create` requires exactly one `Content-Type` value whose case-insensitive media type is `application/json`; media-type parameters are allowed. The body must be one JSON object with exactly the required string fields `title`, `navigation_hint`, and `narrative`, plus the required `connections` array of 24-lowercase-hex Access IDs. Unknown, duplicate, missing, mistyped, malformed, and trailing JSON input is rejected. Text is neither trimmed nor limited. Connection order and duplicates are preserved for Access-Kmap validation.

`CreateNode` exposes borrowed fields and can be consumed into its three owned strings and ordered Access IDs. `created_response` returns 201 with exactly `{"node_id":"<24-lowercase-hex>"}`. Every response has `Cache-Control: no-store`; JSON responses have `Content-Type: application/json`.

Errors use the authenticated K1 JSON shape `{"error":"<code>","message":"<message>"}`. Invalid profile IDs, bodies, connection IDs, and authority-filter selectors are 400. Unavailable authority filters and exact `profile is unavailable` or `node unavailable` leaves are concealed as 404. Unsupported media types are 415. Access-context dependencies, blocking-task failures, operational creation failures, and wrapped forms of concealed leaves are 503. Dependency and operational helpers retain only caller-supplied safe child text and add a stable operation prefix.

The library owns representation only. It has no router, authentication, profile or AccessContext resolution, persistence, retries, blocking dispatch, Access-Kmap validation, or Kmap mutation.