jenkins b66c762f5d hermes(webui): add HUX card UI models with contract-locked suites
Standalone per-card browser model/security/view modules for HUX-01..10
plus node+pytest suites that read the hux.v1 contract schemas directly.
Reconciled drift found on integration: the activity model now accepts
all 32 hux.event.v1 kinds (delegation.*, memory.suppressed,
memory.retrieval_removed, budget.exhausted, side_effect.*), the
autonomy model carries the external_side_effect capability, and the
foundation boundary test now asserts the shipped static HUX surface
exists on disk and that images never bake activated HUX_FLAGS.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BvMSXH8VH2tMWXanb8SJdf
2026-08-24 04:12:03 -03:00

39 lines
1.6 KiB
TypeScript

/** Exact same-origin backend contracts required by the HUX-03 frontend. */
export const API_VERSION = "hux.v1";
export const ACCEPT = "application/vnd.hermes.hux+json; version=1";
export const RESPONSE_SCHEMAS = Object.freeze({
projects: "hux.projects.page.v1",
conversations: "hux.conversations.page.v1",
search: "hux.conversations.search.v1",
projectMutation: "hux.project.response.v1",
conversationMutation: "hux.conversation.response.v1",
});
/**
* GET /hux/v1/projects?cursor=&limit=
* GET /hux/v1/projects/{prj_id}/conversations?cursor=&limit=
* GET /hux/v1/conversations/search?q=&project_id=&tag=&pinned=&cursor=&limit=
* PATCH /hux/v1/projects/{prj_id}
* PATCH /hux/v1/conversations/{conv_id}
*
* Every response is JSON with api_version="hux.v1", its operation-specific
* schema, and identity={tenant_ref,user_ref,surface}. Page responses contain
* items, next_cursor (opaque or null), and total (non-negative integer or
* null). Mutation responses contain item. PATCH bodies use only name/title,
* project_id, tags, pinned, and required expected_updated_at for optimistic
* concurrency. Identity is derived from the authenticated server session and
* MUST NOT be accepted from a query, path, body, or browser storage. Moves MUST
* preserve conversation id, branch, and artifact_ids atomically. A 409 means
* stale expected_updated_at; 404 is not converted into an unscoped lookup.
*/
export const BACKEND_ENDPOINTS = Object.freeze({
projects: "/projects",
projectConversations: "/projects/{prj_id}/conversations",
search: "/conversations/search",
project: "/projects/{prj_id}",
conversation: "/conversations/{conv_id}",
});