{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://hermes.bstein.dev/contracts/hux/v1/project.schema.json", "title": "HUX projects and conversations", "description": "Organisation model for chats (HUX-03): projects own conversations and promoted artifacts; conversations carry tags, pins and branch lineage. Search indexes the fields listed in $defs/search_index.", "$defs": { "project": { "type": "object", "additionalProperties": false, "required": [ "schema", "id", "owner", "name", "tags", "pinned", "archived", "created_at", "updated_at", "revision" ], "properties": { "schema": { "const": "hux.project.v1" }, "id": { "$ref": "common.schema.json#/$defs/id" }, "owner": { "$ref": "common.schema.json#/$defs/user_ref" }, "name": { "type": "string", "minLength": 1, "maxLength": 120 }, "description": { "type": "string", "maxLength": 2000 }, "tags": { "$ref": "common.schema.json#/$defs/tags" }, "pinned": { "type": "boolean" }, "archived": { "type": "boolean" }, "default_mode": { "type": "string", "enum": [ "fast", "thoughtful", "research", "create", "private" ] }, "memory_scope_id": { "$ref": "common.schema.json#/$defs/id" }, "created_at": { "$ref": "common.schema.json#/$defs/timestamp" }, "updated_at": { "$ref": "common.schema.json#/$defs/timestamp" }, "revision": { "$ref": "common.schema.json#/$defs/revision" } } }, "conversation": { "type": "object", "additionalProperties": false, "required": [ "schema", "id", "owner", "title", "tags", "pinned", "archived", "artifact_ids", "created_at", "updated_at", "revision" ], "properties": { "schema": { "const": "hux.conversation.v1" }, "id": { "$ref": "common.schema.json#/$defs/id" }, "owner": { "$ref": "common.schema.json#/$defs/user_ref" }, "project_id": { "$ref": "common.schema.json#/$defs/id" }, "title": { "type": "string", "minLength": 1, "maxLength": 200 }, "tags": { "$ref": "common.schema.json#/$defs/tags" }, "pinned": { "type": "boolean" }, "archived": { "type": "boolean" }, "mode": { "type": "string", "enum": [ "fast", "thoughtful", "research", "create", "private" ] }, "branch": { "type": "object", "additionalProperties": false, "required": [ "parent_conversation_id", "branch_point_message_id" ], "properties": { "parent_conversation_id": { "$ref": "common.schema.json#/$defs/id" }, "branch_point_message_id": { "type": "string", "minLength": 1, "maxLength": 120 } } }, "artifact_ids": { "type": "array", "maxItems": 500, "uniqueItems": true, "items": { "$ref": "common.schema.json#/$defs/id" } }, "last_message_at": { "$ref": "common.schema.json#/$defs/timestamp" }, "created_at": { "$ref": "common.schema.json#/$defs/timestamp" }, "updated_at": { "$ref": "common.schema.json#/$defs/timestamp" }, "revision": { "$ref": "common.schema.json#/$defs/revision" } } }, "search_index": { "type": "object", "description": "Fields the tenant indexes; the UI may not assume anything else is searchable.", "additionalProperties": false, "required": [ "conversation" ], "properties": { "conversation": { "type": "array", "items": { "type": "string", "enum": [ "title", "tags", "message_text", "artifact_titles", "project_name" ] } } } } }, "oneOf": [ { "$ref": "#/$defs/project" }, { "$ref": "#/$defs/conversation" } ] }