29 lines
1.4 KiB
TypeScript
29 lines
1.4 KiB
TypeScript
|
|
/** Same-origin backend contracts required by the HUX-10 frontend. */
|
||
|
|
|
||
|
|
export const API_VERSION = "hux.v1";
|
||
|
|
export const ACCEPT = "application/vnd.hermes.hux+json; version=1";
|
||
|
|
export const SNAPSHOT_SCHEMA = "hux.privacy_snapshot.v1";
|
||
|
|
|
||
|
|
/**
|
||
|
|
* GET /hux/v1/privacy/snapshot?session_id=&conversation_id=
|
||
|
|
* POST /hux/v1/privacy/controls
|
||
|
|
*
|
||
|
|
* Identity is derived only from the authenticated server session. The server
|
||
|
|
* MUST bind both opaque ids to that identity and surface; neither an identity
|
||
|
|
* nor a tenant selector is accepted from browser state or request parameters.
|
||
|
|
* Responses contain only the current effective retention state and, at most,
|
||
|
|
* one active hux.privacy_notice.v1. They MUST omit inactive or previous topic
|
||
|
|
* categories and the source message that caused classification.
|
||
|
|
*
|
||
|
|
* Controls accept schema, session_id, conversation_id, expected_revision and
|
||
|
|
* one enumerated action. A 409 rejects stale state. Enabling no-store disables
|
||
|
|
* memory writes and makes retention session-only atomically. Forgetting a
|
||
|
|
* conversation requires an explicit confirmed request and returns a scoped
|
||
|
|
* tombstone snapshot; the UI never infers consent. Topic changes clear the prior notice server-side
|
||
|
|
* so polling cannot reiterate sensitive details after the subject changes.
|
||
|
|
*/
|
||
|
|
export const BACKEND_ENDPOINTS = Object.freeze({
|
||
|
|
snapshot: "/privacy/snapshot",
|
||
|
|
controls: "/privacy/controls",
|
||
|
|
});
|