hermes-web-cli/models/hermes_services.json
yumoqing 0e0ee695e6 feat: add orgid field to hermes_services for organization-scoped service isolation
- Add orgid field (str32, not nullable) to hermes_services table
- Replace user_id with orgid in all service CRUD operations (SQL + functions)
- Update function signatures: get_all_services, create_service, delete_service,
  get_service_by_id, test_service_connection, create_session,
  send_message_to_service, get_session_messages all use orgid
- Add orgid indexes: idx_hermes_services_orgid, idx_hermes_services_orgid_status
- Add logined_userorgid filtering to CRUD definition for automatic framework-level isolation
- Update all .dspy files to use get_userorgid() for org-scoped service queries
- Update init/data.json and db_tables.py to reflect orgid field
2026-04-27 11:50:05 +08:00

105 lines
2.8 KiB
JSON

{
"summary": [
{
"name": "hermes_services",
"title": "Hermes Services",
"primary": "id",
"catelog": "entity"
}
],
"fields": [
{
"name": "id",
"title": "Service ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "Primary key - UUID format"
},
{
"name": "orgid",
"title": "Organization ID",
"type": "str",
"length": 32,
"nullable": "no",
"comments": "Organization ID that owns this service"
},
{
"name": "name",
"title": "Service Name",
"type": "str",
"length": 255,
"nullable": "no",
"comments": "Hermes service display name"
},
{
"name": "service_url",
"title": "Service URL",
"type": "str",
"length": 512,
"nullable": "no",
"comments": "Base URL of the Hermes service endpoint"
},
{
"name": "description",
"title": "Description",
"type": "text",
"nullable": "yes",
"comments": "Service description"
},
{
"name": "status",
"title": "Status",
"type": "str",
"length": 32,
"nullable": "no",
"default": "pending",
"comments": "Service status: pending, active, inactive, error"
},
{
"name": "created_at",
"title": "Created At",
"type": "timestamp",
"nullable": "no",
"comments": "Record creation timestamp"
},
{
"name": "updated_at",
"title": "Updated At",
"type": "timestamp",
"nullable": "yes",
"comments": "Record last update timestamp"
},
{
"name": "apikey",
"title": "API Key",
"type": "str",
"length": 255,
"nullable": "yes",
"comments": "API key for authenticating with the Hermes service"
}
],
"indexes": [
{
"name": "idx_hermes_services_orgid",
"idxtype": "index",
"idxfields": ["orgid"]
},
{
"name": "idx_hermes_services_name",
"idxtype": "index",
"idxfields": ["name"]
},
{
"name": "idx_hermes_services_status",
"idxtype": "index",
"idxfields": ["status"]
},
{
"name": "idx_hermes_services_orgid_status",
"idxtype": "index",
"idxfields": ["orgid", "status"]
}
],
"codes": []
}