2026-08-23 22:07:38 -03:00
{
"$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 ,
2026-08-24 00:04:37 -03:00
"required" : [
"schema" ,
"id" ,
"owner" ,
"name" ,
"tags" ,
"pinned" ,
"archived" ,
"created_at" ,
"updated_at" ,
"revision"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:04:37 -03:00
"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"
}
2026-08-23 22:07:38 -03:00
}
} ,
"conversation" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:04:37 -03:00
"required" : [
"schema" ,
"id" ,
"owner" ,
"title" ,
"tags" ,
"pinned" ,
"archived" ,
"artifact_ids" ,
"created_at" ,
"updated_at" ,
"revision"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:04:37 -03:00
"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"
]
} ,
2026-08-23 22:07:38 -03:00
"branch" : {
"type" : "object" ,
"additionalProperties" : false ,
2026-08-24 00:04:37 -03:00
"required" : [
"parent_conversation_id" ,
"branch_point_message_id"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:04:37 -03:00
"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"
2026-08-23 22:07:38 -03:00
}
} ,
2026-08-24 00:04:37 -03:00
"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"
}
2026-08-23 22:07:38 -03:00
}
} ,
"search_index" : {
"type" : "object" ,
"description" : "Fields the tenant indexes; the UI may not assume anything else is searchable." ,
"additionalProperties" : false ,
2026-08-24 00:04:37 -03:00
"required" : [
"conversation"
] ,
2026-08-23 22:07:38 -03:00
"properties" : {
2026-08-24 00:04:37 -03:00
"conversation" : {
"type" : "array" ,
"items" : {
"type" : "string" ,
"enum" : [
"title" ,
"tags" ,
"message_text" ,
"artifact_titles" ,
"project_name"
]
}
}
2026-08-23 22:07:38 -03:00
}
}
} ,
"oneOf" : [
2026-08-24 00:04:37 -03:00
{
"$ref" : "#/$defs/project"
} ,
{
"$ref" : "#/$defs/conversation"
}
2026-08-23 22:07:38 -03:00
]
}