🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
✨ feat(sdk): readable operationIds, scopes, workspace, retries, typed errors, pagination, streaming and CI drift check (#23246)
Arvin Xu30986136de82
diff --git a/.github/workflows/release-sdk.yml b/.github/workflows/release-sdk.ymlindex 441143ba0f5..8d3083088f0 100644--- a/.github/workflows/release-sdk.yml+++ b/.github/workflows/release-sdk.yml@@ -10,6 +10,8 @@ on:- canarypaths:- packages/sdk/**+ # The SDK is generated from the spec: a spec change ships an SDK change.+ - packages/openapi/openapi.ymlworkflow_dispatch: {}concurrency:@@ -52,11 +54,16 @@ jobs:- name: Build packagerun: pnpm --filter @lobehub/sdk build+ # Semver: package.json `version` + its CHANGELOG.md section go to `latest`;+ # a push whose version is already on npm ships `x.y.(z+1)-canary.<ts>`+ # under the `canary` dist-tag. See packages/sdk/scripts/release-version.ts.- name: Prepare publish packageid: versionrun: |- BASE_VERSION=$(node -p "require('./packages/sdk/package.json').version.split('.').slice(0, 2).join('.')")- SDK_VERSION="${BASE_VERSION}.$(date -u +%Y%m%d%H%M%S)"+ PUBLISHED=$(npm view @lobehub/sdk versions --json 2>/dev/null || echo '[]')+ RELEASE=$(bun packages/sdk/scripts/release-version.ts --published "$PUBLISHED")+ SDK_VERSION=$(node -p "JSON.parse(process.argv[1]).version" "$RELEASE")+ SDK_TAG=$(node -p "JSON.parse(process.argv[1]).tag" "$RELEASE")export SDK_VERSIONnode <<'NODE'@@ -70,7 +77,7 @@ jobs:packageJson.type = 'module';packageJson.main = './dist/index.mjs';packageJson.types = './dist/index.d.mts';- packageJson.files = ['dist'];+ packageJson.files = ['dist', 'CHANGELOG.md'];packageJson.repository = {type: 'git',url: 'https://github.com/lobehub/lobehub',@@ -101,10 +108,11 @@ jobs:NODEecho "version=${SDK_VERSION}" >> "$GITHUB_OUTPUT"- echo "Prepared @lobehub/sdk@${SDK_VERSION}"+ echo "tag=${SDK_TAG}" >> "$GITHUB_OUTPUT"+ echo "Prepared @lobehub/sdk@${SDK_VERSION} (dist-tag ${SDK_TAG})"- name: Publish to npm- run: npm publish --provenance --access public+ run: npm publish --provenance --access public --tag "${{ steps.version.outputs.tag }}"working-directory: packages/sdkenv:NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}diff --git a/.github/workflows/test.yml b/.github/workflows/test.ymlindex bf215cf406a..e2d2e46ecad 100644--- a/.github/workflows/test.yml+++ b/.github/workflows/test.yml@@ -45,7 +45,7 @@ jobs:runs-on: ubuntu-latestname: Test Packagesenv:- PACKAGES: '@lobechat/file-loaders @lobechat/prompts @lobechat/model-runtime @lobechat/web-crawler @lobechat/electron-server-ipc @lobechat/utils @lobechat/context-engine @lobechat/agent-runtime @lobechat/conversation-flow @lobechat/editor-runtime @lobechat/ssrf-safe-fetch @lobechat/memory-user-memory @lobechat/types @lobechat/trpc @lobechat/app-config @lobechat/locales @lobechat/env @lobechat/builtin-tool-lobe-agent @lobechat/builtin-tool-message model-bank @lobechat/agent-gateway-client @lobechat/agent-manager-runtime @lobechat/device-gateway-client @lobechat/device-identity @lobechat/device-mcp @lobechat/eval-dataset-parser @lobechat/eval-rubric @lobechat/fetch-sse @lobechat/heterogeneous-agents @lobechat/openapi @lobechat/chat-adapter-wecom'+ PACKAGES: '@lobechat/file-loaders @lobechat/prompts @lobechat/model-runtime @lobechat/web-crawler @lobechat/electron-server-ipc @lobechat/utils @lobechat/context-engine @lobechat/agent-runtime @lobechat/conversation-flow @lobechat/editor-runtime @lobechat/ssrf-safe-fetch @lobechat/memory-user-memory @lobechat/types @lobechat/trpc @lobechat/app-config @lobechat/locales @lobechat/env @lobechat/builtin-tool-lobe-agent @lobechat/builtin-tool-message model-bank @lobechat/agent-gateway-client @lobechat/agent-manager-runtime @lobechat/device-gateway-client @lobechat/device-identity @lobechat/device-mcp @lobechat/eval-dataset-parser @lobechat/eval-rubric @lobechat/fetch-sse @lobechat/heterogeneous-agents @lobechat/openapi @lobechat/chat-adapter-wecom @lobehub/sdk'steps:- name: Checkout@@ -166,6 +166,7 @@ jobs:for package in $PACKAGES; dodir="${package#@lobechat/}"+ dir="${dir#@lobehub/}"if [ -f "./packages/$dir/coverage/lcov.info" ]; thenflag="packages/$dir"diff --git a/apps/server/src/services/channel/README.md b/apps/server/src/services/channel/README.mdindex 1c4dda915fe..8feaed766e1 100644--- a/apps/server/src/services/channel/README.md+++ b/apps/server/src/services/channel/README.md@@ -8,7 +8,7 @@ replies never trigger another classification.## Enable-Configure a TypeSafe API key through the deployment's \`TYPESAFE\_API\_KEY\` environment variable,+Configure a TypeSafe API key through the deployment's \`TYPESAFE_API_KEY\` environment variable,or in the sender's provider settings (workspace provider settings in workspace scope).Routing is enabled by default. Configure its switch and decision model in Settings → Service Models → Advanced → Channels:diff --git a/packages/database/migrations/meta/0223_snapshot.json b/packages/database/migrations/meta/0223_snapshot.jsonindex c1d487fa1f4..04dd1622b50 100644--- a/packages/database/migrations/meta/0223_snapshot.json+++ b/packages/database/migrations/meta/0223_snapshot.json@@ -1,8 +1,28 @@{+ "_meta": {+ "columns": {},+ "schemas": {},+ "tables": {}+ },+ "dialect": "postgresql",+ "enums": {},"id": "e4b7cfb6-736f-455b-a78e-7a6383945adc",+ "policies": {},"prevId": "367a1cd7-ebf2-48db-9e9c-ec804563b475",- "version": "7",- "dialect": "postgresql",+ "roles": {},+ "schemas": {},+ "sequences": {+ "public.fts_search_sync_revision_seq": {+ "name": "fts_search_sync_revision_seq",+ "schema": "public",+ "increment": "1",+ "startWith": "1",+ "minValue": "1",+ "maxValue": "9223372036854775807",+ "cache": "1",+ "cycle": false+ }+ },"tables": {"public.acceptance_comments": {"name": "acceptance_comments",@@ -308,12 +328,8 @@"name": "acceptance_comments_acceptance_id_acceptances_id_fk","tableFrom": "acceptance_comments","tableTo": "acceptances",- "columnsFrom": [- "acceptance_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["acceptance_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -321,12 +337,8 @@"name": "acceptance_comments_author_user_id_users_id_fk","tableFrom": "acceptance_comments","tableTo": "users",- "columnsFrom": [- "author_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -334,12 +346,8 @@"name": "acceptance_comments_author_agent_id_agents_id_fk","tableFrom": "acceptance_comments","tableTo": "agents",- "columnsFrom": [- "author_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -347,12 +355,8 @@"name": "acceptance_comments_workspace_id_workspaces_id_fk","tableFrom": "acceptance_comments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -360,12 +364,8 @@"name": "acceptance_comments_parent_comment_id_acceptance_comments_id_fk","tableFrom": "acceptance_comments","tableTo": "acceptance_comments",- "columnsFrom": [- "parent_comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_comment_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -373,12 +373,8 @@"name": "acceptance_comments_context_run_id_verify_runs_id_fk","tableFrom": "acceptance_comments","tableTo": "verify_runs",- "columnsFrom": [- "context_run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["context_run_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -386,12 +382,8 @@"name": "acceptance_comments_evidence_id_verify_evidence_id_fk","tableFrom": "acceptance_comments","tableTo": "verify_evidence",- "columnsFrom": [- "evidence_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["evidence_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -399,12 +391,8 @@"name": "acceptance_comments_review_mark_id_acceptance_review_marks_id_fk","tableFrom": "acceptance_comments","tableTo": "acceptance_review_marks",- "columnsFrom": [- "review_mark_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["review_mark_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -412,12 +400,8 @@"name": "acceptance_comments_resolved_by_user_id_users_id_fk","tableFrom": "acceptance_comments","tableTo": "users",- "columnsFrom": [- "resolved_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["resolved_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -526,12 +510,8 @@"name": "acceptance_flow_edges_flow_id_acceptance_flows_id_fk","tableFrom": "acceptance_flow_edges","tableTo": "acceptance_flows",- "columnsFrom": [- "flow_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["flow_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -539,14 +519,8 @@"name": "acceptance_flow_edges_flow_id_source_node_id_acceptance_flow_nodes_flow_id_id_fk","tableFrom": "acceptance_flow_edges","tableTo": "acceptance_flow_nodes",- "columnsFrom": [- "flow_id",- "source_node_id"- ],- "columnsTo": [- "flow_id",- "id"- ],+ "columnsFrom": ["flow_id", "source_node_id"],+ "columnsTo": ["flow_id", "id"],"onDelete": "cascade","onUpdate": "no action"},@@ -554,14 +528,8 @@"name": "acceptance_flow_edges_flow_id_target_node_id_acceptance_flow_nodes_flow_id_id_fk","tableFrom": "acceptance_flow_edges","tableTo": "acceptance_flow_nodes",- "columnsFrom": [- "flow_id",- "target_node_id"- ],- "columnsTo": [- "flow_id",- "id"- ],+ "columnsFrom": ["flow_id", "target_node_id"],+ "columnsTo": ["flow_id", "id"],"onDelete": "cascade","onUpdate": "no action"}@@ -689,12 +657,8 @@"name": "acceptance_flow_nodes_flow_id_acceptance_flows_id_fk","tableFrom": "acceptance_flow_nodes","tableTo": "acceptance_flows",- "columnsFrom": [- "flow_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["flow_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -702,12 +666,8 @@"name": "acceptance_flow_nodes_criterion_id_verify_criteria_id_fk","tableFrom": "acceptance_flow_nodes","tableTo": "verify_criteria",- "columnsFrom": [- "criterion_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["criterion_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -715,12 +675,8 @@"name": "acceptance_flow_nodes_sub_flow_id_acceptance_flows_id_fk","tableFrom": "acceptance_flow_nodes","tableTo": "acceptance_flows",- "columnsFrom": [- "sub_flow_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["sub_flow_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"}@@ -803,12 +759,8 @@"name": "acceptance_flows_acceptance_id_acceptances_id_fk","tableFrom": "acceptance_flows","tableTo": "acceptances",- "columnsFrom": [- "acceptance_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["acceptance_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -1023,12 +975,8 @@"name": "acceptance_review_marks_review_id_acceptance_reviews_id_fk","tableFrom": "acceptance_review_marks","tableTo": "acceptance_reviews",- "columnsFrom": [- "review_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["review_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1036,12 +984,8 @@"name": "acceptance_review_marks_screenshot_file_id_files_id_fk","tableFrom": "acceptance_review_marks","tableTo": "files",- "columnsFrom": [- "screenshot_file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["screenshot_file_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -1223,12 +1167,8 @@"name": "acceptance_reviews_site_id_project_sites_id_fk","tableFrom": "acceptance_reviews","tableTo": "project_sites",- "columnsFrom": [- "site_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["site_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1236,12 +1176,8 @@"name": "acceptance_reviews_user_id_users_id_fk","tableFrom": "acceptance_reviews","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -1249,12 +1185,8 @@"name": "acceptance_reviews_workspace_id_workspaces_id_fk","tableFrom": "acceptance_reviews","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1262,12 +1194,8 @@"name": "acceptance_reviews_project_id_projects_id_fk","tableFrom": "acceptance_reviews","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -1275,12 +1203,8 @@"name": "acceptance_reviews_task_id_tasks_id_fk","tableFrom": "acceptance_reviews","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -1709,12 +1633,8 @@"name": "agents_user_id_users_id_fk","tableFrom": "agents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1722,12 +1642,8 @@"name": "agents_workspace_id_workspaces_id_fk","tableFrom": "agents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1735,12 +1651,8 @@"name": "agents_session_group_id_session_groups_id_fk","tableFrom": "agents","tableTo": "session_groups",- "columnsFrom": [- "session_group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["session_group_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -1875,12 +1787,8 @@"name": "agents_files_file_id_files_id_fk","tableFrom": "agents_files","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1888,12 +1796,8 @@"name": "agents_files_agent_id_agents_id_fk","tableFrom": "agents_files","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1901,12 +1805,8 @@"name": "agents_files_user_id_users_id_fk","tableFrom": "agents_files","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -1914,12 +1814,8 @@"name": "agents_files_workspace_id_workspaces_id_fk","tableFrom": "agents_files","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -1927,11 +1823,7 @@"compositePrimaryKeys": {"agents_files_file_id_agent_id_user_id_pk": {"name": "agents_files_file_id_agent_id_user_id_pk",- "columns": [- "file_id",- "agent_id",- "user_id"- ]+ "columns": ["file_id", "agent_id", "user_id"]}},"uniqueConstraints": {},@@ -2063,12 +1955,8 @@"name": "agents_knowledge_bases_agent_id_agents_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2076,12 +1964,8 @@"name": "agents_knowledge_bases_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "knowledge_bases",- "columnsFrom": [- "knowledge_base_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["knowledge_base_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2089,12 +1973,8 @@"name": "agents_knowledge_bases_user_id_users_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2102,12 +1982,8 @@"name": "agents_knowledge_bases_workspace_id_workspaces_id_fk","tableFrom": "agents_knowledge_bases","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -2115,10 +1991,7 @@"compositePrimaryKeys": {"agents_knowledge_bases_agent_id_knowledge_base_id_pk": {"name": "agents_knowledge_bases_agent_id_knowledge_base_id_pk",- "columns": [- "agent_id",- "knowledge_base_id"- ]+ "columns": ["agent_id", "knowledge_base_id"]}},"uniqueConstraints": {},@@ -2354,12 +2227,8 @@"name": "agent_accounts_agent_id_agents_id_fk","tableFrom": "agent_accounts","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2367,12 +2236,8 @@"name": "agent_accounts_user_id_users_id_fk","tableFrom": "agent_accounts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2380,12 +2245,8 @@"name": "agent_accounts_workspace_id_workspaces_id_fk","tableFrom": "agent_accounts","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -2567,12 +2428,8 @@"name": "agent_bot_providers_agent_id_agents_id_fk","tableFrom": "agent_bot_providers","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2580,12 +2437,8 @@"name": "agent_bot_providers_user_id_users_id_fk","tableFrom": "agent_bot_providers","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2593,12 +2446,8 @@"name": "agent_bot_providers_workspace_id_workspaces_id_fk","tableFrom": "agent_bot_providers","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -2864,12 +2713,8 @@"name": "agent_cron_jobs_agent_id_agents_id_fk","tableFrom": "agent_cron_jobs","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2877,12 +2722,8 @@"name": "agent_cron_jobs_group_id_chat_groups_id_fk","tableFrom": "agent_cron_jobs","tableTo": "chat_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2890,12 +2731,8 @@"name": "agent_cron_jobs_user_id_users_id_fk","tableFrom": "agent_cron_jobs","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -2903,12 +2740,8 @@"name": "agent_cron_jobs_workspace_id_workspaces_id_fk","tableFrom": "agent_cron_jobs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -3346,12 +3179,8 @@"name": "agent_documents_user_id_users_id_fk","tableFrom": "agent_documents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3359,12 +3188,8 @@"name": "agent_documents_workspace_id_workspaces_id_fk","tableFrom": "agent_documents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3372,12 +3197,8 @@"name": "agent_documents_agent_id_agents_id_fk","tableFrom": "agent_documents","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3385,12 +3206,8 @@"name": "agent_documents_document_id_documents_id_fk","tableFrom": "agent_documents","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3398,12 +3215,8 @@"name": "agent_documents_deleted_by_user_id_users_id_fk","tableFrom": "agent_documents","tableTo": "users",- "columnsFrom": [- "deleted_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["deleted_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -3411,12 +3224,8 @@"name": "agent_documents_deleted_by_agent_id_agents_id_fk","tableFrom": "agent_documents","tableTo": "agents",- "columnsFrom": [- "deleted_by_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["deleted_by_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -3677,12 +3486,8 @@"name": "agent_eval_memories_user_id_users_id_fk","tableFrom": "agent_eval_memories","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3690,12 +3495,8 @@"name": "agent_eval_memories_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_memories","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3703,12 +3504,8 @@"name": "agent_eval_memories_run_id_agent_eval_runs_id_fk","tableFrom": "agent_eval_memories","tableTo": "agent_eval_runs",- "columnsFrom": [- "run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["run_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3716,12 +3513,8 @@"name": "agent_eval_memories_topic_id_topics_id_fk","tableFrom": "agent_eval_memories","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -3729,12 +3522,8 @@"name": "agent_eval_memories_thread_id_threads_id_fk","tableFrom": "agent_eval_memories","tableTo": "threads",- "columnsFrom": [- "thread_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["thread_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -3928,12 +3717,8 @@"name": "agent_eval_benchmarks_user_id_users_id_fk","tableFrom": "agent_eval_benchmarks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -3941,12 +3726,8 @@"name": "agent_eval_benchmarks_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_benchmarks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -4160,12 +3941,8 @@"name": "agent_eval_datasets_benchmark_id_agent_eval_benchmarks_id_fk","tableFrom": "agent_eval_datasets","tableTo": "agent_eval_benchmarks",- "columnsFrom": [- "benchmark_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["benchmark_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4173,12 +3950,8 @@"name": "agent_eval_datasets_source_experiment_id_agent_eval_experiments_id_fk","tableFrom": "agent_eval_datasets","tableTo": "agent_eval_experiments",- "columnsFrom": [- "source_experiment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_experiment_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -4186,12 +3959,8 @@"name": "agent_eval_datasets_user_id_users_id_fk","tableFrom": "agent_eval_datasets","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4199,12 +3968,8 @@"name": "agent_eval_datasets_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_datasets","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -4371,12 +4136,8 @@"name": "agent_eval_environments_user_id_users_id_fk","tableFrom": "agent_eval_environments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4384,12 +4145,8 @@"name": "agent_eval_environments_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_environments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -4488,12 +4245,8 @@"name": "agent_eval_experiment_benchmarks_experiment_id_agent_eval_experiments_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "agent_eval_experiments",- "columnsFrom": [- "experiment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["experiment_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4501,12 +4254,8 @@"name": "agent_eval_experiment_benchmarks_benchmark_id_agent_eval_benchmarks_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "agent_eval_benchmarks",- "columnsFrom": [- "benchmark_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["benchmark_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4514,12 +4263,8 @@"name": "agent_eval_experiment_benchmarks_user_id_users_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4527,12 +4272,8 @@"name": "agent_eval_experiment_benchmarks_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_experiment_benchmarks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -4540,10 +4281,7 @@"compositePrimaryKeys": {"agent_eval_experiment_benchmarks_experiment_id_benchmark_id_pk": {"name": "agent_eval_experiment_benchmarks_experiment_id_benchmark_id_pk",- "columns": [- "experiment_id",- "benchmark_id"- ]+ "columns": ["experiment_id", "benchmark_id"]}},"uniqueConstraints": {},@@ -4650,12 +4388,8 @@"name": "agent_eval_experiments_user_id_users_id_fk","tableFrom": "agent_eval_experiments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4663,12 +4397,8 @@"name": "agent_eval_experiments_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_experiments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -4812,12 +4542,8 @@"name": "agent_eval_run_topics_user_id_users_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4825,12 +4551,8 @@"name": "agent_eval_run_topics_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4838,12 +4560,8 @@"name": "agent_eval_run_topics_run_id_agent_eval_runs_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "agent_eval_runs",- "columnsFrom": [- "run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["run_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4851,12 +4569,8 @@"name": "agent_eval_run_topics_topic_id_topics_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -4864,12 +4578,8 @@"name": "agent_eval_run_topics_test_case_id_agent_eval_test_cases_id_fk","tableFrom": "agent_eval_run_topics","tableTo": "agent_eval_test_cases",- "columnsFrom": [- "test_case_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["test_case_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -4877,10 +4587,7 @@"compositePrimaryKeys": {"agent_eval_run_topics_run_id_topic_id_pk": {"name": "agent_eval_run_topics_run_id_topic_id_pk",- "columns": [- "run_id",- "topic_id"- ]+ "columns": ["run_id", "topic_id"]}},"uniqueConstraints": {},@@ -5099,12 +4806,8 @@"name": "agent_eval_runs_dataset_id_agent_eval_datasets_id_fk","tableFrom": "agent_eval_runs","tableTo": "agent_eval_datasets",- "columnsFrom": [- "dataset_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dataset_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5112,12 +4815,8 @@"name": "agent_eval_runs_experiment_id_agent_eval_experiments_id_fk","tableFrom": "agent_eval_runs","tableTo": "agent_eval_experiments",- "columnsFrom": [- "experiment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["experiment_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -5125,12 +4824,8 @@"name": "agent_eval_runs_target_agent_id_agents_id_fk","tableFrom": "agent_eval_runs","tableTo": "agents",- "columnsFrom": [- "target_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["target_agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5138,12 +4833,8 @@"name": "agent_eval_runs_user_id_users_id_fk","tableFrom": "agent_eval_runs","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5151,12 +4842,8 @@"name": "agent_eval_runs_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_runs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5164,12 +4851,8 @@"name": "agent_eval_runs_parent_run_id_agent_eval_runs_id_fk","tableFrom": "agent_eval_runs","tableTo": "agent_eval_runs",- "columnsFrom": [- "parent_run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_run_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"}@@ -5348,12 +5031,8 @@"name": "agent_eval_test_cases_user_id_users_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5361,12 +5040,8 @@"name": "agent_eval_test_cases_workspace_id_workspaces_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5374,12 +5049,8 @@"name": "agent_eval_test_cases_dataset_id_agent_eval_datasets_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "agent_eval_datasets",- "columnsFrom": [- "dataset_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dataset_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5387,12 +5058,8 @@"name": "agent_eval_test_cases_environment_id_agent_eval_environments_id_fk","tableFrom": "agent_eval_test_cases","tableTo": "agent_eval_environments",- "columnsFrom": [- "environment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["environment_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -5470,12 +5137,8 @@"name": "agent_history_job_agents_job_id_agent_history_jobs_id_fk","tableFrom": "agent_history_job_agents","tableTo": "agent_history_jobs",- "columnsFrom": [- "job_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["job_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5483,12 +5146,8 @@"name": "agent_history_job_agents_agent_id_agents_id_fk","tableFrom": "agent_history_job_agents","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -5566,12 +5225,8 @@"name": "agent_history_job_groups_job_id_agent_history_jobs_id_fk","tableFrom": "agent_history_job_groups","tableTo": "agent_history_jobs",- "columnsFrom": [- "job_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["job_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5579,12 +5234,8 @@"name": "agent_history_job_groups_group_id_chat_groups_id_fk","tableFrom": "agent_history_job_groups","tableTo": "chat_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -5708,12 +5359,8 @@"name": "agent_history_job_topics_job_id_agent_history_jobs_id_fk","tableFrom": "agent_history_job_topics","tableTo": "agent_history_jobs",- "columnsFrom": [- "job_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["job_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -5721,12 +5368,8 @@"name": "agent_history_job_topics_topic_id_topics_id_fk","tableFrom": "agent_history_job_topics","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -6228,12 +5871,8 @@"name": "agent_inbox_messages_agent_id_agents_id_fk","tableFrom": "agent_inbox_messages","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -6241,12 +5880,8 @@"name": "agent_inbox_messages_user_id_users_id_fk","tableFrom": "agent_inbox_messages","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -6254,12 +5889,8 @@"name": "agent_inbox_messages_workspace_id_workspaces_id_fk","tableFrom": "agent_inbox_messages","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -6267,12 +5898,8 @@"name": "agent_inbox_messages_account_id_agent_accounts_id_fk","tableFrom": "agent_inbox_messages","tableTo": "agent_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -6280,12 +5907,8 @@"name": "agent_inbox_messages_topic_id_topics_id_fk","tableFrom": "agent_inbox_messages","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -6599,12 +6222,8 @@"name": "agent_intervention_resolutions_operation_id_agent_operations_id_fk","tableFrom": "agent_intervention_resolutions","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -6612,12 +6231,8 @@"name": "agent_intervention_resolutions_user_id_users_id_fk","tableFrom": "agent_intervention_resolutions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -6625,12 +6240,8 @@"name": "agent_intervention_resolutions_workspace_id_workspaces_id_fk","tableFrom": "agent_intervention_resolutions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -7094,12 +6705,8 @@"name": "agent_interventions_operation_id_agent_operations_id_fk","tableFrom": "agent_interventions","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7107,12 +6714,8 @@"name": "agent_interventions_user_id_users_id_fk","tableFrom": "agent_interventions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7120,12 +6723,8 @@"name": "agent_interventions_workspace_id_workspaces_id_fk","tableFrom": "agent_interventions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7133,12 +6732,8 @@"name": "agent_interventions_resolution_id_agent_intervention_resolutions_id_fk","tableFrom": "agent_interventions","tableTo": "agent_intervention_resolutions",- "columnsFrom": [- "resolution_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["resolution_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -7300,12 +6895,8 @@"name": "agent_label_assignments_label_id_agent_labels_id_fk","tableFrom": "agent_label_assignments","tableTo": "agent_labels",- "columnsFrom": [- "label_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["label_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7313,12 +6904,8 @@"name": "agent_label_assignments_agent_id_agents_id_fk","tableFrom": "agent_label_assignments","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7326,12 +6913,8 @@"name": "agent_label_assignments_user_id_users_id_fk","tableFrom": "agent_label_assignments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7339,12 +6922,8 @@"name": "agent_label_assignments_workspace_id_workspaces_id_fk","tableFrom": "agent_label_assignments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -7506,12 +7085,8 @@"name": "agent_labels_user_id_users_id_fk","tableFrom": "agent_labels","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7519,12 +7094,8 @@"name": "agent_labels_workspace_id_workspaces_id_fk","tableFrom": "agent_labels","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -7807,12 +7378,8 @@"name": "agent_mails_agent_id_agents_id_fk","tableFrom": "agent_mails","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7820,12 +7387,8 @@"name": "agent_mails_user_id_users_id_fk","tableFrom": "agent_mails","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7833,12 +7396,8 @@"name": "agent_mails_workspace_id_workspaces_id_fk","tableFrom": "agent_mails","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7846,12 +7405,8 @@"name": "agent_mails_account_id_agent_accounts_id_fk","tableFrom": "agent_mails","tableTo": "agent_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -7859,12 +7414,8 @@"name": "agent_mails_signal_id_signals_id_fk","tableFrom": "agent_mails","tableTo": "signals",- "columnsFrom": [- "signal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["signal_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -8364,12 +7915,8 @@"name": "agent_operations_workspace_id_workspaces_id_fk","tableFrom": "agent_operations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8377,12 +7924,8 @@"name": "agent_operations_agent_id_agents_id_fk","tableFrom": "agent_operations","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -8390,12 +7933,8 @@"name": "agent_operations_topic_id_topics_id_fk","tableFrom": "agent_operations","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -8403,12 +7942,8 @@"name": "agent_operations_thread_id_threads_id_fk","tableFrom": "agent_operations","tableTo": "threads",- "columnsFrom": [- "thread_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["thread_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -8416,12 +7951,8 @@"name": "agent_operations_task_id_tasks_id_fk","tableFrom": "agent_operations","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -8429,12 +7960,8 @@"name": "agent_operations_chat_group_id_chat_groups_id_fk","tableFrom": "agent_operations","tableTo": "chat_groups",- "columnsFrom": [- "chat_group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chat_group_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -8634,12 +8161,8 @@"name": "agent_account_bindings_agent_id_agents_id_fk","tableFrom": "agent_account_bindings","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8647,12 +8170,8 @@"name": "agent_account_bindings_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_account_bindings","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8660,12 +8179,8 @@"name": "agent_account_bindings_user_id_users_id_fk","tableFrom": "agent_account_bindings","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8673,12 +8188,8 @@"name": "agent_account_bindings_workspace_id_workspaces_id_fk","tableFrom": "agent_account_bindings","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -8846,12 +8357,8 @@"name": "agent_device_account_bindings_agent_id_agents_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8859,12 +8366,8 @@"name": "agent_device_account_bindings_user_id_users_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8872,12 +8375,8 @@"name": "agent_device_account_bindings_workspace_id_workspaces_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8885,12 +8384,8 @@"name": "agent_device_account_bindings_device_id_devices_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "devices",- "columnsFrom": [- "device_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["device_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8898,12 +8393,8 @@"name": "agent_device_account_bindings_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_device_account_bindings","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -8911,14 +8402,8 @@"name": "agent_device_account_bindings_login_fk","tableFrom": "agent_device_account_bindings","tableTo": "agent_provider_account_logins",- "columnsFrom": [- "account_id",- "device_id"- ],- "columnsTo": [- "account_id",- "device_id"- ],+ "columnsFrom": ["account_id", "device_id"],+ "columnsTo": ["account_id", "device_id"],"onDelete": "cascade","onUpdate": "no action"}@@ -9052,12 +8537,8 @@"name": "agent_provider_account_logins_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9065,12 +8546,8 @@"name": "agent_provider_account_logins_device_id_devices_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "devices",- "columnsFrom": [- "device_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["device_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9078,12 +8555,8 @@"name": "agent_provider_account_logins_user_id_users_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9091,12 +8564,8 @@"name": "agent_provider_account_logins_workspace_id_workspaces_id_fk","tableFrom": "agent_provider_account_logins","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -9106,10 +8575,7 @@"agent_provider_account_logins_account_device_unique": {"name": "agent_provider_account_logins_account_device_unique","nullsNotDistinct": false,- "columns": [- "account_id",- "device_id"- ]+ "columns": ["account_id", "device_id"]}},"policies": {},@@ -9402,12 +8868,8 @@"name": "agent_provider_accounts_user_id_users_id_fk","tableFrom": "agent_provider_accounts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9415,12 +8877,8 @@"name": "agent_provider_accounts_workspace_id_workspaces_id_fk","tableFrom": "agent_provider_accounts","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -9606,12 +9064,8 @@"name": "agent_quota_calibrations_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_calibrations","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9619,12 +9073,8 @@"name": "agent_quota_calibrations_user_id_users_id_fk","tableFrom": "agent_quota_calibrations","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9632,12 +9082,8 @@"name": "agent_quota_calibrations_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_calibrations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -9847,12 +9293,8 @@"name": "agent_quota_snapshots_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9860,12 +9302,8 @@"name": "agent_quota_snapshots_user_id_users_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9873,12 +9311,8 @@"name": "agent_quota_snapshots_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -9886,12 +9320,8 @@"name": "agent_quota_snapshots_device_id_devices_id_fk","tableFrom": "agent_quota_snapshots","tableTo": "devices",- "columnsFrom": [- "device_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["device_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -10166,12 +9596,8 @@"name": "agent_quota_usage_ledger_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -10179,12 +9605,8 @@"name": "agent_quota_usage_ledger_user_id_users_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -10192,12 +9614,8 @@"name": "agent_quota_usage_ledger_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -10205,12 +9623,8 @@"name": "agent_quota_usage_ledger_message_id_messages_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -10218,12 +9632,8 @@"name": "agent_quota_usage_ledger_operation_id_agent_operations_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -10231,12 +9641,8 @@"name": "agent_quota_usage_ledger_topic_id_topics_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -10244,12 +9650,8 @@"name": "agent_quota_usage_ledger_agent_id_agents_id_fk","tableFrom": "agent_quota_usage_ledger","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -10489,12 +9891,8 @@"name": "agent_quota_windows_account_id_agent_provider_accounts_id_fk","tableFrom": "agent_quota_windows","tableTo": "agent_provider_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -10502,12 +9900,8 @@"name": "agent_quota_windows_user_id_users_id_fk","tableFrom": "agent_quota_windows","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -10515,12 +9909,8 @@"name": "agent_quota_windows_workspace_id_workspaces_id_fk","tableFrom": "agent_quota_windows","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -10627,12 +10017,8 @@"name": "agent_shares_agent_id_agents_id_fk","tableFrom": "agent_shares","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -10887,12 +10273,8 @@"name": "agent_skills_zip_file_hash_global_files_hash_id_fk","tableFrom": "agent_skills","tableTo": "global_files",- "columnsFrom": [- "zip_file_hash"- ],- "columnsTo": [- "hash_id"- ],+ "columnsFrom": ["zip_file_hash"],+ "columnsTo": ["hash_id"],"onDelete": "set null","onUpdate": "no action"},@@ -10900,12 +10282,8 @@"name": "agent_skills_user_id_users_id_fk","tableFrom": "agent_skills","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -10913,12 +10291,8 @@"name": "agent_skills_workspace_id_workspaces_id_fk","tableFrom": "agent_skills","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -11173,12 +10547,8 @@"name": "ai_models_user_id_users_id_fk","tableFrom": "ai_models","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -11186,12 +10556,8 @@"name": "ai_models_workspace_id_workspaces_id_fk","tableFrom": "ai_models","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -11406,12 +10772,8 @@"name": "ai_providers_user_id_users_id_fk","tableFrom": "ai_providers","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -11419,12 +10781,8 @@"name": "ai_providers_workspace_id_workspaces_id_fk","tableFrom": "ai_providers","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -11559,12 +10917,8 @@"name": "api_keys_user_id_users_id_fk","tableFrom": "api_keys","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -11572,12 +10926,8 @@"name": "api_keys_workspace_id_workspaces_id_fk","tableFrom": "api_keys","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -11587,16 +10937,12 @@"api_keys_key_unique": {"name": "api_keys_key_unique","nullsNotDistinct": false,- "columns": [- "key"- ]+ "columns": ["key"]},"api_keys_key_hash_unique": {"name": "api_keys_key_hash_unique","nullsNotDistinct": false,- "columns": [- "key_hash"- ]+ "columns": ["key_hash"]}},"policies": {},@@ -11886,12 +11232,8 @@"name": "artboard_boards_artboard_id_artboards_id_fk","tableFrom": "artboard_boards","tableTo": "artboards",- "columnsFrom": [- "artboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["artboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -11899,12 +11241,8 @@"name": "artboard_boards_page_id_artboard_pages_id_fk","tableFrom": "artboard_boards","tableTo": "artboard_pages",- "columnsFrom": [- "page_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["page_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -11912,12 +11250,8 @@"name": "artboard_boards_group_id_artboard_groups_id_fk","tableFrom": "artboard_boards","tableTo": "artboard_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -11925,12 +11259,8 @@"name": "artboard_boards_round_id_artboard_rounds_id_fk","tableFrom": "artboard_boards","tableTo": "artboard_rounds",- "columnsFrom": [- "round_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["round_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -11938,12 +11268,8 @@"name": "artboard_boards_user_id_users_id_fk","tableFrom": "artboard_boards","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -11951,12 +11277,8 @@"name": "artboard_boards_workspace_id_workspaces_id_fk","tableFrom": "artboard_boards","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -11964,12 +11286,8 @@"name": "artboard_boards_project_id_projects_id_fk","tableFrom": "artboard_boards","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -11977,12 +11295,8 @@"name": "artboard_boards_source_work_version_id_work_versions_id_fk","tableFrom": "artboard_boards","tableTo": "work_versions",- "columnsFrom": [- "source_work_version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_work_version_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -11990,12 +11304,8 @@"name": "artboard_boards_source_file_id_files_id_fk","tableFrom": "artboard_boards","tableTo": "files",- "columnsFrom": [- "source_file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_file_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -12291,12 +11601,8 @@"name": "artboard_comments_artboard_id_artboards_id_fk","tableFrom": "artboard_comments","tableTo": "artboards",- "columnsFrom": [- "artboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["artboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12304,12 +11610,8 @@"name": "artboard_comments_parent_comment_id_artboard_comments_id_fk","tableFrom": "artboard_comments","tableTo": "artboard_comments",- "columnsFrom": [- "parent_comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_comment_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12317,12 +11619,8 @@"name": "artboard_comments_author_user_id_users_id_fk","tableFrom": "artboard_comments","tableTo": "users",- "columnsFrom": [- "author_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -12330,12 +11628,8 @@"name": "artboard_comments_author_agent_id_agents_id_fk","tableFrom": "artboard_comments","tableTo": "agents",- "columnsFrom": [- "author_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -12343,12 +11637,8 @@"name": "artboard_comments_user_id_users_id_fk","tableFrom": "artboard_comments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12356,12 +11646,8 @@"name": "artboard_comments_workspace_id_workspaces_id_fk","tableFrom": "artboard_comments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12369,12 +11655,8 @@"name": "artboard_comments_page_id_artboard_pages_id_fk","tableFrom": "artboard_comments","tableTo": "artboard_pages",- "columnsFrom": [- "page_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["page_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -12382,12 +11664,8 @@"name": "artboard_comments_group_id_artboard_groups_id_fk","tableFrom": "artboard_comments","tableTo": "artboard_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -12395,12 +11673,8 @@"name": "artboard_comments_board_id_artboard_boards_id_fk","tableFrom": "artboard_comments","tableTo": "artboard_boards",- "columnsFrom": [- "board_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["board_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -12408,12 +11682,8 @@"name": "artboard_comments_resolved_by_user_id_users_id_fk","tableFrom": "artboard_comments","tableTo": "users",- "columnsFrom": [- "resolved_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["resolved_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -12641,12 +11911,8 @@"name": "artboard_edges_artboard_id_artboards_id_fk","tableFrom": "artboard_edges","tableTo": "artboards",- "columnsFrom": [- "artboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["artboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12654,12 +11920,8 @@"name": "artboard_edges_source_board_id_artboard_boards_id_fk","tableFrom": "artboard_edges","tableTo": "artboard_boards",- "columnsFrom": [- "source_board_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_board_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12667,12 +11929,8 @@"name": "artboard_edges_target_board_id_artboard_boards_id_fk","tableFrom": "artboard_edges","tableTo": "artboard_boards",- "columnsFrom": [- "target_board_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["target_board_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12680,12 +11938,8 @@"name": "artboard_edges_user_id_users_id_fk","tableFrom": "artboard_edges","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12693,12 +11947,8 @@"name": "artboard_edges_workspace_id_workspaces_id_fk","tableFrom": "artboard_edges","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -12863,12 +12113,8 @@"name": "artboard_groups_artboard_id_artboards_id_fk","tableFrom": "artboard_groups","tableTo": "artboards",- "columnsFrom": [- "artboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["artboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12876,12 +12122,8 @@"name": "artboard_groups_page_id_artboard_pages_id_fk","tableFrom": "artboard_groups","tableTo": "artboard_pages",- "columnsFrom": [- "page_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["page_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -12889,12 +12131,8 @@"name": "artboard_groups_user_id_users_id_fk","tableFrom": "artboard_groups","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -12902,12 +12140,8 @@"name": "artboard_groups_workspace_id_workspaces_id_fk","tableFrom": "artboard_groups","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -13040,12 +12274,8 @@"name": "artboard_pages_artboard_id_artboards_id_fk","tableFrom": "artboard_pages","tableTo": "artboards",- "columnsFrom": [- "artboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["artboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13053,12 +12283,8 @@"name": "artboard_pages_user_id_users_id_fk","tableFrom": "artboard_pages","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13066,12 +12292,8 @@"name": "artboard_pages_workspace_id_workspaces_id_fk","tableFrom": "artboard_pages","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -13282,12 +12504,8 @@"name": "artboard_rounds_artboard_id_artboards_id_fk","tableFrom": "artboard_rounds","tableTo": "artboards",- "columnsFrom": [- "artboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["artboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13295,12 +12513,8 @@"name": "artboard_rounds_page_id_artboard_pages_id_fk","tableFrom": "artboard_rounds","tableTo": "artboard_pages",- "columnsFrom": [- "page_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["page_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -13308,12 +12522,8 @@"name": "artboard_rounds_user_id_users_id_fk","tableFrom": "artboard_rounds","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13321,12 +12531,8 @@"name": "artboard_rounds_workspace_id_workspaces_id_fk","tableFrom": "artboard_rounds","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13334,12 +12540,8 @@"name": "artboard_rounds_recommended_board_id_artboard_boards_id_fk","tableFrom": "artboard_rounds","tableTo": "artboard_boards",- "columnsFrom": [- "recommended_board_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["recommended_board_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -13347,12 +12549,8 @@"name": "artboard_rounds_chosen_board_id_artboard_boards_id_fk","tableFrom": "artboard_rounds","tableTo": "artboard_boards",- "columnsFrom": [- "chosen_board_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chosen_board_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -13360,12 +12558,8 @@"name": "artboard_rounds_selected_by_users_id_fk","tableFrom": "artboard_rounds","tableTo": "users",- "columnsFrom": [- "selected_by"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["selected_by"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -13612,12 +12806,8 @@"name": "artboards_user_id_users_id_fk","tableFrom": "artboards","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13625,12 +12815,8 @@"name": "artboards_workspace_id_workspaces_id_fk","tableFrom": "artboards","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13638,12 +12824,8 @@"name": "artboards_topic_id_topics_id_fk","tableFrom": "artboards","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -13651,12 +12833,8 @@"name": "artboards_task_id_tasks_id_fk","tableFrom": "artboards","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -13664,12 +12842,8 @@"name": "artboards_project_id_projects_id_fk","tableFrom": "artboards","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -13677,12 +12851,8 @@"name": "artboards_acceptance_id_acceptances_id_fk","tableFrom": "artboards","tableTo": "acceptances",- "columnsFrom": [- "acceptance_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["acceptance_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -13884,12 +13054,8 @@"name": "async_tasks_user_id_users_id_fk","tableFrom": "async_tasks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -13897,12 +13063,8 @@"name": "async_tasks_workspace_id_workspaces_id_fk","tableFrom": "async_tasks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -14019,12 +13181,8 @@"name": "accounts_user_id_users_id_fk","tableFrom": "accounts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -14144,12 +13302,8 @@"name": "passkey_userId_users_id_fk","tableFrom": "passkey","tableTo": "users",- "columnsFrom": [- "userId"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["userId"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -14242,12 +13396,8 @@"name": "auth_sessions_user_id_users_id_fk","tableFrom": "auth_sessions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -14257,9 +13407,7 @@"auth_sessions_token_unique": {"name": "auth_sessions_token_unique","nullsNotDistinct": false,- "columns": [- "token"- ]+ "columns": ["token"]}},"policies": {},@@ -14332,12 +13480,8 @@"name": "two_factor_user_id_users_id_fk","tableFrom": "two_factor","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -14520,12 +13664,8 @@"name": "channel_audit_channel_id_channels_id_fk","tableFrom": "channel_audit","tableTo": "channels",- "columnsFrom": [- "channel_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["channel_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -14877,12 +14017,8 @@"name": "channel_jobs_channel_id_channels_id_fk","tableFrom": "channel_jobs","tableTo": "channels",- "columnsFrom": [- "channel_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["channel_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -14890,12 +14026,8 @@"name": "channel_jobs_topic_id_topics_id_fk","tableFrom": "channel_jobs","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -14903,12 +14035,8 @@"name": "channel_jobs_operation_id_agent_operations_id_fk","tableFrom": "channel_jobs","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -14916,14 +14044,8 @@"name": "channel_jobs_member_fk","tableFrom": "channel_jobs","tableTo": "channel_members",- "columnsFrom": [- "channel_id",- "member_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "member_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"},@@ -14931,14 +14053,8 @@"name": "channel_jobs_requester_fk","tableFrom": "channel_jobs","tableTo": "channel_members",- "columnsFrom": [- "channel_id",- "requester_member_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "requester_member_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"},@@ -14946,14 +14062,8 @@"name": "channel_jobs_message_fk","tableFrom": "channel_jobs","tableTo": "channel_messages",- "columnsFrom": [- "channel_id",- "message_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "message_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"},@@ -14961,14 +14071,8 @@"name": "channel_jobs_thread_fk","tableFrom": "channel_jobs","tableTo": "channel_threads",- "columnsFrom": [- "channel_id",- "thread_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "thread_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"}@@ -14978,17 +14082,12 @@"channel_jobs_operation_id_unique": {"name": "channel_jobs_operation_id_unique","nullsNotDistinct": false,- "columns": [- "operation_id"- ]+ "columns": ["operation_id"]},"channel_jobs_scope_unique": {"name": "channel_jobs_scope_unique","nullsNotDistinct": false,- "columns": [- "channel_id",- "id"- ]+ "columns": ["channel_id", "id"]}},"policies": {},@@ -15132,12 +14231,8 @@"name": "channel_member_grants_channel_id_channels_id_fk","tableFrom": "channel_member_grants","tableTo": "channels",- "columnsFrom": [- "channel_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["channel_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -15145,12 +14240,8 @@"name": "channel_member_grants_device_owner_id_users_id_fk","tableFrom": "channel_member_grants","tableTo": "users",- "columnsFrom": [- "device_owner_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["device_owner_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -15158,14 +14249,8 @@"name": "channel_member_grants_member_fk","tableFrom": "channel_member_grants","tableTo": "channel_members",- "columnsFrom": [- "channel_id",- "member_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "member_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"},@@ -15173,14 +14258,8 @@"name": "channel_member_grants_requester_fk","tableFrom": "channel_member_grants","tableTo": "channel_members",- "columnsFrom": [- "channel_id",- "requested_by_member_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "requested_by_member_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"}@@ -15387,12 +14466,8 @@"name": "channel_members_channel_id_channels_id_fk","tableFrom": "channel_members","tableTo": "channels",- "columnsFrom": [- "channel_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["channel_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -15400,12 +14475,8 @@"name": "channel_members_user_id_users_id_fk","tableFrom": "channel_members","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -15413,12 +14484,8 @@"name": "channel_members_section_id_channel_sections_id_fk","tableFrom": "channel_members","tableTo": "channel_sections",- "columnsFrom": [- "section_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["section_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -15426,12 +14493,8 @@"name": "channel_members_agent_id_agents_id_fk","tableFrom": "channel_members","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -15441,10 +14504,7 @@"channel_members_scope_unique": {"name": "channel_members_scope_unique","nullsNotDistinct": false,- "columns": [- "channel_id",- "id"- ]+ "columns": ["channel_id", "id"]}},"policies": {},@@ -15536,12 +14596,8 @@"name": "channel_message_files_message_id_channel_messages_id_fk","tableFrom": "channel_message_files","tableTo": "channel_messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -15549,12 +14605,8 @@"name": "channel_message_files_file_id_files_id_fk","tableFrom": "channel_message_files","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -15564,10 +14616,7 @@"channel_message_files_message_file_unique": {"name": "channel_message_files_message_file_unique","nullsNotDistinct": false,- "columns": [- "message_id",- "file_id"- ]+ "columns": ["message_id", "file_id"]}},"policies": {},@@ -15813,12 +14862,8 @@"name": "channel_messages_channel_id_channels_id_fk","tableFrom": "channel_messages","tableTo": "channels",- "columnsFrom": [- "channel_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["channel_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -15826,12 +14871,8 @@"name": "channel_messages_user_id_users_id_fk","tableFrom": "channel_messages","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -15839,12 +14880,8 @@"name": "channel_messages_agent_id_agents_id_fk","tableFrom": "channel_messages","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -15852,14 +14889,8 @@"name": "channel_messages_thread_fk","tableFrom": "channel_messages","tableTo": "channel_threads",- "columnsFrom": [- "channel_id",- "thread_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "thread_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"}@@ -15869,10 +14900,7 @@"channel_messages_scope_unique": {"name": "channel_messages_scope_unique","nullsNotDistinct": false,- "columns": [- "channel_id",- "id"- ]+ "columns": ["channel_id", "id"]}},"policies": {},@@ -15973,12 +15001,8 @@"name": "channel_sections_user_id_users_id_fk","tableFrom": "channel_sections","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -15986,12 +15010,8 @@"name": "channel_sections_workspace_id_workspaces_id_fk","tableFrom": "channel_sections","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -16100,12 +15120,8 @@"name": "channel_threads_channel_id_channels_id_fk","tableFrom": "channel_threads","tableTo": "channels",- "columnsFrom": [- "channel_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["channel_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16113,14 +15129,8 @@"name": "channel_threads_root_fk","tableFrom": "channel_threads","tableTo": "channel_messages",- "columnsFrom": [- "channel_id",- "root_message_id"- ],- "columnsTo": [- "channel_id",- "id"- ],+ "columnsFrom": ["channel_id", "root_message_id"],+ "columnsTo": ["channel_id", "id"],"onDelete": "no action","onUpdate": "no action"}@@ -16130,10 +15140,7 @@"channel_threads_scope_unique": {"name": "channel_threads_scope_unique","nullsNotDistinct": false,- "columns": [- "channel_id",- "id"- ]+ "columns": ["channel_id", "id"]}},"policies": {},@@ -16368,12 +15375,8 @@"name": "channels_user_id_users_id_fk","tableFrom": "channels","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -16381,12 +15384,8 @@"name": "channels_workspace_id_workspaces_id_fk","tableFrom": "channels","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16394,12 +15393,8 @@"name": "channels_project_id_projects_id_fk","tableFrom": "channels","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -16407,12 +15402,8 @@"name": "channels_agent_id_agents_id_fk","tableFrom": "channels","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16420,12 +15411,8 @@"name": "channels_peer_user_id_users_id_fk","tableFrom": "channels","tableTo": "users",- "columnsFrom": [- "peer_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["peer_user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -16671,12 +15658,8 @@"name": "chat_groups_user_id_users_id_fk","tableFrom": "chat_groups","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16684,12 +15667,8 @@"name": "chat_groups_workspace_id_workspaces_id_fk","tableFrom": "chat_groups","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16697,12 +15676,8 @@"name": "chat_groups_group_id_session_groups_id_fk","tableFrom": "chat_groups","tableTo": "session_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -16821,12 +15796,8 @@"name": "chat_groups_agents_chat_group_id_chat_groups_id_fk","tableFrom": "chat_groups_agents","tableTo": "chat_groups",- "columnsFrom": [- "chat_group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chat_group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16834,12 +15805,8 @@"name": "chat_groups_agents_agent_id_agents_id_fk","tableFrom": "chat_groups_agents","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16847,12 +15814,8 @@"name": "chat_groups_agents_user_id_users_id_fk","tableFrom": "chat_groups_agents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -16860,12 +15823,8 @@"name": "chat_groups_agents_workspace_id_workspaces_id_fk","tableFrom": "chat_groups_agents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -16873,10 +15832,7 @@"compositePrimaryKeys": {"chat_groups_agents_chat_group_id_agent_id_pk": {"name": "chat_groups_agents_chat_group_id_agent_id_pk",- "columns": [- "chat_group_id",- "agent_id"- ]+ "columns": ["chat_group_id", "agent_id"]}},"uniqueConstraints": {},@@ -17081,12 +16037,8 @@"name": "user_connector_tools_user_connector_id_user_connectors_id_fk","tableFrom": "user_connector_tools","tableTo": "user_connectors",- "columnsFrom": [- "user_connector_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_connector_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17094,12 +16046,8 @@"name": "user_connector_tools_user_id_users_id_fk","tableFrom": "user_connector_tools","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17107,12 +16055,8 @@"name": "user_connector_tools_workspace_id_workspaces_id_fk","tableFrom": "user_connector_tools","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -17393,12 +16337,8 @@"name": "user_connectors_user_id_users_id_fk","tableFrom": "user_connectors","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17406,12 +16346,8 @@"name": "user_connectors_workspace_id_workspaces_id_fk","tableFrom": "user_connectors","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17419,12 +16355,8 @@"name": "user_connectors_agent_id_agents_id_fk","tableFrom": "user_connectors","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -17531,12 +16463,8 @@"name": "user_installed_plugins_user_id_users_id_fk","tableFrom": "user_installed_plugins","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17544,12 +16472,8 @@"name": "user_installed_plugins_workspace_id_workspaces_id_fk","tableFrom": "user_installed_plugins","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -17557,10 +16481,7 @@"compositePrimaryKeys": {"user_installed_plugins_user_id_identifier_pk": {"name": "user_installed_plugins_user_id_identifier_pk",- "columns": [- "user_id",- "identifier"- ]+ "columns": ["user_id", "identifier"]}},"uniqueConstraints": {},@@ -17752,12 +16673,8 @@"name": "user_contact_requests_requester_id_users_id_fk","tableFrom": "user_contact_requests","tableTo": "users",- "columnsFrom": [- "requester_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["requester_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17765,12 +16682,8 @@"name": "user_contact_requests_addressee_id_users_id_fk","tableFrom": "user_contact_requests","tableTo": "users",- "columnsFrom": [- "addressee_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["addressee_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17778,12 +16691,8 @@"name": "user_contact_requests_workspace_id_workspaces_id_fk","tableFrom": "user_contact_requests","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -17908,12 +16817,8 @@"name": "user_contact_tag_assignments_tag_id_user_contact_tags_id_fk","tableFrom": "user_contact_tag_assignments","tableTo": "user_contact_tags",- "columnsFrom": [- "tag_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["tag_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17921,12 +16826,8 @@"name": "user_contact_tag_assignments_contact_id_user_contacts_id_fk","tableFrom": "user_contact_tag_assignments","tableTo": "user_contacts",- "columnsFrom": [- "contact_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["contact_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -17934,12 +16835,8 @@"name": "user_contact_tag_assignments_user_id_users_id_fk","tableFrom": "user_contact_tag_assignments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -18036,12 +16933,8 @@"name": "user_contact_tags_user_id_users_id_fk","tableFrom": "user_contact_tags","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -18285,12 +17178,8 @@"name": "user_contacts_user_id_users_id_fk","tableFrom": "user_contacts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18298,12 +17187,8 @@"name": "user_contacts_workspace_id_workspaces_id_fk","tableFrom": "user_contacts","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18311,12 +17196,8 @@"name": "user_contacts_contact_user_id_users_id_fk","tableFrom": "user_contacts","tableTo": "users",- "columnsFrom": [- "contact_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["contact_user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18324,12 +17205,8 @@"name": "user_contacts_agent_id_agents_id_fk","tableFrom": "user_contacts","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -18504,12 +17381,8 @@"name": "dashboard_items_dashboard_id_dashboards_id_fk","tableFrom": "dashboard_items","tableTo": "dashboards",- "columnsFrom": [- "dashboard_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dashboard_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18517,12 +17390,8 @@"name": "dashboard_items_widget_id_widgets_id_fk","tableFrom": "dashboard_items","tableTo": "widgets",- "columnsFrom": [- "widget_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["widget_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18530,12 +17399,8 @@"name": "dashboard_items_user_id_users_id_fk","tableFrom": "dashboard_items","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18543,12 +17408,8 @@"name": "dashboard_items_workspace_id_workspaces_id_fk","tableFrom": "dashboard_items","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -18791,12 +17652,8 @@"name": "dashboards_user_id_users_id_fk","tableFrom": "dashboards","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18804,12 +17661,8 @@"name": "dashboards_workspace_id_workspaces_id_fk","tableFrom": "dashboards","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18817,12 +17670,8 @@"name": "dashboards_project_id_projects_id_fk","tableFrom": "dashboards","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -18830,12 +17679,8 @@"name": "dashboards_agent_id_agents_id_fk","tableFrom": "dashboards","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -19088,12 +17933,8 @@"name": "devices_user_id_users_id_fk","tableFrom": "devices","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19101,12 +17942,8 @@"name": "devices_workspace_id_workspaces_id_fk","tableFrom": "devices","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -19218,12 +18055,8 @@"name": "document_comment_mentions_comment_id_document_comments_id_fk","tableFrom": "document_comment_mentions","tableTo": "document_comments",- "columnsFrom": [- "comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["comment_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19231,12 +18064,8 @@"name": "document_comment_mentions_mentioned_user_id_users_id_fk","tableFrom": "document_comment_mentions","tableTo": "users",- "columnsFrom": [- "mentioned_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["mentioned_user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19244,12 +18073,8 @@"name": "document_comment_mentions_workspace_id_workspaces_id_fk","tableFrom": "document_comment_mentions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -19479,12 +18304,8 @@"name": "document_comments_document_id_documents_id_fk","tableFrom": "document_comments","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19492,12 +18313,8 @@"name": "document_comments_parent_comment_id_document_comments_id_fk","tableFrom": "document_comments","tableTo": "document_comments",- "columnsFrom": [- "parent_comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_comment_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -19505,12 +18322,8 @@"name": "document_comments_reply_to_comment_id_document_comments_id_fk","tableFrom": "document_comments","tableTo": "document_comments",- "columnsFrom": [- "reply_to_comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["reply_to_comment_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -19518,12 +18331,8 @@"name": "document_comments_author_user_id_users_id_fk","tableFrom": "document_comments","tableTo": "users",- "columnsFrom": [- "author_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -19531,12 +18340,8 @@"name": "document_comments_workspace_id_workspaces_id_fk","tableFrom": "document_comments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -19684,12 +18489,8 @@"name": "document_histories_document_id_documents_id_fk","tableFrom": "document_histories","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19697,12 +18498,8 @@"name": "document_histories_user_id_users_id_fk","tableFrom": "document_histories","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19710,12 +18507,8 @@"name": "document_histories_workspace_id_workspaces_id_fk","tableFrom": "document_histories","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -19842,12 +18635,8 @@"name": "document_likes_document_id_documents_id_fk","tableFrom": "document_likes","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19855,12 +18644,8 @@"name": "document_likes_user_id_users_id_fk","tableFrom": "document_likes","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -19868,12 +18653,8 @@"name": "document_likes_workspace_id_workspaces_id_fk","tableFrom": "document_likes","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -20008,12 +18789,8 @@"name": "document_shares_document_id_documents_id_fk","tableFrom": "document_shares","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20021,12 +18798,8 @@"name": "document_shares_user_id_users_id_fk","tableFrom": "document_shares","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20034,12 +18807,8 @@"name": "document_shares_workspace_id_workspaces_id_fk","tableFrom": "document_shares","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -20263,12 +19032,8 @@"name": "environments_user_id_users_id_fk","tableFrom": "environments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "restrict","onUpdate": "no action"},@@ -20276,12 +19041,8 @@"name": "environments_workspace_id_workspaces_id_fk","tableFrom": "environments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "restrict","onUpdate": "no action"},@@ -20289,12 +19050,8 @@"name": "environments_project_id_projects_id_fk","tableFrom": "environments","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "restrict","onUpdate": "no action"}@@ -20538,12 +19295,8 @@"name": "environment_instances_environment_id_environments_id_fk","tableFrom": "environment_instances","tableTo": "environments",- "columnsFrom": [- "environment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["environment_id"],+ "columnsTo": ["id"],"onDelete": "restrict","onUpdate": "no action"},@@ -20551,12 +19304,8 @@"name": "environment_instances_device_id_devices_id_fk","tableFrom": "environment_instances","tableTo": "devices",- "columnsFrom": [- "device_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["device_id"],+ "columnsTo": ["id"],"onDelete": "restrict","onUpdate": "no action"}@@ -20809,12 +19558,8 @@"name": "expertise_bindings_domain_id_expertise_domains_id_fk","tableFrom": "expertise_bindings","tableTo": "expertise_domains",- "columnsFrom": [- "domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["domain_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20822,12 +19567,8 @@"name": "expertise_bindings_agent_id_agents_id_fk","tableFrom": "expertise_bindings","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20835,12 +19576,8 @@"name": "expertise_bindings_project_id_projects_id_fk","tableFrom": "expertise_bindings","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20848,12 +19585,8 @@"name": "expertise_bindings_bound_workspace_id_workspaces_id_fk","tableFrom": "expertise_bindings","tableTo": "workspaces",- "columnsFrom": [- "bound_workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["bound_workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20861,12 +19594,8 @@"name": "expertise_bindings_bound_user_id_users_id_fk","tableFrom": "expertise_bindings","tableTo": "users",- "columnsFrom": [- "bound_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["bound_user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -20874,12 +19603,8 @@"name": "expertise_bindings_added_by_user_id_users_id_fk","tableFrom": "expertise_bindings","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -20887,12 +19612,8 @@"name": "expertise_bindings_workspace_id_workspaces_id_fk","tableFrom": "expertise_bindings","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -21122,12 +19843,8 @@"name": "expertise_domain_snapshots_domain_id_expertise_domains_id_fk","tableFrom": "expertise_domain_snapshots","tableTo": "expertise_domains",- "columnsFrom": [- "domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["domain_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -21135,12 +19852,8 @@"name": "expertise_domain_snapshots_run_id_expertise_runs_id_fk","tableFrom": "expertise_domain_snapshots","tableTo": "expertise_runs",- "columnsFrom": [- "run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["run_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21148,14 +19861,8 @@"name": "expertise_domain_snapshots_run_domain_fk","tableFrom": "expertise_domain_snapshots","tableTo": "expertise_runs",- "columnsFrom": [- "run_id",- "domain_id"- ],- "columnsTo": [- "id",- "domain_id"- ],+ "columnsFrom": ["run_id", "domain_id"],+ "columnsTo": ["id", "domain_id"],"onDelete": "no action","onUpdate": "no action"}@@ -21440,12 +20147,8 @@"name": "expertise_domains_user_id_users_id_fk","tableFrom": "expertise_domains","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -21453,12 +20156,8 @@"name": "expertise_domains_workspace_id_workspaces_id_fk","tableFrom": "expertise_domains","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -21466,12 +20165,8 @@"name": "expertise_domains_parent_domain_id_expertise_domains_id_fk","tableFrom": "expertise_domains","tableTo": "expertise_domains",- "columnsFrom": [- "parent_domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_domain_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21479,12 +20174,8 @@"name": "expertise_domains_canon_document_id_documents_id_fk","tableFrom": "expertise_domains","tableTo": "documents",- "columnsFrom": [- "canon_document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["canon_document_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21492,12 +20183,8 @@"name": "expertise_domains_lesson_base_document_id_documents_id_fk","tableFrom": "expertise_domains","tableTo": "documents",- "columnsFrom": [- "lesson_base_document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["lesson_base_document_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21505,12 +20192,8 @@"name": "expertise_domains_anchor_chosen_by_user_id_users_id_fk","tableFrom": "expertise_domains","tableTo": "users",- "columnsFrom": [- "anchor_chosen_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["anchor_chosen_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -21719,12 +20402,8 @@"name": "expertise_hits_domain_id_expertise_domains_id_fk","tableFrom": "expertise_hits","tableTo": "expertise_domains",- "columnsFrom": [- "domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["domain_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -21732,12 +20411,8 @@"name": "expertise_hits_evidence_id_verify_evidence_id_fk","tableFrom": "expertise_hits","tableTo": "verify_evidence",- "columnsFrom": [- "evidence_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["evidence_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21745,12 +20420,8 @@"name": "expertise_hits_operation_id_agent_operations_id_fk","tableFrom": "expertise_hits","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21758,12 +20429,8 @@"name": "expertise_hits_source_check_result_id_verify_check_results_id_fk","tableFrom": "expertise_hits","tableTo": "verify_check_results",- "columnsFrom": [- "source_check_result_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_check_result_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21771,12 +20438,8 @@"name": "expertise_hits_source_message_id_messages_id_fk","tableFrom": "expertise_hits","tableTo": "messages",- "columnsFrom": [- "source_message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_message_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -21784,14 +20447,8 @@"name": "expertise_hits_run_domain_fk","tableFrom": "expertise_hits","tableTo": "expertise_runs",- "columnsFrom": [- "run_id",- "domain_id"- ],- "columnsTo": [- "id",- "domain_id"- ],+ "columnsFrom": ["run_id", "domain_id"],+ "columnsTo": ["id", "domain_id"],"onDelete": "cascade","onUpdate": "no action"},@@ -21799,14 +20456,8 @@"name": "expertise_hits_lesson_domain_fk","tableFrom": "expertise_hits","tableTo": "expertise_lessons",- "columnsFrom": [- "lesson_id",- "domain_id"- ],- "columnsTo": [- "id",- "domain_id"- ],+ "columnsFrom": ["lesson_id", "domain_id"],+ "columnsTo": ["id", "domain_id"],"onDelete": "cascade","onUpdate": "no action"}@@ -21993,12 +20644,8 @@"name": "expertise_insights_domain_id_expertise_domains_id_fk","tableFrom": "expertise_insights","tableTo": "expertise_domains",- "columnsFrom": [- "domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["domain_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -22006,12 +20653,8 @@"name": "expertise_insights_user_id_users_id_fk","tableFrom": "expertise_insights","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -22019,12 +20662,8 @@"name": "expertise_insights_workspace_id_workspaces_id_fk","tableFrom": "expertise_insights","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -22032,12 +20671,8 @@"name": "expertise_insights_generated_by_operation_id_agent_operations_id_fk","tableFrom": "expertise_insights","tableTo": "agent_operations",- "columnsFrom": [- "generated_by_operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["generated_by_operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -22177,12 +20812,8 @@"name": "expertise_lesson_revisions_lesson_id_expertise_lessons_id_fk","tableFrom": "expertise_lesson_revisions","tableTo": "expertise_lessons",- "columnsFrom": [- "lesson_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["lesson_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -22190,12 +20821,8 @@"name": "expertise_lesson_revisions_changed_by_user_id_users_id_fk","tableFrom": "expertise_lesson_revisions","tableTo": "users",- "columnsFrom": [- "changed_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["changed_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -22203,12 +20830,8 @@"name": "expertise_lesson_revisions_operation_id_agent_operations_id_fk","tableFrom": "expertise_lesson_revisions","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -22542,12 +21165,8 @@"name": "expertise_lessons_domain_id_expertise_domains_id_fk","tableFrom": "expertise_lessons","tableTo": "expertise_domains",- "columnsFrom": [- "domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["domain_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -22555,12 +21174,8 @@"name": "expertise_lessons_created_by_user_id_users_id_fk","tableFrom": "expertise_lessons","tableTo": "users",- "columnsFrom": [- "created_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -22568,12 +21183,8 @@"name": "expertise_lessons_salvaged_from_id_expertise_lessons_id_fk","tableFrom": "expertise_lessons","tableTo": "expertise_lessons",- "columnsFrom": [- "salvaged_from_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["salvaged_from_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -22581,12 +21192,8 @@"name": "expertise_lessons_compiled_criterion_id_verify_criteria_id_fk","tableFrom": "expertise_lessons","tableTo": "verify_criteria",- "columnsFrom": [- "compiled_criterion_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["compiled_criterion_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -22596,10 +21203,7 @@"expertise_lessons_id_domain_unique": {"name": "expertise_lessons_id_domain_unique","nullsNotDistinct": false,- "columns": [- "id",- "domain_id"- ]+ "columns": ["id", "domain_id"]}},"policies": {},@@ -22866,12 +21470,8 @@"name": "expertise_runs_domain_id_expertise_domains_id_fk","tableFrom": "expertise_runs","tableTo": "expertise_domains",- "columnsFrom": [- "domain_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["domain_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -22879,12 +21479,8 @@"name": "expertise_runs_user_id_users_id_fk","tableFrom": "expertise_runs","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -22892,12 +21488,8 @@"name": "expertise_runs_workspace_id_workspaces_id_fk","tableFrom": "expertise_runs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -22907,10 +21499,7 @@"expertise_runs_id_domain_unique": {"name": "expertise_runs_id_domain_unique","nullsNotDistinct": false,- "columns": [- "id",- "domain_id"- ]+ "columns": ["id", "domain_id"]}},"policies": {},@@ -23098,12 +21687,8 @@"name": "user_favorites_user_id_users_id_fk","tableFrom": "user_favorites","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -23111,12 +21696,8 @@"name": "user_favorites_workspace_id_workspaces_id_fk","tableFrom": "user_favorites","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -23517,12 +22098,8 @@"name": "documents_file_id_files_id_fk","tableFrom": "documents","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -23530,12 +22107,8 @@"name": "documents_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "documents","tableTo": "knowledge_bases",- "columnsFrom": [- "knowledge_base_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["knowledge_base_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -23543,12 +22116,8 @@"name": "documents_parent_id_documents_id_fk","tableFrom": "documents","tableTo": "documents",- "columnsFrom": [- "parent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -23556,12 +22125,8 @@"name": "documents_user_id_users_id_fk","tableFrom": "documents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -23569,12 +22134,8 @@"name": "documents_workspace_id_workspaces_id_fk","tableFrom": "documents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -23791,12 +22352,8 @@"name": "file_uploads_user_id_users_id_fk","tableFrom": "file_uploads","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -23804,12 +22361,8 @@"name": "file_uploads_workspace_id_workspaces_id_fk","tableFrom": "file_uploads","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -23817,12 +22370,8 @@"name": "file_uploads_file_id_files_id_fk","tableFrom": "file_uploads","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -24107,12 +22656,8 @@"name": "files_user_id_users_id_fk","tableFrom": "files","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24120,12 +22665,8 @@"name": "files_file_hash_global_files_hash_id_fk","tableFrom": "files","tableTo": "global_files",- "columnsFrom": [- "file_hash"- ],- "columnsTo": [- "hash_id"- ],+ "columnsFrom": ["file_hash"],+ "columnsTo": ["hash_id"],"onDelete": "no action","onUpdate": "no action"},@@ -24133,12 +22674,8 @@"name": "files_parent_id_documents_id_fk","tableFrom": "files","tableTo": "documents",- "columnsFrom": [- "parent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -24146,12 +22683,8 @@"name": "files_chunk_task_id_async_tasks_id_fk","tableFrom": "files","tableTo": "async_tasks",- "columnsFrom": [- "chunk_task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chunk_task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -24159,12 +22692,8 @@"name": "files_embedding_task_id_async_tasks_id_fk","tableFrom": "files","tableTo": "async_tasks",- "columnsFrom": [- "embedding_task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["embedding_task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -24172,12 +22701,8 @@"name": "files_workspace_id_workspaces_id_fk","tableFrom": "files","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -24265,12 +22790,8 @@"name": "global_files_creator_users_id_fk","tableFrom": "global_files","tableTo": "users",- "columnsFrom": [- "creator"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["creator"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -24384,12 +22905,8 @@"name": "knowledge_base_files_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "knowledge_base_files","tableTo": "knowledge_bases",- "columnsFrom": [- "knowledge_base_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["knowledge_base_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24397,12 +22914,8 @@"name": "knowledge_base_files_file_id_files_id_fk","tableFrom": "knowledge_base_files","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24410,12 +22923,8 @@"name": "knowledge_base_files_user_id_users_id_fk","tableFrom": "knowledge_base_files","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24423,12 +22932,8 @@"name": "knowledge_base_files_workspace_id_workspaces_id_fk","tableFrom": "knowledge_base_files","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -24436,10 +22941,7 @@"compositePrimaryKeys": {"knowledge_base_files_knowledge_base_id_file_id_pk": {"name": "knowledge_base_files_knowledge_base_id_file_id_pk",- "columns": [- "knowledge_base_id",- "file_id"- ]+ "columns": ["knowledge_base_id", "file_id"]}},"uniqueConstraints": {},@@ -24638,12 +23140,8 @@"name": "knowledge_bases_user_id_users_id_fk","tableFrom": "knowledge_bases","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24651,12 +23149,8 @@"name": "knowledge_bases_workspace_id_workspaces_id_fk","tableFrom": "knowledge_bases","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -24795,12 +23289,8 @@"name": "file_shares_file_id_files_id_fk","tableFrom": "file_shares","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24808,12 +23298,8 @@"name": "file_shares_user_id_users_id_fk","tableFrom": "file_shares","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -24821,12 +23307,8 @@"name": "file_shares_workspace_id_workspaces_id_fk","tableFrom": "file_shares","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -25192,12 +23674,8 @@"name": "generation_batches_user_id_users_id_fk","tableFrom": "generation_batches","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25205,12 +23683,8 @@"name": "generation_batches_workspace_id_workspaces_id_fk","tableFrom": "generation_batches","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25218,12 +23692,8 @@"name": "generation_batches_generation_topic_id_generation_topics_id_fk","tableFrom": "generation_batches","tableTo": "generation_topics",- "columnsFrom": [- "generation_topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["generation_topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -25380,12 +23850,8 @@"name": "generation_topics_user_id_users_id_fk","tableFrom": "generation_topics","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25393,12 +23859,8 @@"name": "generation_topics_workspace_id_workspaces_id_fk","tableFrom": "generation_topics","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -25562,12 +24024,8 @@"name": "generations_user_id_users_id_fk","tableFrom": "generations","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25575,12 +24033,8 @@"name": "generations_workspace_id_workspaces_id_fk","tableFrom": "generations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25588,12 +24042,8 @@"name": "generations_generation_batch_id_generation_batches_id_fk","tableFrom": "generations","tableTo": "generation_batches",- "columnsFrom": [- "generation_batch_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["generation_batch_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25601,12 +24051,8 @@"name": "generations_async_task_id_async_tasks_id_fk","tableFrom": "generations","tableTo": "async_tasks",- "columnsFrom": [- "async_task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["async_task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -25614,12 +24060,8 @@"name": "generations_file_id_files_id_fk","tableFrom": "generations","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -25895,12 +24337,8 @@"name": "goals_user_id_users_id_fk","tableFrom": "goals","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25908,12 +24346,8 @@"name": "goals_workspace_id_workspaces_id_fk","tableFrom": "goals","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -25921,12 +24355,8 @@"name": "goals_agent_id_agents_id_fk","tableFrom": "goals","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -25934,12 +24364,8 @@"name": "goals_project_id_projects_id_fk","tableFrom": "goals","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -26057,12 +24483,8 @@"name": "goal_edges_goal_id_goals_id_fk","tableFrom": "goal_edges","tableTo": "goals",- "columnsFrom": [- "goal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["goal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -26070,14 +24492,8 @@"name": "goal_edges_goal_source_node_fk","tableFrom": "goal_edges","tableTo": "goal_nodes",- "columnsFrom": [- "goal_id",- "source_node_id"- ],- "columnsTo": [- "goal_id",- "id"- ],+ "columnsFrom": ["goal_id", "source_node_id"],+ "columnsTo": ["goal_id", "id"],"onDelete": "cascade","onUpdate": "no action"},@@ -26085,14 +24501,8 @@"name": "goal_edges_goal_target_node_fk","tableFrom": "goal_edges","tableTo": "goal_nodes",- "columnsFrom": [- "goal_id",- "target_node_id"- ],- "columnsTo": [- "goal_id",- "id"- ],+ "columnsFrom": ["goal_id", "target_node_id"],+ "columnsTo": ["goal_id", "id"],"onDelete": "cascade","onUpdate": "no action"}@@ -26260,12 +24670,8 @@"name": "goal_events_goal_id_goals_id_fk","tableFrom": "goal_events","tableTo": "goals",- "columnsFrom": [- "goal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["goal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -26273,12 +24679,8 @@"name": "goal_events_task_id_tasks_id_fk","tableFrom": "goal_events","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -26480,12 +24882,8 @@"name": "goal_node_decisions_node_id_goal_nodes_id_fk","tableFrom": "goal_node_decisions","tableTo": "goal_nodes",- "columnsFrom": [- "node_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["node_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -26493,12 +24891,8 @@"name": "goal_node_decisions_requested_user_id_users_id_fk","tableFrom": "goal_node_decisions","tableTo": "users",- "columnsFrom": [- "requested_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["requested_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -26506,12 +24900,8 @@"name": "goal_node_decisions_resolved_by_user_id_users_id_fk","tableFrom": "goal_node_decisions","tableTo": "users",- "columnsFrom": [- "resolved_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["resolved_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -26519,12 +24909,8 @@"name": "goal_node_decisions_resolved_by_agent_id_agents_id_fk","tableFrom": "goal_node_decisions","tableTo": "agents",- "columnsFrom": [- "resolved_by_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["resolved_by_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -26621,12 +25007,8 @@"name": "goal_node_work_versions_node_id_goal_nodes_id_fk","tableFrom": "goal_node_work_versions","tableTo": "goal_nodes",- "columnsFrom": [- "node_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["node_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -26634,12 +25016,8 @@"name": "goal_node_work_versions_work_version_id_work_versions_id_fk","tableFrom": "goal_node_work_versions","tableTo": "work_versions",- "columnsFrom": [- "work_version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["work_version_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -26831,12 +25209,8 @@"name": "goal_nodes_goal_id_goals_id_fk","tableFrom": "goal_nodes","tableTo": "goals",- "columnsFrom": [- "goal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["goal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -26844,12 +25218,8 @@"name": "goal_nodes_task_id_tasks_id_fk","tableFrom": "goal_nodes","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -26857,12 +25227,8 @@"name": "goal_nodes_created_by_user_id_users_id_fk","tableFrom": "goal_nodes","tableTo": "users",- "columnsFrom": [- "created_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -26870,12 +25236,8 @@"name": "goal_nodes_created_by_agent_id_agents_id_fk","tableFrom": "goal_nodes","tableTo": "agents",- "columnsFrom": [- "created_by_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -26885,10 +25247,7 @@"goal_nodes_goal_id_id_unique": {"name": "goal_nodes_goal_id_id_unique","nullsNotDistinct": false,- "columns": [- "goal_id",- "id"- ]+ "columns": ["goal_id", "id"]}},"policies": {},@@ -27028,12 +25387,8 @@"name": "goal_shares_goal_id_goals_id_fk","tableFrom": "goal_shares","tableTo": "goals",- "columnsFrom": [- "goal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["goal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27041,12 +25396,8 @@"name": "goal_shares_user_id_users_id_fk","tableFrom": "goal_shares","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27054,12 +25405,8 @@"name": "goal_shares_workspace_id_workspaces_id_fk","tableFrom": "goal_shares","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -27358,12 +25705,8 @@"name": "goal_subscriptions_goal_id_goals_id_fk","tableFrom": "goal_subscriptions","tableTo": "goals",- "columnsFrom": [- "goal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["goal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27371,12 +25714,8 @@"name": "goal_subscriptions_widget_id_widgets_id_fk","tableFrom": "goal_subscriptions","tableTo": "widgets",- "columnsFrom": [- "widget_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["widget_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27384,12 +25723,8 @@"name": "goal_subscriptions_metric_id_metrics_id_fk","tableFrom": "goal_subscriptions","tableTo": "metrics",- "columnsFrom": [- "metric_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["metric_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27397,12 +25732,8 @@"name": "goal_subscriptions_user_id_users_id_fk","tableFrom": "goal_subscriptions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27410,12 +25741,8 @@"name": "goal_subscriptions_workspace_id_workspaces_id_fk","tableFrom": "goal_subscriptions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27423,12 +25750,8 @@"name": "goal_subscriptions_confirmed_version_id_widget_versions_id_fk","tableFrom": "goal_subscriptions","tableTo": "widget_versions",- "columnsFrom": [- "confirmed_version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["confirmed_version_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -27614,12 +25937,8 @@"name": "goal_traces_goal_id_goals_id_fk","tableFrom": "goal_traces","tableTo": "goals",- "columnsFrom": [- "goal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["goal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -27914,12 +26233,8 @@"name": "inbound_webhooks_user_id_users_id_fk","tableFrom": "inbound_webhooks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27927,12 +26242,8 @@"name": "inbound_webhooks_workspace_id_workspaces_id_fk","tableFrom": "inbound_webhooks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27940,12 +26251,8 @@"name": "inbound_webhooks_agent_id_agents_id_fk","tableFrom": "inbound_webhooks","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27953,12 +26260,8 @@"name": "inbound_webhooks_topic_id_topics_id_fk","tableFrom": "inbound_webhooks","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -27966,12 +26269,8 @@"name": "inbound_webhooks_connector_id_user_connectors_id_fk","tableFrom": "inbound_webhooks","tableTo": "user_connectors",- "columnsFrom": [- "connector_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["connector_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -28169,12 +26468,8 @@"name": "linear_connections_user_id_users_id_fk","tableFrom": "linear_connections","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -28182,12 +26477,8 @@"name": "linear_connections_workspace_id_workspaces_id_fk","tableFrom": "linear_connections","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -28364,12 +26655,8 @@"name": "linear_sync_rules_project_id_projects_id_fk","tableFrom": "linear_sync_rules","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -28377,12 +26664,8 @@"name": "linear_sync_rules_connection_id_linear_connections_id_fk","tableFrom": "linear_sync_rules","tableTo": "linear_connections",- "columnsFrom": [- "connection_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["connection_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -28390,12 +26673,8 @@"name": "linear_sync_rules_user_id_users_id_fk","tableFrom": "linear_sync_rules","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -28403,12 +26682,8 @@"name": "linear_sync_rules_workspace_id_workspaces_id_fk","tableFrom": "linear_sync_rules","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -28828,12 +27103,8 @@"name": "llm_generation_tracing_workspace_id_workspaces_id_fk","tableFrom": "llm_generation_tracing","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -28966,12 +27237,8 @@"name": "meeting_minutes_meeting_id_meetings_id_fk","tableFrom": "meeting_minutes","tableTo": "meetings",- "columnsFrom": [- "meeting_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["meeting_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -28979,12 +27246,8 @@"name": "meeting_minutes_document_id_documents_id_fk","tableFrom": "meeting_minutes","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -29146,12 +27409,8 @@"name": "meeting_segments_meeting_id_meetings_id_fk","tableFrom": "meeting_segments","tableTo": "meetings",- "columnsFrom": [- "meeting_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["meeting_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29159,12 +27418,8 @@"name": "meeting_segments_speaker_id_meeting_speakers_id_fk","tableFrom": "meeting_segments","tableTo": "meeting_speakers",- "columnsFrom": [- "speaker_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["speaker_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -29254,12 +27509,8 @@"name": "meeting_speakers_meeting_id_meetings_id_fk","tableFrom": "meeting_speakers","tableTo": "meetings",- "columnsFrom": [- "meeting_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["meeting_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -29467,12 +27718,8 @@"name": "meetings_user_id_users_id_fk","tableFrom": "meetings","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29480,12 +27727,8 @@"name": "meetings_workspace_id_workspaces_id_fk","tableFrom": "meetings","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29493,12 +27736,8 @@"name": "meetings_audio_file_id_files_id_fk","tableFrom": "meetings","tableTo": "files",- "columnsFrom": [- "audio_file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["audio_file_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -29590,12 +27829,8 @@"name": "message_chunks_message_id_messages_id_fk","tableFrom": "message_chunks","tableTo": "messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29603,12 +27838,8 @@"name": "message_chunks_chunk_id_chunks_id_fk","tableFrom": "message_chunks","tableTo": "chunks",- "columnsFrom": [- "chunk_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chunk_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29616,12 +27847,8 @@"name": "message_chunks_user_id_users_id_fk","tableFrom": "message_chunks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29629,12 +27856,8 @@"name": "message_chunks_workspace_id_workspaces_id_fk","tableFrom": "message_chunks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -29642,10 +27865,7 @@"compositePrimaryKeys": {"message_chunks_chunk_id_message_id_pk": {"name": "message_chunks_chunk_id_message_id_pk",- "columns": [- "chunk_id",- "message_id"- ]+ "columns": ["chunk_id", "message_id"]}},"uniqueConstraints": {},@@ -29875,12 +28095,8 @@"name": "message_groups_topic_id_topics_id_fk","tableFrom": "message_groups","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29888,12 +28104,8 @@"name": "message_groups_user_id_users_id_fk","tableFrom": "message_groups","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29901,12 +28113,8 @@"name": "message_groups_workspace_id_workspaces_id_fk","tableFrom": "message_groups","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29914,12 +28122,8 @@"name": "message_groups_parent_group_id_message_groups_id_fk","tableFrom": "message_groups","tableTo": "message_groups",- "columnsFrom": [- "parent_group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -29927,12 +28131,8 @@"name": "message_groups_parent_message_id_messages_id_fk","tableFrom": "message_groups","tableTo": "messages",- "columnsFrom": [- "parent_message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_message_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -30094,12 +28294,8 @@"name": "message_plugins_id_messages_id_fk","tableFrom": "message_plugins","tableTo": "messages",- "columnsFrom": [- "id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30107,12 +28303,8 @@"name": "message_plugins_user_id_users_id_fk","tableFrom": "message_plugins","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30120,12 +28312,8 @@"name": "message_plugins_workspace_id_workspaces_id_fk","tableFrom": "message_plugins","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -30278,12 +28466,8 @@"name": "message_queries_message_id_messages_id_fk","tableFrom": "message_queries","tableTo": "messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30291,12 +28475,8 @@"name": "message_queries_user_id_users_id_fk","tableFrom": "message_queries","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30304,12 +28484,8 @@"name": "message_queries_workspace_id_workspaces_id_fk","tableFrom": "message_queries","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30317,12 +28493,8 @@"name": "message_queries_embeddings_id_embeddings_id_fk","tableFrom": "message_queries","tableTo": "embeddings",- "columnsFrom": [- "embeddings_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["embeddings_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -30441,12 +28613,8 @@"name": "message_query_chunks_id_messages_id_fk","tableFrom": "message_query_chunks","tableTo": "messages",- "columnsFrom": [- "id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30454,12 +28622,8 @@"name": "message_query_chunks_query_id_message_queries_id_fk","tableFrom": "message_query_chunks","tableTo": "message_queries",- "columnsFrom": [- "query_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["query_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30467,12 +28631,8 @@"name": "message_query_chunks_chunk_id_chunks_id_fk","tableFrom": "message_query_chunks","tableTo": "chunks",- "columnsFrom": [- "chunk_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chunk_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30480,12 +28640,8 @@"name": "message_query_chunks_user_id_users_id_fk","tableFrom": "message_query_chunks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30493,12 +28649,8 @@"name": "message_query_chunks_workspace_id_workspaces_id_fk","tableFrom": "message_query_chunks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -30506,11 +28658,7 @@"compositePrimaryKeys": {"message_query_chunks_chunk_id_id_query_id_pk": {"name": "message_query_chunks_chunk_id_id_query_id_pk",- "columns": [- "chunk_id",- "id",- "query_id"- ]+ "columns": ["chunk_id", "id", "query_id"]}},"uniqueConstraints": {},@@ -30623,12 +28771,8 @@"name": "message_tts_id_messages_id_fk","tableFrom": "message_tts","tableTo": "messages",- "columnsFrom": [- "id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30636,12 +28780,8 @@"name": "message_tts_file_id_files_id_fk","tableFrom": "message_tts","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30649,12 +28789,8 @@"name": "message_tts_user_id_users_id_fk","tableFrom": "message_tts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30662,12 +28798,8 @@"name": "message_tts_workspace_id_workspaces_id_fk","tableFrom": "message_tts","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -30783,12 +28915,8 @@"name": "message_translates_id_messages_id_fk","tableFrom": "message_translates","tableTo": "messages",- "columnsFrom": [- "id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30796,12 +28924,8 @@"name": "message_translates_user_id_users_id_fk","tableFrom": "message_translates","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -30809,12 +28933,8 @@"name": "message_translates_workspace_id_workspaces_id_fk","tableFrom": "message_translates","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -31297,12 +29417,8 @@"name": "messages_user_id_users_id_fk","tableFrom": "messages","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31310,12 +29426,8 @@"name": "messages_session_id_sessions_id_fk","tableFrom": "messages","tableTo": "sessions",- "columnsFrom": [- "session_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["session_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31323,12 +29435,8 @@"name": "messages_topic_id_topics_id_fk","tableFrom": "messages","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31336,12 +29444,8 @@"name": "messages_thread_id_threads_id_fk","tableFrom": "messages","tableTo": "threads",- "columnsFrom": [- "thread_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["thread_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31349,12 +29453,8 @@"name": "messages_parent_id_messages_id_fk","tableFrom": "messages","tableTo": "messages",- "columnsFrom": [- "parent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -31362,12 +29462,8 @@"name": "messages_quota_id_messages_id_fk","tableFrom": "messages","tableTo": "messages",- "columnsFrom": [- "quota_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["quota_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -31375,12 +29471,8 @@"name": "messages_agent_id_agents_id_fk","tableFrom": "messages","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31388,12 +29480,8 @@"name": "messages_group_id_chat_groups_id_fk","tableFrom": "messages","tableTo": "chat_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -31401,12 +29489,8 @@"name": "messages_message_group_id_message_groups_id_fk","tableFrom": "messages","tableTo": "message_groups",- "columnsFrom": [- "message_group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31414,12 +29498,8 @@"name": "messages_workspace_id_workspaces_id_fk","tableFrom": "messages","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -31511,12 +29591,8 @@"name": "messages_files_file_id_files_id_fk","tableFrom": "messages_files","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31524,12 +29600,8 @@"name": "messages_files_message_id_messages_id_fk","tableFrom": "messages_files","tableTo": "messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31537,12 +29609,8 @@"name": "messages_files_user_id_users_id_fk","tableFrom": "messages_files","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31550,12 +29618,8 @@"name": "messages_files_workspace_id_workspaces_id_fk","tableFrom": "messages_files","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -31563,10 +29627,7 @@"compositePrimaryKeys": {"messages_files_file_id_message_id_pk": {"name": "messages_files_file_id_message_id_pk",- "columns": [- "file_id",- "message_id"- ]+ "columns": ["file_id", "message_id"]}},"uniqueConstraints": {},@@ -31781,12 +29842,8 @@"name": "messenger_account_links_user_id_users_id_fk","tableFrom": "messenger_account_links","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31794,12 +29851,8 @@"name": "messenger_account_links_workspace_id_workspaces_id_fk","tableFrom": "messenger_account_links","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -31807,12 +29860,8 @@"name": "messenger_account_links_active_agent_id_agents_id_fk","tableFrom": "messenger_account_links","tableTo": "agents",- "columnsFrom": [- "active_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["active_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -31987,12 +30036,8 @@"name": "messenger_installations_installed_by_user_id_users_id_fk","tableFrom": "messenger_installations","tableTo": "users",- "columnsFrom": [- "installed_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["installed_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -32140,12 +30185,8 @@"name": "metric_points_metric_id_metrics_id_fk","tableFrom": "metric_points","tableTo": "metrics",- "columnsFrom": [- "metric_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["metric_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -32153,12 +30194,8 @@"name": "metric_points_user_id_users_id_fk","tableFrom": "metric_points","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -32166,12 +30203,8 @@"name": "metric_points_workspace_id_workspaces_id_fk","tableFrom": "metric_points","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -32344,12 +30377,8 @@"name": "metrics_user_id_users_id_fk","tableFrom": "metrics","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -32357,12 +30386,8 @@"name": "metrics_workspace_id_workspaces_id_fk","tableFrom": "metrics","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -32466,12 +30491,8 @@"name": "nextauth_accounts_user_id_users_id_fk","tableFrom": "nextauth_accounts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -32479,10 +30500,7 @@"compositePrimaryKeys": {"nextauth_accounts_provider_providerAccountId_pk": {"name": "nextauth_accounts_provider_providerAccountId_pk",- "columns": [- "provider",- "providerAccountId"- ]+ "columns": ["provider", "providerAccountId"]}},"uniqueConstraints": {},@@ -32549,12 +30567,8 @@"name": "nextauth_authenticators_user_id_users_id_fk","tableFrom": "nextauth_authenticators","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -32562,19 +30576,14 @@"compositePrimaryKeys": {"nextauth_authenticators_user_id_credentialID_pk": {"name": "nextauth_authenticators_user_id_credentialID_pk",- "columns": [- "user_id",- "credentialID"- ]+ "columns": ["user_id", "credentialID"]}},"uniqueConstraints": {"nextauth_authenticators_credentialID_unique": {"name": "nextauth_authenticators_credentialID_unique","nullsNotDistinct": false,- "columns": [- "credentialID"- ]+ "columns": ["credentialID"]}},"policies": {},@@ -32626,12 +30635,8 @@"name": "nextauth_sessions_user_id_users_id_fk","tableFrom": "nextauth_sessions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -32670,10 +30675,7 @@"compositePrimaryKeys": {"nextauth_verificationtokens_identifier_token_pk": {"name": "nextauth_verificationtokens_identifier_token_pk",- "columns": [- "identifier",- "token"- ]+ "columns": ["identifier", "token"]}},"uniqueConstraints": {},@@ -32788,12 +30790,8 @@"name": "notification_deliveries_notification_id_notifications_id_fk","tableFrom": "notification_deliveries","tableTo": "notifications",- "columnsFrom": [- "notification_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["notification_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33049,12 +31047,8 @@"name": "notifications_user_id_users_id_fk","tableFrom": "notifications","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -33062,12 +31056,8 @@"name": "notifications_workspace_id_workspaces_id_fk","tableFrom": "notifications","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33220,12 +31210,8 @@"name": "oidc_access_tokens_user_id_users_id_fk","tableFrom": "oidc_access_tokens","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33326,12 +31312,8 @@"name": "oidc_authorization_codes_user_id_users_id_fk","tableFrom": "oidc_authorization_codes","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33520,12 +31502,8 @@"name": "oidc_clients_user_id_users_id_fk","tableFrom": "oidc_clients","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -33533,12 +31511,8 @@"name": "oidc_clients_workspace_id_workspaces_id_fk","tableFrom": "oidc_clients","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33605,12 +31579,8 @@"name": "oidc_consents_user_id_users_id_fk","tableFrom": "oidc_consents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -33618,12 +31588,8 @@"name": "oidc_consents_client_id_oidc_clients_id_fk","tableFrom": "oidc_consents","tableTo": "oidc_clients",- "columnsFrom": [- "client_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["client_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33631,10 +31597,7 @@"compositePrimaryKeys": {"oidc_consents_user_id_client_id_pk": {"name": "oidc_consents_user_id_client_id_pk",- "columns": [- "user_id",- "client_id"- ]+ "columns": ["user_id", "client_id"]}},"uniqueConstraints": {},@@ -33738,12 +31701,8 @@"name": "oidc_device_codes_user_id_users_id_fk","tableFrom": "oidc_device_codes","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33838,12 +31797,8 @@"name": "oidc_grants_user_id_users_id_fk","tableFrom": "oidc_grants","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -33996,12 +31951,8 @@"name": "oidc_refresh_tokens_user_id_users_id_fk","tableFrom": "oidc_refresh_tokens","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -34084,12 +32035,8 @@"name": "oidc_sessions_user_id_users_id_fk","tableFrom": "oidc_sessions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -34262,12 +32209,8 @@"name": "project_agents_project_id_projects_id_fk","tableFrom": "project_agents","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34275,12 +32218,8 @@"name": "project_agents_agent_id_agents_id_fk","tableFrom": "project_agents","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34288,12 +32227,8 @@"name": "project_agents_added_by_user_id_users_id_fk","tableFrom": "project_agents","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -34301,12 +32236,8 @@"name": "project_agents_workspace_id_workspaces_id_fk","tableFrom": "project_agents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -34479,12 +32410,8 @@"name": "project_chat_groups_project_id_projects_id_fk","tableFrom": "project_chat_groups","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34492,12 +32419,8 @@"name": "project_chat_groups_chat_group_id_chat_groups_id_fk","tableFrom": "project_chat_groups","tableTo": "chat_groups",- "columnsFrom": [- "chat_group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chat_group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34505,12 +32428,8 @@"name": "project_chat_groups_added_by_user_id_users_id_fk","tableFrom": "project_chat_groups","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -34518,12 +32437,8 @@"name": "project_chat_groups_workspace_id_workspaces_id_fk","tableFrom": "project_chat_groups","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -34682,12 +32597,8 @@"name": "project_completion_reviews_project_id_projects_id_fk","tableFrom": "project_completion_reviews","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34695,12 +32606,8 @@"name": "project_completion_reviews_reviewer_user_id_users_id_fk","tableFrom": "project_completion_reviews","tableTo": "users",- "columnsFrom": [- "reviewer_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["reviewer_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -34708,12 +32615,8 @@"name": "project_completion_reviews_workspace_id_workspaces_id_fk","tableFrom": "project_completion_reviews","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -34879,12 +32782,8 @@"name": "project_knowledge_bases_project_id_projects_id_fk","tableFrom": "project_knowledge_bases","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34892,12 +32791,8 @@"name": "project_knowledge_bases_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "project_knowledge_bases","tableTo": "knowledge_bases",- "columnsFrom": [- "knowledge_base_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["knowledge_base_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -34905,12 +32800,8 @@"name": "project_knowledge_bases_added_by_user_id_users_id_fk","tableFrom": "project_knowledge_bases","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -34918,12 +32809,8 @@"name": "project_knowledge_bases_workspace_id_workspaces_id_fk","tableFrom": "project_knowledge_bases","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -35125,12 +33012,8 @@"name": "project_working_directories_project_id_projects_id_fk","tableFrom": "project_working_directories","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -35138,12 +33021,8 @@"name": "project_working_directories_device_id_devices_id_fk","tableFrom": "project_working_directories","tableTo": "devices",- "columnsFrom": [- "device_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["device_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -35151,12 +33030,8 @@"name": "project_working_directories_workspace_id_workspaces_id_fk","tableFrom": "project_working_directories","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -35164,12 +33039,8 @@"name": "project_working_directories_added_by_user_id_users_id_fk","tableFrom": "project_working_directories","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -35555,12 +33426,8 @@"name": "projects_coordinator_agent_id_agents_id_fk","tableFrom": "projects","tableTo": "agents",- "columnsFrom": [- "coordinator_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["coordinator_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -35568,12 +33435,8 @@"name": "projects_user_id_users_id_fk","tableFrom": "projects","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -35581,12 +33444,8 @@"name": "projects_workspace_id_workspaces_id_fk","tableFrom": "projects","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -35811,12 +33670,8 @@"name": "project_environments_project_id_projects_id_fk","tableFrom": "project_environments","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -35824,12 +33679,8 @@"name": "project_environments_environment_id_environments_id_fk","tableFrom": "project_environments","tableTo": "environments",- "columnsFrom": [- "environment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["environment_id"],+ "columnsTo": ["id"],"onDelete": "restrict","onUpdate": "no action"},@@ -35837,12 +33688,8 @@"name": "project_environments_workspace_id_workspaces_id_fk","tableFrom": "project_environments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -35850,12 +33697,8 @@"name": "project_environments_added_by_user_id_users_id_fk","tableFrom": "project_environments","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -35863,14 +33706,8 @@"name": "project_environments_default_instance_fk","tableFrom": "project_environments","tableTo": "environment_instances",- "columnsFrom": [- "environment_id",- "default_instance_id"- ],- "columnsTo": [- "environment_id",- "id"- ],+ "columnsFrom": ["environment_id", "default_instance_id"],+ "columnsTo": ["environment_id", "id"],"onDelete": "restrict","onUpdate": "no action"}@@ -36008,12 +33845,8 @@"name": "project_members_project_id_projects_id_fk","tableFrom": "project_members","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36021,12 +33854,8 @@"name": "project_members_user_id_users_id_fk","tableFrom": "project_members","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36034,12 +33863,8 @@"name": "project_members_added_by_user_id_users_id_fk","tableFrom": "project_members","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -36161,12 +33986,8 @@"name": "project_sites_project_id_projects_id_fk","tableFrom": "project_sites","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36174,12 +33995,8 @@"name": "project_sites_workspace_id_workspaces_id_fk","tableFrom": "project_sites","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36187,12 +34004,8 @@"name": "project_sites_created_by_user_id_users_id_fk","tableFrom": "project_sites","tableTo": "users",- "columnsFrom": [- "created_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -36200,12 +34013,8 @@"name": "project_sites_acceptance_id_acceptances_id_fk","tableFrom": "project_sites","tableTo": "acceptances",- "columnsFrom": [- "acceptance_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["acceptance_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -36368,12 +34177,8 @@"name": "project_works_project_id_projects_id_fk","tableFrom": "project_works","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36381,12 +34186,8 @@"name": "project_works_work_id_works_id_fk","tableFrom": "project_works","tableTo": "works",- "columnsFrom": [- "work_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["work_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36394,12 +34195,8 @@"name": "project_works_added_by_user_id_users_id_fk","tableFrom": "project_works","tableTo": "users",- "columnsFrom": [- "added_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["added_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -36407,12 +34204,8 @@"name": "project_works_workspace_id_workspaces_id_fk","tableFrom": "project_works","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -36582,12 +34375,8 @@"name": "push_live_activities_user_id_users_id_fk","tableFrom": "push_live_activities","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -36735,12 +34524,8 @@"name": "push_tokens_user_id_users_id_fk","tableFrom": "push_tokens","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -36895,12 +34680,8 @@"name": "chunks_user_id_users_id_fk","tableFrom": "chunks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -36908,12 +34689,8 @@"name": "chunks_workspace_id_workspaces_id_fk","tableFrom": "chunks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -37033,12 +34810,8 @@"name": "document_chunks_document_id_documents_id_fk","tableFrom": "document_chunks","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37046,12 +34819,8 @@"name": "document_chunks_chunk_id_chunks_id_fk","tableFrom": "document_chunks","tableTo": "chunks",- "columnsFrom": [- "chunk_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chunk_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37059,12 +34828,8 @@"name": "document_chunks_user_id_users_id_fk","tableFrom": "document_chunks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37072,12 +34837,8 @@"name": "document_chunks_workspace_id_workspaces_id_fk","tableFrom": "document_chunks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -37085,10 +34846,7 @@"compositePrimaryKeys": {"document_chunks_document_id_chunk_id_pk": {"name": "document_chunks_document_id_chunk_id_pk",- "columns": [- "document_id",- "chunk_id"- ]+ "columns": ["document_id", "chunk_id"]}},"uniqueConstraints": {},@@ -37217,12 +34975,8 @@"name": "embeddings_chunk_id_chunks_id_fk","tableFrom": "embeddings","tableTo": "chunks",- "columnsFrom": [- "chunk_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chunk_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37230,12 +34984,8 @@"name": "embeddings_user_id_users_id_fk","tableFrom": "embeddings","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37243,12 +34993,8 @@"name": "embeddings_workspace_id_workspaces_id_fk","tableFrom": "embeddings","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -37258,9 +35004,7 @@"embeddings_chunk_id_unique": {"name": "embeddings_chunk_id_unique","nullsNotDistinct": false,- "columns": [- "chunk_id"- ]+ "columns": ["chunk_id"]}},"policies": {},@@ -37448,12 +35192,8 @@"name": "unstructured_chunks_composite_id_chunks_id_fk","tableFrom": "unstructured_chunks","tableTo": "chunks",- "columnsFrom": [- "composite_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["composite_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37461,12 +35201,8 @@"name": "unstructured_chunks_user_id_users_id_fk","tableFrom": "unstructured_chunks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37474,12 +35210,8 @@"name": "unstructured_chunks_workspace_id_workspaces_id_fk","tableFrom": "unstructured_chunks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37487,12 +35219,8 @@"name": "unstructured_chunks_file_id_files_id_fk","tableFrom": "unstructured_chunks","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -37614,12 +35342,8 @@"name": "rag_eval_dataset_records_dataset_id_rag_eval_datasets_id_fk","tableFrom": "rag_eval_dataset_records","tableTo": "rag_eval_datasets",- "columnsFrom": [- "dataset_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dataset_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37627,12 +35351,8 @@"name": "rag_eval_dataset_records_user_id_users_id_fk","tableFrom": "rag_eval_dataset_records","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37640,12 +35360,8 @@"name": "rag_eval_dataset_records_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_dataset_records","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -37755,12 +35471,8 @@"name": "rag_eval_datasets_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "rag_eval_datasets","tableTo": "knowledge_bases",- "columnsFrom": [- "knowledge_base_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["knowledge_base_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37768,12 +35480,8 @@"name": "rag_eval_datasets_user_id_users_id_fk","tableFrom": "rag_eval_datasets","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37781,12 +35489,8 @@"name": "rag_eval_datasets_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_datasets","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -37932,12 +35636,8 @@"name": "rag_eval_evaluations_dataset_id_rag_eval_datasets_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "rag_eval_datasets",- "columnsFrom": [- "dataset_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dataset_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37945,12 +35645,8 @@"name": "rag_eval_evaluations_knowledge_base_id_knowledge_bases_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "knowledge_bases",- "columnsFrom": [- "knowledge_base_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["knowledge_base_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37958,12 +35654,8 @@"name": "rag_eval_evaluations_user_id_users_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -37971,12 +35663,8 @@"name": "rag_eval_evaluations_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_evaluations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38140,12 +35828,8 @@"name": "rag_eval_evaluation_records_question_embedding_id_embeddings_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "embeddings",- "columnsFrom": [- "question_embedding_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["question_embedding_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -38153,12 +35837,8 @@"name": "rag_eval_evaluation_records_dataset_record_id_rag_eval_dataset_records_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "rag_eval_dataset_records",- "columnsFrom": [- "dataset_record_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dataset_record_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38166,12 +35846,8 @@"name": "rag_eval_evaluation_records_evaluation_id_rag_eval_evaluations_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "rag_eval_evaluations",- "columnsFrom": [- "evaluation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["evaluation_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38179,12 +35855,8 @@"name": "rag_eval_evaluation_records_user_id_users_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38192,12 +35864,8 @@"name": "rag_eval_evaluation_records_workspace_id_workspaces_id_fk","tableFrom": "rag_eval_evaluation_records","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38278,9 +35946,7 @@"rbac_permissions_code_unique": {"name": "rbac_permissions_code_unique","nullsNotDistinct": false,- "columns": [- "code"- ]+ "columns": ["code"]}},"policies": {},@@ -38348,12 +36014,8 @@"name": "rbac_role_permissions_role_id_rbac_roles_id_fk","tableFrom": "rbac_role_permissions","tableTo": "rbac_roles",- "columnsFrom": [- "role_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["role_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38361,12 +36023,8 @@"name": "rbac_role_permissions_permission_id_rbac_permissions_id_fk","tableFrom": "rbac_role_permissions","tableTo": "rbac_permissions",- "columnsFrom": [- "permission_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["permission_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38374,10 +36032,7 @@"compositePrimaryKeys": {"rbac_role_permissions_role_id_permission_id_pk": {"name": "rbac_role_permissions_role_id_permission_id_pk",- "columns": [- "role_id",- "permission_id"- ]+ "columns": ["role_id", "permission_id"]}},"uniqueConstraints": {},@@ -38505,12 +36160,8 @@"name": "rbac_roles_workspace_id_workspaces_id_fk","tableFrom": "rbac_roles","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38643,12 +36294,8 @@"name": "rbac_user_roles_user_id_users_id_fk","tableFrom": "rbac_user_roles","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38656,12 +36303,8 @@"name": "rbac_user_roles_role_id_rbac_roles_id_fk","tableFrom": "rbac_user_roles","tableTo": "rbac_roles",- "columnsFrom": [- "role_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["role_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38669,12 +36312,8 @@"name": "rbac_user_roles_workspace_id_workspaces_id_fk","tableFrom": "rbac_user_roles","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38781,12 +36420,8 @@"name": "agents_to_sessions_agent_id_agents_id_fk","tableFrom": "agents_to_sessions","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38794,12 +36429,8 @@"name": "agents_to_sessions_session_id_sessions_id_fk","tableFrom": "agents_to_sessions","tableTo": "sessions",- "columnsFrom": [- "session_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["session_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38807,12 +36438,8 @@"name": "agents_to_sessions_user_id_users_id_fk","tableFrom": "agents_to_sessions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38820,12 +36447,8 @@"name": "agents_to_sessions_workspace_id_workspaces_id_fk","tableFrom": "agents_to_sessions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38833,10 +36456,7 @@"compositePrimaryKeys": {"agents_to_sessions_agent_id_session_id_pk": {"name": "agents_to_sessions_agent_id_session_id_pk",- "columns": [- "agent_id",- "session_id"- ]+ "columns": ["agent_id", "session_id"]}},"uniqueConstraints": {},@@ -38947,12 +36567,8 @@"name": "file_chunks_file_id_files_id_fk","tableFrom": "file_chunks","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38960,12 +36576,8 @@"name": "file_chunks_chunk_id_chunks_id_fk","tableFrom": "file_chunks","tableTo": "chunks",- "columnsFrom": [- "chunk_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["chunk_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38973,12 +36585,8 @@"name": "file_chunks_user_id_users_id_fk","tableFrom": "file_chunks","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -38986,12 +36594,8 @@"name": "file_chunks_workspace_id_workspaces_id_fk","tableFrom": "file_chunks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -38999,10 +36603,7 @@"compositePrimaryKeys": {"file_chunks_file_id_chunk_id_pk": {"name": "file_chunks_file_id_chunk_id_pk",- "columns": [- "file_id",- "chunk_id"- ]+ "columns": ["file_id", "chunk_id"]}},"uniqueConstraints": {},@@ -39106,12 +36707,8 @@"name": "files_to_sessions_file_id_files_id_fk","tableFrom": "files_to_sessions","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -39119,12 +36716,8 @@"name": "files_to_sessions_session_id_sessions_id_fk","tableFrom": "files_to_sessions","tableTo": "sessions",- "columnsFrom": [- "session_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["session_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -39132,12 +36725,8 @@"name": "files_to_sessions_user_id_users_id_fk","tableFrom": "files_to_sessions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -39145,12 +36734,8 @@"name": "files_to_sessions_workspace_id_workspaces_id_fk","tableFrom": "files_to_sessions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -39158,10 +36743,7 @@"compositePrimaryKeys": {"files_to_sessions_file_id_session_id_pk": {"name": "files_to_sessions_file_id_session_id_pk",- "columns": [- "file_id",- "session_id"- ]+ "columns": ["file_id", "session_id"]}},"uniqueConstraints": {},@@ -39394,12 +36976,8 @@"name": "resource_permissions_workspace_id_workspaces_id_fk","tableFrom": "resource_permissions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -39407,12 +36985,8 @@"name": "resource_permissions_user_id_users_id_fk","tableFrom": "resource_permissions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -39420,12 +36994,8 @@"name": "resource_permissions_created_by_users_id_fk","tableFrom": "resource_permissions","tableTo": "users",- "columnsFrom": [- "created_by"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -39595,12 +37165,8 @@"name": "resource_transfer_requests_workspace_id_workspaces_id_fk","tableFrom": "resource_transfer_requests","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -39608,12 +37174,8 @@"name": "resource_transfer_requests_initiator_id_users_id_fk","tableFrom": "resource_transfer_requests","tableTo": "users",- "columnsFrom": [- "initiator_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["initiator_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -39621,12 +37183,8 @@"name": "resource_transfer_requests_recipient_id_users_id_fk","tableFrom": "resource_transfer_requests","tableTo": "users",- "columnsFrom": [- "recipient_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["recipient_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -39634,12 +37192,8 @@"name": "resource_transfer_requests_previous_owner_id_users_id_fk","tableFrom": "resource_transfer_requests","tableTo": "users",- "columnsFrom": [- "previous_owner_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["previous_owner_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -40034,12 +37588,8 @@"name": "scm_change_requests_user_id_users_id_fk","tableFrom": "scm_change_requests","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -40047,12 +37597,8 @@"name": "scm_change_requests_workspace_id_workspaces_id_fk","tableFrom": "scm_change_requests","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -40060,12 +37606,8 @@"name": "scm_change_requests_installation_id_scm_installations_id_fk","tableFrom": "scm_change_requests","tableTo": "scm_installations",- "columnsFrom": [- "installation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["installation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -40073,12 +37615,8 @@"name": "scm_change_requests_acceptance_id_acceptances_id_fk","tableFrom": "scm_change_requests","tableTo": "acceptances",- "columnsFrom": [- "acceptance_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["acceptance_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -40086,12 +37624,8 @@"name": "scm_change_requests_work_id_works_id_fk","tableFrom": "scm_change_requests","tableTo": "works",- "columnsFrom": [- "work_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["work_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -40099,12 +37633,8 @@"name": "scm_change_requests_topic_id_topics_id_fk","tableFrom": "scm_change_requests","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -40112,12 +37642,8 @@"name": "scm_change_requests_task_id_tasks_id_fk","tableFrom": "scm_change_requests","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -40268,12 +37794,8 @@"name": "scm_identities_user_id_users_id_fk","tableFrom": "scm_identities","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -40482,12 +38004,8 @@"name": "scm_installations_user_id_users_id_fk","tableFrom": "scm_installations","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -40495,12 +38013,8 @@"name": "scm_installations_workspace_id_workspaces_id_fk","tableFrom": "scm_installations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -40801,12 +38315,8 @@"name": "session_groups_user_id_users_id_fk","tableFrom": "session_groups","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -40814,12 +38324,8 @@"name": "session_groups_workspace_id_workspaces_id_fk","tableFrom": "session_groups","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -41089,12 +38595,8 @@"name": "sessions_user_id_users_id_fk","tableFrom": "sessions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -41102,12 +38604,8 @@"name": "sessions_group_id_session_groups_id_fk","tableFrom": "sessions","tableTo": "session_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -41115,12 +38613,8 @@"name": "sessions_workspace_id_workspaces_id_fk","tableFrom": "sessions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -41398,12 +38892,8 @@"name": "signals_user_id_users_id_fk","tableFrom": "signals","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -41411,12 +38901,8 @@"name": "signals_workspace_id_workspaces_id_fk","tableFrom": "signals","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -41424,12 +38910,8 @@"name": "signals_account_id_agent_accounts_id_fk","tableFrom": "signals","tableTo": "agent_accounts",- "columnsFrom": [- "account_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["account_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -41437,12 +38919,8 @@"name": "signals_agent_id_agents_id_fk","tableFrom": "signals","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -41537,12 +39015,8 @@"name": "signal_decision_labels_decision_id_signal_decisions_id_fk","tableFrom": "signal_decision_labels","tableTo": "signal_decisions",- "columnsFrom": [- "decision_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["decision_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -41756,12 +39230,8 @@"name": "signal_decisions_signal_id_signals_id_fk","tableFrom": "signal_decisions","tableTo": "signals",- "columnsFrom": [- "signal_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["signal_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -41769,12 +39239,8 @@"name": "signal_decisions_agent_id_agents_id_fk","tableFrom": "signal_decisions","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -41782,12 +39248,8 @@"name": "signal_decisions_user_id_users_id_fk","tableFrom": "signal_decisions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -41795,12 +39257,8 @@"name": "signal_decisions_workspace_id_workspaces_id_fk","tableFrom": "signal_decisions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -41808,12 +39266,8 @@"name": "signal_decisions_topic_id_topics_id_fk","tableFrom": "signal_decisions","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -42194,12 +39648,8 @@"name": "briefs_user_id_users_id_fk","tableFrom": "briefs","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42207,12 +39657,8 @@"name": "briefs_workspace_id_workspaces_id_fk","tableFrom": "briefs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42220,12 +39666,8 @@"name": "briefs_task_id_tasks_id_fk","tableFrom": "briefs","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42233,12 +39675,8 @@"name": "briefs_cron_job_id_agent_cron_jobs_id_fk","tableFrom": "briefs","tableTo": "agent_cron_jobs",- "columnsFrom": [- "cron_job_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["cron_job_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -42396,12 +39834,8 @@"name": "task_activities_task_id_tasks_id_fk","tableFrom": "task_activities","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42409,12 +39843,8 @@"name": "task_activities_user_id_users_id_fk","tableFrom": "task_activities","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42422,12 +39852,8 @@"name": "task_activities_workspace_id_workspaces_id_fk","tableFrom": "task_activities","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42435,12 +39861,8 @@"name": "task_activities_actor_user_id_users_id_fk","tableFrom": "task_activities","tableTo": "users",- "columnsFrom": [- "actor_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["actor_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -42448,12 +39870,8 @@"name": "task_activities_actor_agent_id_agents_id_fk","tableFrom": "task_activities","tableTo": "agents",- "columnsFrom": [- "actor_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["actor_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -42696,12 +40114,8 @@"name": "task_comments_task_id_tasks_id_fk","tableFrom": "task_comments","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42709,12 +40123,8 @@"name": "task_comments_user_id_users_id_fk","tableFrom": "task_comments","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42722,12 +40132,8 @@"name": "task_comments_workspace_id_workspaces_id_fk","tableFrom": "task_comments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42735,12 +40141,8 @@"name": "task_comments_author_user_id_users_id_fk","tableFrom": "task_comments","tableTo": "users",- "columnsFrom": [- "author_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -42748,12 +40150,8 @@"name": "task_comments_author_agent_id_agents_id_fk","tableFrom": "task_comments","tableTo": "agents",- "columnsFrom": [- "author_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -42761,12 +40159,8 @@"name": "task_comments_brief_id_briefs_id_fk","tableFrom": "task_comments","tableTo": "briefs",- "columnsFrom": [- "brief_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["brief_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -42774,12 +40168,8 @@"name": "task_comments_topic_id_topics_id_fk","tableFrom": "task_comments","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -42968,12 +40358,8 @@"name": "task_dependencies_task_id_tasks_id_fk","tableFrom": "task_dependencies","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42981,12 +40367,8 @@"name": "task_dependencies_depends_on_id_tasks_id_fk","tableFrom": "task_dependencies","tableTo": "tasks",- "columnsFrom": [- "depends_on_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["depends_on_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -42994,12 +40376,8 @@"name": "task_dependencies_user_id_users_id_fk","tableFrom": "task_dependencies","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43007,12 +40385,8 @@"name": "task_dependencies_workspace_id_workspaces_id_fk","tableFrom": "task_dependencies","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -43195,12 +40569,8 @@"name": "task_documents_task_id_tasks_id_fk","tableFrom": "task_documents","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43208,12 +40578,8 @@"name": "task_documents_document_id_documents_id_fk","tableFrom": "task_documents","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43221,12 +40587,8 @@"name": "task_documents_user_id_users_id_fk","tableFrom": "task_documents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43234,12 +40596,8 @@"name": "task_documents_workspace_id_workspaces_id_fk","tableFrom": "task_documents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -43511,12 +40869,8 @@"name": "task_topics_task_id_tasks_id_fk","tableFrom": "task_topics","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43524,12 +40878,8 @@"name": "task_topics_topic_id_topics_id_fk","tableFrom": "task_topics","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43537,12 +40887,8 @@"name": "task_topics_user_id_users_id_fk","tableFrom": "task_topics","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -43550,12 +40896,8 @@"name": "task_topics_workspace_id_workspaces_id_fk","tableFrom": "task_topics","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -44065,12 +41407,8 @@"name": "tasks_created_by_user_id_users_id_fk","tableFrom": "tasks","tableTo": "users",- "columnsFrom": [- "created_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by_user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44078,12 +41416,8 @@"name": "tasks_workspace_id_workspaces_id_fk","tableFrom": "tasks","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44091,12 +41425,8 @@"name": "tasks_project_id_projects_id_fk","tableFrom": "tasks","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -44104,12 +41434,8 @@"name": "tasks_created_by_agent_id_agents_id_fk","tableFrom": "tasks","tableTo": "agents",- "columnsFrom": [- "created_by_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -44117,12 +41443,8 @@"name": "tasks_assignee_user_id_users_id_fk","tableFrom": "tasks","tableTo": "users",- "columnsFrom": [- "assignee_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["assignee_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -44130,12 +41452,8 @@"name": "tasks_assignee_agent_id_agents_id_fk","tableFrom": "tasks","tableTo": "agents",- "columnsFrom": [- "assignee_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["assignee_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -44143,12 +41461,8 @@"name": "tasks_current_topic_id_topics_id_fk","tableFrom": "tasks","tableTo": "topics",- "columnsFrom": [- "current_topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["current_topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -44156,12 +41470,8 @@"name": "tasks_parent_task_id_tasks_id_fk","tableFrom": "tasks","tableTo": "tasks",- "columnsFrom": [- "parent_task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_task_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -44393,12 +41703,8 @@"name": "task_external_links_task_id_tasks_id_fk","tableFrom": "task_external_links","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44406,12 +41712,8 @@"name": "task_external_links_user_id_users_id_fk","tableFrom": "task_external_links","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44419,12 +41721,8 @@"name": "task_external_links_workspace_id_workspaces_id_fk","tableFrom": "task_external_links","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -44551,12 +41849,8 @@"name": "task_label_links_task_id_tasks_id_fk","tableFrom": "task_label_links","tableTo": "tasks",- "columnsFrom": [- "task_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["task_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44564,12 +41858,8 @@"name": "task_label_links_label_id_task_labels_id_fk","tableFrom": "task_label_links","tableTo": "task_labels",- "columnsFrom": [- "label_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["label_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44577,12 +41867,8 @@"name": "task_label_links_user_id_users_id_fk","tableFrom": "task_label_links","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44590,12 +41876,8 @@"name": "task_label_links_workspace_id_workspaces_id_fk","tableFrom": "task_label_links","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -44785,12 +42067,8 @@"name": "task_labels_user_id_users_id_fk","tableFrom": "task_labels","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -44798,12 +42076,8 @@"name": "task_labels_workspace_id_workspaces_id_fk","tableFrom": "task_labels","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -44811,12 +42085,8 @@"name": "task_labels_parent_id_task_labels_id_fk","tableFrom": "task_labels","tableTo": "task_labels",- "columnsFrom": [- "parent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -45095,12 +42365,8 @@"name": "threads_topic_id_topics_id_fk","tableFrom": "threads","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45108,12 +42374,8 @@"name": "threads_parent_thread_id_threads_id_fk","tableFrom": "threads","tableTo": "threads",- "columnsFrom": [- "parent_thread_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_thread_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -45121,12 +42383,8 @@"name": "threads_agent_id_agents_id_fk","tableFrom": "threads","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45134,12 +42392,8 @@"name": "threads_group_id_chat_groups_id_fk","tableFrom": "threads","tableTo": "chat_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45147,12 +42401,8 @@"name": "threads_user_id_users_id_fk","tableFrom": "threads","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45160,12 +42410,8 @@"name": "threads_workspace_id_workspaces_id_fk","tableFrom": "threads","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -45279,12 +42525,8 @@"name": "topic_documents_document_id_documents_id_fk","tableFrom": "topic_documents","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45292,12 +42534,8 @@"name": "topic_documents_topic_id_topics_id_fk","tableFrom": "topic_documents","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45305,12 +42543,8 @@"name": "topic_documents_user_id_users_id_fk","tableFrom": "topic_documents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45318,12 +42552,8 @@"name": "topic_documents_workspace_id_workspaces_id_fk","tableFrom": "topic_documents","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -45331,10 +42561,7 @@"compositePrimaryKeys": {"topic_documents_document_id_topic_id_pk": {"name": "topic_documents_document_id_topic_id_pk",- "columns": [- "document_id",- "topic_id"- ]+ "columns": ["document_id", "topic_id"]}},"uniqueConstraints": {},@@ -45458,12 +42685,8 @@"name": "topic_shares_topic_id_topics_id_fk","tableFrom": "topic_shares","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45471,12 +42694,8 @@"name": "topic_shares_user_id_users_id_fk","tableFrom": "topic_shares","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -45484,12 +42703,8 @@"name": "topic_shares_workspace_id_workspaces_id_fk","tableFrom": "topic_shares","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -45995,12 +43210,8 @@"name": "topics_session_id_sessions_id_fk","tableFrom": "topics","tableTo": "sessions",- "columnsFrom": [- "session_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["session_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46008,12 +43219,8 @@"name": "topics_agent_id_agents_id_fk","tableFrom": "topics","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46021,12 +43228,8 @@"name": "topics_group_id_chat_groups_id_fk","tableFrom": "topics","tableTo": "chat_groups",- "columnsFrom": [- "group_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["group_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46034,12 +43237,8 @@"name": "topics_project_id_projects_id_fk","tableFrom": "topics","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -46047,12 +43246,8 @@"name": "topics_project_working_directory_id_project_working_directories_id_fk","tableFrom": "topics","tableTo": "project_working_directories",- "columnsFrom": [- "project_working_directory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_working_directory_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -46060,12 +43255,8 @@"name": "topics_user_id_users_id_fk","tableFrom": "topics","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46073,12 +43264,8 @@"name": "topics_workspace_id_workspaces_id_fk","tableFrom": "topics","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -46358,12 +43545,8 @@"name": "topic_analyses_topic_id_topics_id_fk","tableFrom": "topic_analyses","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46371,12 +43554,8 @@"name": "topic_analyses_user_id_users_id_fk","tableFrom": "topic_analyses","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46384,12 +43563,8 @@"name": "topic_analyses_workspace_id_workspaces_id_fk","tableFrom": "topic_analyses","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -46501,12 +43676,8 @@"name": "topic_comment_mentions_comment_id_topic_comments_id_fk","tableFrom": "topic_comment_mentions","tableTo": "topic_comments",- "columnsFrom": [- "comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["comment_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46514,12 +43685,8 @@"name": "topic_comment_mentions_mentioned_user_id_users_id_fk","tableFrom": "topic_comment_mentions","tableTo": "users",- "columnsFrom": [- "mentioned_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["mentioned_user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46527,12 +43694,8 @@"name": "topic_comment_mentions_workspace_id_workspaces_id_fk","tableFrom": "topic_comment_mentions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -46830,12 +43993,8 @@"name": "topic_comments_topic_id_topics_id_fk","tableFrom": "topic_comments","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46843,12 +44002,8 @@"name": "topic_comments_message_id_messages_id_fk","tableFrom": "topic_comments","tableTo": "messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -46856,12 +44011,8 @@"name": "topic_comments_parent_comment_id_topic_comments_id_fk","tableFrom": "topic_comments","tableTo": "topic_comments",- "columnsFrom": [- "parent_comment_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_comment_id"],+ "columnsTo": ["id"],"onDelete": "no action","onUpdate": "no action"},@@ -46869,12 +44020,8 @@"name": "topic_comments_author_user_id_users_id_fk","tableFrom": "topic_comments","tableTo": "users",- "columnsFrom": [- "author_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["author_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -46882,12 +44029,8 @@"name": "topic_comments_workspace_id_workspaces_id_fk","tableFrom": "topic_comments","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -46895,12 +44038,8 @@"name": "topic_comments_moderated_by_user_id_users_id_fk","tableFrom": "topic_comments","tableTo": "users",- "columnsFrom": [- "moderated_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["moderated_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -47147,12 +44286,8 @@"name": "trash_items_root_id_trash_items_id_fk","tableFrom": "trash_items","tableTo": "trash_items",- "columnsFrom": [- "root_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["root_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -47160,12 +44295,8 @@"name": "trash_items_user_id_users_id_fk","tableFrom": "trash_items","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -47173,12 +44304,8 @@"name": "trash_items_workspace_id_workspaces_id_fk","tableFrom": "trash_items","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -47186,12 +44313,8 @@"name": "trash_items_deleted_by_user_id_users_id_fk","tableFrom": "trash_items","tableTo": "users",- "columnsFrom": [- "deleted_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["deleted_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -47291,12 +44414,8 @@"name": "user_settings_id_users_id_fk","tableFrom": "user_settings","tableTo": "users",- "columnsFrom": [- "id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -47551,30 +44670,22 @@"users_username_unique": {"name": "users_username_unique","nullsNotDistinct": false,- "columns": [- "username"- ]+ "columns": ["username"]},"users_email_unique": {"name": "users_email_unique","nullsNotDistinct": false,- "columns": [- "email"- ]+ "columns": ["email"]},"users_normalized_email_unique": {"name": "users_normalized_email_unique","nullsNotDistinct": false,- "columns": [- "normalized_email"- ]+ "columns": ["normalized_email"]},"users_phone_unique": {"name": "users_phone_unique","nullsNotDistinct": false,- "columns": [- "phone"- ]+ "columns": ["phone"]}},"policies": {},@@ -47851,12 +44962,8 @@"name": "user_memories_activities_user_id_users_id_fk","tableFrom": "user_memories_activities","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -47864,12 +44971,8 @@"name": "user_memories_activities_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_activities","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -47877,12 +44980,8 @@"name": "user_memories_activities_dossier_id_user_memories_dossiers_id_fk","tableFrom": "user_memories_activities","tableTo": "user_memories_dossiers",- "columnsFrom": [- "dossier_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["dossier_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -48096,12 +45195,8 @@"name": "user_memories_user_id_users_id_fk","tableFrom": "user_memories","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -48247,12 +45342,8 @@"name": "user_memories_context_projects_context_id_user_memories_contexts_id_fk","tableFrom": "user_memories_context_projects","tableTo": "user_memories_contexts",- "columnsFrom": [- "context_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["context_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48260,12 +45351,8 @@"name": "user_memories_context_projects_project_id_projects_id_fk","tableFrom": "user_memories_context_projects","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48273,12 +45360,8 @@"name": "user_memories_context_projects_user_id_users_id_fk","tableFrom": "user_memories_context_projects","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -48554,12 +45637,8 @@"name": "user_memories_contexts_user_id_users_id_fk","tableFrom": "user_memories_contexts","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48567,12 +45646,8 @@"name": "user_memories_contexts_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_contexts","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -48851,12 +45926,8 @@"name": "user_memories_dossiers_context_id_user_memories_contexts_id_fk","tableFrom": "user_memories_dossiers","tableTo": "user_memories_contexts",- "columnsFrom": [- "context_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["context_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -48864,12 +45935,8 @@"name": "user_memories_dossiers_user_id_users_id_fk","tableFrom": "user_memories_dossiers","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48877,12 +45944,8 @@"name": "user_memories_dossiers_workspace_id_workspaces_id_fk","tableFrom": "user_memories_dossiers","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48890,12 +45953,8 @@"name": "user_memories_dossiers_agent_id_agents_id_fk","tableFrom": "user_memories_dossiers","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48903,12 +45962,8 @@"name": "user_memories_dossiers_project_id_projects_id_fk","tableFrom": "user_memories_dossiers","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -48916,12 +45971,8 @@"name": "user_memories_dossiers_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_dossiers","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -49105,12 +46156,8 @@"name": "user_memories_edges_source_memory_id_user_memories_id_fk","tableFrom": "user_memories_edges","tableTo": "user_memories",- "columnsFrom": [- "source_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49118,12 +46165,8 @@"name": "user_memories_edges_target_memory_id_user_memories_id_fk","tableFrom": "user_memories_edges","tableTo": "user_memories",- "columnsFrom": [- "target_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["target_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49131,12 +46174,8 @@"name": "user_memories_edges_user_id_users_id_fk","tableFrom": "user_memories_edges","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49144,12 +46183,8 @@"name": "user_memories_edges_workspace_id_workspaces_id_fk","tableFrom": "user_memories_edges","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -49426,12 +46461,8 @@"name": "user_memories_entities_parent_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_entities","tableTo": "user_memories_entities",- "columnsFrom": [- "parent_entity_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_entity_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -49439,12 +46470,8 @@"name": "user_memories_entities_user_id_users_id_fk","tableFrom": "user_memories_entities","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49452,12 +46479,8 @@"name": "user_memories_entities_workspace_id_workspaces_id_fk","tableFrom": "user_memories_entities","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49465,12 +46488,8 @@"name": "user_memories_entities_agent_id_agents_id_fk","tableFrom": "user_memories_entities","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49478,12 +46497,8 @@"name": "user_memories_entities_project_id_projects_id_fk","tableFrom": "user_memories_entities","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49491,12 +46506,8 @@"name": "user_memories_entities_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_entities","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -49659,12 +46670,8 @@"name": "user_memories_entity_names_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_entity_names","tableTo": "user_memories_entities",- "columnsFrom": [- "entity_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["entity_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49672,12 +46679,8 @@"name": "user_memories_entity_names_user_id_users_id_fk","tableFrom": "user_memories_entity_names","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49685,12 +46688,8 @@"name": "user_memories_entity_names_workspace_id_workspaces_id_fk","tableFrom": "user_memories_entity_names","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49698,12 +46697,8 @@"name": "user_memories_entity_names_source_memory_id_user_memories_id_fk","tableFrom": "user_memories_entity_names","tableTo": "user_memories",- "columnsFrom": [- "source_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_memory_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -49938,12 +46933,8 @@"name": "user_memories_experiences_user_id_users_id_fk","tableFrom": "user_memories_experiences","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -49951,12 +46942,8 @@"name": "user_memories_experiences_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_experiences","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -50155,12 +47142,8 @@"name": "user_memories_identities_user_id_users_id_fk","tableFrom": "user_memories_identities","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -50168,12 +47151,8 @@"name": "user_memories_identities_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_identities","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -50181,12 +47160,8 @@"name": "user_memories_identities_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_identities","tableTo": "user_memories_entities",- "columnsFrom": [- "entity_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["entity_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -50368,12 +47343,8 @@"name": "user_memories_operations_user_id_users_id_fk","tableFrom": "user_memories_operations","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -50381,12 +47352,8 @@"name": "user_memories_operations_workspace_id_workspaces_id_fk","tableFrom": "user_memories_operations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -50586,12 +47553,8 @@"name": "user_memory_persona_document_histories_user_id_users_id_fk","tableFrom": "user_memory_persona_document_histories","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -50599,12 +47562,8 @@"name": "user_memory_persona_document_histories_persona_id_user_memory_persona_documents_id_fk","tableFrom": "user_memory_persona_document_histories","tableTo": "user_memory_persona_documents",- "columnsFrom": [- "persona_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["persona_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -50747,12 +47706,8 @@"name": "user_memory_persona_documents_user_id_users_id_fk","tableFrom": "user_memory_persona_documents","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -50977,12 +47932,8 @@"name": "user_memories_preferences_user_id_users_id_fk","tableFrom": "user_memories_preferences","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -50990,12 +47941,8 @@"name": "user_memories_preferences_user_memory_id_user_memories_id_fk","tableFrom": "user_memories_preferences","tableTo": "user_memories",- "columnsFrom": [- "user_memory_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_memory_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -51003,12 +47950,8 @@"name": "user_memories_preferences_holder_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_preferences","tableTo": "user_memories_entities",- "columnsFrom": [- "holder_entity_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["holder_entity_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -51016,12 +47959,8 @@"name": "user_memories_preferences_applies_to_entity_id_user_memories_entities_id_fk","tableFrom": "user_memories_preferences","tableTo": "user_memories_entities",- "columnsFrom": [- "applies_to_entity_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["applies_to_entity_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -51311,12 +48250,8 @@"name": "acceptances_user_id_users_id_fk","tableFrom": "acceptances","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -51324,12 +48259,8 @@"name": "acceptances_workspace_id_workspaces_id_fk","tableFrom": "acceptances","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -51337,12 +48268,8 @@"name": "acceptances_project_id_projects_id_fk","tableFrom": "acceptances","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -51729,12 +48656,8 @@"name": "verify_check_results_verify_run_id_verify_runs_id_fk","tableFrom": "verify_check_results","tableTo": "verify_runs",- "columnsFrom": [- "verify_run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["verify_run_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -51742,12 +48665,8 @@"name": "verify_check_results_operation_id_agent_operations_id_fk","tableFrom": "verify_check_results","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -51755,12 +48674,8 @@"name": "verify_check_results_user_id_users_id_fk","tableFrom": "verify_check_results","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -51768,12 +48683,8 @@"name": "verify_check_results_workspace_id_workspaces_id_fk","tableFrom": "verify_check_results","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -51781,12 +48692,8 @@"name": "verify_check_results_source_criterion_id_verify_criteria_id_fk","tableFrom": "verify_check_results","tableTo": "verify_criteria",- "columnsFrom": [- "source_criterion_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_criterion_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -51794,12 +48701,8 @@"name": "verify_check_results_verifier_operation_id_agent_operations_id_fk","tableFrom": "verify_check_results","tableTo": "agent_operations",- "columnsFrom": [- "verifier_operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["verifier_operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -51807,12 +48710,8 @@"name": "verify_check_results_verifier_tracing_id_llm_generation_tracing_id_fk","tableFrom": "verify_check_results","tableTo": "llm_generation_tracing",- "columnsFrom": [- "verifier_tracing_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["verifier_tracing_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -51820,12 +48719,8 @@"name": "verify_check_results_repair_operation_id_agent_operations_id_fk","tableFrom": "verify_check_results","tableTo": "agent_operations",- "columnsFrom": [- "repair_operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["repair_operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -52012,12 +48907,8 @@"name": "verify_criteria_user_id_users_id_fk","tableFrom": "verify_criteria","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52025,12 +48916,8 @@"name": "verify_criteria_document_id_documents_id_fk","tableFrom": "verify_criteria","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -52038,12 +48925,8 @@"name": "verify_criteria_workspace_id_workspaces_id_fk","tableFrom": "verify_criteria","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -52221,12 +49104,8 @@"name": "verify_evidence_check_result_id_verify_check_results_id_fk","tableFrom": "verify_evidence","tableTo": "verify_check_results",- "columnsFrom": [- "check_result_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["check_result_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52234,12 +49113,8 @@"name": "verify_evidence_document_id_documents_id_fk","tableFrom": "verify_evidence","tableTo": "documents",- "columnsFrom": [- "document_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["document_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -52247,12 +49122,8 @@"name": "verify_evidence_file_id_files_id_fk","tableFrom": "verify_evidence","tableTo": "files",- "columnsFrom": [- "file_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["file_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -52260,12 +49131,8 @@"name": "verify_evidence_user_id_users_id_fk","tableFrom": "verify_evidence","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52273,12 +49140,8 @@"name": "verify_evidence_workspace_id_workspaces_id_fk","tableFrom": "verify_evidence","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -52468,12 +49331,8 @@"name": "verify_reports_verify_run_id_verify_runs_id_fk","tableFrom": "verify_reports","tableTo": "verify_runs",- "columnsFrom": [- "verify_run_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["verify_run_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52481,12 +49340,8 @@"name": "verify_reports_operation_id_agent_operations_id_fk","tableFrom": "verify_reports","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -52494,12 +49349,8 @@"name": "verify_reports_user_id_users_id_fk","tableFrom": "verify_reports","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52507,12 +49358,8 @@"name": "verify_reports_workspace_id_workspaces_id_fk","tableFrom": "verify_reports","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -52762,12 +49609,8 @@"name": "verify_review_predictions_check_result_id_verify_check_results_id_fk","tableFrom": "verify_review_predictions","tableTo": "verify_check_results",- "columnsFrom": [- "check_result_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["check_result_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52775,12 +49618,8 @@"name": "verify_review_predictions_user_id_users_id_fk","tableFrom": "verify_review_predictions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52788,12 +49627,8 @@"name": "verify_review_predictions_workspace_id_workspaces_id_fk","tableFrom": "verify_review_predictions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -52903,12 +49738,8 @@"name": "verify_rubric_criteria_rubric_id_verify_rubrics_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "verify_rubrics",- "columnsFrom": [- "rubric_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["rubric_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52916,12 +49747,8 @@"name": "verify_rubric_criteria_criterion_id_verify_criteria_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "verify_criteria",- "columnsFrom": [- "criterion_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["criterion_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52929,12 +49756,8 @@"name": "verify_rubric_criteria_user_id_users_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -52942,12 +49765,8 @@"name": "verify_rubric_criteria_workspace_id_workspaces_id_fk","tableFrom": "verify_rubric_criteria","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -52955,10 +49774,7 @@"compositePrimaryKeys": {"verify_rubric_criteria_rubric_id_criterion_id_pk": {"name": "verify_rubric_criteria_rubric_id_criterion_id_pk",- "columns": [- "rubric_id",- "criterion_id"- ]+ "columns": ["rubric_id", "criterion_id"]}},"uniqueConstraints": {},@@ -53067,12 +49883,8 @@"name": "verify_rubrics_user_id_users_id_fk","tableFrom": "verify_rubrics","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53080,12 +49892,8 @@"name": "verify_rubrics_workspace_id_workspaces_id_fk","tableFrom": "verify_rubrics","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -53357,12 +50165,8 @@"name": "verify_runs_user_id_users_id_fk","tableFrom": "verify_runs","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53370,12 +50174,8 @@"name": "verify_runs_workspace_id_workspaces_id_fk","tableFrom": "verify_runs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53383,12 +50183,8 @@"name": "verify_runs_acceptance_id_acceptances_id_fk","tableFrom": "verify_runs","tableTo": "acceptances",- "columnsFrom": [- "acceptance_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["acceptance_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -53396,12 +50192,8 @@"name": "verify_runs_operation_id_agent_operations_id_fk","tableFrom": "verify_runs","tableTo": "agent_operations",- "columnsFrom": [- "operation_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["operation_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -53607,12 +50399,8 @@"name": "widget_runs_widget_id_widgets_id_fk","tableFrom": "widget_runs","tableTo": "widgets",- "columnsFrom": [- "widget_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["widget_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53620,12 +50408,8 @@"name": "widget_runs_version_id_widget_versions_id_fk","tableFrom": "widget_runs","tableTo": "widget_versions",- "columnsFrom": [- "version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["version_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53633,12 +50417,8 @@"name": "widget_runs_user_id_users_id_fk","tableFrom": "widget_runs","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53646,12 +50426,8 @@"name": "widget_runs_workspace_id_workspaces_id_fk","tableFrom": "widget_runs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -53912,12 +50688,8 @@"name": "widget_versions_widget_id_widgets_id_fk","tableFrom": "widget_versions","tableTo": "widgets",- "columnsFrom": [- "widget_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["widget_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53925,12 +50697,8 @@"name": "widget_versions_user_id_users_id_fk","tableFrom": "widget_versions","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53938,12 +50706,8 @@"name": "widget_versions_workspace_id_workspaces_id_fk","tableFrom": "widget_versions","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -53951,12 +50715,8 @@"name": "widget_versions_published_by_user_id_users_id_fk","tableFrom": "widget_versions","tableTo": "users",- "columnsFrom": [- "published_by_user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["published_by_user_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -53964,12 +50724,8 @@"name": "widget_versions_source_agent_id_agents_id_fk","tableFrom": "widget_versions","tableTo": "agents",- "columnsFrom": [- "source_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -53977,12 +50733,8 @@"name": "widget_versions_source_topic_id_topics_id_fk","tableFrom": "widget_versions","tableTo": "topics",- "columnsFrom": [- "source_topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["source_topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -53990,12 +50742,8 @@"name": "widget_versions_parent_version_id_widget_versions_id_fk","tableFrom": "widget_versions","tableTo": "widget_versions",- "columnsFrom": [- "parent_version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["parent_version_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -54365,12 +51113,8 @@"name": "widgets_user_id_users_id_fk","tableFrom": "widgets","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -54378,12 +51122,8 @@"name": "widgets_workspace_id_workspaces_id_fk","tableFrom": "widgets","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -54391,12 +51131,8 @@"name": "widgets_project_id_projects_id_fk","tableFrom": "widgets","tableTo": "projects",- "columnsFrom": [- "project_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["project_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -54404,12 +51140,8 @@"name": "widgets_agent_id_agents_id_fk","tableFrom": "widgets","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -54417,12 +51149,8 @@"name": "widgets_published_version_id_widget_versions_id_fk","tableFrom": "widgets","tableTo": "widget_versions",- "columnsFrom": [- "published_version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["published_version_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -54430,12 +51158,8 @@"name": "widgets_draft_version_id_widget_versions_id_fk","tableFrom": "widgets","tableTo": "widget_versions",- "columnsFrom": [- "draft_version_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["draft_version_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -54443,12 +51167,8 @@"name": "widgets_metric_id_metrics_id_fk","tableFrom": "widgets","tableTo": "metrics",- "columnsFrom": [- "metric_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["metric_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -54762,12 +51482,8 @@"name": "work_versions_work_id_works_id_fk","tableFrom": "work_versions","tableTo": "works",- "columnsFrom": [- "work_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["work_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -54775,12 +51491,8 @@"name": "work_versions_topic_id_topics_id_fk","tableFrom": "work_versions","tableTo": "topics",- "columnsFrom": [- "topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -54788,12 +51500,8 @@"name": "work_versions_thread_id_threads_id_fk","tableFrom": "work_versions","tableTo": "threads",- "columnsFrom": [- "thread_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["thread_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -54801,12 +51509,8 @@"name": "work_versions_message_id_messages_id_fk","tableFrom": "work_versions","tableTo": "messages",- "columnsFrom": [- "message_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["message_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -54814,12 +51518,8 @@"name": "work_versions_agent_id_agents_id_fk","tableFrom": "work_versions","tableTo": "agents",- "columnsFrom": [- "agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -55208,12 +51908,8 @@"name": "works_origin_topic_id_topics_id_fk","tableFrom": "works","tableTo": "topics",- "columnsFrom": [- "origin_topic_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["origin_topic_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -55221,12 +51917,8 @@"name": "works_origin_thread_id_threads_id_fk","tableFrom": "works","tableTo": "threads",- "columnsFrom": [- "origin_thread_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["origin_thread_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -55234,12 +51926,8 @@"name": "works_origin_agent_id_agents_id_fk","tableFrom": "works","tableTo": "agents",- "columnsFrom": [- "origin_agent_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["origin_agent_id"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"},@@ -55247,12 +51935,8 @@"name": "works_user_id_users_id_fk","tableFrom": "works","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -55260,12 +51944,8 @@"name": "works_workspace_id_workspaces_id_fk","tableFrom": "works","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -55389,12 +52069,8 @@"name": "workspace_audit_logs_workspace_id_workspaces_id_fk","tableFrom": "workspace_audit_logs","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -55548,12 +52224,8 @@"name": "workspace_invitations_workspace_id_workspaces_id_fk","tableFrom": "workspace_invitations","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -55561,12 +52233,8 @@"name": "workspace_invitations_inviter_id_users_id_fk","tableFrom": "workspace_invitations","tableTo": "users",- "columnsFrom": [- "inviter_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["inviter_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -55576,9 +52244,7 @@"workspace_invitations_token_unique": {"name": "workspace_invitations_token_unique","nullsNotDistinct": false,- "columns": [- "token"- ]+ "columns": ["token"]}},"policies": {},@@ -55691,12 +52357,8 @@"name": "workspace_members_workspace_id_workspaces_id_fk","tableFrom": "workspace_members","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -55704,12 +52366,8 @@"name": "workspace_members_user_id_users_id_fk","tableFrom": "workspace_members","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -55717,10 +52375,7 @@"compositePrimaryKeys": {"workspace_members_workspace_id_user_id_pk": {"name": "workspace_members_workspace_id_user_id_pk",- "columns": [- "workspace_id",- "user_id"- ]+ "columns": ["workspace_id", "user_id"]}},"uniqueConstraints": {},@@ -55836,12 +52491,8 @@"name": "workspace_team_members_workspace_id_workspaces_id_fk","tableFrom": "workspace_team_members","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -55849,12 +52500,8 @@"name": "workspace_team_members_user_id_users_id_fk","tableFrom": "workspace_team_members","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -55862,14 +52509,8 @@"name": "workspace_team_members_team_workspace_fk","tableFrom": "workspace_team_members","tableTo": "workspace_teams",- "columnsFrom": [- "team_id",- "workspace_id"- ],- "columnsTo": [- "id",- "workspace_id"- ],+ "columnsFrom": ["team_id", "workspace_id"],+ "columnsTo": ["id", "workspace_id"],"onDelete": "cascade","onUpdate": "no action"}@@ -55999,12 +52640,8 @@"name": "workspace_teams_workspace_id_workspaces_id_fk","tableFrom": "workspace_teams","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -56012,12 +52649,8 @@"name": "workspace_teams_created_by_users_id_fk","tableFrom": "workspace_teams","tableTo": "users",- "columnsFrom": [- "created_by"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["created_by"],+ "columnsTo": ["id"],"onDelete": "set null","onUpdate": "no action"}@@ -56027,10 +52660,7 @@"workspace_teams_id_workspace_unique": {"name": "workspace_teams_id_workspace_unique","nullsNotDistinct": false,- "columns": [- "id",- "workspace_id"- ]+ "columns": ["id", "workspace_id"]}},"policies": {},@@ -56125,12 +52755,8 @@"name": "workspace_user_settings_workspace_id_workspaces_id_fk","tableFrom": "workspace_user_settings","tableTo": "workspaces",- "columnsFrom": [- "workspace_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["workspace_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"},@@ -56138,12 +52764,8 @@"name": "workspace_user_settings_user_id_users_id_fk","tableFrom": "workspace_user_settings","tableTo": "users",- "columnsFrom": [- "user_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["user_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -56272,12 +52894,8 @@"name": "workspaces_primary_owner_id_users_id_fk","tableFrom": "workspaces","tableTo": "users",- "columnsFrom": [- "primary_owner_id"- ],- "columnsTo": [- "id"- ],+ "columnsFrom": ["primary_owner_id"],+ "columnsTo": ["id"],"onDelete": "cascade","onUpdate": "no action"}@@ -56289,26 +52907,6 @@"isRLSEnabled": false}},- "enums": {},- "schemas": {},- "sequences": {- "public.fts_search_sync_revision_seq": {- "name": "fts_search_sync_revision_seq",- "schema": "public",- "increment": "1",- "startWith": "1",- "minValue": "1",- "maxValue": "9223372036854775807",- "cache": "1",- "cycle": false- }- },- "roles": {},- "policies": {},- "views": {},- "_meta": {- "columns": {},- "schemas": {},- "tables": {}- }-}\ No newline at end of file+ "version": "7",+ "views": {}+}diff --git a/packages/database/src/models/work/__tests__/canvas.test.ts b/packages/database/src/models/work/__tests__/canvas.test.tsindex ac9e8b103ed..e4cac4337b1 100644--- a/packages/database/src/models/work/__tests__/canvas.test.ts+++ b/packages/database/src/models/work/__tests__/canvas.test.ts@@ -372,9 +372,9 @@ describe('WorkModel · canvas', () => {const work = await owner.registerCanvas(params());const versionId = (await owner.findCanvasVersionId('cvs_cost', 1))!;- expect(await new WorkModel(serverDB, userId2).findCanvasSourcesByVersionIds([versionId])).toEqual(- {},- );+ expect(+ await new WorkModel(serverDB, userId2).findCanvasSourcesByVersionIds([versionId]),+ ).toEqual({});await serverDB.update(works)diff --git a/packages/database/src/models/work/internal.ts b/packages/database/src/models/work/internal.tsindex 24b2c523bb6..e40129ba495 100644--- a/packages/database/src/models/work/internal.ts+++ b/packages/database/src/models/work/internal.ts@@ -188,7 +188,8 @@ export interface TaskWorkSummaryQueryRow {* Work types whose list rows are fully described by the `works` display columns* (unlike `task`, which additionally joins the live tasks table).*/-export type DisplayWorkType = 'artboard' | 'canvas' | 'document' | 'external' | 'file' | 'collection';+export type DisplayWorkType =+ 'artboard' | 'canvas' | 'document' | 'external' | 'file' | 'collection';/** Version-event row for display-backed types (each mutation event). */export interface DisplayVersionEventRow {diff --git a/packages/database/src/repositories/channel/__tests__/userMembers.test.ts b/packages/database/src/repositories/channel/__tests__/userMembers.test.tsindex 92fab510181..cce18ce869e 100644--- a/packages/database/src/repositories/channel/__tests__/userMembers.test.ts+++ b/packages/database/src/repositories/channel/__tests__/userMembers.test.ts@@ -265,7 +265,10 @@ describe('Channel human membership', () => {owner.create({ title: 'Friends', userIds: [fixture.memberId] }),).rejects.toMatchObject({ code: 'FORBIDDEN' });expect(- await db.select().from(channels).where(and(eq(channels.userId, fixture.ownerId), isNull(channels.workspaceId))),+ await db+ .select()+ .from(channels)+ .where(and(eq(channels.userId, fixture.ownerId), isNull(channels.workspaceId))),).toEqual([]);});});diff --git a/packages/openapi/openapi.yml b/packages/openapi/openapi.ymlindex 6f92a03245e..d2db51e5700 100644--- a/packages/openapi/openapi.yml+++ b/packages/openapi/openapi.yml@@ -49,6 +49,22 @@ components:maxLength: 255minLength: 1type: string+ WorkspaceId:+ description: Run the request inside a workspace instead of the caller's personal+ space. Omit it for personal data. A personal API key cannot send it (403+ `workspace_mismatch`); a workspace API key is bound to its workspace, so+ the header may be omitted and, when sent, must name that same workspace+ (403 `workspace_mismatch` otherwise). An unknown workspace answers 404,+ and a caller who is not a member answers 403 `workspace_mismatch`.+ Workspace API key access also depends on the workspace's plan. Routes+ that change workspace-wide settings additionally require the admin or+ owner role.+ in: header+ name: X-Workspace-Id+ required: false+ schema:+ minLength: 1+ type: stringschemas:ApiError:type: object@@ -6532,6 +6548,404 @@ components:- output_tokens_details- total_tokensadditionalProperties: false+ ResponseStreamEvent:+ oneOf:+ - $ref: "#/components/schemas/ResponseCreatedEvent"+ - $ref: "#/components/schemas/ResponseInProgressEvent"+ - $ref: "#/components/schemas/ResponseCompletedEvent"+ - $ref: "#/components/schemas/ResponseFailedEvent"+ - $ref: "#/components/schemas/ResponseIncompleteEvent"+ - $ref: "#/components/schemas/ResponseOutputItemAddedEvent"+ - $ref: "#/components/schemas/ResponseOutputItemDoneEvent"+ - $ref: "#/components/schemas/ResponseContentPartAddedEvent"+ - $ref: "#/components/schemas/ResponseContentPartDoneEvent"+ - $ref: "#/components/schemas/ResponseOutputTextDeltaEvent"+ - $ref: "#/components/schemas/ResponseOutputTextDoneEvent"+ - $ref: "#/components/schemas/ResponseFunctionCallArgumentsDeltaEvent"+ - $ref: "#/components/schemas/ResponseFunctionCallArgumentsDoneEvent"+ ResponseCreatedEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.created+ response:+ $ref: "#/components/schemas/ResponseObject"+ required:+ - sequence_number+ - type+ - response+ additionalProperties: false+ ResponseInProgressEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.in_progress+ response:+ $ref: "#/components/schemas/ResponseObject"+ required:+ - sequence_number+ - type+ - response+ additionalProperties: false+ ResponseCompletedEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.completed+ response:+ $ref: "#/components/schemas/ResponseObject"+ required:+ - sequence_number+ - type+ - response+ additionalProperties: false+ ResponseFailedEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.failed+ response:+ $ref: "#/components/schemas/ResponseObject"+ required:+ - sequence_number+ - type+ - response+ additionalProperties: false+ ResponseIncompleteEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.incomplete+ response:+ $ref: "#/components/schemas/ResponseObject"+ required:+ - sequence_number+ - type+ - response+ additionalProperties: false+ ResponseOutputItemAddedEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.output_item.added+ item:+ $ref: "#/components/schemas/ResponseOutputItem"+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - sequence_number+ - type+ - item+ - output_index+ additionalProperties: false+ ResponseOutputItemDoneEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.output_item.done+ item:+ $ref: "#/components/schemas/ResponseOutputItem"+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ required:+ - sequence_number+ - type+ - item+ - output_index+ additionalProperties: false+ ResponseContentPartAddedEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.content_part.added+ item_id:+ type: string+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ content_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ part:+ $ref: "#/components/schemas/ResponseOutputText"+ required:+ - sequence_number+ - type+ - item_id+ - output_index+ - content_index+ - part+ additionalProperties: false+ ResponseContentPartDoneEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.content_part.done+ item_id:+ type: string+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ content_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ part:+ $ref: "#/components/schemas/ResponseOutputText"+ required:+ - sequence_number+ - type+ - item_id+ - output_index+ - content_index+ - part+ additionalProperties: false+ ResponseOutputTextDeltaEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.output_text.delta+ item_id:+ type: string+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ content_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ delta:+ type: string+ logprobs:+ type: array+ items:+ type: object+ properties:+ bytes:+ type: array+ items:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ logprob:+ type: number+ token:+ type: string+ top_logprobs:+ type: array+ items:+ type: object+ properties:+ bytes:+ type: array+ items:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ logprob:+ type: number+ token:+ type: string+ required:+ - bytes+ - logprob+ - token+ additionalProperties: false+ required:+ - bytes+ - logprob+ - token+ - top_logprobs+ additionalProperties: false+ required:+ - sequence_number+ - type+ - item_id+ - output_index+ - content_index+ - delta+ - logprobs+ additionalProperties: false+ ResponseOutputTextDoneEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.output_text.done+ item_id:+ type: string+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ content_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ logprobs:+ type: array+ items:+ type: object+ properties:+ bytes:+ type: array+ items:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ logprob:+ type: number+ token:+ type: string+ top_logprobs:+ type: array+ items:+ type: object+ properties:+ bytes:+ type: array+ items:+ type: integer+ minimum: -9007199254740991+ maximum: 9007199254740991+ logprob:+ type: number+ token:+ type: string+ required:+ - bytes+ - logprob+ - token+ additionalProperties: false+ required:+ - bytes+ - logprob+ - token+ - top_logprobs+ additionalProperties: false+ text:+ type: string+ required:+ - sequence_number+ - type+ - item_id+ - output_index+ - content_index+ - logprobs+ - text+ additionalProperties: false+ ResponseFunctionCallArgumentsDeltaEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.function_call_arguments.delta+ item_id:+ type: string+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ delta:+ type: string+ required:+ - sequence_number+ - type+ - item_id+ - output_index+ - delta+ additionalProperties: false+ ResponseFunctionCallArgumentsDoneEvent:+ type: object+ properties:+ sequence_number:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ type:+ type: string+ const: response.function_call_arguments.done+ item_id:+ type: string+ output_index:+ type: integer+ minimum: 0+ maximum: 9007199254740991+ arguments:+ type: string+ required:+ - sequence_number+ - type+ - item_id+ - output_index+ - arguments+ additionalProperties: falseRoleList:type: objectproperties:@@ -9367,6 +9781,23 @@ info:`POST` operations accept an `Idempotency-Key` header; see the parameterdescription.+++ ## Scopes+++ A restricted API key only reaches operations whose scopes it holds;+ `x:write` implies `x:read`. Each operation lists the scopes it needs (all of+ them) in `x-required-scopes`; `*` means only a full-access key, and an empty+ list means any key. OIDC tokens and full-access keys are not narrowed by+ scopes. The caller's own role still applies on top.+++ ## Workspaces+++ Send `X-Workspace-Id` to act inside a workspace; see the parameter+ description for how it combines with personal and workspace API keys.version: 1.0.0security:- bearerAuth: []@@ -9376,7 +9807,7 @@ servers:paths:/api/v1/health:get:- operationId: getApiV1Health+ operationId: health.checksecurity: []summary: Health checktags:@@ -9407,11 +9838,15 @@ paths:$ref: "#/components/headers/RequestId"/api/v1/agent-groups:get:- operationId: getApiV1AgentGroups- description: Paginated with `limit` + `cursor`; answers `{ items, total,- hasMore, nextCursor }`. Clients that still expect the former bare array- can pass the deprecated `format=array`, which returns every item as a- plain array.+ operationId: agentGroups.list+ description: >-+ Paginated with `limit` + `cursor`; answers `{ items, total, hasMore,+ nextCursor }`. Clients that still expect the former bare array can pass+ the deprecated `format=array`, which returns every item as a plain+ array.+++ **API key scopes:** `agent:read`.summary: List agent groupstags:- agent-groups@@ -9541,6 +9976,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: cursor@@ -9568,8 +10005,9 @@ paths:item instead of the paginated object. Migrate to `items` +`nextCursor`."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"post:- operationId: postApiV1AgentGroups+ operationId: agentGroups.createsummary: Create an agent grouptags:- agent-groups@@ -9684,6 +10122,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writerequestBody:required: truecontent:@@ -9701,10 +10141,12 @@ paths:required:- nameparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/agent-groups/{id}:get:- operationId: getApiV1AgentGroupsById+ operationId: agentGroups.getsummary: Get an agent grouptags:- agent-groups@@ -9832,6 +10274,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -9839,8 +10283,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."patch:- operationId: patchApiV1AgentGroupsById+ operationId: agentGroups.updatesummary: Update an agent grouptags:- agent-groups@@ -9953,6 +10399,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -9960,6 +10408,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -9976,8 +10425,9 @@ paths:type:- number- "null"+ description: "**API key scopes:** `agent:write`."delete:- operationId: deleteApiV1AgentGroupsById+ operationId: agentGroups.deletesummary: Delete an agent grouptags:- agent-groups@@ -10090,6 +10540,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -10097,9 +10549,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:write`."/api/v1/agents:get:- operationId: getApiV1Agents+ operationId: agents.listsummary: List agentstags:- agents@@ -10125,6 +10579,34 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ agents:+ - agencyConfig: null+ avatar: 🧑💻+ chatConfig:+ enableHistoryCount: true+ historyCount: 20+ createdAt: 2026-01-15T08:30:00.000Z+ description: Reviews pull requests and explains the risky parts.+ id: agt_6sQwJ3dVbX1m+ model: gpt-5.1+ params:+ temperature: 0.3+ personal: false+ plugins:+ - identifier: lobe-web-browsing+ mode: auto+ provider: openai+ slug: code-reviewer+ systemRole: You are a meticulous senior code reviewer.+ title: Code Reviewer+ updatedAt: 2026-01-15T09:12:00.000Z+ hasMore: true+ nextCursor: eyJpZCI6ImFndF82c1F3SjNkVmJYMW0ifQ+ total: 42+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -10212,6 +10694,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: cursor@@ -10257,8 +10741,10 @@ paths:enum:- "true"- "false"+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."post:- operationId: postApiV1Agents+ operationId: agents.createsummary: Create an agenttags:- agents@@ -10284,6 +10770,30 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ agencyConfig: null+ avatar: 🧑💻+ chatConfig:+ enableHistoryCount: true+ historyCount: 20+ createdAt: 2026-01-15T08:30:00.000Z+ description: Reviews pull requests and explains the risky parts.+ id: agt_6sQwJ3dVbX1m+ model: gpt-5.1+ params:+ temperature: 0.3+ personal: false+ plugins:+ - identifier: lobe-web-browsing+ mode: auto+ provider: openai+ slug: code-reviewer+ systemRole: You are a meticulous senior code reviewer.+ title: Code Reviewer+ updatedAt: 2026-01-15T09:12:00.000Z+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -10373,6 +10883,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writerequestBody:required: truecontent:@@ -10647,11 +11159,19 @@ paths:minLength: 1required:- title+ example:+ description: Reviews pull requests and explains the risky parts.+ model: gpt-5.1+ provider: openai+ systemRole: You are a meticulous senior code reviewer.+ title: Code Reviewerparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/agents/{id}:get:- operationId: getApiV1AgentsById+ operationId: agents.getsummary: Get an agent with its mounted files and knowledge basestags:- agents@@ -10779,6 +11299,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -10786,8 +11308,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."patch:- operationId: patchApiV1AgentsById+ operationId: agents.updatesummary: Update an agenttags:- agents@@ -10900,6 +11424,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -10907,6 +11433,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -11179,8 +11706,9 @@ paths:title:type: stringminLength: 1+ description: "**API key scopes:** `agent:write`."delete:- operationId: deleteApiV1AgentsById+ operationId: agents.deletesummary: Delete an agenttags:- agents@@ -11293,6 +11821,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -11300,9 +11830,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:write`."/api/v1/agents/{id}/duplicate:post:- operationId: postApiV1AgentsByIdDuplicate+ operationId: agents.createDuplicatesummary: Duplicate an agenttags:- agents@@ -11432,6 +11964,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -11439,6 +11973,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -11452,9 +11987,10 @@ paths:minLength: 1maxLength: 255additionalProperties: false+ description: "**API key scopes:** `agent:write`."/api/v1/agents/{id}/accounts:get:- operationId: listAgentAccounts+ operationId: agents.listAccountssummary: List an agent's accountstags:- agents@@ -11582,6 +12118,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -11602,8 +12140,10 @@ paths:schema:type: stringminLength: 1+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."post:- operationId: createAgentAccount+ operationId: agents.createAccountsummary: Mount or provision an agent accounttags:- agents@@ -11748,6 +12288,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -11755,6 +12297,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -11813,9 +12356,10 @@ paths:required:- provideradditionalProperties: false+ description: "**API key scopes:** `agent:write`."/api/v1/agents/{id}/accounts/{accountId}:get:- operationId: getAgentAccount+ operationId: agents.getAccountsummary: Get an agent accounttags:- agents@@ -11943,6 +12487,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: accountId@@ -11956,8 +12502,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."patch:- operationId: updateAgentAccount+ operationId: agents.updateAccountsummary: Update an agent accounttags:- agents@@ -12100,6 +12648,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: accountId@@ -12113,6 +12663,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -12143,10 +12694,15 @@ paths:propertyNames:type: stringadditionalProperties: {}+ description: "**API key scopes:** `agent:write`."delete:- operationId: revokeAgentAccount- description: Releases the account and marks it revoked. The row is kept for- audit, so the response is the revoked account.+ operationId: agents.deleteAccount+ description: >-+ Releases the account and marks it revoked. The row is kept for audit, so+ the response is the revoked account.+++ **API key scopes:** `agent:write`.summary: Revoke an agent accounttags:- agents@@ -12274,6 +12830,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: accountId@@ -12301,11 +12859,16 @@ paths:enum:- "true"- "false"+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/agents/{id}/accounts/{accountId}/credential:put:- operationId: setAgentAccountCredential- description: "Write-only: the response carries the non-secret hint and- `hasCredential`, never the secret."+ operationId: agents.updateAccountCredential+ description: >-+ Write-only: the response carries the non-secret hint and+ `hasCredential`, never the secret.+++ **API key scopes:** `agent:credential:write` + `agent:write`.summary: Write an agent account credentialtags:- agents@@ -12433,6 +12996,9 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:credential:write+ - agent:writeparameters:- in: pathname: accountId@@ -12446,6 +13012,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -12472,11 +13039,15 @@ paths:- credential/api/v1/api-keys:get:- operationId: getApiV1ApiKeys- description: Paginated with `limit` + `cursor`; answers `{ items, total,- hasMore, nextCursor }`. Clients that still expect the former bare array- can pass the deprecated `format=array`, which returns every item as a- plain array.+ operationId: apiKeys.list+ description: >-+ Paginated with `limit` + `cursor`; answers `{ items, total, hasMore,+ nextCursor }`. Clients that still expect the former bare array can pass+ the deprecated `format=array`, which returns every item as a plain+ array.+++ **API key scopes:** a full-access API key (`*`).summary: List API keystags:- api-keys@@ -12606,6 +13177,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: queryname: cursor@@ -12633,9 +13206,13 @@ paths:item instead of the paginated object. Migrate to `items` +`nextCursor`."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"post:- operationId: postApiV1ApiKeys- description: The plaintext key is returned only in this response.+ operationId: apiKeys.create+ description: |-+ The plaintext key is returned only in this response.++ **API key scopes:** a full-access API key (`*`).summary: Create an API keytags:- api-keys@@ -12750,6 +13327,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"requestBody:required: truecontent:@@ -12801,10 +13380,11 @@ paths:- nameadditionalProperties: falseparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/api-keys/{id}:get:- operationId: getApiV1ApiKeysById+ operationId: apiKeys.getsummary: Get an API keytags:- api-keys@@ -12932,6 +13512,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -12940,8 +13522,10 @@ paths:minLength: 16maxLength: 16required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."patch:- operationId: patchApiV1ApiKeysById+ operationId: apiKeys.updatesummary: Update an API keytags:- api-keys@@ -13069,6 +13653,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -13077,6 +13663,7 @@ paths:minLength: 16maxLength: 16required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -13097,8 +13684,9 @@ paths:minLength: 1maxLength: 256additionalProperties: false+ description: "**API key scopes:** a full-access API key (`*`)."delete:- operationId: deleteApiV1ApiKeysById+ operationId: apiKeys.deletesummary: Delete an API keytags:- api-keys@@ -13226,6 +13814,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -13234,17 +13824,23 @@ paths:minLength: 16maxLength: 16required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."/api/v1/audio/speech:post:- operationId: postApiV1AudioSpeech- description: "OpenAI-compatible text-to-speech. Point an OpenAI SDK at `/api/v1`- and call `audio.speech.create`. `model` takes `provider/model` (for- example `lobehub/speech-2.8-hd`) or a bare model id; the optional- `provider` and `params` (emotion, pitch, volume, sampleRate) are LobeHub- extensions. Returns the audio bytes; usage is reported in `X-LobeHub-*`- headers. Synthesis errors use OpenAI's `{ error: { message, type, code,- param } }` body; authentication and permission errors use the platform- `ApiError` envelope."+ operationId: audio.createSpeech+ description: >-+ OpenAI-compatible text-to-speech. Point an OpenAI SDK at `/api/v1` and+ call `audio.speech.create`. `model` takes `provider/model` (for example+ `lobehub/speech-2.8-hd`) or a bare model id; the optional `provider` and+ `params` (emotion, pitch, volume, sampleRate) are LobeHub extensions.+ Returns the audio bytes; usage is reported in `X-LobeHub-*` headers.+ Synthesis errors use OpenAI's `{ error: { message, type, code, param }+ }` body; authentication and permission errors use the platform+ `ApiError` envelope.+++ **API key scopes:** `model:invoke`.responses:"200":content:@@ -13487,11 +14083,14 @@ paths:summary: Create speechtags:- audio+ x-required-scopes:+ - model:invokeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/chat:post:- operationId: postApiV1Chat+ operationId: chat.createsummary: Run a non-streaming chat completiontags:- chat@@ -13606,6 +14205,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:invokerequestBody:required: truecontent:@@ -13676,10 +14277,12 @@ paths:required:- messagesparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `model:invoke`."/api/v1/chat/translate:post:- operationId: postApiV1ChatTranslate+ operationId: chat.createTranslatesummary: Translate texttags:- chat@@ -13794,6 +14397,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:invokerequestBody:required: truecontent:@@ -13829,10 +14434,12 @@ paths:- text- toparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `model:invoke`."/api/v1/chat/generate-reply:post:- operationId: postApiV1ChatGenerateReply+ operationId: chat.createGenerateReplysummary: Generate a reply to a messagetags:- chat@@ -13947,6 +14554,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:invokerequestBody:required: truecontent:@@ -14085,10 +14694,12 @@ paths:- sessionId- userMessageparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `model:invoke`."/api/v1/chat-groups:get:- operationId: getApiV1ChatGroups+ operationId: chatGroups.listsummary: List chat groupstags:- chat-groups@@ -14201,6 +14812,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: cursor@@ -14242,8 +14855,10 @@ paths:enum:- "true"- "false"+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."post:- operationId: postApiV1ChatGroups+ operationId: chatGroups.createsummary: Create a chat group with its supervisor and memberstags:- chat-groups@@ -14388,6 +15003,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writerequestBody:required: truecontent:@@ -14432,10 +15049,12 @@ paths:- members- titleparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/chat-groups/{id}:get:- operationId: getApiV1ChatGroupsById+ operationId: chatGroups.getsummary: Get a chat grouptags:- chat-groups@@ -14563,6 +15182,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -14570,8 +15191,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."patch:- operationId: patchApiV1ChatGroupsById+ operationId: chatGroups.updatesummary: Update a chat grouptags:- chat-groups@@ -14714,6 +15337,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -14721,6 +15346,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -14747,8 +15373,9 @@ paths:title:type: stringminLength: 1+ description: "**API key scopes:** `agent:write`."delete:- operationId: deleteApiV1ChatGroupsById+ operationId: chatGroups.deletesummary: Delete a chat grouptags:- chat-groups@@ -14876,6 +15503,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -14883,9 +15512,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:write`."/api/v1/chat-groups/{id}/members:post:- operationId: postApiV1ChatGroupsByIdMembers+ operationId: chatGroups.addMemberssummary: Add members to a chat grouptags:- chat-groups@@ -15015,6 +15646,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -15022,6 +15655,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -15039,9 +15673,13 @@ paths:minLength: 1required:- agentIds+ description: "**API key scopes:** `agent:write`."delete:- operationId: deleteApiV1ChatGroupsByIdMembers- description: Detaches the agents and answers with the updated group.+ operationId: chatGroups.removeMembers+ description: |-+ Detaches the agents and answers with the updated group.++ **API key scopes:** `agent:write`.summary: Remove members from a chat grouptags:- chat-groups@@ -15184,6 +15822,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -15191,6 +15831,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -15209,7 +15850,7 @@ paths:- agentIds/api/v1/documents:get:- operationId: getApiV1Documents+ operationId: documents.listsummary: List documentstags:- documents@@ -15339,6 +15980,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:readparameters:- in: queryname: cursor@@ -15361,10 +16004,16 @@ paths:type: stringminLength: 1description: Only list the direct children of this folder (id or slug).+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `knowledge:read`."post:- operationId: postApiV1Documents- description: 'Creates a page from Markdown, or a folder with `fileType:- "custom/folder"`.'+ operationId: documents.create+ description: >-+ Creates a page from Markdown, or a folder with `fileType:+ "custom/folder"`.+++ **API key scopes:** `knowledge:write`.summary: Create a documenttags:- documents@@ -15494,6 +16143,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writerequestBody:required: truecontent:@@ -15521,10 +16172,11 @@ paths:- titleadditionalProperties: falseparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/documents/{id}:get:- operationId: getApiV1DocumentsById+ operationId: documents.getsummary: Get a documenttags:- documents@@ -15652,6 +16304,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:readparameters:- in: pathname: id@@ -15659,10 +16313,16 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `knowledge:read`."patch:- operationId: patchApiV1DocumentsById- description: Replaces the title and/or the whole Markdown body. A page open in- the editor receives the write through its live room.+ operationId: documents.update+ description: >-+ Replaces the title and/or the whole Markdown body. A page open in the+ editor receives the write through its live room.+++ **API key scopes:** `knowledge:write`.summary: Update a documenttags:- documents@@ -15790,6 +16450,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writeparameters:- in: pathname: id@@ -15797,6 +16459,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -15814,9 +16477,13 @@ paths:additionalProperties: false/api/v1/eval/runs:post:- operationId: postApiV1EvalRuns- description: Queues an asynchronous QStash-backed evaluation run and returns+ operationId: eval.createRuns+ description: >-+ Queues an asynchronous QStash-backed evaluation run and returnsimmediately.+++ **API key scopes:** `eval:write`.summary: Create an eval runtags:- eval@@ -15961,6 +16628,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writerequestBody:required: truecontent:@@ -16046,9 +16715,10 @@ paths:- targetAgentIdadditionalProperties: falseparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"get:- operationId: getApiV1EvalRuns+ operationId: eval.listRunssummary: List eval runstags:- eval@@ -16178,6 +16848,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: queryname: cursor@@ -16245,9 +16917,11 @@ paths:- failed- aborted- external+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `eval:read`."/api/v1/eval/runs/{id}/topics:get:- operationId: getApiV1EvalRunsByIdTopics+ operationId: eval.listRunsTopicssummary: List topic results of an eval runtags:- eval@@ -16395,6 +17069,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: id@@ -16445,9 +17121,11 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `eval:read`."/api/v1/eval/runs/{id}:get:- operationId: getApiV1EvalRunsById+ operationId: eval.getRunssummary: Get an eval runtags:- eval@@ -16575,6 +17253,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: id@@ -16583,9 +17263,11 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `eval:read`."/api/v1/eval/runs/{id}/results:get:- operationId: getApiV1EvalRunsByIdResults+ operationId: eval.listRunsResultssummary: List case results of an eval runtags:- eval@@ -16733,6 +17415,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: id@@ -16783,13 +17467,19 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `eval:read`."post:- operationId: postApiV1EvalRunsByIdResults- description: "Claim: one pending worker succeeds, others receive 409. Reports:+ operationId: eval.createRunsResults+ description: >-+ Claim: one pending worker succeeds, others receive 409. Reports:identical replays succeed; different results conflict. Batches areatomic. External workers can supply testCaseId to associate their owntopic with a dataset case on first report. Retry: only terminal runs,- concurrent repeats conflict."+ concurrent repeats conflict.+++ **API key scopes:** `eval:write`.summary: Report results for a batch of run topicstags:- eval@@ -16934,6 +17624,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -16942,6 +17634,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -16988,10 +17681,13 @@ paths:additionalProperties: false/api/v1/eval/benchmarks:post:- operationId: postApiV1EvalBenchmarks- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.createBenchmarks+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Create a benchmarktags:- eval@@ -17121,6 +17817,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writerequestBody:required: truecontent:@@ -17414,12 +18112,16 @@ paths:- nameadditionalProperties: falseparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"get:- operationId: getApiV1EvalBenchmarks- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.listBenchmarks+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:read`.summary: List benchmarkstags:- eval@@ -17549,6 +18251,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: queryname: cursor@@ -17592,12 +18296,16 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/eval/benchmarks/{id}:get:- operationId: getApiV1EvalBenchmarksById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.getBenchmarks+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:read`.summary: Get a benchmarktags:- eval@@ -17725,6 +18433,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: id@@ -17733,11 +18443,15 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"patch:- operationId: patchApiV1EvalBenchmarksById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.updateBenchmarks+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Update a benchmarktags:- eval@@ -17880,6 +18594,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -17888,6 +18604,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -18174,10 +18891,13 @@ paths:additionalProperties: falseadditionalProperties: falsedelete:- operationId: deleteApiV1EvalBenchmarksById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.deleteBenchmarks+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Delete a benchmarktags:- eval@@ -18305,6 +19025,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -18313,12 +19035,16 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/eval/datasets:post:- operationId: postApiV1EvalDatasets- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.createDatasets+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Create a datasettags:- eval@@ -18463,6 +19189,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writerequestBody:required: truecontent:@@ -18535,12 +19263,16 @@ paths:- nameadditionalProperties: falseparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"get:- operationId: getApiV1EvalDatasets- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.listDatasets+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:read`.summary: List datasetstags:- eval@@ -18670,6 +19402,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: queryname: cursor@@ -18719,12 +19453,16 @@ paths:type: stringminLength: 1maxLength: 128+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/eval/datasets/{id}:get:- operationId: getApiV1EvalDatasetsById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.getDatasets+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:read`.summary: Get a datasettags:- eval@@ -18852,6 +19590,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: id@@ -18860,11 +19600,15 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"patch:- operationId: patchApiV1EvalDatasetsById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.updateDatasets+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Update a datasettags:- eval@@ -19007,6 +19751,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -19015,6 +19761,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -19080,10 +19827,13 @@ paths:- type: "null"additionalProperties: falsedelete:- operationId: deleteApiV1EvalDatasetsById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.deleteDatasets+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Delete a datasettags:- eval@@ -19211,6 +19961,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -19219,12 +19971,16 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/eval/datasets/{datasetId}/test-cases:post:- operationId: postApiV1EvalDatasetsByDatasetIdTestCases- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.createDatasetsTestCases+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Create a test casetags:- eval@@ -19369,6 +20125,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: datasetId@@ -19377,6 +20135,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -19554,10 +20313,13 @@ paths:- inputadditionalProperties: falseget:- operationId: getApiV1EvalDatasetsByDatasetIdTestCases- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.listDatasetsTestCases+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:read`.summary: List test cases of a datasettags:- eval@@ -19702,6 +20464,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: datasetId@@ -19752,12 +20516,16 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/eval/test-cases/{id}:get:- operationId: getApiV1EvalTestCasesById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.getTestCases+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:read`.summary: Get a test casetags:- eval@@ -19885,6 +20653,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:readparameters:- in: pathname: id@@ -19893,11 +20663,15 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"patch:- operationId: patchApiV1EvalTestCasesById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.updateTestCases+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Update a test casetags:- eval@@ -20025,6 +20799,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -20033,6 +20809,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -20203,10 +20980,13 @@ paths:- type: "null"additionalProperties: falsedelete:- operationId: deleteApiV1EvalTestCasesById- description: "Creates accept an optional id: an identical replay returns the- resource; conflicting id or identifier returns 409. Lists are- paginated."+ operationId: eval.deleteTestCases+ description: >-+ Creates accept an optional id: an identical replay returns the resource;+ conflicting id or identifier returns 409. Lists are paginated.+++ **API key scopes:** `eval:write`.summary: Delete a test casetags:- eval@@ -20334,6 +21114,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -20342,14 +21124,19 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/eval/runs/{id}/claim:post:- operationId: postApiV1EvalRunsByIdClaim- description: "Claim: one pending worker succeeds, others receive 409. Reports:+ operationId: eval.createRunsClaim+ description: >-+ Claim: one pending worker succeeds, others receive 409. Reports:identical replays succeed; different results conflict. Batches areatomic. External workers can supply testCaseId to associate their owntopic with a dataset case on first report. Retry: only terminal runs,- concurrent repeats conflict."+ concurrent repeats conflict.+++ **API key scopes:** `eval:write`.summary: Claim a pending external eval runtags:- eval@@ -20494,6 +21281,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -20502,15 +21291,20 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/eval/runs/{id}/status:patch:- operationId: patchApiV1EvalRunsByIdStatus- description: "Claim: one pending worker succeeds, others receive 409. Reports:+ operationId: eval.updateRunsStatus+ description: >-+ Claim: one pending worker succeeds, others receive 409. Reports:identical replays succeed; different results conflict. Batches areatomic. External workers can supply testCaseId to associate their owntopic with a dataset case on first report. Retry: only terminal runs,- concurrent repeats conflict."+ concurrent repeats conflict.+++ **API key scopes:** `eval:write`.summary: Set the status of an external eval runtags:- eval@@ -20653,6 +21447,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -20661,6 +21457,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -20681,12 +21478,16 @@ paths:additionalProperties: false/api/v1/eval/runs/{id}/retry-errors:post:- operationId: postApiV1EvalRunsByIdRetryErrors- description: "Claim: one pending worker succeeds, others receive 409. Reports:+ operationId: eval.createRunsRetryErrors+ description: >-+ Claim: one pending worker succeeds, others receive 409. Reports:identical replays succeed; different results conflict. Batches areatomic. External workers can supply testCaseId to associate their owntopic with a dataset case on first report. Retry: only terminal runs,- concurrent repeats conflict."+ concurrent repeats conflict.+++ **API key scopes:** `eval:write`.summary: Retry the errored cases of an eval runtags:- eval@@ -20831,6 +21632,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: id@@ -20839,15 +21642,20 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/eval/runs/{runId}/topics/{topicId}/result:put:- operationId: putApiV1EvalRunsByRunIdTopicsByTopicIdResult- description: "Claim: one pending worker succeeds, others receive 409. Reports:+ operationId: eval.updateRunsTopicsResult+ description: >-+ Claim: one pending worker succeeds, others receive 409. Reports:identical replays succeed; different results conflict. Batches areatomic. External workers can supply testCaseId to associate their owntopic with a dataset case on first report. Retry: only terminal runs,- concurrent repeats conflict."+ concurrent repeats conflict.+++ **API key scopes:** `eval:write`.summary: Report the result of one run topictags:- eval@@ -20990,6 +21798,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - eval:writeparameters:- in: pathname: runId@@ -21005,6 +21815,7 @@ paths:minLength: 1maxLength: 128required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -21035,7 +21846,7 @@ paths:additionalProperties: false/api/v1/plugins:get:- operationId: getApiV1Plugins+ operationId: plugins.listsummary: List installed plugins in the current workspace or personal scopetags:- plugins@@ -21148,6 +21959,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: cursor@@ -21191,9 +22004,11 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."/api/v1/files:get:- operationId: getApiV1Files+ operationId: files.listsummary: List filestags:- files@@ -21219,6 +22034,30 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ files:+ - chunking: null+ createdAt: 2026-01-15T08:30:00.000Z+ embedding: null+ fileType: application/pdf+ id: file_Lw7pD3kXa9Ue+ knowledgeBases: []+ metadata: null+ name: architecture.pdf+ parentId: null+ size: 482133+ source: null+ updatedAt: 2026-01-15T09:12:00.000Z+ url: https://files.example.com/architecture.pdf+ users: []+ visibility: private+ hasMore: false+ nextCursor: null+ total: 1+ totalSize: "482133"+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -21306,6 +22145,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:readparameters:- in: queryname: cursor@@ -21372,8 +22213,10 @@ paths:name: userIdschema:type: string+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `file:read`."post:- operationId: postApiV1Files+ operationId: files.createrequestBody:content:multipart/form-data:@@ -21512,13 +22355,21 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:writeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `file:write`."/api/v1/files/{id}:get:- operationId: getApiV1FilesById- description: Non-image files include their parse result. A file that does not- exist answers 400.+ operationId: files.get+ description: >-+ Non-image files include their parse result. A file that does not exist+ answers 400.+++ **API key scopes:** `file:read`.summary: Get a filetags:- files@@ -21631,6 +22482,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:readparameters:- in: pathname: id@@ -21638,8 +22491,9 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"patch:- operationId: patchApiV1FilesById+ operationId: files.updatesummary: Update a filetags:- files@@ -21767,6 +22621,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:writeparameters:- in: pathname: id@@ -21774,6 +22630,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -21785,8 +22642,9 @@ paths:type:- string- "null"+ description: "**API key scopes:** `file:write`."delete:- operationId: deleteApiV1FilesById+ operationId: files.deletesummary: Delete a filetags:- files@@ -21899,6 +22757,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:writeparameters:- in: pathname: id@@ -21906,9 +22766,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `file:write`."/api/v1/files/{id}/url:get:- operationId: getApiV1FilesByIdUrl+ operationId: files.getUrlsummary: Get a pre-signed file URLtags:- files@@ -22021,6 +22883,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:readparameters:- in: pathname: id@@ -22034,9 +22898,11 @@ paths:type:- string- "null"+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `file:read`."/api/v1/files/{id}/parses:post:- operationId: postApiV1FilesByIdParses+ operationId: files.parsesummary: Parse file contenttags:- files@@ -22151,6 +23017,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:writeparameters:- in: pathname: id@@ -22164,10 +23032,12 @@ paths:type:- string- "null"+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `file:write`."/api/v1/files/{id}/chunks:post:- operationId: postApiV1FilesByIdChunks+ operationId: files.createChunkssummary: Start a file chunking tasktags:- files@@ -22282,6 +23152,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:writeparameters:- in: pathname: id@@ -22289,6 +23161,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -22301,8 +23174,9 @@ paths:type: booleanskipExist:type: boolean+ description: "**API key scopes:** `file:write`."get:- operationId: getApiV1FilesByIdChunks+ operationId: files.listChunkssummary: Get file chunking statustags:- files@@ -22415,6 +23289,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:readparameters:- in: pathname: id@@ -22422,9 +23298,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `file:read`."/api/v1/files/batches:post:- operationId: postApiV1FilesBatches+ operationId: files.uploadBatchrequestBody:content:multipart/form-data:@@ -22565,11 +23443,15 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:writeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `file:write`."/api/v1/files/queries:post:- operationId: postApiV1FilesQueries+ operationId: files.querysummary: Get several filestags:- files@@ -22595,6 +23477,28 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ failed:+ - error: File not found+ fileId: file_missing0000+ files:+ - file:+ createdAt: 2026-01-15T08:30:00.000Z+ fileType: application/pdf+ id: file_Lw7pD3kXa9Ue+ metadata: null+ name: architecture.pdf+ parentId: null+ size: 482133+ source: null+ updatedAt: 2026-01-15T09:12:00.000Z+ url: https://files.example.com/architecture.pdf+ visibility: private+ success: 1+ total: 2+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -22684,6 +23588,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - file:readrequestBody:required: truecontent:@@ -22699,11 +23605,17 @@ paths:minLength: 1required:- fileIds+ example:+ fileIds:+ - file_Lw7pD3kXa9Ue+ - file_missing0000parameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `file:read`."/api/v1/goals:get:- operationId: getApiV1Goals+ operationId: goals.listsummary: List goalstags:- goals@@ -22816,6 +23728,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: agentId@@ -22857,9 +23771,14 @@ paths:name: topicIdschema:type: string+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."post:- operationId: postApiV1Goals- description: Creates the goal graph and hands it to the coordinator.+ operationId: goals.create+ description: |-+ Creates the goal graph and hands it to the coordinator.++ **API key scopes:** `agent:write`.summary: Create a goaltags:- goals@@ -22989,6 +23908,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writerequestBody:required: truecontent:@@ -23051,10 +23972,11 @@ paths:required:- titleparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/goals/{id}:get:- operationId: getApiV1GoalsById+ operationId: goals.getsummary: Get a goal and its graphtags:- goals@@ -23182,6 +24104,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -23189,8 +24113,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."patch:- operationId: patchApiV1GoalsById+ operationId: goals.updatesummary: Update a goal requirement or budgettags:- goals@@ -23318,6 +24244,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -23325,6 +24253,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -23379,8 +24308,9 @@ paths:requirement:type: stringminLength: 1+ description: "**API key scopes:** `agent:write`."delete:- operationId: deleteApiV1GoalsById+ operationId: goals.deletesummary: Delete a goaltags:- goals@@ -23538,6 +24468,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -23545,9 +24477,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:write`."/api/v1/goals/{id}/supervision:get:- operationId: getGoalSupervision+ operationId: goals.getSupervisionsummary: Get goal supervision statetags:- goals@@ -23675,6 +24609,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -23682,9 +24618,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."/api/v1/goals/{id}/advance:post:- operationId: advanceGoal+ operationId: goals.advancesummary: Run the goal coordinator nowtags:- goals@@ -23814,6 +24752,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -23821,10 +24761,12 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/goals/{id}/pause:post:- operationId: pauseGoal+ operationId: goals.pausesummary: Pause a goaltags:- goals@@ -23984,6 +24926,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -23991,10 +24935,12 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/goals/{id}/resume:post:- operationId: resumeGoal+ operationId: goals.resumesummary: Resume a paused goaltags:- goals@@ -24154,6 +25100,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -24161,10 +25109,12 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/goals/{id}/restart:post:- operationId: restartGoal+ operationId: goals.restartsummary: Restart every unfinished task of a goaltags:- goals@@ -24309,6 +25259,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -24316,6 +25268,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -24327,9 +25280,10 @@ paths:agentId:type: stringminLength: 1+ description: "**API key scopes:** `agent:write`."/api/v1/im/messages:post:- operationId: sendImMessage+ operationId: im.sendsummary: Send a message to an agent; the reply arrives asynchronously via synctags:- im@@ -24474,6 +25428,10 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:write+ - chat:write+ - model:invokerequestBody:required: truecontent:@@ -24537,10 +25495,12 @@ paths:- content- groupIdparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write` + `chat:write` + `model:invoke`."/api/v1/im/topics/{topicId}/sync:get:- operationId: syncImTopic+ operationId: im.syncsummary: Long-poll a conversation for whole new messages, typing and read receiptstags:- im@@ -24668,6 +25628,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: topicId@@ -24697,9 +25659,11 @@ paths:type: integerminimum: 0maximum: 25000+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."/api/v1/im/topics/{topicId}/read:post:- operationId: markImTopicRead+ operationId: im.markReadsummary: Mark the agent's messages read up to a messagetags:- im@@ -24829,6 +25793,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: topicId@@ -24836,6 +25802,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -24849,9 +25816,10 @@ paths:minLength: 1required:- messageId+ description: "**API key scopes:** `chat:write`."/api/v1/knowledge-bases:get:- operationId: getApiV1KnowledgeBases+ operationId: knowledgeBases.listsummary: List knowledge basestags:- knowledge-bases@@ -24964,6 +25932,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:readparameters:- in: queryname: cursor@@ -25002,8 +25972,10 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `knowledge:read`."post:- operationId: postApiV1KnowledgeBases+ operationId: knowledgeBases.createsummary: Create a knowledge basetags:- knowledge-bases@@ -25118,6 +26090,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writerequestBody:required: truecontent:@@ -25138,10 +26112,12 @@ paths:required:- nameparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `knowledge:write`."/api/v1/knowledge-bases/{id}:get:- operationId: getApiV1KnowledgeBasesById+ operationId: knowledgeBases.getsummary: Get a knowledge basetags:- knowledge-bases@@ -25269,6 +26245,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:readparameters:- in: pathname: id@@ -25276,8 +26254,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `knowledge:read`."patch:- operationId: patchApiV1KnowledgeBasesById+ operationId: knowledgeBases.updatesummary: Update a knowledge basetags:- knowledge-bases@@ -25405,6 +26385,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writeparameters:- in: pathname: id@@ -25412,6 +26394,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -25429,9 +26412,13 @@ paths:type: stringminLength: 1maxLength: 255+ description: "**API key scopes:** `knowledge:write`."delete:- operationId: deleteApiV1KnowledgeBasesById- description: Also deletes the files that belong to no other knowledge base.+ operationId: knowledgeBases.delete+ description: |-+ Also deletes the files that belong to no other knowledge base.++ **API key scopes:** `knowledge:write`.summary: Delete a knowledge basetags:- knowledge-bases@@ -25559,6 +26546,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writeparameters:- in: pathname: id@@ -25566,9 +26555,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/knowledge-bases/{id}/files:get:- operationId: getApiV1KnowledgeBasesByIdFiles+ operationId: knowledgeBases.listFilessummary: List the files of a knowledge basetags:- knowledge-bases@@ -25696,6 +26686,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:readparameters:- in: pathname: id@@ -25746,9 +26738,11 @@ paths:type:- string- "null"+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `knowledge:read`."/api/v1/knowledge-bases/{id}/files/batch:post:- operationId: postApiV1KnowledgeBasesByIdFilesBatch+ operationId: knowledgeBases.addFilessummary: Add files to a knowledge basetags:- knowledge-bases@@ -25878,6 +26872,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writeparameters:- in: pathname: id@@ -25885,6 +26881,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -25901,10 +26898,15 @@ paths:minLength: 1required:- fileIds+ description: "**API key scopes:** `knowledge:write`."delete:- operationId: deleteApiV1KnowledgeBasesByIdFilesBatch- description: Detaches the files from the knowledge base without deleting them,- and reports per file which ones were detached.+ operationId: knowledgeBases.removeFiles+ description: >-+ Detaches the files from the knowledge base without deleting them, and+ reports per file which ones were detached.+++ **API key scopes:** `knowledge:write`.summary: Remove files from a knowledge basetags:- knowledge-bases@@ -26032,6 +27034,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writeparameters:- in: pathname: id@@ -26039,6 +27043,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -26056,7 +27061,7 @@ paths:- fileIds/api/v1/knowledge-bases/{id}/files/move:post:- operationId: postApiV1KnowledgeBasesByIdFilesMove+ operationId: knowledgeBases.moveFilessummary: Move files to another knowledge basetags:- knowledge-bases@@ -26186,6 +27191,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - knowledge:writeparameters:- in: pathname: id@@ -26193,6 +27200,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -26213,13 +27221,18 @@ paths:required:- fileIds- targetKnowledgeBaseId+ description: "**API key scopes:** `knowledge:write`."/api/v1/mcp-servers:get:- operationId: getApiV1McpServers- description: Paginated with `limit` + `cursor`; answers `{ items, total,- hasMore, nextCursor }`. Clients that still expect the former bare array- can pass the deprecated `format=array`, which returns every item as a- plain array.+ operationId: mcpServers.list+ description: >-+ Paginated with `limit` + `cursor`; answers `{ items, total, hasMore,+ nextCursor }`. Clients that still expect the former bare array can pass+ the deprecated `format=array`, which returns every item as a plain+ array.+++ **API key scopes:** `mcp:read`.summary: List remote MCP serverstags:- mcp-servers@@ -26349,6 +27362,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - mcp:readparameters:- in: queryname: cursor@@ -26376,8 +27391,9 @@ paths:item instead of the paginated object. Migrate to `items` +`nextCursor`."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"post:- operationId: postApiV1McpServers+ operationId: mcpServers.createsummary: Add a remote MCP servertags:- mcp-servers@@ -26507,6 +27523,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - mcp:writerequestBody:required: truecontent:@@ -26585,10 +27603,12 @@ paths:- serverUrladditionalProperties: falseparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `mcp:write`."/api/v1/mcp-servers/{id}:get:- operationId: getApiV1McpServersById+ operationId: mcpServers.getsummary: Get a remote MCP servertags:- mcp-servers@@ -26716,6 +27736,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - mcp:readparameters:- in: pathname: id@@ -26724,10 +27746,16 @@ paths:format: uuidpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `mcp:read`."patch:- operationId: patchApiV1McpServersById- description: Changing `serverUrl` or `credentials` resets the status to+ operationId: mcpServers.update+ description: >-+ Changing `serverUrl` or `credentials` resets the status to`disconnected`.+++ **API key scopes:** `mcp:write`.summary: Update a remote MCP servertags:- mcp-servers@@ -26855,6 +27883,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - mcp:writeparameters:- in: pathname: id@@ -26863,6 +27893,7 @@ paths:format: uuidpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -26935,7 +27966,7 @@ paths:format: uriadditionalProperties: falsedelete:- operationId: deleteApiV1McpServersById+ operationId: mcpServers.deletesummary: Delete a remote MCP servertags:- mcp-servers@@ -27063,6 +28094,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - mcp:writeparameters:- in: pathname: id@@ -27071,9 +28104,11 @@ paths:format: uuidpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `mcp:write`."/api/v1/mcp-servers/{id}/sync:post:- operationId: postApiV1McpServersByIdSync+ operationId: mcpServers.createSyncsummary: Discover and sync MCP toolstags:- mcp-servers@@ -27203,6 +28238,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - mcp:writeparameters:- in: pathname: id@@ -27211,11 +28248,16 @@ paths:format: uuidpattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `mcp:write`."/api/v1/memories/persona:get:- operationId: getMemoryPersona- description: "`data` is null until a persona has been written."+ operationId: memories.getPersona+ description: |-+ `data` is null until a persona has been written.++ **API key scopes:** `user:read`.summary: Get the current persona documenttags:- memories@@ -27315,9 +28357,13 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:read+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/memories/persona/versions:get:- operationId: listMemoryPersonaVersions+ operationId: memories.listPersonaVersionssummary: List persona document versionstags:- memories@@ -27417,11 +28463,20 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:read+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `user:read`."/api/v1/memories:delete:- operationId: deleteAllMemories- description: Removes every memory, the persona and the per-topic extraction- status; `count` is the number of memories removed.+ operationId: memories.deleteAll+ description: >-+ Removes every memory, the persona and the per-topic extraction status;+ `count` is the number of memories removed.+++ **API key scopes:** `user:write`.summary: Delete all memory entriestags:- memories@@ -27519,9 +28574,13 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:write+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/memories/{category}/{id}:delete:- operationId: deleteMemoryEntry+ operationId: memories.deleteEntrysummary: Delete a memory entrytags:- memories@@ -27649,6 +28708,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:writeparameters:- in: pathname: category@@ -27667,11 +28728,17 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `user:write`."/api/v1/memories/{category}:get:- operationId: listMemoryCategory- description: Every identity, or the newest entries of the other categories; the- array shape follows `category`.+ operationId: memories.listCategory+ description: >-+ Every identity, or the newest entries of the other categories; the array+ shape follows `category`.+++ **API key scopes:** `user:read`.summary: List the entries of a memory categorytags:- memories@@ -27784,6 +28851,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:readparameters:- in: pathname: category@@ -27796,9 +28865,10 @@ paths:- activities- experiencesrequired: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/message-translations/{messageId}:post:- operationId: postApiV1MessageTranslationsByMessageId+ operationId: messageTranslations.createsummary: Translate a messagetags:- message-translations@@ -27913,6 +28983,9 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:write+ - model:invokeparameters:- in: pathname: messageId@@ -27920,6 +28993,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -27943,9 +29017,13 @@ paths:minLength: 1required:- to+ description: "**API key scopes:** `chat:write` + `model:invoke`."get:- operationId: getApiV1MessageTranslationsByMessageId- description: "`null` when the message has no stored translation."+ operationId: messageTranslations.get+ description: |-+ `null` when the message has no stored translation.++ **API key scopes:** `chat:read`.summary: Get a message's translationtags:- message-translations@@ -28060,6 +29138,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: messageId@@ -28067,8 +29147,9 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"patch:- operationId: patchApiV1MessageTranslationsByMessageId+ operationId: messageTranslations.updatesummary: Set a message's translationtags:- message-translations@@ -28181,6 +29262,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: messageId@@ -28188,6 +29271,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -28212,9 +29296,13 @@ paths:type: stringrequired:- to+ description: "**API key scopes:** `chat:write`."delete:- operationId: deleteApiV1MessageTranslationsByMessageId- description: "`id` is the id of the message whose translation was removed."+ operationId: messageTranslations.delete+ description: |-+ `id` is the id of the message whose translation was removed.++ **API key scopes:** `chat:write`.summary: Delete a message's translationtags:- message-translations@@ -28342,6 +29430,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: messageId@@ -28349,9 +29439,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/messages/count:get:- operationId: getApiV1MessagesCount+ operationId: messages.getCountsummary: Count messagestags:- messages@@ -28472,6 +29563,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: queryname: topicId@@ -28495,9 +29588,11 @@ paths:type:- string- "null"+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."/api/v1/messages:get:- operationId: getApiV1Messages+ operationId: messages.listsummary: List messagestags:- messages@@ -28540,6 +29635,67 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ hasMore: false+ messages:+ - agentId: agt_6sQwJ3dVbX1m+ content: What changed in the auth middleware?+ createdAt: 2026-01-15T08:30:00.000Z+ error: null+ favorite: false+ files: []+ groupId: null+ id: msg_Qm4c8VtYw2Rz+ messageGroupId: null+ metadata: null+ model: null+ observationId: null+ parentId: null+ provider: null+ quotaId: null+ reasoning: null+ role: user+ search: null+ session: null+ sessionId: null+ summary: null+ targetId: null+ threadId: null+ tools: null+ topic:+ agentId: agt_6sQwJ3dVbX1m+ completedAt: null+ content: null+ cost: null+ createdAt: 2026-01-15T08:30:00.000Z+ description: null+ favorite: false+ groupId: null+ historySummary: null+ id: tpc_Hk2vX9pQe4Ls+ metadata: null+ mode: null+ model: gpt-5.1+ provider: openai+ sessionId: null+ status: active+ title: "Review PR #1234"+ totalCost: 0.0123+ totalInputTokens: 1830+ totalOutputTokens: 412+ totalTokens: 2242+ trigger: null+ updatedAt: 2026-01-15T09:12:00.000Z+ usage: null+ topicId: tpc_Hk2vX9pQe4Ls+ traceId: null+ updatedAt: 2026-01-15T09:12:00.000Z+ usage: null+ nextCursor: null+ total: 1+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -28627,6 +29783,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: queryname: threadId@@ -28702,8 +29860,10 @@ paths:maximum: 9007199254740991description: "Deprecated: use `cursor` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."post:- operationId: postApiV1Messages+ operationId: messages.createsummary: Create a messagetags:- messages@@ -28729,6 +29889,63 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ agentId: agt_6sQwJ3dVbX1m+ content: What changed in the auth middleware?+ createdAt: 2026-01-15T08:30:00.000Z+ error: null+ favorite: false+ files: []+ groupId: null+ id: msg_Qm4c8VtYw2Rz+ messageGroupId: null+ metadata: null+ model: null+ observationId: null+ parentId: null+ provider: null+ quotaId: null+ reasoning: null+ role: user+ search: null+ session: null+ sessionId: null+ summary: null+ targetId: null+ threadId: null+ tools: null+ topic:+ agentId: agt_6sQwJ3dVbX1m+ completedAt: null+ content: null+ cost: null+ createdAt: 2026-01-15T08:30:00.000Z+ description: null+ favorite: false+ groupId: null+ historySummary: null+ id: tpc_Hk2vX9pQe4Ls+ metadata: null+ mode: null+ model: gpt-5.1+ provider: openai+ sessionId: null+ status: active+ title: "Review PR #1234"+ totalCost: 0.0123+ totalInputTokens: 1830+ totalOutputTokens: 412+ totalTokens: 2242+ trigger: null+ updatedAt: 2026-01-15T09:12:00.000Z+ usage: null+ topicId: tpc_Hk2vX9pQe4Ls+ traceId: null+ updatedAt: 2026-01-15T09:12:00.000Z+ usage: null+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -28818,6 +30035,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writerequestBody:required: truecontent:@@ -28905,12 +30124,23 @@ paths:required:- content- role+ example:+ agentId: agt_6sQwJ3dVbX1m+ content: What changed in the auth middleware?+ role: user+ topicId: tpc_Hk2vX9pQe4Lsparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `chat:write`."delete:- operationId: deleteApiV1Messages- description: "Best effort: ids the caller may not delete or that no longer exist- are skipped. `count` is the number of messages actually removed."+ operationId: messages.deleteMany+ description: >-+ Best effort: ids the caller may not delete or that no longer exist are+ skipped. `count` is the number of messages actually removed.+++ **API key scopes:** `chat:write`.summary: Delete messages in batchtags:- messages@@ -29023,6 +30253,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writerequestBody:required: truecontent:@@ -29038,9 +30270,11 @@ paths:minLength: 1required:- messageIds+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/messages/{id}:get:- operationId: getApiV1MessagesById+ operationId: messages.getsummary: Get a messagetags:- messages@@ -29168,6 +30402,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: id@@ -29175,8 +30411,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."delete:- operationId: deleteApiV1MessagesById+ operationId: messages.deletesummary: Delete a messagetags:- messages@@ -29304,6 +30542,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: id@@ -29311,11 +30551,17 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:write`."/api/v1/messages/replies:post:- operationId: postApiV1MessagesReplies- description: Stores the user message, then generates and stores the assistant- reply. Answers with the reply; `null` only if it could not be read back.+ operationId: messages.createReply+ description: >-+ Stores the user message, then generates and stores the assistant reply.+ Answers with the reply; `null` only if it could not be read back.+++ **API key scopes:** `chat:write` + `model:invoke`.summary: Create a user message and generate an AI replytags:- messages@@ -29432,6 +30678,9 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:write+ - model:invokerequestBody:required: truecontent:@@ -29516,10 +30765,11 @@ paths:- content- roleparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/models:get:- operationId: getApiV1Models+ operationId: models.listsummary: List modelstags:- models@@ -29649,6 +30899,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:readparameters:- in: queryname: cursor@@ -29718,8 +30970,10 @@ paths:- decision- stt- type: "null"+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `model:read`."post:- operationId: postApiV1Models+ operationId: models.createsummary: Create a modeltags:- models@@ -29834,6 +31088,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:writerequestBody:required: truecontent:@@ -29936,10 +31192,12 @@ paths:- id- providerIdparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `model:write`."/api/v1/models/{providerId}/{modelId}:get:- operationId: getApiV1ModelsByProviderIdByModelId+ operationId: models.getsummary: Get a modeltags:- models@@ -30067,6 +31325,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:readparameters:- in: pathname: modelId@@ -30082,8 +31342,10 @@ paths:minLength: 1maxLength: 64required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `model:read`."patch:- operationId: patchApiV1ModelsByProviderIdByModelId+ operationId: models.updatesummary: Update a modeltags:- models@@ -30211,6 +31473,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:writeparameters:- in: pathname: modelId@@ -30226,6 +31490,7 @@ paths:minLength: 1maxLength: 64required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -30315,11 +31580,16 @@ paths:- decision- stt- type: "null"+ description: "**API key scopes:** `model:write`."/api/v1/notifications:get:- operationId: getApiV1Notifications- description: Unarchived notifications, newest first; pass the last `id` as- `cursor` for the next page.+ operationId: notifications.list+ description: >-+ Unarchived notifications, newest first; pass the last `id` as `cursor`+ for the next page.+++ **API key scopes:** any API key (no scope needed).summary: List notificationstags:- notifications@@ -30467,9 +31737,11 @@ paths:enum:- "true"- "false"+ - $ref: "#/components/parameters/WorkspaceId"+ x-required-scopes: []/api/v1/notifications/settings:get:- operationId: getNotificationSettings+ operationId: notifications.listSettingssummary: Get notification delivery settingstags:- notifications@@ -30591,9 +31863,15 @@ paths:enum:- personal- workspace+ - $ref: "#/components/parameters/WorkspaceId"+ x-required-scopes: []+ description: "**API key scopes:** any API key (no scope needed)."patch:- operationId: updateNotificationSettings- description: Answers with the merged settings now stored for the scope.+ operationId: notifications.updateSettings+ description: |-+ Answers with the merged settings now stored for the scope.++ **API key scopes:** any API key (no scope needed).summary: Update notification delivery settingstags:- notifications@@ -30715,6 +31993,7 @@ paths:enum:- personal- workspace+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -30815,9 +32094,10 @@ paths:type: booleanadditionalProperties: falseadditionalProperties: false+ x-required-scopes: []/api/v1/notifications/unread-count:get:- operationId: getUnreadNotificationCount+ operationId: notifications.getUnreadCountsummary: Get the unread notification counttags:- notifications@@ -30915,9 +32195,13 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"+ x-required-scopes: []+ description: "**API key scopes:** any API key (no scope needed)."/api/v1/notifications/counts:get:- operationId: getNotificationCounts+ operationId: notifications.getCountssummary: Get per-category notification countstags:- notifications@@ -31017,9 +32301,13 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"+ x-required-scopes: []+ description: "**API key scopes:** any API key (no scope needed)."/api/v1/notifications/read:post:- operationId: markNotificationsRead+ operationId: notifications.markReadsummary: Mark notifications as readtags:- notifications@@ -31132,6 +32420,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writerequestBody:required: truecontent:@@ -31148,10 +32438,12 @@ paths:required:- idsparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `chat:write`."/api/v1/notifications/read-all:post:- operationId: markAllNotificationsRead+ operationId: notifications.markAllReadsummary: Mark every notification as readtags:- notifications@@ -31249,11 +32541,15 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `chat:write`."/api/v1/notifications/archive-all:post:- operationId: archiveAllNotifications+ operationId: notifications.archiveAllsummary: Archive every notificationtags:- notifications@@ -31351,11 +32647,15 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `chat:write`."/api/v1/notifications/{id}/archive:post:- operationId: archiveNotification+ operationId: notifications.archivesummary: Archive a notificationtags:- notifications@@ -31468,6 +32768,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: id@@ -31475,10 +32777,12 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `chat:write`."/api/v1/permissions:get:- operationId: getApiV1Permissions+ operationId: permissions.listsummary: List permissionstags:- permissions@@ -31591,6 +32895,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: queryname: active@@ -31642,8 +32948,10 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."post:- operationId: postApiV1Permissions+ operationId: permissions.createsummary: Create a permissiontags:- permissions@@ -31758,6 +33066,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"requestBody:required: truecontent:@@ -31788,10 +33098,12 @@ paths:- code- nameparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** a full-access API key (`*`)."/api/v1/permissions/{id}:get:- operationId: getApiV1PermissionsById+ operationId: permissions.getsummary: Get a permissiontags:- permissions@@ -31919,6 +33231,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -31927,8 +33241,10 @@ paths:minLength: 16maxLength: 16required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."patch:- operationId: patchApiV1PermissionsById+ operationId: permissions.updatesummary: Update a permissiontags:- permissions@@ -32056,6 +33372,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -32064,6 +33382,7 @@ paths:minLength: 16maxLength: 16required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -32089,8 +33408,9 @@ paths:name:type: stringminLength: 1+ description: "**API key scopes:** a full-access API key (`*`)."delete:- operationId: deleteApiV1PermissionsById+ operationId: permissions.deletesummary: Delete a permissiontags:- permissions@@ -32218,6 +33538,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -32226,9 +33548,11 @@ paths:minLength: 16maxLength: 16required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."/api/v1/providers:get:- operationId: getApiV1Providers+ operationId: providers.listsummary: List providerstags:- providers@@ -32358,6 +33682,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:readparameters:- in: queryname: cursor@@ -32400,8 +33726,10 @@ paths:name: enabledschema:type: boolean+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `model:read`."post:- operationId: postApiV1Providers+ operationId: providers.createsummary: Create a providertags:- providers@@ -32516,6 +33844,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:writerequestBody:required: truecontent:@@ -32579,10 +33909,12 @@ paths:required:- idparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `model:write`."/api/v1/providers/{id}:get:- operationId: getApiV1ProvidersById+ operationId: providers.getsummary: Get a providertags:- providers@@ -32710,6 +34042,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:readparameters:- in: pathname: id@@ -32718,8 +34052,10 @@ paths:minLength: 1maxLength: 64required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `model:read`."patch:- operationId: patchApiV1ProvidersById+ operationId: providers.updatesummary: Update a providertags:- providers@@ -32847,6 +34183,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:writeparameters:- in: pathname: id@@ -32855,6 +34193,7 @@ paths:minLength: 1maxLength: 64required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -32914,9 +34253,13 @@ paths:enum:- builtin- custom+ description: "**API key scopes:** `model:write`."delete:- operationId: deleteApiV1ProvidersById- description: Also removes the models configured under the provider.+ operationId: providers.delete+ description: |-+ Also removes the models configured under the provider.++ **API key scopes:** `model:write`.summary: Delete a providertags:- providers@@ -33044,6 +34387,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - model:writeparameters:- in: pathname: id@@ -33052,9 +34397,10 @@ paths:minLength: 1maxLength: 64required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/push-tokens/{deviceId}:put:- operationId: registerPushToken+ operationId: pushTokens.registersummary: Register or rotate this device's push tokentags:- push-tokens@@ -33167,6 +34513,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: deviceId@@ -33175,6 +34523,7 @@ paths:minLength: 1maxLength: 200required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -33200,10 +34549,15 @@ paths:required:- expoToken- platform+ description: "**API key scopes:** `chat:read`."delete:- operationId: unregisterPushToken- description: "`id` is the device id. Idempotent: a stale `expoToken` removes- nothing and leaves the rotated registration in place."+ operationId: pushTokens.unregister+ description: >-+ `id` is the device id. Idempotent: a stale `expoToken` removes nothing+ and leaves the rotated registration in place.+++ **API key scopes:** `chat:read`.summary: Stop pushing to this device (sign-out)tags:- push-tokens@@ -33316,6 +34670,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: deviceId@@ -33330,14 +34686,21 @@ paths:type: stringminLength: 1maxLength: 512+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/responses:post:- operationId: postApiV1Responses- description: 'OpenResponses-compatible: `model` takes an agent id. Without- `stream` the response object is the whole JSON body (no success- envelope); a run that fails still answers 200 with `status: "failed"`- and `error`. With `stream: true` the same object arrives through- `response.*` server-sent events.'+ operationId: responses.create+ description: >-+ OpenResponses-compatible: `model` takes an agent id. Without `stream`+ the response object is the whole JSON body (no success envelope); a run+ that fails still answers 200 with `status: "failed"` and `error`. With+ `stream: true` the body is `text/event-stream`: each message is `event:+ <type>` plus `data: <ResponseStreamEvent JSON>`, and the final+ `response.completed` / `response.failed` / `response.incomplete` event+ carries the same response object.+++ **API key scopes:** `agent:write` + `chat:write` + `model:invoke`.summary: Create a model responsetags:- responses@@ -33347,9 +34710,62 @@ paths:application/json:schema:$ref: "#/components/schemas/ResponseObject"+ example:+ background: false+ completed_at: 1768465821+ created_at: 1768465800+ error: null+ frequency_penalty: 0+ id: resp_tpc_Hk2vX9pQe4Ls+ incomplete_details: null+ instructions: null+ max_output_tokens: null+ max_tool_calls: null+ metadata: {}+ model: agt_6sQwJ3dVbX1m+ object: response+ output:+ - content:+ - annotations: []+ logprobs: []+ text: "Two comments are still open: a missing null check and a flaky test."+ type: output_text+ id: msg_Zt5n1KcBv8Qp+ role: assistant+ status: completed+ type: message+ output_text: "Two comments are still open: a missing null check and a flaky+ test."+ parallel_tool_calls: true+ presence_penalty: 0+ previous_response_id: null+ prompt_cache_key: null+ reasoning: null+ safety_identifier: null+ service_tier: default+ status: completed+ store: true+ temperature: 1+ text:+ format:+ type: text+ tool_choice: auto+ tools: []+ top_logprobs: 0+ top_p: 1+ truncation: disabled+ usage:+ input_tokens: 1830+ input_tokens_details:+ cached_tokens: 0+ output_tokens: 412+ output_tokens_details:+ reasoning_tokens: 0+ total_tokens: 2242+ user: nulltext/event-stream:schema:- type: string+ $ref: "#/components/schemas/ResponseStreamEvent"description: Successful responseheaders:X-Request-Id:@@ -33684,6 +35100,10 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:write+ - chat:write+ - model:invokerequestBody:required: truecontent:@@ -33957,11 +35377,15 @@ paths:- input- modeladditionalProperties: {}+ example:+ input: "Summarize the open review comments on PR #1234."+ model: agt_6sQwJ3dVbX1mparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"/api/v1/roles:get:- operationId: getApiV1Roles+ operationId: roles.listsummary: List rolestags:- roles@@ -34074,6 +35498,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: queryname: active@@ -34124,8 +35550,10 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."post:- operationId: postApiV1Roles+ operationId: roles.createsummary: Create a roletags:- roles@@ -34240,6 +35668,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"requestBody:required: truecontent:@@ -34271,10 +35701,12 @@ paths:- displayName- nameparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** a full-access API key (`*`)."/api/v1/roles/{id}:get:- operationId: getApiV1RolesById+ operationId: roles.getsummary: Get a roletags:- roles@@ -34402,6 +35834,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -34409,8 +35843,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."patch:- operationId: patchApiV1RolesById+ operationId: roles.updatesummary: Update a roletags:- roles@@ -34538,6 +35974,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -34545,6 +35983,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -34572,8 +36011,9 @@ paths:name:type: stringminLength: 1+ description: "**API key scopes:** a full-access API key (`*`)."delete:- operationId: deleteApiV1RolesById+ operationId: roles.deletesummary: Delete a roletags:- roles@@ -34701,6 +36141,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -34708,9 +36150,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."/api/v1/roles/{id}/permissions:get:- operationId: getApiV1RolesByIdPermissions+ operationId: roles.listPermissionssummary: List a role's permissionstags:- roles@@ -34823,6 +36267,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -34867,9 +36313,14 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."patch:- operationId: patchApiV1RolesByIdPermissions- description: Grants and revokes permissions by id; returns how many mappings changed.+ operationId: roles.updatePermissions+ description: |-+ Grants and revokes permissions by id; returns how many mappings changed.++ **API key scopes:** a full-access API key (`*`).summary: Update a role's permissionstags:- roles@@ -34997,6 +36448,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -35004,6 +36457,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -35026,8 +36480,11 @@ paths:minLength: 1- type: "null"delete:- operationId: deleteApiV1RolesByIdPermissions- description: "`count` is the number of permission mappings removed."+ operationId: roles.deletePermissions+ description: |-+ `count` is the number of permission mappings removed.++ **API key scopes:** a full-access API key (`*`).summary: Clear a role's permissionstags:- roles@@ -35155,6 +36612,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -35162,9 +36621,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/signals/source-events:post:- operationId: emitSourceEvent+ operationId: signals.emitsummary: Emit an agent signal source eventtags:- signals@@ -35294,6 +36754,9 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:write+ - model:invokerequestBody:required: truecontent:@@ -35327,10 +36790,12 @@ paths:- sourceId- sourceTypeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write` + `model:invoke`."/api/v1/signals/trigger:post:- operationId: triggerSourceEvent+ operationId: signals.triggersummary: Trigger a synthesized agent signal source eventtags:- signals@@ -35460,6 +36925,9 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:write+ - model:invokerequestBody:required: truecontent:@@ -35494,10 +36962,12 @@ paths:required:- sourceTypeparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write` + `model:invoke`."/api/v1/signals/receipts:get:- operationId: listSignalReceipts+ operationId: signals.listReceiptssummary: List agent signal receipts for a topictags:- signals@@ -35610,6 +37080,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: agentId@@ -35641,9 +37113,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."/api/v1/tasks:get:- operationId: getApiV1Tasks+ operationId: tasks.listsummary: List taskstags:- tasks@@ -35756,6 +37230,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: queryname: assigneeAgentId@@ -35793,8 +37269,10 @@ paths:name: statusesschema:type: string+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."post:- operationId: postApiV1Tasks+ operationId: tasks.createsummary: Create a tasktags:- tasks@@ -35939,6 +37417,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writerequestBody:required: truecontent:@@ -35989,10 +37469,12 @@ paths:required:- instructionparameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `agent:write`."/api/v1/tasks/{id}:get:- operationId: getApiV1TasksById+ operationId: tasks.getsummary: Get a tasktags:- tasks@@ -36120,6 +37602,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -36127,8 +37611,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."patch:- operationId: patchApiV1TasksById+ operationId: tasks.updatesummary: Update a tasktags:- tasks@@ -36286,6 +37772,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -36293,6 +37781,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -36353,8 +37842,9 @@ paths:- string- "null"additionalProperties: false+ description: "**API key scopes:** `agent:write`."delete:- operationId: deleteApiV1TasksById+ operationId: tasks.deletesummary: Delete a tasktags:- tasks@@ -36497,6 +37987,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -36504,9 +37996,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:write`."/api/v1/tasks/{id}/status:patch:- operationId: patchApiV1TasksByIdStatus+ operationId: tasks.updateStatussummary: Change a task statustags:- tasks@@ -36649,6 +38143,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -36656,6 +38152,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -36677,11 +38174,16 @@ paths:- canceledrequired:- status+ description: "**API key scopes:** `agent:write`."/api/v1/tasks/{id}/runs:post:- operationId: postApiV1TasksByIdRuns- description: Starts the run and answers once the agent operation is accepted;- follow it with `operationId`.+ operationId: tasks.run+ description: >-+ Starts the run and answers once the agent operation is accepted; follow+ it with `operationId`.+++ **API key scopes:** `agent:write`.summary: Run a task nowtags:- tasks@@ -36841,6 +38343,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:writeparameters:- in: pathname: id@@ -36848,6 +38352,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"requestBody:required: true@@ -36861,7 +38366,7 @@ paths:minLength: 1additionalProperties: falseget:- operationId: getApiV1TasksByIdRuns+ operationId: tasks.listRunssummary: List past runs of a tasktags:- tasks@@ -36991,6 +38496,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - agent:readparameters:- in: pathname: id@@ -37004,9 +38511,11 @@ paths:type: integerminimum: 1maximum: 100+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `agent:read`."/api/v1/topics:get:- operationId: getApiV1Topics+ operationId: topics.listsummary: List topicstags:- topics@@ -37049,6 +38558,51 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ hasMore: false+ nextCursor: null+ topics:+ - agentId: agt_6sQwJ3dVbX1m+ completedAt: null+ content: null+ cost: null+ createdAt: 2026-01-15T08:30:00.000Z+ description: null+ favorite: false+ groupId: null+ historySummary: null+ id: tpc_Hk2vX9pQe4Ls+ metadata: null+ mode: null+ model: gpt-5.1+ provider: openai+ sessionId: null+ status: active+ title: "Review PR #1234"+ totalCost: 0.0123+ totalInputTokens: 1830+ totalOutputTokens: 412+ totalTokens: 2242+ trigger: null+ updatedAt: 2026-01-15T09:12:00.000Z+ usage: null+ messageCount: 6+ user:+ avatar: null+ createdAt: 2026-01-15T08:30:00.000Z+ email: [email protected]+ firstName: Ada+ fullName: Ada Lovelace+ id: user_2Nf8sLq0aT+ isOnboarded: true+ lastName: Lovelace+ phone: null+ updatedAt: 2026-01-15T09:12:00.000Z+ username: ada+ total: 1+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -37136,6 +38690,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: queryname: agentId@@ -37202,8 +38758,10 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."post:- operationId: postApiV1Topics+ operationId: topics.createsummary: Create a topictags:- topics@@ -37229,6 +38787,47 @@ paths:- success- timestampadditionalProperties: false+ example:+ data:+ agentId: agt_6sQwJ3dVbX1m+ completedAt: null+ content: null+ cost: null+ createdAt: 2026-01-15T08:30:00.000Z+ description: null+ favorite: false+ groupId: null+ historySummary: null+ id: tpc_Hk2vX9pQe4Ls+ metadata: null+ mode: null+ model: gpt-5.1+ provider: openai+ sessionId: null+ status: active+ title: "Review PR #1234"+ totalCost: 0.0123+ totalInputTokens: 1830+ totalOutputTokens: 412+ totalTokens: 2242+ trigger: null+ updatedAt: 2026-01-15T09:12:00.000Z+ usage: null+ messageCount: 6+ user:+ avatar: null+ createdAt: 2026-01-15T08:30:00.000Z+ email: [email protected]+ firstName: Ada+ fullName: Ada Lovelace+ id: user_2Nf8sLq0aT+ isOnboarded: true+ lastName: Lovelace+ phone: null+ updatedAt: 2026-01-15T09:12:00.000Z+ username: ada+ success: true+ timestamp: 2026-01-01T00:00:00.000Zdescription: Successful responseheaders:X-Request-Id:@@ -37318,6 +38917,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writerequestBody:required: truecontent:@@ -37342,11 +38943,16 @@ paths:minLength: 1required:- title+ example:+ agentId: agt_6sQwJ3dVbX1m+ title: "Review PR #1234"parameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `chat:write`."/api/v1/topics/{id}:get:- operationId: getApiV1TopicsById+ operationId: topics.getsummary: Get a topictags:- topics@@ -37474,6 +39080,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: id@@ -37481,8 +39089,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."patch:- operationId: patchApiV1TopicsById+ operationId: topics.updatesummary: Update a topictags:- topics@@ -37610,6 +39220,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: id@@ -37617,6 +39229,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -37642,8 +39255,9 @@ paths:title:type: stringminLength: 1+ description: "**API key scopes:** `chat:write`."delete:- operationId: deleteApiV1TopicsById+ operationId: topics.deletesummary: Delete a topictags:- topics@@ -37771,6 +39385,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:writeparameters:- in: pathname: id@@ -37778,9 +39394,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:write`."/api/v1/topics/{topicId}/threads:get:- operationId: getApiV1TopicsByTopicIdThreads+ operationId: topics.listThreadssummary: List topic threadstags:- topics@@ -37925,6 +39543,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - chat:readparameters:- in: pathname: topicId@@ -37974,12 +39594,18 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `chat:read`."/api/v1/users/me:get:- operationId: getApiV1UsersMe- description: Reachable by every authenticated caller. An API key without- `user:read` receives only `{ id }`; `messageCount` is included only with+ operationId: users.me+ description: >-+ Reachable by every authenticated caller. An API key without `user:read`+ receives only `{ id }`; `messageCount` is included only with`?includeCount=1` and `chat:read`.+++ **API key scopes:** any API key (no scope needed).summary: Get current authenticated usertags:- users@@ -38094,9 +39720,12 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"+ x-required-scopes: []/api/v1/users:get:- operationId: getApiV1Users+ operationId: users.listsummary: List userstags:- users@@ -38209,6 +39838,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:readparameters:- in: queryname: cursor@@ -38247,8 +39878,10 @@ paths:maximum: 100description: "Deprecated: use `limit` instead."deprecated: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `user:read`."post:- operationId: postApiV1Users+ operationId: users.createsummary: Create a usertags:- users@@ -38363,6 +39996,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:writerequestBody:required: truecontent:@@ -38413,10 +40048,12 @@ paths:minLength: 1- type: "null"parameters:+ - $ref: "#/components/parameters/WorkspaceId"- $ref: "#/components/parameters/IdempotencyKey"+ description: "**API key scopes:** `user:write`."/api/v1/users/{id}:get:- operationId: getApiV1UsersById+ operationId: users.getsummary: Get a usertags:- users@@ -38544,6 +40181,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:readparameters:- in: pathname: id@@ -38551,8 +40190,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `user:read`."patch:- operationId: patchApiV1UsersById+ operationId: users.updatesummary: Update a usertags:- users@@ -38680,6 +40321,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:writeparameters:- in: pathname: id@@ -38687,6 +40330,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -38740,8 +40384,9 @@ paths:- type: stringminLength: 1- type: "null"+ description: "**API key scopes:** `user:write`."delete:- operationId: deleteApiV1UsersById+ operationId: users.deletesummary: Delete a usertags:- users@@ -38869,6 +40514,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - user:writeparameters:- in: pathname: id@@ -38876,9 +40523,11 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `user:write`."/api/v1/users/{id}/roles:get:- operationId: getApiV1UsersByIdRoles+ operationId: users.listRolessummary: List a user's rolestags:- users@@ -39008,6 +40657,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -39015,9 +40666,14 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** a full-access API key (`*`)."patch:- operationId: patchApiV1UsersByIdRoles- description: Adds and removes role assignments, then returns all of the user's roles.+ operationId: users.updateRoles+ description: |-+ Adds and removes role assignments, then returns all of the user's roles.++ **API key scopes:** a full-access API key (`*`).summary: Update a user's rolestags:- users@@ -39147,6 +40803,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -39154,6 +40812,7 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"requestBody:required: truecontent:@@ -39187,8 +40846,11 @@ paths:minLength: 1- type: "null"delete:- operationId: deleteApiV1UsersByIdRoles- description: "`count` is the number of role assignments removed."+ operationId: users.deleteRoles+ description: |-+ `count` is the number of role assignments removed.++ **API key scopes:** a full-access API key (`*`).summary: Clear a user's rolestags:- users@@ -39316,6 +40978,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - "*"parameters:- in: pathname: id@@ -39323,9 +40987,10 @@ paths:type: stringminLength: 1required: true+ - $ref: "#/components/parameters/WorkspaceId"/api/v1/usage:get:- operationId: getApiV1Usage+ operationId: usage.listsummary: Get usage and quota summarytags:- usage@@ -39423,3 +41088,8 @@ paths:$ref: "#/components/headers/RateLimitRemaining"X-RateLimit-Reset:$ref: "#/components/headers/RateLimitReset"+ x-required-scopes:+ - usage:read+ parameters:+ - $ref: "#/components/parameters/WorkspaceId"+ description: "**API key scopes:** `usage:read`."diff --git a/packages/openapi/src/app.ts b/packages/openapi/src/app.tsindex 88708620fc5..e4b70c16029 100644--- a/packages/openapi/src/app.ts+++ b/packages/openapi/src/app.ts@@ -74,6 +74,7 @@ app.get(routeDoc({data: HealthSchema,envelope: false,+ operationId: 'health.check',public: true,summary: 'Health check',tags: ['health'],diff --git a/packages/openapi/src/common/examples.ts b/packages/openapi/src/common/examples.tsnew file mode 100644index 00000000000..250a53da8c1--- /dev/null+++ b/packages/openapi/src/common/examples.ts@@ -0,0 +1,266 @@+/**+ * Request / response examples for the core resources' operations, published+ * in the spec through `routeDoc({ requestExample, responseExample })`.+ *+ * Every example is checked against its schema (requests here through+ * `example()`, responses inside `routeDoc`), and the spec build fails on a+ * mismatch, so the documentation cannot drift from the payload it describes.+ */+import type { z } from 'zod';++import type { RequestExample } from './openapi';++/** Pair `value` with its schema check for `routeDoc({ requestExample })`. */+export const example = <T extends z.ZodType>(schema: T, value: z.input<T>): RequestExample => {+ const result = schema.safeParse(value);+ return result.success+ ? { value }+ : { error: `requestExample does not match its schema: ${result.error.message}`, value };+};++const createdAt = '2026-01-15T08:30:00.000Z';+const updatedAt = '2026-01-15T09:12:00.000Z';++export const AGENT_EXAMPLE = {+ agencyConfig: null,+ avatar: '🧑💻',+ chatConfig: { enableHistoryCount: true, historyCount: 20 },+ createdAt,+ description: 'Reviews pull requests and explains the risky parts.',+ id: 'agt_6sQwJ3dVbX1m',+ model: 'gpt-5.1',+ params: { temperature: 0.3 },+ personal: false,+ plugins: [{ identifier: 'lobe-web-browsing', mode: 'auto' as const }],+ provider: 'openai',+ slug: 'code-reviewer',+ systemRole: 'You are a meticulous senior code reviewer.',+ title: 'Code Reviewer',+ updatedAt,+};++export const CREATE_AGENT_EXAMPLE = {+ description: 'Reviews pull requests and explains the risky parts.',+ model: 'gpt-5.1',+ provider: 'openai',+ systemRole: 'You are a meticulous senior code reviewer.',+ title: 'Code Reviewer',+};++export const AGENT_LIST_EXAMPLE = {+ agents: [AGENT_EXAMPLE],+ hasMore: true,+ nextCursor: 'eyJpZCI6ImFndF82c1F3SjNkVmJYMW0ifQ',+ total: 42,+};++const TOPIC_SUMMARY_EXAMPLE = {+ agentId: AGENT_EXAMPLE.id,+ completedAt: null,+ content: null,+ cost: null,+ createdAt,+ description: null,+ favorite: false,+ groupId: null,+ historySummary: null,+ id: 'tpc_Hk2vX9pQe4Ls',+ metadata: null,+ mode: null,+ model: 'gpt-5.1',+ provider: 'openai',+ sessionId: null,+ status: 'active' as const,+ title: 'Review PR #1234',+ totalCost: 0.0123,+ totalInputTokens: 1830,+ totalOutputTokens: 412,+ totalTokens: 2242,+ trigger: null,+ updatedAt,+ usage: null,+};++export const TOPIC_EXAMPLE = {+ ...TOPIC_SUMMARY_EXAMPLE,+ messageCount: 6,+ user: {+ avatar: null,+ createdAt,+ email: '[email protected]',+ firstName: 'Ada',+ fullName: 'Ada Lovelace',+ id: 'user_2Nf8sLq0aT',+ isOnboarded: true,+ lastName: 'Lovelace',+ phone: null,+ updatedAt,+ username: 'ada',+ },+};++export const CREATE_TOPIC_EXAMPLE = { agentId: AGENT_EXAMPLE.id, title: 'Review PR #1234' };++export const TOPIC_LIST_EXAMPLE = {+ hasMore: false,+ nextCursor: null,+ topics: [TOPIC_EXAMPLE],+ total: 1,+};++export const MESSAGE_EXAMPLE = {+ agentId: AGENT_EXAMPLE.id,+ content: 'What changed in the auth middleware?',+ createdAt,+ error: null,+ favorite: false,+ files: [],+ groupId: null,+ id: 'msg_Qm4c8VtYw2Rz',+ messageGroupId: null,+ metadata: null,+ model: null,+ observationId: null,+ parentId: null,+ provider: null,+ quotaId: null,+ reasoning: null,+ role: 'user',+ search: null,+ session: null,+ sessionId: null,+ summary: null,+ targetId: null,+ threadId: null,+ tools: null,+ topic: TOPIC_SUMMARY_EXAMPLE,+ topicId: TOPIC_SUMMARY_EXAMPLE.id,+ traceId: null,+ updatedAt,+ usage: null,+};++export const CREATE_MESSAGE_EXAMPLE = {+ agentId: AGENT_EXAMPLE.id,+ content: 'What changed in the auth middleware?',+ role: 'user' as const,+ topicId: TOPIC_SUMMARY_EXAMPLE.id,+};++export const MESSAGE_LIST_EXAMPLE = {+ hasMore: false,+ messages: [MESSAGE_EXAMPLE],+ nextCursor: null,+ total: 1,+};++export const FILE_LIST_EXAMPLE = {+ files: [+ {+ chunking: null,+ createdAt,+ embedding: null,+ fileType: 'application/pdf',+ id: 'file_Lw7pD3kXa9Ue',+ knowledgeBases: [],+ metadata: null,+ name: 'architecture.pdf',+ parentId: null,+ size: 482_133,+ source: null,+ updatedAt,+ url: 'https://files.example.com/architecture.pdf',+ users: [],+ visibility: 'private' as const,+ },+ ],+ hasMore: false,+ nextCursor: null,+ total: 1,+ totalSize: '482133',+};++const FILE_EXAMPLE = {+ createdAt,+ fileType: 'application/pdf',+ id: 'file_Lw7pD3kXa9Ue',+ metadata: null,+ name: 'architecture.pdf',+ parentId: null,+ size: 482_133,+ source: null,+ updatedAt,+ url: 'https://files.example.com/architecture.pdf',+ visibility: 'private' as const,+};++export const QUERY_FILES_EXAMPLE = { fileIds: [FILE_EXAMPLE.id, 'file_missing0000'] };++export const QUERY_FILES_RESULT_EXAMPLE = {+ failed: [{ error: 'File not found', fileId: 'file_missing0000' }],+ files: [{ file: FILE_EXAMPLE }],+ success: 1,+ total: 2,+};++export const CREATE_RESPONSE_EXAMPLE = {+ input: 'Summarize the open review comments on PR #1234.',+ model: AGENT_EXAMPLE.id,+};++export const RESPONSE_EXAMPLE = {+ background: false,+ completed_at: 1_768_465_821,+ created_at: 1_768_465_800,+ error: null,+ frequency_penalty: 0,+ id: 'resp_tpc_Hk2vX9pQe4Ls',+ incomplete_details: null,+ instructions: null,+ max_output_tokens: null,+ max_tool_calls: null,+ metadata: {},+ model: AGENT_EXAMPLE.id,+ object: 'response' as const,+ output: [+ {+ content: [+ {+ annotations: [],+ logprobs: [],+ text: 'Two comments are still open: a missing null check and a flaky test.',+ type: 'output_text' as const,+ },+ ],+ id: 'msg_Zt5n1KcBv8Qp',+ role: 'assistant' as const,+ status: 'completed' as const,+ type: 'message' as const,+ },+ ],+ output_text: 'Two comments are still open: a missing null check and a flaky test.',+ parallel_tool_calls: true,+ presence_penalty: 0,+ previous_response_id: null,+ prompt_cache_key: null,+ reasoning: null,+ safety_identifier: null,+ service_tier: 'default',+ status: 'completed' as const,+ store: true,+ temperature: 1,+ text: { format: { type: 'text' as const } },+ tool_choice: 'auto' as const,+ tools: [],+ top_logprobs: 0,+ top_p: 1,+ truncation: 'disabled' as const,+ usage: {+ input_tokens: 1830,+ input_tokens_details: { cached_tokens: 0 },+ output_tokens: 412,+ output_tokens_details: { reasoning_tokens: 0 },+ total_tokens: 2242,+ },+ user: null,+};diff --git a/packages/openapi/src/common/openapi.ts b/packages/openapi/src/common/openapi.tsindex 6b8e68784d2..09442c7be28 100644--- a/packages/openapi/src/common/openapi.ts+++ b/packages/openapi/src/common/openapi.ts@@ -11,6 +11,27 @@ export const API_ERROR_REF = '#/components/schemas/ApiError';export type SuccessStatus = 200 | 201 | 202;+/**+ * Carries `routeDoc({ requestExample })` to `buildSpecDocument`, which moves+ * it onto the JSON request body the validator documents (the body schema is+ * not known when `routeDoc` runs).+ */+export const REQUEST_EXAMPLE_EXTENSION = 'x-request-example';++/**+ * Documentation mistakes found while routes are declared (an example that does+ * not match its schema, an undocumentable scope gate). Recorded here instead of+ * thrown, so a doc slip can never stop the API server from booting;+ * `buildSpecDocument` fails on them, which CI runs on every PR.+ */+export const SPEC_ERROR_EXTENSION = 'x-spec-error';++/** A request body example plus, when it does not match its schema, why. */+export interface RequestExample {+ error?: string;+ value: unknown;+}+/*** Error statuses a route may declare on top of the ones every authenticated* route shares. `400` is also derived automatically for any route with a@@ -76,12 +97,22 @@ export interface RouteDocOptions extends Omit<DescribeRouteOptions, 'responses'>errors?: RouteErrorStatus[];/** Error body schema for routes speaking another protocol; defaults to `ApiError`. */errorSchema?: z.ZodType;+ /**+ * `<resource>.<method>` when the mechanical name from `{method} {path}` reads+ * wrong (see `common/operation-id.ts`). It is the SDK method name: never+ * rename one that has shipped.+ */+ operationId?: `${string}.${string}`;/** Public routes skip the shared authenticated errors (401/403/500). */public?: boolean;+ /** Example JSON request body, built with `example(schema, value)` from `common/examples.ts`. */+ requestExample?: RequestExample;+ /** Example success payload (`data`); wrapped in the success envelope like the schema. */+ responseExample?: unknown;/** The success status the handler answers with. Defaults to 200. */status?: SuccessStatus;/** Extra success media types, e.g. `text/event-stream` for streaming routes. */- streamContent?: Record<string, { schema: Record<string, unknown> }>;+ streamContent?: Record<string, { schema: z.ZodType }>;summary: string;}@@ -97,22 +128,51 @@ export const routeDoc = ({errorSchema,errors = [],public: isPublic = false,+ requestExample,+ responseExample,status = 200,streamContent,...rest}: RouteDocOptions) => {const errorStatuses = new Set<number>([...(isPublic ? [] : AUTHENTICATED_ERRORS), ...errors]);+ const specErrors: string[] = [];+ if (requestExample?.error) specErrors.push(requestExample.error);+ if (responseExample !== undefined) {+ const parsed = data.safeParse(responseExample);+ if (!parsed.success)+ specErrors.push(`responseExample does not match data: ${parsed.error.message}`);+ }+ const example =+ responseExample === undefined+ ? undefined+ : envelope+ ? {+ data: responseExample,+ success: true,+ timestamp: '2026-01-01T00:00:00.000Z',+ }+ : responseExample;return describeRoute({// Public routes need no credentials, so they also skip the API-key rate// limit and Idempotency-Key the spec builder adds to authenticated ones....(isPublic ? { security: [] } : {}),...rest,+ ...(requestExample === undefined ? {} : { [REQUEST_EXAMPLE_EXTENSION]: requestExample.value }),+ ...(specErrors.length > 0 ? { [SPEC_ERROR_EXTENSION]: specErrors } : {}),responses: {[status]: {content: {- 'application/json': { schema: resolver(envelope ? successEnvelope(data) : data) },- ...streamContent,+ 'application/json': {+ schema: resolver(envelope ? successEnvelope(data) : data),+ ...(example === undefined ? {} : { example }),+ },+ ...Object.fromEntries(+ Object.entries(streamContent ?? {}).map(([type, media]) => [+ type,+ { schema: resolver(media.schema) },+ ]),+ ),},description: 'Successful response',},diff --git a/packages/openapi/src/common/operation-id.ts b/packages/openapi/src/common/operation-id.tsnew file mode 100644index 00000000000..ff7ab378043--- /dev/null+++ b/packages/openapi/src/common/operation-id.ts@@ -0,0 +1,72 @@+/**+ * Readable `operationId`s: `<resource>.<method>`, e.g. `agents.list`,+ * `files.uploadBatch`. The SDK nests on these two parts verbatim+ * (`lobehub.agents.list()`), so an operationId is also a public SDK method name+ * and must never change once shipped.+ *+ * `<resource>` is the camelCased first path segment after `/api/v1`. The method+ * is derived from `{method} {path}` unless the route's `routeDoc()` declares+ * its own dotted `operationId` (for verbs the rule cannot express —+ * `notifications.markRead`, `tasks.run`):+ * - GET collection → list GET …/{id} → get+ * - POST collection → create PATCH/PUT …/{id} → update+ * - DELETE …/{id} → delete+ * - extra static sub-segments are appended in PascalCase+ * (GET …/{id}/chunks → listChunks, GET …/{id}/url → getUrl)+ */++export const OPERATION_ID_PATTERN = /^[a-z][\dA-Za-z]*\.[a-z][\dA-Za-z]*$/;++const pascal = (segment: string) =>+ segment+ .split('-')+ .map((part) => part.charAt(0).toUpperCase() + part.slice(1))+ .join('');++const camel = (segment: string) => {+ const name = pascal(segment);+ return name.charAt(0).toLowerCase() + name.slice(1);+};++/** `/api/v1/knowledge-bases/{id}` → `knowledgeBases` */+export const operationResource = (path: string) =>+ camel(path.split('/').filter(Boolean)[2] ?? 'root');++/** The mechanical method name for `{method} {path}`. */+export const operationMethodName = (method: string, path: string): string => {+ // '/api/v1/<resource-root>/<...rest>' — the resource group carries the root.+ const rest = path.split('/').filter(Boolean).slice(3);+ const statics = rest.filter((segment) => !segment.startsWith('{'));+ const endsWithParam = rest.length > 0 && rest.at(-1)!.startsWith('{');+ const suffix = statics.map(pascal).join('');++ switch (method.toUpperCase()) {+ case 'GET': {+ if (endsWithParam) return `get${suffix}`;+ if (statics.length === 0) return 'list';+ return `${statics.at(-1)!.endsWith('s') ? 'list' : 'get'}${suffix}`;+ }+ case 'POST': {+ return `create${suffix}`;+ }+ case 'PATCH':+ case 'PUT': {+ return `update${suffix}`;+ }+ case 'DELETE': {+ return `delete${suffix}`;+ }+ default: {+ return `${method.toLowerCase()}${suffix}`;+ }+ }+};++/**+ * Keep a route-declared dotted id (`files.uploadBatch`); replace hono-openapi's+ * generated default (`getApiV1AgentsById`) with the mechanical name.+ */+export const resolveOperationId = (method: string, path: string, declared?: string) =>+ declared?.includes('.')+ ? declared+ : `${operationResource(path)}.${operationMethodName(method, path)}`;diff --git a/packages/openapi/src/middleware/permission-check.test.ts b/packages/openapi/src/middleware/permission-check.test.tsindex 4abeab6cfd7..8c445ce661c 100644--- a/packages/openapi/src/middleware/permission-check.test.ts+++ b/packages/openapi/src/middleware/permission-check.test.ts@@ -1,7 +1,10 @@import { Hono } from 'hono';+import { uniqueSymbol } from 'hono-openapi';import { describe, expect, it, vi } from 'vitest';import {+ documentedScopes,+ requireAllPermissions,requireAnyPermission,requireAnyPermissionWithApiKeyScope,requireApiKeyScope,@@ -123,3 +126,50 @@ describe('requireApiKeyScope', () => {expect(response.status).toBe(200);});});++describe('documented scopes', () => {+ const specOf = (middleware: object) =>+ (middleware as Record<symbol, { spec: Record<string, unknown> }>)[uniqueSymbol].spec;++ it('maps an OR gate over one resource onto its single scope', () => {+ expect(documentedScopes(['agent:read:all', 'agent:read:owner'], 'OR')).toEqual({+ scopes: ['agent:read'],+ });+ });++ it('only admits a full-access key when no permission maps to a scope', () => {+ expect(documentedScopes(['rbac:read'], 'OR')).toEqual({ scopes: ['*'] });+ expect(documentedScopes(['agent:read', 'rbac:read'], 'AND')).toEqual({ scopes: ['*'] });+ // An OR gate still passes on the mappable alternative.+ expect(documentedScopes(['agent:read', 'rbac:read'], 'OR')).toEqual({+ scopes: ['agent:read'],+ });+ });++ it('prefers the explicit apiKeyScope', () => {+ expect(documentedScopes(['user:read'], 'OR', 'usage:read')).toEqual({ scopes: ['usage:read'] });+ });++ it('reports a genuine either-or gate instead of flattening it into an all-of list', () => {+ expect(documentedScopes(['agent:read', 'file:read'], 'OR')).toEqual({+ error: expect.stringContaining('pass an explicit apiKeyScope'),+ scopes: ['agent:read', 'file:read'],+ });+ // Declaring the gate never throws; the spec build reports it instead.+ expect(specOf(requireAnyPermission(['agent:read', 'file:read']))).toMatchObject({+ 'x-spec-error': [expect.stringContaining('accepts any of agent:read, file:read')],+ });+ });++ it('attaches the scopes to the middleware for the spec builder', () => {+ expect(specOf(requireApiKeyScope('model:invoke'))).toEqual({+ 'x-required-scopes': ['model:invoke'],+ });+ expect(specOf(requireAllPermissions(['file:create', 'knowledge_base:update']))).toEqual({+ 'x-required-scopes': ['file:write', 'knowledge:write'],+ });+ expect(specOf(requireAnyPermissionWithApiKeyScope(['user:read'], 'usage:read'))).toEqual({+ 'x-required-scopes': ['usage:read'],+ });+ });+});diff --git a/packages/openapi/src/middleware/permission-check.ts b/packages/openapi/src/middleware/permission-check.tsindex ef595510a7a..77f48f9cca2 100644--- a/packages/openapi/src/middleware/permission-check.ts+++ b/packages/openapi/src/middleware/permission-check.ts@@ -1,9 +1,11 @@import debug from 'debug';-import type { Context, Next } from 'hono';+import type { Context, MiddlewareHandler, Next } from 'hono';import { HTTPException } from 'hono/http-exception';+import { uniqueSymbol } from 'hono-openapi';import type { ApiKeyScope } from '@/const/apiKeyScope';import {+ API_KEY_FULL_ACCESS_SCOPE,hasApiKeyScope,isFullAccessApiKey,requiredApiKeyScopeForPermission,@@ -11,6 +13,8 @@ import {import { getServerDB } from '@/database/core/db-adaptor';import { RbacModel } from '@/database/models/rbac';+import { SPEC_ERROR_EXTENSION } from '../common/openapi';+// Create context logger namespaceconst log = debug('lobe-hono:permission-middleware');@@ -94,8 +98,68 @@ const assertApiKeyScopesAllow = (}};+/** OpenAPI extension listing the API key scopes an operation needs (all of them). */+export const REQUIRED_SCOPES_EXTENSION = 'x-required-scopes';++/**+ * Scopes a restricted API key must hold to pass this gate, as documented in+ * the spec. Mirrors `assertApiKeyScopesAllow`: an OR gate passes with any one+ * mappable scope, so unmappable permissions only matter when nothing maps —+ * then only a full-access key (`*`) gets through.+ *+ * Every OR gate in the API maps its alternatives onto one scope (e.g.+ * `agent:read:all` / `agent:read:owner` → `agent:read`). A genuine either-or+ * cannot be written as the spec's all-of list, so it comes back as `error`.+ */+export const documentedScopes = (+ permissionCodes: string[],+ operator: 'AND' | 'OR',+ apiKeyScope?: ApiKeyScope,+): { error?: string; scopes: string[] } => {+ if (apiKeyScope) return { scopes: [apiKeyScope] };++ const mapped = permissionCodes.map((code) => requiredApiKeyScopeForPermission(code));+ const reachable = [...new Set(mapped.filter(Boolean) as string[])];+ if (reachable.length === 0 || (operator === 'AND' && mapped.includes(null))) {+ return { scopes: [API_KEY_FULL_ACCESS_SCOPE] };+ }+ if (operator === 'OR' && reachable.length > 1) {+ return {+ error: `Permission gate [${permissionCodes.join(', ')}] accepts any of ${reachable.join(', ')}; pass an explicit apiKeyScope`,+ scopes: reachable,+ };+ }+ return { scopes: reachable };+};++/**+ * Attach the gate's scopes to the route's OpenAPI operation. hono-openapi merges+ * every documented middleware on a route, concatenating these arrays — which+ * matches runtime semantics, since stacked gates must all pass.+ */+const documentScopes = <T extends MiddlewareHandler>(+ middleware: T,+ { error, scopes }: { error?: string; scopes: string[] },+): T =>+ Object.assign(middleware, {+ [uniqueSymbol]: {+ spec: {+ [REQUIRED_SCOPES_EXTENSION]: scopes,+ ...(error ? { [SPEC_ERROR_EXTENSION]: [error] } : {}),+ },+ },+ });+const requirePermission = (options: PermissionCheckOptions) => {- return async (c: Context, next: Next) => {+ const permissionList = Array.isArray(options.permissions)+ ? options.permissions+ : [options.permissions];+ const scopes =+ permissionList.length === 0+ ? { scopes: [] }+ : documentedScopes(permissionList, options.operator || 'OR', options.apiKeyScope);++ return documentScopes(async (c: Context, next: Next) => {// Development mode bypass if enabledif (options.skipInDev && process.env.NODE_ENV === 'development') {log('Development mode: skipping permission check');@@ -183,7 +247,7 @@ const requirePermission = (options: PermissionCheckOptions) => {message: 'Internal error during permission check',});}- };+ }, scopes);};/**@@ -251,17 +315,20 @@ export const requireAnyPermissionWithApiKeyScope = (* restricted keys must hold the given scope.*/export const requireApiKeyScope = (scope: ApiKeyScope) => {- return async (c: Context, next: Next) => {- if (c.get('authType') !== 'apikey') return next();-- const scopes = c.get('apiKeyScopes') as string[] | null | undefined;- if (!isFullAccessApiKey(scopes) && !hasApiKeyScope(scopes, scope)) {- throw new HTTPException(403, {- cause: { missingScopes: [scope] },- message: `insufficient_scope: this API key is missing required scope '${scope}'`,- });- }+ return documentScopes(+ async (c: Context, next: Next) => {+ if (c.get('authType') !== 'apikey') return next();++ const scopes = c.get('apiKeyScopes') as string[] | null | undefined;+ if (!isFullAccessApiKey(scopes) && !hasApiKeyScope(scopes, scope)) {+ throw new HTTPException(403, {+ cause: { missingScopes: [scope] },+ message: `insufficient_scope: this API key is missing required scope '${scope}'`,+ });+ }- return next();- };+ return next();+ },+ { scopes: [scope] },+ );};diff --git a/packages/openapi/src/routes/agents.route.ts b/packages/openapi/src/routes/agents.route.tsindex ac633e4df64..26cc50b02d2 100644--- a/packages/openapi/src/routes/agents.route.ts+++ b/packages/openapi/src/routes/agents.route.ts@@ -2,6 +2,12 @@ import { Hono } from 'hono';import { getAllScopePermissions, getScopePermissions } from '@/utils/rbac';+import {+ AGENT_EXAMPLE,+ AGENT_LIST_EXAMPLE,+ CREATE_AGENT_EXAMPLE,+ example,+} from '../common/examples';import { routeDoc } from '../common/openapi';import { zValidator } from '../common/validator';import { AgentController } from '../controllers/agent.controller';@@ -41,7 +47,12 @@ const AgentRoutes = new Hono();*/AgentRoutes.get('/',- routeDoc({ data: AgentListSchema, summary: 'List agents', tags: ['agents'] }),+ routeDoc({+ data: AgentListSchema,+ responseExample: AGENT_LIST_EXAMPLE,+ summary: 'List agents',+ tags: ['agents'],+ }),requireAuth,requireAnyPermission(getScopePermissions('AGENT_READ', ['ALL', 'OWNER']),@@ -61,7 +72,13 @@ AgentRoutes.get(*/AgentRoutes.post('/',- routeDoc({ data: AgentSchema, summary: 'Create an agent', tags: ['agents'] }),+ routeDoc({+ data: AgentSchema,+ requestExample: example(CreateAgentRequestSchema, CREATE_AGENT_EXAMPLE),+ responseExample: AGENT_EXAMPLE,+ summary: 'Create an agent',+ tags: ['agents'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('AGENT_CREATE'),@@ -188,7 +205,6 @@ AgentRoutes.get(routeDoc({data: AgentAccountListSchema,errors: [404],- operationId: 'listAgentAccounts',summary: "List an agent's accounts",tags: ['agents'],}),@@ -205,7 +221,7 @@ AgentRoutes.post(routeDoc({data: AgentAccountSchema,errors: [404, 409],- operationId: 'createAgentAccount',+ operationId: 'agents.createAccount',status: 201,summary: 'Mount or provision an agent account',tags: ['agents'],@@ -223,7 +239,7 @@ AgentRoutes.get(routeDoc({data: AgentAccountSchema,errors: [404],- operationId: 'getAgentAccount',+ operationId: 'agents.getAccount',summary: 'Get an agent account',tags: ['agents'],}),@@ -239,7 +255,7 @@ AgentRoutes.patch(routeDoc({data: AgentAccountSchema,errors: [404, 409],- operationId: 'updateAgentAccount',+ operationId: 'agents.updateAccount',summary: 'Update an agent account',tags: ['agents'],}),@@ -263,7 +279,7 @@ AgentRoutes.put(description:'Write-only: the response carries the non-secret hint and `hasCredential`, never the secret.',errors: [404],- operationId: 'setAgentAccountCredential',+ operationId: 'agents.updateAccountCredential',summary: 'Write an agent account credential',tags: ['agents'],}),@@ -283,7 +299,7 @@ AgentRoutes.delete(description:'Releases the account and marks it revoked. The row is kept for audit, so the response is the revoked account.',errors: [404],- operationId: 'revokeAgentAccount',+ operationId: 'agents.deleteAccount',summary: 'Revoke an agent account',tags: ['agents'],}),diff --git a/packages/openapi/src/routes/chat-groups.route.ts b/packages/openapi/src/routes/chat-groups.route.tsindex 33e2279cd4e..8ef8de28233 100644--- a/packages/openapi/src/routes/chat-groups.route.ts+++ b/packages/openapi/src/routes/chat-groups.route.ts@@ -109,6 +109,7 @@ ChatGroupRoutes.delete(ChatGroupRoutes.post('/:id/members',routeDoc({+ operationId: 'chatGroups.addMembers',data: ChatGroupSchema,errors: [404],summary: 'Add members to a chat group',@@ -124,6 +125,7 @@ ChatGroupRoutes.post(ChatGroupRoutes.delete('/:id/members',routeDoc({+ operationId: 'chatGroups.removeMembers',data: ChatGroupSchema,description: 'Detaches the agents and answers with the updated group.',errors: [404, 409],diff --git a/packages/openapi/src/routes/files.route.ts b/packages/openapi/src/routes/files.route.tsindex 4512992b8d5..2f739951aca 100644--- a/packages/openapi/src/routes/files.route.ts+++ b/packages/openapi/src/routes/files.route.ts@@ -2,6 +2,12 @@ import { Hono } from 'hono';import { getAllScopePermissions } from '@/utils/rbac';+import {+ example,+ FILE_LIST_EXAMPLE,+ QUERY_FILES_EXAMPLE,+ QUERY_FILES_RESULT_EXAMPLE,+} from '../common/examples';import { routeDoc } from '../common/openapi';import { zValidator } from '../common/validator';import { FileController } from '../controllers/file.controller';@@ -44,7 +50,12 @@ const app = new Hono();*/app.get('/',- routeDoc({ data: FileListResponseSchema, summary: 'List files', tags: ['files'] }),+ routeDoc({+ data: FileListResponseSchema,+ responseExample: FILE_LIST_EXAMPLE,+ summary: 'List files',+ tags: ['files'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('FILE_READ'),@@ -240,7 +251,12 @@ app.delete(*/app.post('/:id/parses',- routeDoc({ data: FileParseResultSchema, summary: 'Parse file content', tags: ['files'] }),+ routeDoc({+ operationId: 'files.parse',+ data: FileParseResultSchema,+ summary: 'Parse file content',+ tags: ['files'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('FILE_UPDATE'),@@ -333,6 +349,7 @@ app.get(app.post('/batches',routeDoc({+ operationId: 'files.uploadBatch',data: BatchFileUploadResponseSchema,errors: [400],requestBody: {@@ -390,7 +407,10 @@ app.post(app.post('/queries',routeDoc({+ operationId: 'files.query',data: BatchGetFilesResponseSchema,+ requestExample: example(BatchGetFilesRequestSchema, QUERY_FILES_EXAMPLE),+ responseExample: QUERY_FILES_RESULT_EXAMPLE,summary: 'Get several files',tags: ['files'],}),diff --git a/packages/openapi/src/routes/goals.route.ts b/packages/openapi/src/routes/goals.route.tsindex c689ed47044..0ce5315998e 100644--- a/packages/openapi/src/routes/goals.route.ts+++ b/packages/openapi/src/routes/goals.route.ts@@ -91,7 +91,6 @@ GoalRoutes.get(routeDoc({data: GoalSupervisionSchema,errors: [404],- operationId: 'getGoalSupervision',summary: 'Get goal supervision state',tags: ['goals'],}),@@ -139,7 +138,7 @@ GoalRoutes.post(routeDoc({data: GoalAdvanceResultSchema,errors: [404],- operationId: 'advanceGoal',+ operationId: 'goals.advance',summary: 'Run the goal coordinator now',tags: ['goals'],}),@@ -156,7 +155,7 @@ GoalRoutes.post(data: GoalSchema,// 409: a draft never started; 412: an archived goal stays put.errors: [404, 409, 412],- operationId: 'pauseGoal',+ operationId: 'goals.pause',summary: 'Pause a goal',tags: ['goals'],}),@@ -173,7 +172,7 @@ GoalRoutes.post(data: GoalSchema,// 409: a draft, or the goal changed while resuming; 412: an archived goal.errors: [404, 409, 412],- operationId: 'resumeGoal',+ operationId: 'goals.resume',summary: 'Resume a paused goal',tags: ['goals'],}),@@ -190,7 +189,7 @@ GoalRoutes.post(data: GoalRestartResultSchema,// 412: an archived goal is not restarted.errors: [404, 412],- operationId: 'restartGoal',+ operationId: 'goals.restart',summary: 'Restart every unfinished task of a goal',tags: ['goals'],}),diff --git a/packages/openapi/src/routes/im.route.ts b/packages/openapi/src/routes/im.route.tsindex 083cdafc99f..bdcde29a6d2 100644--- a/packages/openapi/src/routes/im.route.ts+++ b/packages/openapi/src/routes/im.route.ts@@ -43,7 +43,7 @@ ImRoutes.post(routeDoc({data: ImSendResultSchema,errors: [404, 409],- operationId: 'sendImMessage',+ operationId: 'im.send',summary: 'Send a message to an agent; the reply arrives asynchronously via sync',tags: ['im'],}),@@ -62,7 +62,7 @@ ImRoutes.get(routeDoc({data: ImSyncResultSchema,errors: [404],- operationId: 'syncImTopic',+ operationId: 'im.sync',summary: 'Long-poll a conversation for whole new messages, typing and read receipts',tags: ['im'],}),@@ -80,7 +80,7 @@ ImRoutes.post(routeDoc({data: ImReadResultSchema,errors: [404],- operationId: 'markImTopicRead',+ operationId: 'im.markRead',summary: "Mark the agent's messages read up to a message",tags: ['im'],}),diff --git a/packages/openapi/src/routes/knowledge-bases.route.ts b/packages/openapi/src/routes/knowledge-bases.route.tsindex a77da83862e..b1f9ae39e47 100644--- a/packages/openapi/src/routes/knowledge-bases.route.ts+++ b/packages/openapi/src/routes/knowledge-bases.route.ts@@ -218,6 +218,7 @@ app.get(app.post('/:id/files/batch',routeDoc({+ operationId: 'knowledgeBases.addFiles',data: KnowledgeBaseFileOperationResultSchema,errors: [404],summary: 'Add files to a knowledge base',@@ -243,6 +244,7 @@ app.post(app.delete('/:id/files/batch',routeDoc({+ operationId: 'knowledgeBases.removeFiles',data: KnowledgeBaseFileOperationResultSchema,description:'Detaches the files from the knowledge base without deleting them, and reports per file which ones were detached.',@@ -270,6 +272,7 @@ app.delete(app.post('/:id/files/move',routeDoc({+ operationId: 'knowledgeBases.moveFiles',data: KnowledgeBaseFileOperationResultSchema,errors: [404],summary: 'Move files to another knowledge base',diff --git a/packages/openapi/src/routes/memories.route.ts b/packages/openapi/src/routes/memories.route.tsindex a81c3e968a4..bdecbbd5b3f 100644--- a/packages/openapi/src/routes/memories.route.ts+++ b/packages/openapi/src/routes/memories.route.ts@@ -49,7 +49,6 @@ MemoryRoutes.get(routeDoc({data: MemoryPersonaSchema.nullable(),description: '`data` is null until a persona has been written.',- operationId: 'getMemoryPersona',summary: 'Get the current persona document',tags: ['memories'],}),@@ -63,7 +62,6 @@ MemoryRoutes.get('/persona/versions',routeDoc({data: z.array(MemoryPersonaVersionSchema),- operationId: 'listMemoryPersonaVersions',summary: 'List persona document versions',tags: ['memories'],}),@@ -79,7 +77,7 @@ MemoryRoutes.delete(data: DeletedResourcesSchema,description:'Removes every memory, the persona and the per-topic extraction status; `count` is the number of memories removed.',- operationId: 'deleteAllMemories',+ operationId: 'memories.deleteAll',summary: 'Delete all memory entries',tags: ['memories'],}),@@ -94,7 +92,7 @@ MemoryRoutes.delete(routeDoc({data: DeletedResourceSchema,errors: [404],- operationId: 'deleteMemoryEntry',+ operationId: 'memories.deleteEntry',summary: 'Delete a memory entry',tags: ['memories'],}),@@ -111,7 +109,7 @@ MemoryRoutes.get(data: MemoryCategoryEntriesSchema,description:'Every identity, or the newest entries of the other categories; the array shape follows `category`.',- operationId: 'listMemoryCategory',+ operationId: 'memories.listCategory',summary: 'List the entries of a memory category',tags: ['memories'],}),diff --git a/packages/openapi/src/routes/messages.route.ts b/packages/openapi/src/routes/messages.route.tsindex 0ca031c611d..14fed475c04 100644--- a/packages/openapi/src/routes/messages.route.ts+++ b/packages/openapi/src/routes/messages.route.ts@@ -2,6 +2,12 @@ import { Hono } from 'hono';import { getAllScopePermissions } from '@/utils/rbac';+import {+ CREATE_MESSAGE_EXAMPLE,+ example,+ MESSAGE_EXAMPLE,+ MESSAGE_LIST_EXAMPLE,+} from '../common/examples';import { routeDoc } from '../common/openapi';import { zValidator } from '../common/validator';import { MessageController } from '../controllers';@@ -42,7 +48,12 @@ MessageRoutes.get(// GET /api/v1/messages - Get message list (supports various filters and search)MessageRoutes.get('/',- routeDoc({ data: MessageListSchema, summary: 'List messages', tags: ['messages'] }),+ routeDoc({+ data: MessageListSchema,+ responseExample: MESSAGE_LIST_EXAMPLE,+ summary: 'List messages',+ tags: ['messages'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('MESSAGE_READ'),@@ -74,7 +85,13 @@ MessageRoutes.get(// POST /api/v1/messages - Create a new message (requires message write permission)MessageRoutes.post('/',- routeDoc({ data: MessageSchema, summary: 'Create a message', tags: ['messages'] }),+ routeDoc({+ data: MessageSchema,+ requestExample: example(MessagesCreateRequestSchema, CREATE_MESSAGE_EXAMPLE),+ responseExample: MESSAGE_EXAMPLE,+ summary: 'Create a message',+ tags: ['messages'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('MESSAGE_CREATE'),@@ -93,6 +110,7 @@ MessageRoutes.post(MessageRoutes.post('/replies',routeDoc({+ operationId: 'messages.createReply',data: MessageSchema.nullable(),description:'Stores the user message, then generates and stores the assistant reply. Answers with the reply; `null` only if it could not be read back.',@@ -137,6 +155,7 @@ MessageRoutes.delete(MessageRoutes.delete('/',routeDoc({+ operationId: 'messages.deleteMany',data: DeletedResourcesSchema,description:'Best effort: ids the caller may not delete or that no longer exist are skipped. `count` is the number of messages actually removed.',diff --git a/packages/openapi/src/routes/notifications.route.ts b/packages/openapi/src/routes/notifications.route.tsindex f26cdcd56de..a75f74726df 100644--- a/packages/openapi/src/routes/notifications.route.ts+++ b/packages/openapi/src/routes/notifications.route.ts@@ -67,7 +67,6 @@ NotificationRoutes.get('/settings',routeDoc({data: NotificationSettingsResponseSchema,- operationId: 'getNotificationSettings',summary: 'Get notification delivery settings',tags: ['notifications'],}),@@ -83,7 +82,6 @@ NotificationRoutes.patch(routeDoc({data: NotificationSettingsResponseSchema,description: 'Answers with the merged settings now stored for the scope.',- operationId: 'updateNotificationSettings',summary: 'Update notification delivery settings',tags: ['notifications'],}),@@ -99,7 +97,6 @@ NotificationRoutes.get('/unread-count',routeDoc({data: NotificationUnreadCountSchema,- operationId: 'getUnreadNotificationCount',summary: 'Get the unread notification count',tags: ['notifications'],}),@@ -112,7 +109,7 @@ NotificationRoutes.get('/counts',routeDoc({data: z.array(NotificationCategoryCountSchema),- operationId: 'getNotificationCounts',+ operationId: 'notifications.getCounts',summary: 'Get per-category notification counts',tags: ['notifications'],}),@@ -127,7 +124,7 @@ NotificationRoutes.post(data: NotificationAcknowledgementSchema,// Nothing to report back: the body is the success envelope without `data`.envelope: false,- operationId: 'markNotificationsRead',+ operationId: 'notifications.markRead',summary: 'Mark notifications as read',tags: ['notifications'],}),@@ -144,7 +141,7 @@ NotificationRoutes.post(data: NotificationAcknowledgementSchema,// Nothing to report back: the body is the success envelope without `data`.envelope: false,- operationId: 'markAllNotificationsRead',+ operationId: 'notifications.markAllRead',summary: 'Mark every notification as read',tags: ['notifications'],}),@@ -160,7 +157,7 @@ NotificationRoutes.post(data: NotificationAcknowledgementSchema,// Nothing to report back: the body is the success envelope without `data`.envelope: false,- operationId: 'archiveAllNotifications',+ operationId: 'notifications.archiveAll',summary: 'Archive every notification',tags: ['notifications'],}),@@ -176,7 +173,7 @@ NotificationRoutes.post(data: NotificationAcknowledgementSchema,// Nothing to report back: the body is the success envelope without `data`.envelope: false,- operationId: 'archiveNotification',+ operationId: 'notifications.archive',summary: 'Archive a notification',tags: ['notifications'],}),diff --git a/packages/openapi/src/routes/push-tokens.route.ts b/packages/openapi/src/routes/push-tokens.route.tsindex d52e2fc20e5..3c931d47eeb 100644--- a/packages/openapi/src/routes/push-tokens.route.ts+++ b/packages/openapi/src/routes/push-tokens.route.ts@@ -32,7 +32,7 @@ PushTokenRoutes.put('/:deviceId',routeDoc({data: PushTokenRegistrationSchema,- operationId: 'registerPushToken',+ operationId: 'pushTokens.register',summary: "Register or rotate this device's push token",tags: ['push-tokens'],}),@@ -50,7 +50,7 @@ PushTokenRoutes.delete(data: DeletedResourceSchema,description:'`id` is the device id. Idempotent: a stale `expoToken` removes nothing and leaves the rotated registration in place.',- operationId: 'unregisterPushToken',+ operationId: 'pushTokens.unregister',summary: 'Stop pushing to this device (sign-out)',tags: ['push-tokens'],}),diff --git a/packages/openapi/src/routes/responses.route.ts b/packages/openapi/src/routes/responses.route.tsindex 5b0d52ad69d..3547e74f927 100644--- a/packages/openapi/src/routes/responses.route.ts+++ b/packages/openapi/src/routes/responses.route.ts@@ -1,5 +1,6 @@import { Hono } from 'hono';+import { CREATE_RESPONSE_EXAMPLE, example, RESPONSE_EXAMPLE } from '../common/examples';import { routeDoc } from '../common/openapi';import { zValidator } from '../common/validator';import { ResponsesController } from '../controllers/responses.controller';@@ -7,6 +8,7 @@ import { requireAuth } from '../middleware/auth';import { OpenResponsesHttpErrorSchema } from '../middleware/open-responses-errors';import { requireApiKeyScope } from '../middleware/permission-check';import { CreateResponseRequestSchema, ResponseObjectSchema } from '../types/responses.type';+import { ResponseStreamEventSchema } from '../types/responses-stream.type';const ResponsesRoutes = new Hono();@@ -24,14 +26,16 @@ ResponsesRoutes.post(routeDoc({data: ResponseObjectSchema,description:- 'OpenResponses-compatible: `model` takes an agent id. Without `stream` the response object is the whole JSON body (no success envelope); a run that fails still answers 200 with `status: "failed"` and `error`. With `stream: true` the same object arrives through `response.*` server-sent events.',+ 'OpenResponses-compatible: `model` takes an agent id. Without `stream` the response object is the whole JSON body (no success envelope); a run that fails still answers 200 with `status: "failed"` and `error`. With `stream: true` the body is `text/event-stream`: each message is `event: <type>` plus `data: <ResponseStreamEvent JSON>`, and the final `response.completed` / `response.failed` / `response.incomplete` event carries the same response object.',// The handler answers `c.json(response)` directly, not `this.success(...)`.envelope: false,// OpenResponses clients parse `error.message`/`error.type`, so HTTP errors// keep the protocol's shape (plus `requestId`) instead of `ApiError`.errorSchema: OpenResponsesHttpErrorSchema,errors: [400],- streamContent: { 'text/event-stream': { schema: { type: 'string' } } },+ streamContent: { 'text/event-stream': { schema: ResponseStreamEventSchema } },+ requestExample: example(CreateResponseRequestSchema, CREATE_RESPONSE_EXAMPLE),+ responseExample: RESPONSE_EXAMPLE,summary: 'Create a model response',tags: ['responses'],}),diff --git a/packages/openapi/src/routes/signals.route.ts b/packages/openapi/src/routes/signals.route.tsindex 9d1fce4c9d3..030e6359731 100644--- a/packages/openapi/src/routes/signals.route.ts+++ b/packages/openapi/src/routes/signals.route.ts@@ -50,7 +50,7 @@ AgentSignalRoutes.post(data: AgentSignalEmissionSchema,// 404: the agent named in the payload is not usable by the caller.errors: [404],- operationId: 'emitSourceEvent',+ operationId: 'signals.emit',status: 202,summary: 'Emit an agent signal source event',tags: ['signals'],@@ -70,7 +70,7 @@ AgentSignalRoutes.post(// 404: the target agent is not usable by the caller; 429: the hourly// manual-trigger budget is spent.errors: [404, 429],- operationId: 'triggerSourceEvent',+ operationId: 'signals.trigger',status: 202,summary: 'Trigger a synthesized agent signal source event',tags: ['signals'],@@ -87,7 +87,6 @@ AgentSignalRoutes.get('/receipts',routeDoc({data: AgentSignalReceiptListSchema,- operationId: 'listSignalReceipts',summary: 'List agent signal receipts for a topic',tags: ['signals'],}),diff --git a/packages/openapi/src/routes/tasks.route.ts b/packages/openapi/src/routes/tasks.route.tsindex 3dc44393ee0..b0ca6c94f48 100644--- a/packages/openapi/src/routes/tasks.route.ts+++ b/packages/openapi/src/routes/tasks.route.ts@@ -120,6 +120,7 @@ TaskRoutes.patch(TaskRoutes.post('/:id/runs',routeDoc({+ operationId: 'tasks.run',data: TaskRunStartedSchema,description:'Starts the run and answers once the agent operation is accepted; follow it with `operationId`.',diff --git a/packages/openapi/src/routes/topics.route.ts b/packages/openapi/src/routes/topics.route.tsindex fd1640ed6b7..8fd68309c11 100644--- a/packages/openapi/src/routes/topics.route.ts+++ b/packages/openapi/src/routes/topics.route.ts@@ -3,6 +3,12 @@ import { z } from 'zod';import { getAllScopePermissions } from '@/utils/rbac';+import {+ CREATE_TOPIC_EXAMPLE,+ example,+ TOPIC_EXAMPLE,+ TOPIC_LIST_EXAMPLE,+} from '../common/examples';import { routeDoc } from '../common/openapi';import { zValidator } from '../common/validator';import { TopicController } from '../controllers';@@ -29,7 +35,12 @@ const TopicsRoutes = new Hono();// GET /api/v1/topics - Get topic list (supports pagination and agent/group filtering)TopicsRoutes.get('/',- routeDoc({ data: TopicListSchema, summary: 'List topics', tags: ['topics'] }),+ routeDoc({+ data: TopicListSchema,+ responseExample: TOPIC_LIST_EXAMPLE,+ summary: 'List topics',+ tags: ['topics'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('TOPIC_READ'),@@ -45,7 +56,13 @@ TopicsRoutes.get(// POST /api/v1/topics - Create a new topicTopicsRoutes.post('/',- routeDoc({ data: TopicSchema, summary: 'Create a topic', tags: ['topics'] }),+ routeDoc({+ data: TopicSchema,+ requestExample: example(TopicCreateRequestSchema, CREATE_TOPIC_EXAMPLE),+ responseExample: TOPIC_EXAMPLE,+ summary: 'Create a topic',+ tags: ['topics'],+ }),requireAuth,requireAnyPermission(getAllScopePermissions('TOPIC_CREATE'),diff --git a/packages/openapi/src/routes/users.route.ts b/packages/openapi/src/routes/users.route.tsindex aa176390729..0d1fd870148 100644--- a/packages/openapi/src/routes/users.route.ts+++ b/packages/openapi/src/routes/users.route.ts@@ -31,6 +31,7 @@ const UserRoutes = new Hono();UserRoutes.get('/me',routeDoc({+ operationId: 'users.me',data: CurrentUserSchema,description:'Reachable by every authenticated caller. An API key without `user:read` receives only `{ id }`; `messageCount` is included only with `?includeCount=1` and `chat:read`.',diff --git a/packages/openapi/src/spec.test.ts b/packages/openapi/src/spec.test.tsindex 8910c34f0b1..98096ad115f 100644--- a/packages/openapi/src/spec.test.ts+++ b/packages/openapi/src/spec.test.ts@@ -3,7 +3,12 @@ import { describeRoute } from 'hono-openapi';import { beforeAll, describe, expect, it } from 'vitest';import { z } from 'zod';+import { isValidApiKeyScope } from '@/const/apiKeyScope';++import { example } from './common/examples';import { routeDoc } from './common/openapi';+import { OPERATION_ID_PATTERN, operationResource } from './common/operation-id';+import { zValidator } from './common/validator';import { buildSpecDocument, collectSpecDocument } from './spec';type Schema = Record<string, unknown>;@@ -276,6 +281,124 @@ describe('generated OpenAPI document', () => {expect.arrayContaining(['error', 'requestId']),);});++ it('declares no 409 on the health check', () => {+ const responses = (spec.paths?.['/api/v1/health'] as any).get.responses;+ expect(Object.keys(responses)).toEqual(['200']);+ });++ it('names every operation <resource>.<method> after its own path, uniquely', () => {+ const ids = operations().map(({ key, op }) => ({ id: op.operationId as string, key }));+ expect(ids.filter(({ id }) => !OPERATION_ID_PATTERN.test(id))).toEqual([]);+ expect(+ ids.filter(({ id, key }) => id.split('.')[0] !== operationResource(key.split(' ')[1])),+ ).toEqual([]);+ expect(new Set(ids.map(({ id }) => id)).size).toBe(ids.length);+ // Spot-check the names the SDK has always exposed.+ const byKey = Object.fromEntries(ids.map(({ id, key }) => [key, id]));+ expect(byKey).toMatchObject({+ 'DELETE /api/v1/memories/{category}/{id}': 'memories.deleteEntry',+ 'GET /api/v1/agents': 'agents.list',+ 'GET /api/v1/agents/{id}': 'agents.get',+ 'GET /api/v1/files/{id}/chunks': 'files.listChunks',+ 'GET /api/v1/health': 'health.check',+ 'GET /api/v1/users/me': 'users.me',+ 'POST /api/v1/files/batches': 'files.uploadBatch',+ 'POST /api/v1/tasks/{id}/runs': 'tasks.run',+ });+ });++ it('gives every operation a summary', () => {+ expect(+ operations()+ .filter(({ op }) => !op.summary?.trim())+ .map(({ key }) => key),+ ).toEqual([]);+ });++ it('declares the API key scopes of every authenticated operation', () => {+ const authenticated = operations().filter(({ op }) => !Array.isArray(op.security));+ expect(authenticated.length).toBeGreaterThan(100);+ const invalid = authenticated.filter(+ ({ op }) =>+ !Array.isArray(op['x-required-scopes']) ||+ !op['x-required-scopes'].every((scope: string) => isValidApiKeyScope(scope)) ||+ !op.description?.includes('**API key scopes:**'),+ );+ expect(invalid.map(({ key }) => key)).toEqual([]);++ const scopesOf = (key: string) => operations().find((entry) => entry.key === key)!.op;+ expect(scopesOf('GET /api/v1/agents')['x-required-scopes']).toEqual(['agent:read']);+ expect(scopesOf('POST /api/v1/agents')['x-required-scopes']).toEqual(['agent:write']);+ // Stacked gates collapse into one all-of list.+ expect(scopesOf('POST /api/v1/responses')['x-required-scopes']).toEqual([+ 'agent:write',+ 'chat:write',+ 'model:invoke',+ ]);+ // Reachable by every key on purpose (`lh login` resolves its identity here).+ expect(scopesOf('GET /api/v1/users/me')['x-required-scopes']).toEqual([]);+ expect(scopesOf('GET /api/v1/health')['x-required-scopes']).toBeUndefined();+ });++ it('documents X-Workspace-Id on every authenticated operation', () => {+ const missing = operations()+ .filter(({ op }) => !Array.isArray(op.security))+ .filter(+ ({ op }) =>+ !(op.parameters ?? []).some(+ (parameter: Schema) => parameter.$ref === '#/components/parameters/WorkspaceId',+ ),+ );+ expect(missing.map(({ key }) => key)).toEqual([]);+ const parameter = (spec.components?.parameters as Record<string, any>).WorkspaceId;+ expect(parameter).toMatchObject({ in: 'header', name: 'X-Workspace-Id', required: false });+ expect(parameter.description).toContain('workspace_mismatch');+ });++ it('publishes request and response examples for the core resources', () => {+ const media = (path: string, method: string) => {+ const op = (spec.paths as Record<string, any>)[path][method];+ return {+ request: op.requestBody?.content?.['application/json']?.example,+ response: op.responses['200'].content['application/json'].example,+ };+ };+ for (const path of ['/api/v1/agents', '/api/v1/topics', '/api/v1/messages', '/api/v1/files'])+ expect(media(path, 'get').response, path).toMatchObject({ success: true });+ for (const path of [+ '/api/v1/agents',+ '/api/v1/topics',+ '/api/v1/messages',+ '/api/v1/files/queries',+ ]) {+ const { request, response } = media(path, 'post');+ expect(request, path).toBeDefined();+ expect(response, path).toMatchObject({ success: true });+ }+ expect(media('/api/v1/responses', 'post').request).toMatchObject({ model: expect.any(String) });+ expect(media('/api/v1/responses', 'post').response).toMatchObject({ object: 'response' });+ });++ it('types the /responses event stream as the OpenResponses event union', () => {+ const op = (spec.paths as Record<string, any>)['/api/v1/responses'].post;+ expect(op.responses['200'].content['text/event-stream'].schema).toEqual({+ $ref: '#/components/schemas/ResponseStreamEvent',+ });+ const union = spec.components?.schemas?.ResponseStreamEvent as { oneOf: Schema[] };+ const types = union.oneOf.map(+ (ref) => (resolveRef(spec, ref).properties as Record<string, Schema>).type.const,+ );+ expect(types).toEqual(+ expect.arrayContaining([+ 'response.created',+ 'response.output_text.delta',+ 'response.completed',+ 'response.failed',+ 'response.function_call_arguments.done',+ ]),+ );+ });});describe('route-declared responses', () => {@@ -312,6 +435,65 @@ describe('route-declared responses', () => {});});+ it('keeps a declared operationId and derives the rest from the path', async () => {+ const app = buildApp();+ app.post(+ '/api/v1/things/:id/archive',+ routeDoc({+ data: z.object({ id: z.string() }),+ operationId: 'things.archive',+ requestExample: example(z.object({ reason: z.string() }), { reason: 'done' }),+ summary: 'Archive a thing',+ }),+ zValidator('json', z.object({ reason: z.string() })),+ (c) => c.json({}),+ );+ const spec = await buildSpecDocument(app);+ const paths = spec.paths as Record<string, any>;++ expect(paths['/api/v1/things'].post.operationId).toBe('things.create');+ expect(paths['/api/v1/things/{id}/runs'].post.operationId).toBe('things.createRuns');+ const archive = paths['/api/v1/things/{id}/archive'].post;+ expect(archive.operationId).toBe('things.archive');+ expect(archive.requestBody.content['application/json'].example).toEqual({ reason: 'done' });+ expect(archive['x-request-example']).toBeUndefined();+ });++ it('refuses two operations with the same operationId', async () => {+ const app = buildApp();+ app.get(+ '/api/v1/things/:id',+ routeDoc({ data: z.object({}), operationId: 'things.create', summary: 'Clash' }),+ (c) => c.json({}),+ );+ await expect(buildSpecDocument(app)).rejects.toThrow('already used');+ });++ it('fails the spec build, not the route declaration, on an example that does not match', async () => {+ const app = buildApp();+ // Declaring the route must not throw: a doc slip cannot stop the server from booting.+ const declare = () =>+ app.post(+ '/api/v1/things/:id/bad',+ routeDoc({+ data: z.object({ id: z.string() }),+ requestExample: example(z.object({ reason: z.string() }), { reason: 1 } as never),+ responseExample: { id: 1 },+ summary: 'Bad examples',+ }),+ zValidator('json', z.object({ reason: z.string() })),+ (c) => c.json({}),+ );+ expect(declare).not.toThrow();++ const { invalid } = await collectSpecDocument(app);+ expect(invalid).toEqual([+ expect.stringContaining('POST /api/v1/things/{id}/bad: requestExample does not match'),+ expect.stringContaining('POST /api/v1/things/{id}/bad: responseExample does not match'),+ ]);+ await expect(buildSpecDocument(app)).rejects.toThrow('Invalid route documentation');+ });+it('refuses to emit a route without a declared success response', async () => {const app = buildApp();app.get('/api/v1/vague', describeRoute({ summary: 'Vague' }), (c) => c.json({}));diff --git a/packages/openapi/src/spec.ts b/packages/openapi/src/spec.tsindex 9f1d3297a39..4f96b4c71d2 100644--- a/packages/openapi/src/spec.ts+++ b/packages/openapi/src/spec.ts@@ -3,11 +3,19 @@ import { generateSpecs } from 'hono-openapi';import { z } from 'zod';import { API_ERROR_CODES, ApiErrorCodeSchema } from './common/errors';-import { ApiErrorSchema, errorResponse } from './common/openapi';+import {+ ApiErrorSchema,+ errorResponse,+ REQUEST_EXAMPLE_EXTENSION,+ SPEC_ERROR_EXTENSION,+} from './common/openapi';+import { OPERATION_ID_PATTERN, resolveOperationId } from './common/operation-id';import { DEFAULT_PAGE_LIMIT, MAX_PAGE_LIMIT } from './helpers/pagination';import { IDEMPOTENCY_KEY_HEADER, IDEMPOTENT_REPLAYED_HEADER } from './middleware/idempotency';+import { REQUIRED_SCOPES_EXTENSION } from './middleware/permission-check';import { RATE_LIMIT_HEADERS } from './middleware/rate-limit';import { REQUEST_ID_HEADER } from './middleware/request-id';+import { OPENAPI_WORKSPACE_HEADER } from './middleware/workspace';const HTTP_METHODS = new Set(['DELETE', 'GET', 'PATCH', 'POST', 'PUT']);@@ -28,10 +36,16 @@ interface ResponseObject {}interface OperationObject {+ description?: string;operationId?: string;parameters?: ParameterObject[];+ [REQUEST_EXAMPLE_EXTENSION]?: unknown;+ requestBody?: { content?: Record<string, { example?: unknown }> };+ [REQUIRED_SCOPES_EXTENSION]?: string[];responses?: Record<string, ResponseObject>;security?: unknown[];+ [SPEC_ERROR_EXTENSION]?: string[];+ summary?: string;tags?: string[];}@@ -102,6 +116,21 @@ const IDEMPOTENCY_KEY_PARAMETER = {schema: { maxLength: 255, minLength: 1, type: 'string' as const },};+const WORKSPACE_ID_PARAMETER = {+ description: `Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 \`workspace_mismatch\`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 \`workspace_mismatch\` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 \`workspace_mismatch\`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.`,+ in: 'header',+ name: OPENAPI_WORKSPACE_HEADER,+ required: false,+ schema: { minLength: 1, type: 'string' as const },+};++const formatScopes = (scopes: string[]) =>+ scopes.length === 0+ ? 'any API key (no scope needed)'+ : scopes.includes('*')+ ? 'a full-access API key (`*`)'+ : scopes.map((scope) => `\`${scope}\``).join(' + ');+const API_DESCRIPTION = `LobeHub platform REST API. Generated from \`packages/openapi\` routes — do not edit openapi.yml by hand; run \`bun generate:openapi\` instead.## Errors@@ -120,7 +149,15 @@ Requests authenticated with an API key are limited per key (default 600 per minu## Idempotency-\`POST\` operations accept an \`${IDEMPOTENCY_KEY_HEADER}\` header; see the parameter description.`;+\`POST\` operations accept an \`${IDEMPOTENCY_KEY_HEADER}\` header; see the parameter description.++## Scopes++A restricted API key only reaches operations whose scopes it holds; \`x:write\` implies \`x:read\`. Each operation lists the scopes it needs (all of them) in \`${REQUIRED_SCOPES_EXTENSION}\`; \`*\` means only a full-access key, and an empty list means any key. OIDC tokens and full-access keys are not narrowed by scopes. The caller's own role still applies on top.++## Workspaces++Send \`${OPENAPI_WORKSPACE_HEADER}\` to act inside a workspace; see the parameter description for how it combines with personal and workspace API keys.`;/*** Build the OpenAPI 3.1 document from the live Hono app.@@ -135,21 +172,24 @@ Requests authenticated with an API key are limited per key (default 600 per minu* instead of being documented with a guessed or open-ended shape.*/export const buildSpecDocument = async (app: GenerateSpecsApp) => {- const { spec, undocumented } = await collectSpecDocument(app);+ const { invalid, spec, undocumented } = await collectSpecDocument(app);if (undocumented.length > 0) {throw new Error(`Routes without a declared success response (attach routeDoc() from src/common/openapi.ts):\n${undocumented.map((op) => ` - ${op}`).join('\n')}`,);}+ if (invalid.length > 0) {+ throw new Error(`Invalid route documentation:\n${invalid.map((op) => ` - ${op}`).join('\n')}`);+ }return spec;};/**- * The document plus every operation that lacks a typed success response.- * `buildSpecDocument` refuses to emit a document with any; tests and tooling- * use this to report them.+ * The document plus every operation that lacks a typed success response or+ * carries invalid documentation (`x-spec-error`). `buildSpecDocument` refuses+ * to emit a document with either; tests and tooling use this to report them.*/export const collectSpecDocument = async (app: GenerateSpecsApp) => {const spec = await generateSpecs(app, {@@ -159,7 +199,10 @@ export const collectSpecDocument = async (app: GenerateSpecsApp) => {documentation: {components: {headers: SHARED_HEADERS,- parameters: { IdempotencyKey: IDEMPOTENCY_KEY_PARAMETER },+ parameters: {+ IdempotencyKey: IDEMPOTENCY_KEY_PARAMETER,+ WorkspaceId: WORKSPACE_ID_PARAMETER,+ },schemas: { ApiError: apiErrorJsonSchema, ApiErrorCode: apiErrorCodeJsonSchema },securitySchemes: {bearerAuth: {@@ -181,18 +224,40 @@ export const collectSpecDocument = async (app: GenerateSpecsApp) => {const paths = (spec.paths ?? {}) as Record<string, Record<string, OperationObject>>;const undocumented: string[] = [];+ const invalid: string[] = [];+ const operationIds = new Map<string, string>();for (const [path, item] of Object.entries(paths)) {- // '/api/v1/agent-groups/{id}' -> group 'agent-groups', rest '{id}'- const segments = path.replace(/^\/api\/v1\/?/, '').split('/');- const group = segments[0] || 'root';- const rest = segments.slice(1).join('/');+ // '/api/v1/agent-groups/{id}' -> tag 'agent-groups'+ const group = path.replace(/^\/api\/v1\/?/, '').split('/')[0] || 'root';for (const [method, op] of Object.entries(item)) {if (!HTTP_METHODS.has(method.toUpperCase())) continue;op.tags ??= [group];- op.operationId ??= `${group}.${method}${rest ? `_${rest.replaceAll(/[{}]/g, '').replaceAll('/', '_')}` : ''}`;++ // The operationId doubles as the SDK method (`agents.list`); see common/operation-id.ts.+ const endpoint = `${method.toUpperCase()} ${path}`;+ op.operationId = resolveOperationId(method, path, op.operationId);+ if (!OPERATION_ID_PATTERN.test(op.operationId)) {+ throw new Error(`${endpoint}: operationId "${op.operationId}" is not <resource>.<method>`);+ }+ const clash = operationIds.get(op.operationId);+ if (clash) {+ throw new Error(`${endpoint}: operationId "${op.operationId}" is already used by ${clash}`);+ }+ operationIds.set(op.operationId, endpoint);++ for (const error of op[SPEC_ERROR_EXTENSION] ?? []) invalid.push(`${endpoint}: ${error}`);+ delete op[SPEC_ERROR_EXTENSION];++ const requestExample = op[REQUEST_EXAMPLE_EXTENSION];+ delete op[REQUEST_EXAMPLE_EXTENSION];+ if (requestExample !== undefined) {+ const media = op.requestBody?.content?.['application/json'];+ if (!media) throw new Error(`${endpoint}: requestExample needs a JSON request body`);+ media.example = requestExample;+ }const responses = op.responses ?? {};const hasTypedSuccess = Object.entries(responses).some(@@ -207,11 +272,32 @@ export const collectSpecDocument = async (app: GenerateSpecsApp) => {for (const parameter of op.parameters ?? []) {if (parameter.schema?.deprecated) parameter.deprecated = true;}- if (authenticated && method === 'post') {+ if (authenticated) {op.parameters = [...(op.parameters ?? []),- { $ref: '#/components/parameters/IdempotencyKey' },+ { $ref: '#/components/parameters/WorkspaceId' },+ ...(method === 'post' ? [{ $ref: '#/components/parameters/IdempotencyKey' }] : []),];++ // Stacked gates all have to pass, so their scopes are one all-of list;+ // `x:write` already implies `x:read`.+ const scopes = new Set(op[REQUIRED_SCOPES_EXTENSION] ?? []);+ op[REQUIRED_SCOPES_EXTENSION] = scopes.has('*')+ ? ['*']+ : [...scopes]+ .filter(+ (scope) =>+ !(scope.endsWith(':read') && scopes.has(scope.replace(/:read$/, ':write'))),+ )+ .sort();+ op.description = [+ op.description,+ `**API key scopes:** ${formatScopes(op[REQUIRED_SCOPES_EXTENSION])}.`,+ ]+ .filter(Boolean)+ .join('\n\n');+ } else {+ delete op[REQUIRED_SCOPES_EXTENSION];}for (const [status, response] of Object.entries(responses)) {@@ -229,5 +315,5 @@ export const collectSpecDocument = async (app: GenerateSpecsApp) => {}}- return { spec, undocumented };+ return { invalid, spec, undocumented };};diff --git a/packages/openapi/src/types/responses-stream.type.ts b/packages/openapi/src/types/responses-stream.type.tsnew file mode 100644index 00000000000..16c2f9df824--- /dev/null+++ b/packages/openapi/src/types/responses-stream.type.ts@@ -0,0 +1,82 @@+import { z } from 'zod';++import {+ ResponseObjectSchema,+ ResponseOutputItemSchema,+ ResponseOutputTextSchema,+} from './responses.type';++// ==================== Streaming events ====================+//+// `POST /responses` with `stream: true` answers `text/event-stream`: each SSE+// message carries `event: <type>` and `data: <JSON event>`. These schemas type+// that JSON after the OpenResponses streaming events, narrowed to what+// `ResponsesService.createResponseStream` emits.++/** One event schema, registered as a named spec component (`ResponseCreatedEvent`). */+const event = <T extends z.ZodRawShape>(id: string, type: string, shape: T) =>+ z+ .object({+ /** Increases by one per event, starting at 0. */+ sequence_number: z.number().int().min(0),+ type: z.literal(type),+ ...shape,+ })+ .strict()+ .meta({ id });++const outputIndex = z.number().int().min(0);+const itemRef = { item_id: z.string(), output_index: outputIndex };+const textPart = { ...itemRef, content_index: z.number().int().min(0) };+const logprobs = ResponseOutputTextSchema.shape.logprobs;++/**+ * Every event `POST /responses` streams. Switch on `type`; the run is over after+ * `response.completed`, `response.failed` or `response.incomplete`.+ */+export const ResponseStreamEventSchema = z+ .discriminatedUnion('type', [+ event('ResponseCreatedEvent', 'response.created', { response: ResponseObjectSchema }),+ event('ResponseInProgressEvent', 'response.in_progress', { response: ResponseObjectSchema }),+ event('ResponseCompletedEvent', 'response.completed', { response: ResponseObjectSchema }),+ event('ResponseFailedEvent', 'response.failed', { response: ResponseObjectSchema }),+ event('ResponseIncompleteEvent', 'response.incomplete', { response: ResponseObjectSchema }),+ event('ResponseOutputItemAddedEvent', 'response.output_item.added', {+ item: ResponseOutputItemSchema,+ output_index: outputIndex,+ }),+ event('ResponseOutputItemDoneEvent', 'response.output_item.done', {+ item: ResponseOutputItemSchema,+ output_index: outputIndex,+ }),+ event('ResponseContentPartAddedEvent', 'response.content_part.added', {+ ...textPart,+ part: ResponseOutputTextSchema,+ }),+ event('ResponseContentPartDoneEvent', 'response.content_part.done', {+ ...textPart,+ part: ResponseOutputTextSchema,+ }),+ event('ResponseOutputTextDeltaEvent', 'response.output_text.delta', {+ ...textPart,+ delta: z.string(),+ logprobs,+ }),+ event('ResponseOutputTextDoneEvent', 'response.output_text.done', {+ ...textPart,+ logprobs,+ text: z.string(),+ }),+ event('ResponseFunctionCallArgumentsDeltaEvent', 'response.function_call_arguments.delta', {+ ...itemRef,+ delta: z.string(),+ }),+ event('ResponseFunctionCallArgumentsDoneEvent', 'response.function_call_arguments.done', {+ ...itemRef,+ /** The complete JSON-encoded arguments. */+ arguments: z.string(),+ }),+ ])+ .meta({ id: 'ResponseStreamEvent' });++export type ResponseStreamEventPayload = z.infer<typeof ResponseStreamEventSchema>;diff --git a/packages/sdk/CHANGELOG.md b/packages/sdk/CHANGELOG.mdnew file mode 100644index 00000000000..655e2fd7dce--- /dev/null+++ b/packages/sdk/CHANGELOG.md@@ -0,0 +1,28 @@+# Changelog++All notable changes to `@lobehub/sdk`. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and versions follow [Semantic Versioning](https://semver.org/).++Each release sorts its entries into `### Breaking`, `### Added`, `### Changed` and `### Fixed`. A `Breaking` entry needs a major bump and an `Added` one at least a minor bump; the release workflow refuses to publish a version whose bump is smaller than its section requires (see "Releasing" in the README).++## \[1.1.0] - 2026-11-17++First semver release. Versions before it were published as `1.0.<UTC timestamp>` on every push.++### Added++- `createLobeHub({ workspaceId })` sends `X-Workspace-Id` on every request; a per-call header still overrides it.+- `timeout` (default 10 minutes, until the response headers) and `maxRetries` (default 2) on the client and on every call. Retries back off exponentially on 408, 429, 5xx and network errors, honor `Retry-After`, and only resend idempotent methods (`GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`) or a `POST` that carries an `Idempotency-Key` (whose in-flight 409 `idempotency_conflict` is waited out too).+- `idempotencyKey` call option, sent as the `Idempotency-Key` header.+- Typed errors: `LobeHubAPIError` (`status`, `code`, `requestId`, `details`, `headers`, `body`), `LobeHubConnectionError` and `LobeHubTimeoutError`.+- `createLobeHub({ throwOnError: true })` makes every method reject with `LobeHubAPIError` and types `data` as always present.+- `lobehub.paginate(method, options)`: an async iterator over every item of a cursor-paginated list (`hasMore` / `nextCursor`).+- `lobehub.responses.stream(body)`: typed OpenResponses server-sent events (`ResponseStreamEvent`) as an `AsyncIterable`, plus `finalResponse()` and `abort()`.+- `lobehub.files.upload(source, options)` for a `File`, `Blob`, `Buffer` / `Uint8Array` / `ArrayBuffer`, or a local file path.+- Generated types for every streaming event (`ResponseCreatedEvent`, `ResponseOutputTextDeltaEvent`, …) and the `X-Workspace-Id` / `Idempotency-Key` headers on each operation.+- Each method's JSDoc lists the API key scopes it needs.++### Changed++- An error answer now comes back as a `LobeHubAPIError` instance instead of the plain JSON body. It still carries the body's fields (`success`, `code`, `message`, `details`, `requestId`, `timestamp`, `error`), so code reading them is unaffected; code that compared the error with `toEqual` against a plain object, or serialized it, sees an `Error` now.+- Idempotent requests are retried twice by default; pass `maxRetries: 0` for the previous behavior.+- Method names now come from the spec's `operationId`s (`agents.list`, `files.uploadBatch`, …) instead of a naming table in the generator config. Every method and type name is unchanged.diff --git a/packages/sdk/README.md b/packages/sdk/README.mdindex 6435b0e4120..3dfa920cac3 100644--- a/packages/sdk/README.md+++ b/packages/sdk/README.md@@ -2,7 +2,7 @@Official TypeScript SDK for the [LobeHub REST API](https://app.lobehub.com/api/v1/docs), generated from the OpenAPI spec in [`packages/openapi`](../openapi) via [@hey-api/openapi-ts](https://heyapi.dev).-Resource-style methods with full typing — every path, parameter, request body, and response comes from `openapi.yml`, and the HTTP runtime is inlined (zero dependencies).+Resource-style methods with full typing — every path, parameter, request body, and response comes from `openapi.yml` — plus a hand-written layer for workspaces, retries, typed errors, pagination, streaming and uploads. The HTTP runtime is inlined (zero dependencies). See [`CHANGELOG.md`](./CHANGELOG.md) for release notes and [`examples/`](./examples) for runnable scripts.## Installation@@ -21,41 +21,161 @@ const lobehub = createLobeHub({});const me = await lobehub.users.me();-const { data, error } = await lobehub.agents.list();+const { data, error } = await lobehub.agents.list({ query: { limit: 20 } });const agent = await lobehub.agents.get({ path: { id: 'agt_...' } });-await lobehub.agentGroups.create({ body: { name: 'My group' } });-await lobehub.files.uploadBatch({ body: { files: [/* … */] } });+await lobehub.topics.create({ body: { agentId: 'agt_...', title: 'Planning' } });```-Resources map to the API's top-level path segments: `health`, `agentGroups`, `agents`, `files`, `knowledgeBases`, `messageTranslations`, `messages`, `models`, `permissions`, `providers`, `responses`, `roles`, `topics`, `users`. Method names follow a fixed rule — `list` / `get` / `create` / `update` / `delete` plus PascalCase sub-segments (`files.listChunks`, `roles.updatePermissions`) — with a few curated names (`files.uploadBatch`, `files.query`, `knowledgeBases.addFiles`, `users.me`).+Every method resolves to `{ data, error, request, response }`: `data` is the response body (the `{ success, data, timestamp }` envelope for most routes) and `error` is set instead when the API answers with an error — see [Errors](#errors).Point the client at another deployment with `baseURL`, and pass any other client option (custom `fetch`, `headers`, …):```ts-const lobehub = createLobeHub({- apiKey: 'sk-lh-...',- baseURL: 'http://localhost:3010',-});+const lobehub = createLobeHub({ apiKey: 'sk-lh-...', baseURL: 'http://localhost:3010' });+```++Raw spec types are exported from `@lobehub/sdk` and `@lobehub/sdk/types`.++## Resources++30 resources, one per top-level path segment of the API. Method names come from each operation's `operationId` (`<resource>.<method>`) in the spec: `list` / `get` / `create` / `update` / `delete` plus PascalCase sub-segments (`files.listChunks`, `roles.updatePermissions`), and a few verbs declared by the route itself (`files.uploadBatch`, `tasks.run`, `notifications.markRead`). Each method's JSDoc names the API key scopes it needs.++| Resource | Methods |+| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| `agentGroups` | `create`, `delete`, `get`, `list`, `update` |+| `agents` | `create`, `createAccount`, `createDuplicate`, `delete`, `deleteAccount`, `get`, `getAccount`, `list`, `listAccounts`, `update`, `updateAccount`, `updateAccountCredential` |+| `apiKeys` | `create`, `delete`, `get`, `list`, `update` |+| `audio` | `createSpeech` |+| `chat` | `create`, `createGenerateReply`, `createTranslate` |+| `chatGroups` | `addMembers`, `create`, `delete`, `get`, `list`, `removeMembers`, `update` |+| `documents` | `create`, `get`, `list`, `update` |+| `eval` | `createBenchmarks`, `createDatasets`, `createDatasetsTestCases`, `createRuns`, `createRunsClaim`, `createRunsResults`, `createRunsRetryErrors`, `deleteBenchmarks`, `deleteDatasets`, `deleteTestCases`, `getBenchmarks`, `getDatasets`, `getRuns`, `getTestCases`, `listBenchmarks`, `listDatasets`, `listDatasetsTestCases`, `listRuns`, `listRunsResults`, `listRunsTopics`, `updateBenchmarks`, `updateDatasets`, `updateRunsStatus`, `updateRunsTopicsResult`, `updateTestCases` |+| `files` | `create`, `createChunks`, `delete`, `get`, `getUrl`, `list`, `listChunks`, `parse`, `query`, `update`, `uploadBatch` |+| `goals` | `advance`, `create`, `delete`, `get`, `getSupervision`, `list`, `pause`, `restart`, `resume`, `update` |+| `health` | `check` |+| `im` | `markRead`, `send`, `sync` |+| `knowledgeBases` | `addFiles`, `create`, `delete`, `get`, `list`, `listFiles`, `moveFiles`, `removeFiles`, `update` |+| `mcpServers` | `create`, `createSync`, `delete`, `get`, `list`, `update` |+| `memories` | `deleteAll`, `deleteEntry`, `getPersona`, `listCategory`, `listPersonaVersions` |+| `messageTranslations` | `create`, `delete`, `get`, `update` |+| `messages` | `create`, `createReply`, `delete`, `deleteMany`, `get`, `getCount`, `list` |+| `models` | `create`, `get`, `list`, `update` |+| `notifications` | `archive`, `archiveAll`, `getCounts`, `getUnreadCount`, `list`, `listSettings`, `markAllRead`, `markRead`, `updateSettings` |+| `permissions` | `create`, `delete`, `get`, `list`, `update` |+| `plugins` | `list` |+| `providers` | `create`, `delete`, `get`, `list`, `update` |+| `pushTokens` | `register`, `unregister` |+| `responses` | `create` |+| `roles` | `create`, `delete`, `deletePermissions`, `get`, `list`, `listPermissions`, `update`, `updatePermissions` |+| `signals` | `emit`, `listReceipts`, `trigger` |+| `tasks` | `create`, `delete`, `get`, `list`, `listRuns`, `run`, `update`, `updateStatus` |+| `topics` | `create`, `delete`, `get`, `list`, `listThreads`, `update` |+| `usage` | `list` |+| `users` | `create`, `delete`, `deleteRoles`, `get`, `list`, `listRoles`, `me`, `update`, `updateRoles` |++## Workspaces++Pass `workspaceId` to act inside a workspace: every request then carries `X-Workspace-Id`. A per-call header still wins.++```ts+const team = createLobeHub({ apiKey: process.env.LOBEHUB_API_KEY!, workspaceId: 'ws_...' });+await team.agents.list(); // the workspace's agents++await team.agents.list({ headers: { 'X-Workspace-Id': 'ws_other' } });+```++A personal API key cannot send the header (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so `workspaceId` may be omitted and, when set, must name that workspace.++## Errors++An error answer comes back as a `LobeHubAPIError` with `status`, `code` (stable, see `ApiErrorCode` — branch on it, not on `message`), `requestId` (quote it when reporting an issue), `details` (one `{ path, message }` per field for `validation_error`), `headers` and the raw `body`. Network failures are `LobeHubConnectionError`, and `LobeHubTimeoutError` when the [`timeout`](#retries-and-timeouts) runs out.++By default methods do not throw:++```ts+import { LobeHubAPIError } from '@lobehub/sdk';++const { data, error } = await lobehub.agents.get({ path: { id } });+if (error) {+ if (error instanceof LobeHubAPIError && error.code === 'not_found') return null;+ throw error;+}+```++Opt into throwing per call with `throwOnError: true`, or for the whole client — then every method rejects with the error and `data` is typed as always present:++```ts+const lobehub = createLobeHub({ apiKey, throwOnError: true });++try {+ const { data } = await lobehub.agents.get({ path: { id } });+ console.log(data.data.title);+} catch (error) {+ if (error instanceof LobeHubAPIError) console.error(error.status, error.code, error.requestId);+}```-Raw spec types are exported from `@lobehub/sdk/types`.+## Retries and timeouts-### Streaming responses+Requests that are safe to resend are retried up to `maxRetries` times (default 2) on 408, 429, 5xx and network errors, with exponential backoff (\~0.5s, 1s, 2s … up to 8s, with jitter) or exactly the server's `Retry-After`. Safe means an idempotent method (`GET`, `HEAD`, `OPTIONS`, `PUT`, `DELETE`) or a `POST` with an idempotency key — a plain `POST` is never resent, and the server only deduplicates keyed `POST`s, so a key on `PATCH` does not make it retryable. A keyed `POST` resent while the first attempt is still running gets 409 `idempotency_conflict`; the SDK waits and retries it, until the stored answer comes back or the retries run out.-`responses.create` returns Server-Sent Events when `body.stream: true`. Opt out of JSON parsing with `parseAs: 'stream'` and read the raw stream from `response.body`:+`timeout` (default 10 minutes, `0` disables) bounds the wait for the response headers of each attempt. Both work on the client and per call:```ts-const { response } = await lobehub.responses.create({- body: { input: '…', model: '…', stream: true },- parseAs: 'stream',+const lobehub = createLobeHub({ apiKey, maxRetries: 4, timeout: 30_000 });++await lobehub.agents.list({ maxRetries: 0, timeout: 5000 });++// The server runs a keyed request once and replays its answer for repeats,+// so the key also makes this POST retryable.+await lobehub.agents.create({+ body: { title: 'Researcher' },+ idempotencyKey: crypto.randomUUID(),});-for await (const chunk of response.body!) {- // decode SSE chunks+```++## Pagination++List endpoints answer `{ hasMore, nextCursor }` pages. `paginate` walks all of them and yields the items (`items`, or the endpoint's own key such as `agents`):++```ts+for await (const agent of lobehub.paginate(lobehub.agents.list, { query: { limit: 100 } })) {+ console.log(agent.id, agent.title);}```-(First-class typed SSE methods will come with the spec's response schemas.)+The method can be passed unbound; query parameters other than `cursor` are sent with every page.++## Streaming responses++`responses.stream` starts a response with `stream: true` and yields typed OpenResponses events (`ResponseStreamEvent`, generated from the spec). `finalResponse()` drains it and resolves with the response object of the last event; `abort()` (or breaking out of the loop) closes the connection.++```ts+const stream = lobehub.responses.stream({ input: 'Summarize my week', model: 'agt_...' });++for await (const event of stream) {+ if (event.type === 'response.output_text.delta') process.stdout.write(event.delta);+ if (event.type === 'response.failed') console.error(event.response.error);+}+```++```ts+const response = await lobehub.responses.stream({ input, model }).finalResponse();+console.log(response.output_text);+```++## Uploads++`files.upload` takes a `File`, a `Blob`, raw bytes (`Buffer`, `Uint8Array`, `ArrayBuffer`) or a local file path (Node, Bun, Deno), plus the other upload fields:++```ts+await lobehub.files.upload('./report.pdf', { knowledgeBaseId: 'kb_...' });+await lobehub.files.upload(new File([text], 'notes.md', { type: 'text/markdown' }));+await lobehub.files.upload(buffer, { name: 'image.png', type: 'image/png' });+```++The file name defaults to the `File` name or the path's base name, and the type to the `Blob` type.### Signing in with OAuth (native apps)@@ -95,12 +215,17 @@ Refresh tokens rotate, so persist the one returned by every refresh. A `LobeHubO## Development-- `bun generate` — regenerate `src/generated/` from `../openapi/openapi.yml` (run after the spec changes; naming rules live in `openapi-ts.config.ts`)+- `bun generate` — regenerate `src/generated/` from `../openapi/openapi.yml` (run after the spec changes). Names come from the spec's operationIds; the naming rule lives in `packages/openapi/src/common/operation-id.ts`.- `bun run build` — build ESM + d.ts to `dist/`-- `bun run test` — unit tests + generated-output drift check (local and release workflow only; not wired into PR CI)+- `bun run test` — unit tests (mock `fetch`) + the generated-output drift check++PR CI runs this package's tests (it is in the `PACKAGES` list of [`test.yml`](../../.github/workflows/test.yml)), so a spec change without the regenerated SDK fails the PR.## Releasing-Publishing is automated by [`release-sdk.yml`](../../.github/workflows/release-sdk.yml): every push to `canary` touching `packages/sdk/**` publishes `1.0.<UTC timestamp>` to npm with provenance (manual `workflow_dispatch` also available). To ship a spec change, run `bun generate` and commit the regenerated output — the workflow's drift check (`bun scripts/generate-sdk.ts --check`) guards the published artifact.+[`release-sdk.yml`](../../.github/workflows/release-sdk.yml) publishes on every push to `canary` that touches `packages/sdk/**` or `packages/openapi/openapi.yml` (and on `workflow_dispatch`), after the drift check, tests and build. [`scripts/release-version.ts`](./scripts/release-version.ts) picks the version:++- `package.json` `version` not on npm yet → published to `latest`. It needs a `## [x.y.z] - date` section in `CHANGELOG.md`, and the bump has to match the section: `### Breaking` → major, `### Added` → at least minor, `### Changed` / `### Fixed` → patch. A breaking change is expressed this way and cannot go out as a smaller bump.+- Already on npm → `x.y.(z+1)-canary.<UTC timestamp>` under the `canary` dist-tag, so `latest` only moves on a changelogged release.-Regular PR CI does not gate on spec drift — the check runs locally (`bun run test`) and inside the release workflow only.+To cut a release, bump `version` and add its CHANGELOG section in the PR that changes the SDK's surface.diff --git a/packages/sdk/examples/README.md b/packages/sdk/examples/README.mdnew file mode 100644index 00000000000..90c68bb35e2--- /dev/null+++ b/packages/sdk/examples/README.md@@ -0,0 +1,22 @@+# @lobehub/sdk examples++Runnable with Bun from `packages/sdk` (the `@lobehub/sdk` import resolves to `src/` through `tsconfig.json`):++```bash+export LOBEHUB_API_KEY=sk-lh-...+# export LOBEHUB_BASE_URL=http://localhost:3010 # another deployment++bun examples/quickstart.ts+```++| File | Shows |+| ---------------------------------- | --------------------------------------------------------- |+| [`quickstart.ts`](./quickstart.ts) | `users.me`, `agents.list` |+| [`workspace.ts`](./workspace.ts) | `workspaceId` → `X-Workspace-Id` (`LOBEHUB_WORKSPACE_ID`) |+| [`errors.ts`](./errors.ts) | `LobeHubAPIError` returned vs thrown (`throwOnError`) |+| [`retries.ts`](./retries.ts) | `timeout`, `maxRetries`, `idempotencyKey` |+| [`pagination.ts`](./pagination.ts) | `paginate` over every topic |+| [`streaming.ts`](./streaming.ts) | `responses.stream` (`LOBEHUB_AGENT_ID`) |+| [`upload.ts`](./upload.ts) | `files.upload` from a path, bytes and a `Blob` |++`retries.ts` and `upload.ts` create and then delete an agent / files in the account.diff --git a/packages/sdk/examples/client.ts b/packages/sdk/examples/client.tsnew file mode 100644index 00000000000..b9da311600e--- /dev/null+++ b/packages/sdk/examples/client.ts@@ -0,0 +1,10 @@+import { createLobeHub, type LobeHubOptions } from '@lobehub/sdk';++/** Shared setup: `LOBEHUB_API_KEY` (required), `LOBEHUB_BASE_URL` (optional). */+export const options = (): LobeHubOptions => {+ const apiKey = process.env.LOBEHUB_API_KEY;+ if (!apiKey) throw new Error('Set LOBEHUB_API_KEY to an API key (sk-lh-...)');+ return { apiKey, baseURL: process.env.LOBEHUB_BASE_URL };+};++export const lobehub = () => createLobeHub(options());diff --git a/packages/sdk/examples/errors.ts b/packages/sdk/examples/errors.tsnew file mode 100644index 00000000000..4d3385e071b--- /dev/null+++ b/packages/sdk/examples/errors.ts@@ -0,0 +1,25 @@+/** bun examples/errors.ts — the two error-handling styles. */+/* eslint-disable no-console -- examples print their results */+import { createLobeHub, LobeHubAPIError, LobeHubConnectionError } from '@lobehub/sdk';++import { lobehub, options } from './client';++// 1. Default: methods resolve with `{ data, error }`.+const { error } = await lobehub().agents.get({ path: { id: 'agt_does_not_exist' } });+if (error instanceof LobeHubAPIError) {+ console.log('returned:', error.status, error.code, `(request ${error.requestId})`);+}++// 2. throwOnError: methods reject, and `data` is always present on success.+const strict = createLobeHub({ ...options(), throwOnError: true });+try {+ await strict.agents.create({ body: { title: '' } });+} catch (thrown) {+ if (thrown instanceof LobeHubAPIError && thrown.code === 'validation_error') {+ console.log('thrown:', thrown.status, thrown.details);+ } else if (thrown instanceof LobeHubConnectionError) {+ console.log('network trouble:', thrown.message);+ } else {+ throw thrown;+ }+}diff --git a/packages/sdk/examples/pagination.ts b/packages/sdk/examples/pagination.tsnew file mode 100644index 00000000000..fac80b8a532--- /dev/null+++ b/packages/sdk/examples/pagination.ts@@ -0,0 +1,13 @@+/** bun examples/pagination.ts — walk every topic across pages. */+/* eslint-disable no-console -- examples print their results */+import { lobehub } from './client';++const client = lobehub();++let count = 0;+// `paginate` follows `nextCursor` until `hasMore` is false; `limit` is the page size.+for await (const topic of client.paginate(client.topics.list, { query: { limit: 50 } })) {+ count++;+ if (count <= 5) console.log(`- ${topic.id} ${topic.title ?? ''}`);+}+console.log(`${count} topics`);diff --git a/packages/sdk/examples/quickstart.ts b/packages/sdk/examples/quickstart.tsnew file mode 100644index 00000000000..c181e4cd4db--- /dev/null+++ b/packages/sdk/examples/quickstart.ts@@ -0,0 +1,13 @@+/** bun examples/quickstart.ts — who am I, and which agents do I have? */+/* eslint-disable no-console -- examples print their results */+import { lobehub } from './client';++const client = lobehub();++const { data: me, error } = await client.users.me();+if (error) throw error;+console.log('Signed in as', me.data.id);++const { data: agents } = await client.agents.list({ query: { limit: 5 }, throwOnError: true });+for (const agent of agents.data.agents) console.log(`- ${agent.id} ${agent.title ?? '(untitled)'}`);+console.log(`${agents.data.total} agents in total`);diff --git a/packages/sdk/examples/retries.ts b/packages/sdk/examples/retries.tsnew file mode 100644index 00000000000..43311eac2f0--- /dev/null+++ b/packages/sdk/examples/retries.ts@@ -0,0 +1,29 @@+/** bun examples/retries.ts — timeouts, retries and an idempotent create. */+/* eslint-disable no-console -- examples print their results */+import { randomUUID } from 'node:crypto';++import { createLobeHub } from '@lobehub/sdk';++import { options } from './client';++// GETs (and other idempotent requests) retry up to 4 times on 408/429/5xx and+// network errors, honoring Retry-After; each attempt gets 15s for headers.+const lobehub = createLobeHub({ ...options(), maxRetries: 4, throwOnError: true, timeout: 15_000 });++await lobehub.agents.list({ timeout: 5000 });++// A POST is only retried with an idempotency key: the server runs it once and+// replays the answer for repeats, so a retry can never create a second agent.+const key = randomUUID();+const first = await lobehub.agents.create({+ body: { title: 'Idempotent agent' },+ idempotencyKey: key,+});+const again = await lobehub.agents.create({+ body: { title: 'Idempotent agent' },+ idempotencyKey: key,+});+console.log(first.data.data.id === again.data.data.id ? 'same agent' : 'two agents?!');+console.log('replayed:', again.response.headers.get('Idempotent-Replayed'));++await lobehub.agents.delete({ path: { id: first.data.data.id } });diff --git a/packages/sdk/examples/streaming.ts b/packages/sdk/examples/streaming.tsnew file mode 100644index 00000000000..9765d6bda51--- /dev/null+++ b/packages/sdk/examples/streaming.ts@@ -0,0 +1,28 @@+/** LOBEHUB_AGENT_ID=agt_... bun examples/streaming.ts "your prompt" — stream a response. */+/* eslint-disable no-console -- examples print their results */+import { lobehub } from './client';++const model = process.env.LOBEHUB_AGENT_ID;+if (!model) throw new Error('Set LOBEHUB_AGENT_ID to the agent that should answer');++const stream = lobehub().responses.stream({+ input: process.argv[2] ?? 'Say hello in one sentence.',+ model,+});++for await (const event of stream) {+ switch (event.type) {+ case 'response.output_text.delta': {+ process.stdout.write(event.delta);+ break;+ }+ case 'response.completed': {+ console.log(`\n\n${event.response.usage.total_tokens} tokens`);+ break;+ }+ case 'response.failed': {+ console.error('\nfailed:', event.response.error?.message);+ break;+ }+ }+}diff --git a/packages/sdk/examples/upload.ts b/packages/sdk/examples/upload.tsnew file mode 100644index 00000000000..664c708979d--- /dev/null+++ b/packages/sdk/examples/upload.ts@@ -0,0 +1,26 @@+/** bun examples/upload.ts ./path/to/file — upload from a path, bytes and a Blob. */+/* eslint-disable no-console -- examples print their results */+import { lobehub } from './client';++const client = lobehub();+const path = process.argv[2] ?? new URL('../README.md', import.meta.url).pathname;++const fromPath = await client.files.upload(path, { throwOnError: true });+console.log('path →', fromPath.data.data.file.id, fromPath.data.data.file.name);++const fromBytes = await client.files.upload(new TextEncoder().encode('# hello\n'), {+ name: 'hello.md',+ throwOnError: true,+ type: 'text/markdown',+});+console.log('bytes →', fromBytes.data.data.file.id);++const fromBlob = await client.files.upload(new Blob(['a,b\n1,2\n'], { type: 'text/csv' }), {+ name: 'table.csv',+ throwOnError: true,+});+console.log('blob →', fromBlob.data.data.file.id);++for (const result of [fromPath, fromBytes, fromBlob]) {+ await client.files.delete({ path: { id: result.data.data.file.id } });+}diff --git a/packages/sdk/examples/workspace.ts b/packages/sdk/examples/workspace.tsnew file mode 100644index 00000000000..c6d9407ba0b--- /dev/null+++ b/packages/sdk/examples/workspace.ts@@ -0,0 +1,14 @@+/** LOBEHUB_WORKSPACE_ID=ws_... bun examples/workspace.ts — list a workspace's agents. */+/* eslint-disable no-console -- examples print their results */+import { createLobeHub } from '@lobehub/sdk';++import { options } from './client';++const workspaceId = process.env.LOBEHUB_WORKSPACE_ID;+if (!workspaceId) throw new Error('Set LOBEHUB_WORKSPACE_ID');++// Every request of this client carries `X-Workspace-Id: <workspaceId>`.+const team = createLobeHub({ ...options(), throwOnError: true, workspaceId });++const { data } = await team.agents.list({ query: { limit: 10 } });+console.log(`${data.data.total} agents in ${workspaceId}`);diff --git a/packages/sdk/openapi-ts.config.ts b/packages/sdk/openapi-ts.config.tsindex 99861451cd3..bdd74505d23 100644--- a/packages/sdk/openapi-ts.config.ts+++ b/packages/sdk/openapi-ts.config.ts@@ -5,111 +5,17 @@ import { defineConfig } from '@hey-api/openapi-ts';* SDK structure: `new LobeHub(...)` root instance with one resource group per* top-level path segment — `lobehub.agents.list()`, `lobehub.files.uploadBatch()`.*- * Method naming is a mechanical rule (derived from `{method} {path}`) plus- * explicit overrides for the awkward cases:- * - GET collection → list GET …/{id} → get- * - POST collection → create PATCH/PUT …/{id} → update- * - DELETE …/{id} → delete- * - extra static sub-segments are appended in PascalCase- * (GET …/{id}/chunks → listChunks, GET …/{id}/url → getUrl)+ * The spec owns the names: every operationId is `<resource>.<method>` (see+ * `packages/openapi/src/common/operation-id.ts`), so nesting is a plain split.*/-const METHOD_NAME_OVERRIDES: Record<string, string> = {- 'DELETE /api/v1/knowledge-bases/{id}/files/batch': 'removeFiles',- // batch delete of selected ids (body requires non-empty messageIds), not "all"- 'DELETE /api/v1/messages': 'deleteMany',- 'GET /api/v1/health': 'check',- 'GET /api/v1/users/me': 'me',- 'POST /api/v1/files/batches': 'uploadBatch',- 'POST /api/v1/files/queries': 'query',- 'POST /api/v1/files/{id}/parses': 'parse',- 'POST /api/v1/knowledge-bases/{id}/files/batch': 'addFiles',- 'POST /api/v1/knowledge-bases/{id}/files/move': 'moveFiles',- 'POST /api/v1/messages/replies': 'createReply',- // Personal-agent sub-actions: the `{method} {path}` rule would call these- // `createAdvance` / `createPause`, and the two memory DELETEs both reduce to- // `delete` (colliding into `delete2`), so each needs an explicit name.- 'DELETE /api/v1/memories': 'deleteAll',- // Agent identity assets under `/agents/{id}/accounts`: the mechanical rule- // pluralizes the collection noun (`createAccounts`, `getAccounts`,- // `updateAccountsCredential`), but each call acts on exactly one account.- 'POST /api/v1/agents/{id}/accounts': 'createAccount',- 'GET /api/v1/agents/{id}/accounts/{accountId}': 'getAccount',- 'PATCH /api/v1/agents/{id}/accounts/{accountId}': 'updateAccount',- 'PUT /api/v1/agents/{id}/accounts/{accountId}/credential': 'updateAccountCredential',- 'DELETE /api/v1/agents/{id}/accounts/{accountId}': 'deleteAccount',- 'DELETE /api/v1/memories/{category}/{id}': 'deleteEntry',- 'GET /api/v1/memories/{category}': 'listCategory',- 'GET /api/v1/notifications/counts': 'getCounts',- 'POST /api/v1/goals/{id}/advance': 'advance',- 'POST /api/v1/goals/{id}/pause': 'pause',- 'POST /api/v1/goals/{id}/restart': 'restart',- 'POST /api/v1/goals/{id}/resume': 'resume',- 'POST /api/v1/notifications/archive-all': 'archiveAll',- 'POST /api/v1/notifications/read': 'markRead',- 'POST /api/v1/notifications/read-all': 'markAllRead',- 'POST /api/v1/notifications/{id}/archive': 'archive',- 'POST /api/v1/signals/source-events': 'emit',- 'POST /api/v1/signals/trigger': 'trigger',- // Starting a run is a verb; the `{method} {path}` rule would call it `createRuns`.- 'POST /api/v1/tasks/{id}/runs': 'run',- // Chat-group roster edits read as verbs, not `createMembers` / `deleteMembers`.- 'DELETE /api/v1/chat-groups/{id}/members': 'removeMembers',- 'POST /api/v1/chat-groups/{id}/members': 'addMembers',- // IM channel: `send` / `sync` / `markRead` read like a messaging client;- // push tokens are keyed by device, so PUT/DELETE are register/unregister.- 'DELETE /api/v1/push-tokens/{deviceId}': 'unregister',- 'GET /api/v1/im/topics/{topicId}/sync': 'sync',- 'POST /api/v1/im/messages': 'send',- 'POST /api/v1/im/topics/{topicId}/read': 'markRead',- 'PUT /api/v1/push-tokens/{deviceId}': 'register',-};--const pascal = (segment: string) =>- segment- .split('-')- .map((part) => part.charAt(0).toUpperCase() + part.slice(1))- .join('');--const camel = (segment: string) => {- const name = pascal(segment);- return name.charAt(0).toLowerCase() + name.slice(1);-};--const buildMethodName = (method: string, path: string): string => {- const override = METHOD_NAME_OVERRIDES[`${method.toUpperCase()} ${path}`];- if (override) return override;-- // '/api/v1/<resource-root>/<...rest>' — the resource group carries the root.- const rest = path.split('/').filter(Boolean).slice(3);- const statics = rest.filter((segment) => !segment.startsWith('{'));- const endsWithParam = rest.length > 0 && rest.at(-1)!.startsWith('{');- const suffix = statics.map(pascal).join('');-- switch (method.toUpperCase()) {- case 'GET': {- if (endsWithParam) return `get${suffix}`;- if (statics.length === 0) return 'list';- return `${statics.at(-1)!.endsWith('s') ? 'list' : 'get'}${suffix}`;- }- case 'POST': {- return `create${suffix}`;- }- case 'PATCH':- case 'PUT': {- return `update${suffix}`;- }- case 'DELETE': {- return `delete${suffix}`;- }- default: {- return `${method.toLowerCase()}${suffix}`;- }- }-};-const nesting = (operation: IR.OperationObject): ReadonlyArray<string> => {- const resource = camel(operation.path.split('/').filter(Boolean)[2]!);- return [resource, buildMethodName(operation.method, operation.path)];+ const parts = operation.operationId?.split('.') ?? [];+ if (parts.length !== 2) {+ throw new Error(+ `${operation.method.toUpperCase()} ${operation.path}: operationId "${operation.operationId}" is not <resource>.<method>`,+ );+ }+ return parts;};export default defineConfig({diff --git a/packages/sdk/package.json b/packages/sdk/package.jsonindex 01f3ee44414..fdd956cea37 100644--- a/packages/sdk/package.json+++ b/packages/sdk/package.json@@ -1,6 +1,6 @@{"name": "@lobehub/sdk",- "version": "1.0.0",+ "version": "1.1.0","private": true,"description": "Official TypeScript SDK for the LobeHub REST API, generated from the OpenAPI spec","homepage": "https://github.com/lobehub/lobehub/tree/canary/packages/sdk",diff --git a/packages/sdk/scripts/generate-sdk.test.ts b/packages/sdk/scripts/generate-sdk.test.tsindex 15c20026b0f..8f84db99414 100644--- a/packages/sdk/scripts/generate-sdk.test.ts+++ b/packages/sdk/scripts/generate-sdk.test.ts@@ -7,11 +7,12 @@ const PKG_ROOT = path.join(__dirname, '..');describe('generate-sdk', () => {it('src/generated stays in sync with openapi.yml', () => {- // Runs the generator in --check mode as a subprocess (the same command the- // release workflow uses), so committed output failing to match the spec- // fails this test with the generator's own diagnostics. This package is- // deliberately NOT in the CI package whitelist — the test runs locally and- // in the manual release workflow only, never gating regular PRs.+ // Drift check: runs the generator in --check mode as a subprocess (the+ // same command the release workflow uses), so committed output failing to+ // match the spec fails this test with the generator's own diagnostics.+ // `@lobehub/sdk` is in the PACKAGES list of `.github/workflows/test.yml`,+ // so this gates every PR: a route or schema change that regenerates+ // `openapi.yml` must commit the regenerated SDK in the same PR.try {execSync('bun scripts/generate-sdk.ts --check', {cwd: PKG_ROOT,diff --git a/packages/sdk/scripts/generate-sdk.ts b/packages/sdk/scripts/generate-sdk.tsindex 54489f06e78..973670a5d5e 100644--- a/packages/sdk/scripts/generate-sdk.ts+++ b/packages/sdk/scripts/generate-sdk.ts@@ -93,6 +93,55 @@ const rewriteHeaderSpreads = (dir: string) => {writeFileSync(utilsPath, utilsRewritten);};+const CONFIG_ANCHOR = " extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {\n";+const CONFIG_FIELDS = ` /**+ * Retries on 408/429/5xx and network errors, for idempotent methods or a+ * POST with an \`idempotencyKey\` only. Applied by \`createLobeHub\`; default 2.+ */+ maxRetries?: number;+ /**+ * Milliseconds to wait for the response headers, per attempt; \`0\` disables.+ * Applied by \`createLobeHub\`; default 600000 (10 minutes).+ */+ timeout?: number;+`;+const REQUEST_OPTIONS_ANCHOR = ` /**+ * Any body that you want to add to your request.+ *+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}+ */+ body?: unknown;+ path?: Record<string, unknown>;+`;+const REQUEST_OPTIONS_FIELDS = ` /**+ * Sent as \`Idempotency-Key\`: the server runs the request once and replays+ * its answer for repeats, which also makes a POST safe to retry.+ */+ idempotencyKey?: string;+`;++/**+ * Declare the hand-written runtime options of \`createLobeHub\` (see+ * \`src/client.ts\`) on the generated client types, so every method accepts+ * them. Done here rather than by module augmentation because the published+ * d.ts is bundled, and a relative \`declare module\` does not survive that.+ */+const injectRuntimeOptions = (dir: string) => {+ const typesPath = path.join(dir, 'client', 'types.gen.ts');+ const source = readFileSync(typesPath, 'utf8');+ if (!source.includes(CONFIG_ANCHOR) || !source.includes(REQUEST_OPTIONS_ANCHOR)) {+ throw new Error(+ 'injectRuntimeOptions: expected Config / RequestOptions declarations not found in client/types.gen.ts — check the generator output.',+ );+ }+ writeFileSync(+ typesPath,+ source+ .replace(CONFIG_ANCHOR, CONFIG_ANCHOR + CONFIG_FIELDS)+ .replace(REQUEST_OPTIONS_ANCHOR, REQUEST_OPTIONS_FIELDS + REQUEST_OPTIONS_ANCHOR),+ );+};+const listFiles = (dir: string, base = dir): string[] =>readdirSync(dir, { withFileTypes: true }).flatMap((entry) => {const full = path.join(dir, entry.name);@@ -106,6 +155,7 @@ if (process.argv.includes('--check')) {try {await createClient({ ...config, logs: { level: 'silent' }, output: tempDir });rewriteHeaderSpreads(tempDir);+ injectRuntimeOptions(tempDir);const expected = listFiles(tempDir).sort();const committed = listFiles(OUTPUT_DIR).sort();@@ -131,5 +181,6 @@ if (process.argv.includes('--check')) {rmSync(OUTPUT_DIR, { force: true, recursive: true });await createClient(config);rewriteHeaderSpreads(OUTPUT_DIR);+ injectRuntimeOptions(OUTPUT_DIR);console.log(`✓ Generated ${path.relative(PKG_ROOT, OUTPUT_DIR)} from openapi.yml`);}diff --git a/packages/sdk/scripts/release-version.test.ts b/packages/sdk/scripts/release-version.test.tsnew file mode 100644index 00000000000..eb864bfbefb--- /dev/null+++ b/packages/sdk/scripts/release-version.test.ts@@ -0,0 +1,115 @@+import { readFileSync } from 'node:fs';+import path from 'node:path';++import { describe, expect, it } from 'vitest';++import { bumpBetween, changelogSection, resolveRelease } from './release-version';++const changelog = (version: string, ...headings: string[]) =>+ `# Changelog\n\n## [${version}] - 2026-11-17\n\n${headings.map((heading) => `### ${heading}\n\n- entry\n`).join('\n')}\n## [0.9.0] - 2026-01-01\n\n### Fixed\n\n- old\n`;++const now = new Date('2026-11-17T08:09:10Z');++describe('resolveRelease', () => {+ it('publishes a new changelogged version to latest', () => {+ expect(+ resolveRelease({+ changelog: changelog('1.1.0', 'Added'),+ now,+ published: ['1.0.20261030101445'],+ version: '1.1.0',+ }),+ ).toEqual({ tag: 'latest', version: '1.1.0' });+ });++ it('publishes a canary prerelease of the next patch once the version is out', () => {+ expect(+ resolveRelease({+ changelog: changelog('1.1.0', 'Added'),+ now,+ published: ['1.0.20261030101445', '1.1.0'],+ version: '1.1.0',+ }),+ ).toEqual({ tag: 'canary', version: '1.1.1-canary.20261117080910' });+ });++ it('expresses a breaking change as a major bump and refuses a smaller one', () => {+ const published = ['1.1.0'];+ expect(+ resolveRelease({+ changelog: changelog('2.0.0', 'Breaking'),+ now,+ published,+ version: '2.0.0',+ }),+ ).toEqual({ tag: 'latest', version: '2.0.0' });+ expect(() =>+ resolveRelease({+ changelog: changelog('1.2.0', 'Breaking'),+ now,+ published,+ version: '1.2.0',+ }),+ ).toThrow('needs at least major');+ });++ it('refuses to ship an Added entry as a patch', () => {+ expect(() =>+ resolveRelease({+ changelog: changelog('1.1.1', 'Added'),+ now,+ published: ['1.1.0'],+ version: '1.1.1',+ }),+ ).toThrow('needs at least minor');+ });++ it('requires a changelog section for the released version', () => {+ expect(() =>+ resolveRelease({+ changelog: changelog('1.1.0', 'Added'),+ now,+ published: [],+ version: '1.2.0',+ }),+ ).toThrow('no "## [1.2.0]" section');+ });++ it('refuses a version that is not newer than the published one', () => {+ expect(() =>+ resolveRelease({+ changelog: changelog('1.0.5', 'Fixed'),+ now,+ published: ['1.1.0'],+ version: '1.0.5',+ }),+ ).toThrow('not newer');+ });+});++describe('helpers', () => {+ it('reads a section whether or not the formatter escaped its bracket', () => {+ expect(changelogSection('## \\[2.0.0] - 2026-12-01\n\n### Breaking\n', '2.0.0')).toContain(+ 'Breaking',+ );+ });++ it('reads one section and the bump between versions', () => {+ expect(changelogSection(changelog('1.1.0', 'Added'), '1.1.0')).toContain('### Added');+ expect(changelogSection(changelog('1.1.0', 'Added'), '1.1.0')).not.toContain('old');+ expect(bumpBetween('1.0.20261030101445', '1.1.0')).toBe('minor');+ expect(bumpBetween('1.1.0', '1.1.0')).toBeUndefined();+ });++ it('accepts the committed package.json version and CHANGELOG.md', () => {+ const root = path.join(import.meta.dirname, '..');+ const { version } = JSON.parse(readFileSync(path.join(root, 'package.json'), 'utf8'));+ const release = resolveRelease({+ changelog: readFileSync(path.join(root, 'CHANGELOG.md'), 'utf8'),+ // The last timestamp release before semver.+ published: ['1.0.20261030101445'],+ version,+ });+ expect(release.version).toBe(version);+ });+});diff --git a/packages/sdk/scripts/release-version.ts b/packages/sdk/scripts/release-version.tsnew file mode 100644index 00000000000..01164e383d7--- /dev/null+++ b/packages/sdk/scripts/release-version.ts@@ -0,0 +1,143 @@+/**+ * Decide which version the release workflow publishes.+ *+ * Versioning contract (see "Releasing" in the README):+ * - `package.json` `version` is the next stable release. A PR that changes the+ * SDK's surface bumps it and adds a matching `## [x.y.z] - YYYY-MM-DD`+ * section to CHANGELOG.md, sorted into `### Breaking` / `### Added` /+ * `### Changed` / `### Fixed`.+ * - The bump has to match the section: `Breaking` needs a major bump (minor+ * while still on 0.x), `Added` at least a minor one. That is how a breaking+ * change is expressed — and it cannot ship as a patch by accident.+ * - A push to canary whose version is already on npm publishes a prerelease+ * `x.y.z-canary.<UTC timestamp>` of the *next* patch under the `canary`+ * dist-tag instead, so consumers of `latest` only get changelogged releases.+ *+ * Usage (prints JSON `{ version, tag }`):+ * bun scripts/release-version.ts --published "$(npm view @lobehub/sdk versions --json)"+ */+import { readFileSync } from 'node:fs';+import path from 'node:path';++export type Bump = 'major' | 'minor' | 'patch';++interface SemVer {+ major: number;+ minor: number;+ patch: number;+ prerelease?: string;+}++const SEMVER = /^(\d+)\.(\d+)\.(\d+)(?:-([\w.-]+))?$/;++export const parseSemVer = (version: string): SemVer => {+ const match = version.match(SEMVER);+ if (!match) throw new Error(`"${version}" is not a semver version`);+ return { major: +match[1], minor: +match[2], patch: +match[3], prerelease: match[4] };+};++export const compareSemVer = (a: string, b: string) => {+ const x = parseSemVer(a);+ const y = parseSemVer(b);+ for (const key of ['major', 'minor', 'patch'] as const) {+ if (x[key] !== y[key]) return x[key] - y[key];+ }+ if (x.prerelease === y.prerelease) return 0;+ if (!x.prerelease) return 1;+ if (!y.prerelease) return -1;+ return x.prerelease < y.prerelease ? -1 : 1;+};++/** The bump from `from` to `to`, or `undefined` when `to` is not newer. */+export const bumpBetween = (from: string, to: string): Bump | undefined => {+ if (compareSemVer(to, from) <= 0) return;+ const x = parseSemVer(from);+ const y = parseSemVer(to);+ if (y.major !== x.major) return 'major';+ if (y.minor !== x.minor) return 'minor';+ return 'patch';+};++/**+ * The body of `## [version]` in a Keep a Changelog file, or `undefined`. The+ * repo's markdown formatter writes the heading as `## \\[version]`.+ */+export const changelogSection = (changelog: string, version: string): string | undefined => {+ const lines = changelog.split('\n');+ const start = lines.findIndex((line) =>+ new RegExp(`^## \\\\?\\[${version.replaceAll('.', '\\.')}\\]`).test(line),+ );+ if (start === -1) return;+ const end = lines.findIndex((line, index) => index > start && line.startsWith('## '));+ return lines.slice(start + 1, end === -1 ? undefined : end).join('\n');+};++/** The smallest bump a changelog section allows. */+export const requiredBump = (section: string, current: string): Bump => {+ if (/^### Breaking/m.test(section)) return parseSemVer(current).major === 0 ? 'minor' : 'major';+ if (/^### Added/m.test(section)) return 'minor';+ return 'patch';+};++const BUMP_ORDER: Bump[] = ['patch', 'minor', 'major'];++export interface ReleaseInput {+ changelog: string;+ now?: Date;+ /** Every version already on npm. */+ published: string[];+ /** `version` from package.json. */+ version: string;+}++export const resolveRelease = ({+ changelog,+ now = new Date(),+ published,+ version,+}: ReleaseInput) => {+ parseSemVer(version);+ const stable = published.filter((entry) => SEMVER.test(entry) && !parseSemVer(entry).prerelease);+ const latest = stable.sort(compareSemVer).at(-1);++ if (!published.includes(version)) {+ const section = changelogSection(changelog, version);+ if (!section?.trim()) {+ throw new Error(+ `CHANGELOG.md has no "## [${version}]" section for the version being released`,+ );+ }+ if (latest) {+ const bump = bumpBetween(latest, version);+ if (!bump) throw new Error(`${version} is not newer than the published ${latest}`);+ const needed = requiredBump(section, latest);+ if (BUMP_ORDER.indexOf(bump) < BUMP_ORDER.indexOf(needed)) {+ throw new Error(+ `${latest} → ${version} is a ${bump} bump, but the changelog section needs at least ${needed}`,+ );+ }+ }+ return { tag: 'latest' as const, version };+ }++ const next = parseSemVer(version);+ const stamp = now.toISOString().replaceAll(/\D/g, '').slice(0, 14);+ return {+ tag: 'canary' as const,+ version: `${next.major}.${next.minor}.${next.patch + 1}-canary.${stamp}`,+ };+};++if (import.meta.main) {+ const PKG_ROOT = path.join(import.meta.dirname, '..');+ const flag = process.argv.indexOf('--published');+ const raw = flag === -1 ? '[]' : process.argv[flag + 1] || '[]';+ const parsed = JSON.parse(raw) as string[] | string;++ const release = resolveRelease({+ changelog: readFileSync(path.join(PKG_ROOT, 'CHANGELOG.md'), 'utf8'),+ published: Array.isArray(parsed) ? parsed : [parsed],+ version: JSON.parse(readFileSync(path.join(PKG_ROOT, 'package.json'), 'utf8')).version,+ });+ console.log(JSON.stringify(release));+}diff --git a/packages/sdk/src/client.test.ts b/packages/sdk/src/client.test.tsnew file mode 100644index 00000000000..af4a6d6d512--- /dev/null+++ b/packages/sdk/src/client.test.ts@@ -0,0 +1,479 @@+import { describe, expect, expectTypeOf, it } from 'vitest';++import type { Agent, ResponseStreamEvent } from './index';+import { createLobeHub, LobeHubAPIError, LobeHubConnectionError } from './index';++type Handler = (request: Request) => Response | Promise<Response>;++const json = (body: unknown, init: ResponseInit = {}) =>+ new Response(JSON.stringify(body), {+ ...init,+ headers: { 'Content-Type': 'application/json', ...init.headers },+ });++const envelope = (data: unknown) => ({ data, success: true, timestamp: '2026-01-01T00:00:00Z' });++/** A mock `fetch` answering from `handler`, recording every request it saw. */+const mockFetch = (handler: Handler) => {+ const requests: Request[] = [];+ const fetch = (async (input: Request) => {+ requests.push(input);+ return handler(input);+ }) as typeof globalThis.fetch;+ return { fetch, requests };+};++const apiError = (+ status: number,+ code: string,+ extra: Record<string, unknown> = {},+ headers: Record<string, string> = {},+) =>+ json(+ {+ code,+ error: 'boom',+ message: 'boom',+ requestId: 'req_123',+ success: false,+ timestamp: '2026-01-01T00:00:00Z',+ ...extra,+ },+ { headers, status },+ );++describe('workspace', () => {+ it('sends X-Workspace-Id on every request', async () => {+ const { fetch, requests } = mockFetch(() => json(envelope({ id: 'u' })));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, workspaceId: 'ws_1' });++ await lobehub.users.me();+ await lobehub.agents.create({ body: { title: 't' } });++ expect(requests.map((request) => request.headers.get('x-workspace-id'))).toEqual([+ 'ws_1',+ 'ws_1',+ ]);+ });++ it('lets a call override the workspace with its own header', async () => {+ const { fetch, requests } = mockFetch(() => json(envelope({})));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, workspaceId: 'ws_1' });++ await lobehub.agents.list({ headers: { 'X-Workspace-Id': 'ws_2' } });++ expect(requests[0].headers.get('x-workspace-id')).toBe('ws_2');+ });++ it('sends no workspace header by default', async () => {+ const { fetch, requests } = mockFetch(() => json(envelope({})));+ await createLobeHub({ apiKey: 'sk-lh-test', fetch }).agents.list();+ expect(requests[0].headers.has('x-workspace-id')).toBe(false);+ });+});++describe('idempotencyKey', () => {+ it('is sent as the Idempotency-Key header', async () => {+ const { fetch, requests } = mockFetch(() => json(envelope({})));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ await lobehub.agents.create({ body: { title: 't' }, idempotencyKey: 'create-agent-1' });++ expect(requests[0].headers.get('idempotency-key')).toBe('create-agent-1');+ });++ it('makes a POST retryable', async () => {+ let calls = 0;+ const { fetch, requests } = mockFetch(() =>+ ++calls === 1+ ? apiError(503, 'service_unavailable', {}, { 'Retry-After': '0' })+ : json(envelope({ id: 'agt_1' })),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const keyed = await lobehub.agents.create({ body: { title: 't' }, idempotencyKey: 'k1' });++ expect(keyed.error).toBeUndefined();+ expect(requests).toHaveLength(2);+ expect(await requests[1].json()).toEqual({ title: 't' });+ });++ it('waits out a 409 idempotency_conflict while the first attempt is still running', async () => {+ let calls = 0;+ const { fetch, requests } = mockFetch(() =>+ ++calls === 1+ ? apiError(409, 'idempotency_conflict', {}, { 'Retry-After': '0' })+ : json(envelope({ id: 'agt_1' }), { headers: { 'Idempotent-Replayed': 'true' } }),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const { data, error } = await lobehub.agents.create({+ body: { title: 't' },+ idempotencyKey: 'k1',+ });++ expect(error).toBeUndefined();+ expect(data?.data.id).toBe('agt_1');+ expect(requests).toHaveLength(2);+ });++ it('does not retry other 409s or a key reused for a different request (422)', async () => {+ for (const [status, code] of [+ [409, 'conflict'],+ [422, 'idempotency_conflict'],+ ] as const) {+ const { fetch, requests } = mockFetch(() => apiError(status, code));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const { error } = await lobehub.agents.create({ body: { title: 't' }, idempotencyKey: 'k' });++ expect(error).toMatchObject({ code, status });+ expect(requests).toHaveLength(1);+ }+ });++ it('does not make a keyed PATCH retryable: the server only deduplicates POST', async () => {+ const { fetch, requests } = mockFetch(() => apiError(503, 'service_unavailable'));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ await lobehub.agents.update({+ body: { title: 't' },+ idempotencyKey: 'k',+ path: { id: 'agt_1' },+ });++ expect(requests).toHaveLength(1);+ });++ it('never retries a POST without one', async () => {+ const { fetch, requests } = mockFetch(() => apiError(503, 'service_unavailable'));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const { error } = await lobehub.agents.create({ body: { title: 't' } });++ expect(requests).toHaveLength(1);+ expect(error).toBeInstanceOf(LobeHubAPIError);+ });+});++describe('typed errors', () => {+ it('returns LobeHubAPIError with status, code, requestId and details', async () => {+ const details = [{ message: 'Required', path: 'json.title' }];+ const { fetch } = mockFetch(() => apiError(400, 'validation_error', { details }));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const { error } = await lobehub.agents.create({ body: { title: '' } });++ expect(error).toBeInstanceOf(LobeHubAPIError);+ const apiErr = error as unknown as LobeHubAPIError;+ expect(apiErr).toMatchObject({+ code: 'validation_error',+ details,+ message: 'boom',+ requestId: 'req_123',+ status: 400,+ });+ // Still reads like the plain ApiError body it replaced.+ expect(error?.success).toBe(false);+ });++ it('falls back to the X-Request-Id header and the HTTP status', async () => {+ const { fetch } = mockFetch(+ () => new Response('Bad gateway', { headers: { 'X-Request-Id': 'req_hdr' }, status: 502 }),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, maxRetries: 0 });++ const { error } = await lobehub.agents.list();++ expect(error).toMatchObject({ code: 'http_502', requestId: 'req_hdr', status: 502 });+ expect((error as unknown as Error).message).toBe('Bad gateway');+ });++ it('reads the OpenResponses error body of POST /responses', async () => {+ const { fetch } = mockFetch(() =>+ json(+ { error: { code: null, message: 'model is required', type: 'invalid_request_error' } },+ { status: 400 },+ ),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const { error } = await lobehub.responses.create({ body: { input: 'hi', model: '' } });++ expect(error).toMatchObject({+ code: 'invalid_request_error',+ message: 'model is required',+ status: 400,+ });+ });++ it('throws instead of returning with throwOnError, and types data as present', async () => {+ const { fetch } = mockFetch((request) =>+ request.url.endsWith('/agents')+ ? json(envelope({ agents: [{ id: 'agt_1' }], hasMore: false, nextCursor: null, total: 1 }))+ : apiError(404, 'not_found'),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, throwOnError: true });++ const { data } = await lobehub.agents.list();+ expectTypeOf(data.data.agents).toEqualTypeOf<Agent[]>();+ expect(data.data.agents[0].id).toBe('agt_1');++ await expect(lobehub.agents.get({ path: { id: 'missing' } })).rejects.toMatchObject({+ code: 'not_found',+ name: 'LobeHubAPIError',+ status: 404,+ });+ });++ it('throws per call with throwOnError: true', async () => {+ const { fetch } = mockFetch(() => apiError(403, 'workspace_mismatch'));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ await expect(lobehub.users.me({ throwOnError: true })).rejects.toBeInstanceOf(LobeHubAPIError);+ });++ it('reports a network failure as LobeHubConnectionError', async () => {+ const fetch = (async () => {+ throw new TypeError('fetch failed');+ }) as typeof globalThis.fetch;+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, maxRetries: 0 });++ const { error } = await lobehub.agents.list();++ expect(error).toBeInstanceOf(LobeHubConnectionError);+ expect((error as unknown as Error).message).toBe('fetch failed');+ });+});++describe('paginate', () => {+ it('follows nextCursor across pages and yields every item', async () => {+ const pages: Record<string, unknown> = {+ '': { agents: [{ id: 'a1' }, { id: 'a2' }], hasMore: true, nextCursor: 'c2', total: 3 },+ 'c2': { agents: [{ id: 'a3' }], hasMore: false, nextCursor: null, total: 3 },+ };+ const { fetch, requests } = mockFetch((request) =>+ json(envelope(pages[new URL(request.url).searchParams.get('cursor') ?? ''])),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const ids: string[] = [];+ // Passed unbound on purpose: paginate carries the client itself.+ for await (const agent of lobehub.paginate(lobehub.agents.list, { query: { limit: 2 } })) {+ expectTypeOf(agent).toEqualTypeOf<Agent>();+ ids.push(agent.id);+ }++ expect(ids).toEqual(['a1', 'a2', 'a3']);+ expect(requests.map((request) => new URL(request.url).search)).toEqual([+ '?limit=2',+ '?limit=2&cursor=c2',+ ]);+ });++ it('reads the generic `items` array of newer endpoints', async () => {+ const { fetch } = mockFetch(() =>+ json(envelope({ hasMore: false, items: [{ id: 'g1' }], nextCursor: null })),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const items: unknown[] = [];+ for await (const goal of lobehub.paginate(lobehub.goals.list)) items.push(goal);++ expect(items).toEqual([{ id: 'g1' }]);+ });++ it('paginates when the client is configured for data-only results', async () => {+ const { fetch } = mockFetch(() =>+ json(envelope({ agents: [{ id: 'a1' }], hasMore: false, nextCursor: null, total: 1 })),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, responseStyle: 'data' });++ const ids: string[] = [];+ for await (const agent of lobehub.paginate(lobehub.agents.list)) ids.push(agent.id);++ expect(ids).toEqual(['a1']);+ });++ it('stops when hasMore is true but no cursor comes back', async () => {+ const { fetch, requests } = mockFetch(() =>+ json(envelope({ hasMore: true, nextCursor: null, topics: [{ id: 't1' }], total: 9 })),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const items: unknown[] = [];+ for await (const topic of lobehub.paginate(lobehub.topics.list)) items.push(topic);++ expect(items).toHaveLength(1);+ expect(requests).toHaveLength(1);+ });++ it('rejects with LobeHubAPIError when a page fails', async () => {+ const { fetch } = mockFetch(() => apiError(403, 'forbidden'));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const iterate = async () => {+ for await (const _ of lobehub.paginate(lobehub.agents.list)) {+ // never reached+ }+ };+ await expect(iterate()).rejects.toMatchObject({ code: 'forbidden', status: 403 });+ });+});++const sse = (events: Array<Record<string, unknown>>) =>+ events.map((event) => `event: ${event.type}\ndata: ${JSON.stringify(event)}\n\n`).join('');++const RESPONSE = { id: 'resp_1', object: 'response', output_text: 'Hello', status: 'completed' };++describe('responses.stream', () => {+ const streamFetch = () =>+ mockFetch(() => {+ const body = sse([+ {+ response: { ...RESPONSE, status: 'in_progress' },+ sequence_number: 0,+ type: 'response.created',+ },+ {+ content_index: 0,+ delta: 'Hel',+ item_id: 'm',+ logprobs: [],+ output_index: 0,+ sequence_number: 1,+ type: 'response.output_text.delta',+ },+ {+ content_index: 0,+ delta: 'lo',+ item_id: 'm',+ logprobs: [],+ output_index: 0,+ sequence_number: 2,+ type: 'response.output_text.delta',+ },+ { response: RESPONSE, sequence_number: 3, type: 'response.completed' },+ ]);+ // Split mid-event to exercise chunk reassembly.+ const encoder = new TextEncoder();+ const stream = new ReadableStream<Uint8Array>({+ start(controller) {+ controller.enqueue(encoder.encode(body.slice(0, 37)));+ controller.enqueue(encoder.encode(body.slice(37)));+ controller.close();+ },+ });+ return new Response(stream, { headers: { 'Content-Type': 'text/event-stream' } });+ });++ it('yields typed events and sends stream: true', async () => {+ const { fetch, requests } = streamFetch();+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ let text = '';+ const types: string[] = [];+ for await (const event of lobehub.responses.stream({ input: 'hi', model: 'agt_1' })) {+ expectTypeOf(event).toEqualTypeOf<ResponseStreamEvent>();+ types.push(event.type);+ if (event.type === 'response.output_text.delta') text += event.delta;+ }++ expect(text).toBe('Hello');+ expect(types).toEqual([+ 'response.created',+ 'response.output_text.delta',+ 'response.output_text.delta',+ 'response.completed',+ ]);+ expect(await requests[0].json()).toEqual({ input: 'hi', model: 'agt_1', stream: true });+ });++ it('streams when the client is configured for data-only results', async () => {+ const { fetch } = streamFetch();+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, responseStyle: 'data' });++ let text = '';+ for await (const event of lobehub.responses.stream({ input: 'hi', model: 'agt_1' })) {+ if (event.type === 'response.output_text.delta') text += event.delta;+ }++ expect(text).toBe('Hello');+ });++ it('resolves finalResponse() with the terminal event response', async () => {+ const { fetch } = streamFetch();+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const final = await lobehub.responses.stream({ input: 'hi', model: 'agt_1' }).finalResponse();++ expect(final).toMatchObject({ output_text: 'Hello', status: 'completed' });+ });++ it('rejects with LobeHubAPIError before the stream starts', async () => {+ const { fetch } = mockFetch(() =>+ json({ error: { message: 'no access', type: 'invalid_request_error' } }, { status: 403 }),+ );+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ await expect(+ lobehub.responses.stream({ input: 'hi', model: 'agt_1' }).finalResponse(),+ ).rejects.toMatchObject({ name: 'LobeHubAPIError', status: 403 });+ });+});++describe('files.upload', () => {+ const uploaded = () => mockFetch(() => json(envelope({ file: { id: 'file_1', name: 'x' } })));++ const sentFile = async (request: Request) => (await request.formData()).get('file') as File;++ it('uploads raw bytes (Buffer / Uint8Array) with a name and the other fields', async () => {+ const { fetch, requests } = uploaded();+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ const { data } = await lobehub.files.upload(Buffer.from('hello'), {+ knowledgeBaseId: 'kb_1',+ name: 'hello.txt',+ type: 'text/plain',+ });++ expect(data?.data.file.id).toBe('file_1');+ const form = await requests[0].formData();+ const file = form.get('file') as File;+ expect(file.name).toBe('hello.txt');+ expect(file.type).toBe('text/plain');+ expect(await file.text()).toBe('hello');+ expect(form.get('knowledgeBaseId')).toBe('kb_1');+ });++ it('uploads a File as-is and a Blob under a default name', async () => {+ const { fetch, requests } = uploaded();+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ await lobehub.files.upload(new File(['a'], 'a.md', { type: 'text/markdown' }));+ await lobehub.files.upload(new Blob(['b'], { type: 'text/plain' }));++ expect((await sentFile(requests[0])).name).toBe('a.md');+ expect((await sentFile(requests[1])).name).toBe('file');+ });++ it('reads a local path and names the file after it', async () => {+ const { fetch, requests } = uploaded();+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch });++ await lobehub.files.upload(new URL('../package.json', import.meta.url).pathname);++ const file = await sentFile(requests[0]);+ expect(file.name).toBe('package.json');+ expect(JSON.parse(await file.text()).name).toBe('@lobehub/sdk');+ });++ it('throws with throwOnError like any other method', async () => {+ const { fetch } = mockFetch(() => apiError(413, 'payload_too_large'));+ const lobehub = createLobeHub({ apiKey: 'sk-lh-test', fetch, throwOnError: true });++ await expect(lobehub.files.upload(new Uint8Array([1]))).rejects.toMatchObject({+ status: 413,+ });+ });+});diff --git a/packages/sdk/src/client.ts b/packages/sdk/src/client.tsnew file mode 100644index 00000000000..72f3ae74e41--- /dev/null+++ b/packages/sdk/src/client.ts@@ -0,0 +1,283 @@+import { DEFAULT_BASE_URL } from './constants';+import { toLobeHubError } from './errors';+import type { Client, Config, RequestResult } from './generated/client';+import { createClient, createConfig } from './generated/client';+import type { Options } from './generated/sdk.gen';+import { Files, LobeHub, Responses } from './generated/sdk.gen';+import type {+ PostApiV1FilesErrors,+ PostApiV1FilesResponses,+ PostApiV1ResponsesData,+} from './generated/types.gen';+import type { PageItem, PageOf, PaginateOptions } from './pagination';+import { paginate } from './pagination';+import { ResponseStream } from './streaming';+import {+ createTransport,+ DEFAULT_MAX_RETRIES,+ DEFAULT_TIMEOUT,+ IDEMPOTENCY_KEY_HEADER,+ requestSettings,+} from './transport';+import type { Uploadable, UploadOptions } from './uploads';+import { toUploadFile } from './uploads';++export const WORKSPACE_HEADER = 'X-Workspace-Id';++export interface LobeHubOptions<ThrowOnError extends boolean = false> extends Omit<+ Config,+ 'auth' | 'baseUrl' | 'throwOnError'+> {+ /**+ * Called before every request for the OIDC access token to send. Refresh it+ * here (see `refreshAccessToken`) so long-lived clients never send an expired+ * one. Takes precedence over `apiKey`.+ */+ accessToken?: () => Promise<string> | string;+ /** LobeHub API Key (`sk-lh-...`) or an OIDC JWT */+ apiKey?: string;+ /** API origin, defaults to LobeHub Cloud (`https://app.lobehub.com`) */+ baseURL?: string;+ /**+ * Throw `LobeHubAPIError` instead of returning `{ error }`. Every method's+ * return type follows: `{ data, request, response }` with `data` always set.+ */+ throwOnError?: ThrowOnError;+ /** Sent as `X-Workspace-Id` on every request: act inside this workspace. */+ workspaceId?: string;+}++/** The `responses.create` body; `stream` is forced on. */+type CreateResponseBody = PostApiV1ResponsesData['body'];++export type ResponseStreamOptions = Omit<+ Options<PostApiV1ResponsesData, true>,+ 'body' | 'parseAs' | 'throwOnError'+>;++/** `lobehub.responses`, plus `stream()` for typed server-sent events. */+export class ResponsesResource extends Responses {+ /**+ * Start a response with `stream: true` and iterate its typed events:+ *+ * ```ts+ * for await (const event of lobehub.responses.stream({ input, model })) {+ * if (event.type === 'response.output_text.delta') process.stdout.write(event.delta);+ * }+ * ```+ */+ stream(body: CreateResponseBody, options: ResponseStreamOptions = {}): ResponseStream {+ return new ResponseStream(async (signal) => {+ const { response } = await this.create({+ ...options,+ body: { ...body, stream: true },+ client: options.client ?? this.client,+ // Closing the stream must not abort a caller-owned signal, and vice versa.+ signal: options.signal ? anySignal([options.signal, signal]) : signal,+ parseAs: 'stream',+ // The helper reads `{ response }`: a client configured for data-only+ // results must not change its own internals.+ responseStyle: 'fields',+ throwOnError: true,+ });+ if (!response.body) throw new Error('The streaming response has no body');+ return response.body;+ });+ }+}++export type UploadRequestOptions<ThrowOnError extends boolean> = Omit<+ Options<never, ThrowOnError>,+ 'body' | 'path' | 'query'+>;++/** `lobehub.files`, plus `upload()` for any file source. */+export class FilesResource extends Files {+ /**+ * Upload a `File` / `Blob`, raw bytes (`Buffer`, `Uint8Array`,+ * `ArrayBuffer`) or a local file path:+ *+ * ```ts+ * const { data } = await lobehub.files.upload('./report.pdf', { knowledgeBaseId });+ * ```+ */+ upload<ThrowOnError extends boolean = false>(+ source: Uploadable,+ options: UploadOptions & UploadRequestOptions<ThrowOnError> = {},+ ): RequestResult<PostApiV1FilesResponses, PostApiV1FilesErrors, ThrowOnError> {+ const {+ agentId,+ directory,+ knowledgeBaseId,+ name,+ sessionId,+ skipCheckFileType,+ skipDeduplication,+ type,+ ...requestOptions+ } = options;++ type Result = RequestResult<PostApiV1FilesResponses, PostApiV1FilesErrors, ThrowOnError>;+ return toUploadFile(source, { name, type }).then(+ (file): Awaited<Result> =>+ this.create<ThrowOnError>({+ ...requestOptions,+ body: {+ agentId,+ directory,+ file,+ knowledgeBaseId,+ sessionId,+ skipCheckFileType,+ skipDeduplication,+ },+ }) as unknown as Awaited<Result>,+ ) as Result;+ }+}++/**+ * Abort when any of `signals` does. `AbortSignal.any` keeps no strong+ * reference to the inputs, so a long-lived caller signal reused across many+ * streams does not accumulate listeners; the fallback is for hosts without it.+ */+const anySignal = (signals: AbortSignal[]) => {+ if (typeof AbortSignal.any === 'function') return AbortSignal.any(signals);+ const controller = new AbortController();+ for (const signal of signals) {+ if (signal.aborted) {+ controller.abort(signal.reason);+ break;+ }+ signal.addEventListener('abort', () => controller.abort(signal.reason), {+ once: true,+ signal: controller.signal,+ });+ }+ return controller.signal;+};++/**+ * The resource-style client returned by `createLobeHub`: every generated+ * resource (`lobehub.agents`, `lobehub.topics`, …) plus `paginate`,+ * `responses.stream` and `files.upload`.+ */+export class LobeHubClient extends LobeHub {+ readonly #client: Client;+ #files?: FilesResource;+ #responses?: ResponsesResource;++ constructor(args: { client: Client; key?: string }) {+ super(args);+ this.#client = args.client;+ }++ override get files(): FilesResource {+ return (this.#files ??= new FilesResource({ client: this.#client }));+ }++ override get responses(): ResponsesResource {+ return (this.#responses ??= new ResponsesResource({ client: this.#client }));+ }++ /**+ * Iterate every item of a cursor-paginated list across pages:+ *+ * ```ts+ * for await (const agent of lobehub.paginate(lobehub.agents.list, { query: { limit: 50 } })) {+ * console.log(agent.id);+ * }+ * ```+ */+ paginate<M extends (options: any) => Promise<any>>(+ method: M,+ options?: PaginateOptions<M>,+ ): AsyncGenerator<PageItem<PageOf<M>>> {+ return paginate(this.#client, method, options);+ }+}++// ---------- throwOnError typing ----------++type ThrowingOptions<O> = O extends object ? Omit<O, 'throwOnError'> & { throwOnError?: true } : O;++/** The `throwOnError: true` variant of a generated method: same arguments, `data` always set. */+type ThrowingMethod<F> = F extends (...args: infer Args) => Promise<infer Result>+ ? (+ ...args: { [I in keyof Args]: ThrowingOptions<Args[I]> }+ ) => Promise<Extract<Result, { request: Request; response: Response }>>+ : F;++type ThrowingResource<R> = { [K in keyof R]: ThrowingMethod<R[K]> };++/** `LobeHubClient` whose methods all reject with `LobeHubAPIError` and always return `data`. */+export type ThrowingLobeHubClient = {+ [K in keyof LobeHubClient]: K extends 'paginate'+ ? LobeHubClient[K]+ : K extends 'responses'+ ? ThrowingResource<ResponsesResource> & Pick<ResponsesResource, 'stream'>+ : K extends 'files'+ ? ThrowingResource<Files> & {+ upload: (+ source: Uploadable,+ options?: UploadOptions & UploadRequestOptions<true>,+ ) => RequestResult<PostApiV1FilesResponses, PostApiV1FilesErrors, true>;+ }+ : ThrowingResource<LobeHubClient[K]>;+};++/**+ * Create a resource-style LobeHub API client: `lobehub.agents.list()`,+ * `lobehub.files.upload()`, `lobehub.users.me()`, …+ *+ * Resources, methods, and schemas are generated from+ * `packages/openapi/openapi.yml` — run `bun generate` after the spec changes.+ */+export function createLobeHub(options: LobeHubOptions<false>): LobeHubClient;+export function createLobeHub(options: LobeHubOptions<true>): ThrowingLobeHubClient;+export function createLobeHub(+ options: LobeHubOptions<boolean>,+): LobeHubClient | ThrowingLobeHubClient {+ const {+ accessToken,+ apiKey,+ baseURL = DEFAULT_BASE_URL,+ fetch: baseFetch = globalThis.fetch,+ maxRetries = DEFAULT_MAX_RETRIES,+ timeout = DEFAULT_TIMEOUT,+ workspaceId,+ ...clientConfig+ } = options;+ if (!accessToken && !apiKey)+ throw new Error('createLobeHub needs an apiKey or an accessToken provider');++ const client = createClient(+ createConfig({+ ...clientConfig,+ auth: accessToken ? () => accessToken() : () => apiKey,+ baseUrl: baseURL,+ fetch: createTransport((...args) => baseFetch(...args), { maxRetries, timeout }),+ maxRetries,+ timeout,+ }),+ );++ client.interceptors.request.use((request, requestOptions) => {+ // A per-call `X-Workspace-Id` header still wins over the client default.+ if (workspaceId && !request.headers.has(WORKSPACE_HEADER))+ request.headers.set(WORKSPACE_HEADER, workspaceId);+ if (requestOptions.idempotencyKey)+ request.headers.set(IDEMPOTENCY_KEY_HEADER, requestOptions.idempotencyKey);+ requestSettings.set(request, {+ maxRetries: requestOptions.maxRetries ?? maxRetries,+ // `parseAs: 'stream'` asks for the SSE body: keep the transport from+ // resending a request whose answer cannot be replayed.+ streaming: requestOptions.parseAs === 'stream',+ timeout: requestOptions.timeout ?? timeout,+ });+ return request;+ });+ client.interceptors.error.use((error, response) => toLobeHubError(error, response));++ return new LobeHubClient({ client });+}diff --git a/packages/sdk/src/errors.ts b/packages/sdk/src/errors.tsnew file mode 100644index 00000000000..782cef1e8fb--- /dev/null+++ b/packages/sdk/src/errors.ts@@ -0,0 +1,96 @@+import type { ApiErrorCode } from './generated/types.gen';++/** One failing field of a `validation_error`, or route-specific detail. */+export type LobeHubErrorDetails = unknown;++const REQUEST_ID_HEADER = 'X-Request-Id';++type ErrorBody = Record<string, unknown>;++const isRecord = (value: unknown): value is ErrorBody =>+ !!value && typeof value === 'object' && !Array.isArray(value);++/**+ * An error answer from the API (any non-2xx status).+ *+ * It carries the fields of the `ApiError` body (`code`, `message`, `details`,+ * `requestId`, …), so code that read `error.code` from the plain body keeps+ * working. The OpenResponses route (`POST /responses`) answers+ * `{ error: { type, message, code } }`; its `type` / `code` land in `code`.+ */+export class LobeHubAPIError extends Error {+ /** Stable machine-readable code (see `ApiErrorCode`); branch on this, not on `message`. */+ readonly code: ApiErrorCode | (string & {});+ /** Validation failures list `{ path, message }` per field. */+ readonly details?: LobeHubErrorDetails;+ /** Response headers, e.g. `Retry-After` on a 429. */+ readonly headers?: Headers;+ /** The parsed (or raw text) response body. */+ readonly body: unknown;+ /** Quote it when reporting an issue; also sent as the `X-Request-Id` header. */+ readonly requestId?: string;+ readonly status: number;+ /** `ApiError` body fields, kept for code written against the plain body. */+ readonly success = false as const;+ readonly timestamp?: string;+ /** @deprecated alias of `message` from the `ApiError` body. */+ readonly error?: unknown;++ constructor(status: number, body: unknown, headers?: Headers) {+ const record = isRecord(body) ? body : {};+ const nested = isRecord(record.error) ? record.error : undefined;+ const message =+ (typeof record.message === 'string' && record.message) ||+ (typeof nested?.message === 'string' && nested.message) ||+ (typeof body === 'string' && body) ||+ `Request failed with status ${status}`;++ super(message);+ this.name = 'LobeHubAPIError';+ this.status = status;+ this.body = body;+ this.headers = headers;+ this.code =+ (typeof record.code === 'string' && record.code) ||+ (typeof nested?.code === 'string' && nested.code) ||+ (typeof nested?.type === 'string' && nested.type) ||+ `http_${status}`;+ this.details = record.details;+ this.requestId =+ (typeof record.requestId === 'string' && record.requestId) ||+ headers?.get(REQUEST_ID_HEADER) ||+ undefined;+ this.timestamp = typeof record.timestamp === 'string' ? record.timestamp : undefined;+ this.error = record.error;+ }+}++/** The request never got an HTTP answer: DNS, TLS, connection reset, … */+export class LobeHubConnectionError extends Error {+ constructor(message = 'Connection error', options?: { cause?: unknown }) {+ super(message, options);+ this.name = 'LobeHubConnectionError';+ }+}++/** No response headers arrived within `timeout` milliseconds. */+export class LobeHubTimeoutError extends LobeHubConnectionError {+ readonly timeout: number;++ constructor(timeout: number) {+ super(`Request timed out after ${timeout}ms`);+ this.name = 'LobeHubTimeoutError';+ this.timeout = timeout;+ }+}++/**+ * Turn an error body the generated client rejected with into a+ * `LobeHubAPIError`. Transport failures are already `LobeHubConnectionError`s+ * (see `transport.ts`), and anything else — a caller abort, a request that+ * could not be built — passes through untouched.+ */+export const toLobeHubError = (error: unknown, response?: Response): unknown =>+ response && !response.ok && !(error instanceof Error)+ ? new LobeHubAPIError(response.status, error, response.headers)+ : error;diff --git a/packages/sdk/src/generated/client/types.gen.ts b/packages/sdk/src/generated/client/types.gen.tsindex 193646cddf4..8703e375086 100644--- a/packages/sdk/src/generated/client/types.gen.ts+++ b/packages/sdk/src/generated/client/types.gen.ts@@ -12,6 +12,16 @@ export type ResponseStyle = 'data' | 'fields';export interface Config<T extends ClientOptions = ClientOptions>extends Omit<RequestInit, 'body' | 'headers' | 'method'>, CoreConfig {+ /**+ * Retries on 408/429/5xx and network errors, for idempotent methods or a+ * POST with an `idempotencyKey` only. Applied by `createLobeHub`; default 2.+ */+ maxRetries?: number;+ /**+ * Milliseconds to wait for the response headers, per attempt; `0` disables.+ * Applied by `createLobeHub`; default 600000 (10 minutes).+ */+ timeout?: number;/*** Base URL for all requests made by this client.*/@@ -73,6 +83,11 @@ export interface RequestOptions<| 'sseMaxRetryAttempts'| 'sseMaxRetryDelay'> {+ /**+ * Sent as `Idempotency-Key`: the server runs the request once and replays+ * its answer for repeats, which also makes a POST safe to retry.+ */+ idempotencyKey?: string;/*** Any body that you want to add to your request.*diff --git a/packages/sdk/src/generated/index.ts b/packages/sdk/src/generated/index.tsindex a3e29eb7758..80fb29ea7ad 100644--- a/packages/sdk/src/generated/index.ts+++ b/packages/sdk/src/generated/index.ts@@ -1,4 +1,4 @@// This file is auto-generated by @hey-api/openapi-tsexport { AgentGroups, Agents, ApiKeys, Audio, Chat, ChatGroups, Documents, Eval, Files, Goals, Health, Im, KnowledgeBases, LobeHub, McpServers, Memories, Messages, MessageTranslations, Models, Notifications, type Options, Permissions, Plugins, Providers, PushTokens, Responses, Roles, Signals, Tasks, Topics, Usage as Usage2, Users } from './sdk.gen';-export type { Agent, AgentAccount, AgentAccountCapabilities, AgentAccountList, AgentDetail, AgentFile, AgentGroup, AgentKnowledgeBase, AgentList, AgentPlugin, AgentSignalEmission, AgentSignalReceipt, AgentSignalReceiptList, ApiError, ApiErrorCode, ApiKey, AsyncTaskError, BatchFileUploadResult, BatchGetFilesResult, ChatGenerateReplyResponse, ChatGroup, ChatGroupList, ChatGroupMember, ChatResponse, ChatTranslateResponse, ClientOptions, CreatedAgentGroup, CreatedApiKey, DeleteApiV1AgentGroupsByIdData, DeleteApiV1AgentGroupsByIdError, DeleteApiV1AgentGroupsByIdErrors, DeleteApiV1AgentGroupsByIdResponse, DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentsByIdAccountsByAccountIdData, DeleteApiV1AgentsByIdAccountsByAccountIdError, DeleteApiV1AgentsByIdAccountsByAccountIdErrors, DeleteApiV1AgentsByIdAccountsByAccountIdResponse, DeleteApiV1AgentsByIdAccountsByAccountIdResponses, DeleteApiV1AgentsByIdData, DeleteApiV1AgentsByIdError, DeleteApiV1AgentsByIdErrors, DeleteApiV1AgentsByIdResponse, DeleteApiV1AgentsByIdResponses, DeleteApiV1ApiKeysByIdData, DeleteApiV1ApiKeysByIdError, DeleteApiV1ApiKeysByIdErrors, DeleteApiV1ApiKeysByIdResponse, DeleteApiV1ApiKeysByIdResponses, DeleteApiV1ChatGroupsByIdData, DeleteApiV1ChatGroupsByIdError, DeleteApiV1ChatGroupsByIdErrors, DeleteApiV1ChatGroupsByIdMembersData, DeleteApiV1ChatGroupsByIdMembersError, DeleteApiV1ChatGroupsByIdMembersErrors, DeleteApiV1ChatGroupsByIdMembersResponse, DeleteApiV1ChatGroupsByIdMembersResponses, DeleteApiV1ChatGroupsByIdResponse, DeleteApiV1ChatGroupsByIdResponses, DeleteApiV1EvalBenchmarksByIdData, DeleteApiV1EvalBenchmarksByIdError, DeleteApiV1EvalBenchmarksByIdErrors, DeleteApiV1EvalBenchmarksByIdResponse, DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalDatasetsByIdData, DeleteApiV1EvalDatasetsByIdError, DeleteApiV1EvalDatasetsByIdErrors, DeleteApiV1EvalDatasetsByIdResponse, DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalTestCasesByIdData, DeleteApiV1EvalTestCasesByIdError, DeleteApiV1EvalTestCasesByIdErrors, DeleteApiV1EvalTestCasesByIdResponse, DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1FilesByIdData, DeleteApiV1FilesByIdError, DeleteApiV1FilesByIdErrors, DeleteApiV1FilesByIdResponse, DeleteApiV1FilesByIdResponses, DeleteApiV1GoalsByIdData, DeleteApiV1GoalsByIdError, DeleteApiV1GoalsByIdErrors, DeleteApiV1GoalsByIdResponse, DeleteApiV1GoalsByIdResponses, DeleteApiV1KnowledgeBasesByIdData, DeleteApiV1KnowledgeBasesByIdError, DeleteApiV1KnowledgeBasesByIdErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchData, DeleteApiV1KnowledgeBasesByIdFilesBatchError, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchResponse, DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdResponse, DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1McpServersByIdData, DeleteApiV1McpServersByIdError, DeleteApiV1McpServersByIdErrors, DeleteApiV1McpServersByIdResponse, DeleteApiV1McpServersByIdResponses, DeleteApiV1MemoriesByCategoryByIdData, DeleteApiV1MemoriesByCategoryByIdError, DeleteApiV1MemoriesByCategoryByIdErrors, DeleteApiV1MemoriesByCategoryByIdResponse, DeleteApiV1MemoriesByCategoryByIdResponses, DeleteApiV1MemoriesData, DeleteApiV1MemoriesError, DeleteApiV1MemoriesErrors, DeleteApiV1MemoriesResponse, DeleteApiV1MemoriesResponses, DeleteApiV1MessagesByIdData, DeleteApiV1MessagesByIdError, DeleteApiV1MessagesByIdErrors, DeleteApiV1MessagesByIdResponse, DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesData, DeleteApiV1MessagesError, DeleteApiV1MessagesErrors, DeleteApiV1MessagesResponse, DeleteApiV1MessagesResponses, DeleteApiV1MessageTranslationsByMessageIdData, DeleteApiV1MessageTranslationsByMessageIdError, DeleteApiV1MessageTranslationsByMessageIdErrors, DeleteApiV1MessageTranslationsByMessageIdResponse, DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1PermissionsByIdData, DeleteApiV1PermissionsByIdError, DeleteApiV1PermissionsByIdErrors, DeleteApiV1PermissionsByIdResponse, DeleteApiV1PermissionsByIdResponses, DeleteApiV1ProvidersByIdData, DeleteApiV1ProvidersByIdError, DeleteApiV1ProvidersByIdErrors, DeleteApiV1ProvidersByIdResponse, DeleteApiV1ProvidersByIdResponses, DeleteApiV1PushTokensByDeviceIdData, DeleteApiV1PushTokensByDeviceIdError, DeleteApiV1PushTokensByDeviceIdErrors, DeleteApiV1PushTokensByDeviceIdResponse, DeleteApiV1PushTokensByDeviceIdResponses, DeleteApiV1RolesByIdData, DeleteApiV1RolesByIdError, DeleteApiV1RolesByIdErrors, DeleteApiV1RolesByIdPermissionsData, DeleteApiV1RolesByIdPermissionsError, DeleteApiV1RolesByIdPermissionsErrors, DeleteApiV1RolesByIdPermissionsResponse, DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdResponse, DeleteApiV1RolesByIdResponses, DeleteApiV1TasksByIdData, DeleteApiV1TasksByIdError, DeleteApiV1TasksByIdErrors, DeleteApiV1TasksByIdResponse, DeleteApiV1TasksByIdResponses, DeleteApiV1TopicsByIdData, DeleteApiV1TopicsByIdError, DeleteApiV1TopicsByIdErrors, DeleteApiV1TopicsByIdResponse, DeleteApiV1TopicsByIdResponses, DeleteApiV1UsersByIdData, DeleteApiV1UsersByIdError, DeleteApiV1UsersByIdErrors, DeleteApiV1UsersByIdResponse, DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdRolesData, DeleteApiV1UsersByIdRolesError, DeleteApiV1UsersByIdRolesErrors, DeleteApiV1UsersByIdRolesResponse, DeleteApiV1UsersByIdRolesResponses, DeletedResource, DeletedResources, Document, DocumentSummary, EvalBatchReportResult, EvalBenchmark, EvalBenchmarkRubric, EvalCaseResult, EvalDataset, EvalReportReceipt, EvalReportResult, EvalRetryErrors, EvalRubricScore, EvalRun, EvalRunMetrics, EvalRunResult, EvalRunTopic, EvalStoredResult, EvalTestCase, EvalThreadResult, File, FileAsyncTask, FileChunkStatus, FileChunkTask, FileDetail, FileKnowledgeBaseRef, FileList, FileListItem, FileParseResult, FileUrl, FileUser, GetApiV1AgentGroupsByIdData, GetApiV1AgentGroupsByIdError, GetApiV1AgentGroupsByIdErrors, GetApiV1AgentGroupsByIdResponse, GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsData, GetApiV1AgentGroupsError, GetApiV1AgentGroupsErrors, GetApiV1AgentGroupsResponse, GetApiV1AgentGroupsResponses, GetApiV1AgentsByIdAccountsByAccountIdData, GetApiV1AgentsByIdAccountsByAccountIdError, GetApiV1AgentsByIdAccountsByAccountIdErrors, GetApiV1AgentsByIdAccountsByAccountIdResponse, GetApiV1AgentsByIdAccountsByAccountIdResponses, GetApiV1AgentsByIdAccountsData, GetApiV1AgentsByIdAccountsError, GetApiV1AgentsByIdAccountsErrors, GetApiV1AgentsByIdAccountsResponse, GetApiV1AgentsByIdAccountsResponses, GetApiV1AgentsByIdData, GetApiV1AgentsByIdError, GetApiV1AgentsByIdErrors, GetApiV1AgentsByIdResponse, GetApiV1AgentsByIdResponses, GetApiV1AgentsData, GetApiV1AgentsError, GetApiV1AgentsErrors, GetApiV1AgentsResponse, GetApiV1AgentsResponses, GetApiV1ApiKeysByIdData, GetApiV1ApiKeysByIdError, GetApiV1ApiKeysByIdErrors, GetApiV1ApiKeysByIdResponse, GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysData, GetApiV1ApiKeysError, GetApiV1ApiKeysErrors, GetApiV1ApiKeysResponse, GetApiV1ApiKeysResponses, GetApiV1ChatGroupsByIdData, GetApiV1ChatGroupsByIdError, GetApiV1ChatGroupsByIdErrors, GetApiV1ChatGroupsByIdResponse, GetApiV1ChatGroupsByIdResponses, GetApiV1ChatGroupsData, GetApiV1ChatGroupsError, GetApiV1ChatGroupsErrors, GetApiV1ChatGroupsResponse, GetApiV1ChatGroupsResponses, GetApiV1DocumentsByIdData, GetApiV1DocumentsByIdError, GetApiV1DocumentsByIdErrors, GetApiV1DocumentsByIdResponse, GetApiV1DocumentsByIdResponses, GetApiV1DocumentsData, GetApiV1DocumentsError, GetApiV1DocumentsErrors, GetApiV1DocumentsResponse, GetApiV1DocumentsResponses, GetApiV1EvalBenchmarksByIdData, GetApiV1EvalBenchmarksByIdError, GetApiV1EvalBenchmarksByIdErrors, GetApiV1EvalBenchmarksByIdResponse, GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksData, GetApiV1EvalBenchmarksError, GetApiV1EvalBenchmarksErrors, GetApiV1EvalBenchmarksResponse, GetApiV1EvalBenchmarksResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesData, GetApiV1EvalDatasetsByDatasetIdTestCasesError, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, GetApiV1EvalDatasetsByDatasetIdTestCasesResponse, GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByIdData, GetApiV1EvalDatasetsByIdError, GetApiV1EvalDatasetsByIdErrors, GetApiV1EvalDatasetsByIdResponse, GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsData, GetApiV1EvalDatasetsError, GetApiV1EvalDatasetsErrors, GetApiV1EvalDatasetsResponse, GetApiV1EvalDatasetsResponses, GetApiV1EvalRunsByIdData, GetApiV1EvalRunsByIdError, GetApiV1EvalRunsByIdErrors, GetApiV1EvalRunsByIdResponse, GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdResultsData, GetApiV1EvalRunsByIdResultsError, GetApiV1EvalRunsByIdResultsErrors, GetApiV1EvalRunsByIdResultsResponse, GetApiV1EvalRunsByIdResultsResponses, GetApiV1EvalRunsByIdTopicsData, GetApiV1EvalRunsByIdTopicsError, GetApiV1EvalRunsByIdTopicsErrors, GetApiV1EvalRunsByIdTopicsResponse, GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsData, GetApiV1EvalRunsError, GetApiV1EvalRunsErrors, GetApiV1EvalRunsResponse, GetApiV1EvalRunsResponses, GetApiV1EvalTestCasesByIdData, GetApiV1EvalTestCasesByIdError, GetApiV1EvalTestCasesByIdErrors, GetApiV1EvalTestCasesByIdResponse, GetApiV1EvalTestCasesByIdResponses, GetApiV1FilesByIdChunksData, GetApiV1FilesByIdChunksError, GetApiV1FilesByIdChunksErrors, GetApiV1FilesByIdChunksResponse, GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdData, GetApiV1FilesByIdError, GetApiV1FilesByIdErrors, GetApiV1FilesByIdResponse, GetApiV1FilesByIdResponses, GetApiV1FilesByIdUrlData, GetApiV1FilesByIdUrlError, GetApiV1FilesByIdUrlErrors, GetApiV1FilesByIdUrlResponse, GetApiV1FilesByIdUrlResponses, GetApiV1FilesData, GetApiV1FilesError, GetApiV1FilesErrors, GetApiV1FilesResponse, GetApiV1FilesResponses, GetApiV1GoalsByIdData, GetApiV1GoalsByIdError, GetApiV1GoalsByIdErrors, GetApiV1GoalsByIdResponse, GetApiV1GoalsByIdResponses, GetApiV1GoalsByIdSupervisionData, GetApiV1GoalsByIdSupervisionError, GetApiV1GoalsByIdSupervisionErrors, GetApiV1GoalsByIdSupervisionResponse, GetApiV1GoalsByIdSupervisionResponses, GetApiV1GoalsData, GetApiV1GoalsError, GetApiV1GoalsErrors, GetApiV1GoalsResponse, GetApiV1GoalsResponses, GetApiV1HealthData, GetApiV1HealthResponse, GetApiV1HealthResponses, GetApiV1ImTopicsByTopicIdSyncData, GetApiV1ImTopicsByTopicIdSyncError, GetApiV1ImTopicsByTopicIdSyncErrors, GetApiV1ImTopicsByTopicIdSyncResponse, GetApiV1ImTopicsByTopicIdSyncResponses, GetApiV1KnowledgeBasesByIdData, GetApiV1KnowledgeBasesByIdError, GetApiV1KnowledgeBasesByIdErrors, GetApiV1KnowledgeBasesByIdFilesData, GetApiV1KnowledgeBasesByIdFilesError, GetApiV1KnowledgeBasesByIdFilesErrors, GetApiV1KnowledgeBasesByIdFilesResponse, GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdResponse, GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesData, GetApiV1KnowledgeBasesError, GetApiV1KnowledgeBasesErrors, GetApiV1KnowledgeBasesResponse, GetApiV1KnowledgeBasesResponses, GetApiV1McpServersByIdData, GetApiV1McpServersByIdError, GetApiV1McpServersByIdErrors, GetApiV1McpServersByIdResponse, GetApiV1McpServersByIdResponses, GetApiV1McpServersData, GetApiV1McpServersError, GetApiV1McpServersErrors, GetApiV1McpServersResponse, GetApiV1McpServersResponses, GetApiV1MemoriesByCategoryData, GetApiV1MemoriesByCategoryError, GetApiV1MemoriesByCategoryErrors, GetApiV1MemoriesByCategoryResponse, GetApiV1MemoriesByCategoryResponses, GetApiV1MemoriesPersonaData, GetApiV1MemoriesPersonaError, GetApiV1MemoriesPersonaErrors, GetApiV1MemoriesPersonaResponse, GetApiV1MemoriesPersonaResponses, GetApiV1MemoriesPersonaVersionsData, GetApiV1MemoriesPersonaVersionsError, GetApiV1MemoriesPersonaVersionsErrors, GetApiV1MemoriesPersonaVersionsResponse, GetApiV1MemoriesPersonaVersionsResponses, GetApiV1MessagesByIdData, GetApiV1MessagesByIdError, GetApiV1MessagesByIdErrors, GetApiV1MessagesByIdResponse, GetApiV1MessagesByIdResponses, GetApiV1MessagesCountData, GetApiV1MessagesCountError, GetApiV1MessagesCountErrors, GetApiV1MessagesCountResponse, GetApiV1MessagesCountResponses, GetApiV1MessagesData, GetApiV1MessagesError, GetApiV1MessagesErrors, GetApiV1MessagesResponse, GetApiV1MessagesResponses, GetApiV1MessageTranslationsByMessageIdData, GetApiV1MessageTranslationsByMessageIdError, GetApiV1MessageTranslationsByMessageIdErrors, GetApiV1MessageTranslationsByMessageIdResponse, GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1ModelsByProviderIdByModelIdData, GetApiV1ModelsByProviderIdByModelIdError, GetApiV1ModelsByProviderIdByModelIdErrors, GetApiV1ModelsByProviderIdByModelIdResponse, GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsData, GetApiV1ModelsError, GetApiV1ModelsErrors, GetApiV1ModelsResponse, GetApiV1ModelsResponses, GetApiV1NotificationsCountsData, GetApiV1NotificationsCountsError, GetApiV1NotificationsCountsErrors, GetApiV1NotificationsCountsResponse, GetApiV1NotificationsCountsResponses, GetApiV1NotificationsData, GetApiV1NotificationsError, GetApiV1NotificationsErrors, GetApiV1NotificationsResponse, GetApiV1NotificationsResponses, GetApiV1NotificationsSettingsData, GetApiV1NotificationsSettingsError, GetApiV1NotificationsSettingsErrors, GetApiV1NotificationsSettingsResponse, GetApiV1NotificationsSettingsResponses, GetApiV1NotificationsUnreadCountData, GetApiV1NotificationsUnreadCountError, GetApiV1NotificationsUnreadCountErrors, GetApiV1NotificationsUnreadCountResponse, GetApiV1NotificationsUnreadCountResponses, GetApiV1PermissionsByIdData, GetApiV1PermissionsByIdError, GetApiV1PermissionsByIdErrors, GetApiV1PermissionsByIdResponse, GetApiV1PermissionsByIdResponses, GetApiV1PermissionsData, GetApiV1PermissionsError, GetApiV1PermissionsErrors, GetApiV1PermissionsResponse, GetApiV1PermissionsResponses, GetApiV1PluginsData, GetApiV1PluginsError, GetApiV1PluginsErrors, GetApiV1PluginsResponse, GetApiV1PluginsResponses, GetApiV1ProvidersByIdData, GetApiV1ProvidersByIdError, GetApiV1ProvidersByIdErrors, GetApiV1ProvidersByIdResponse, GetApiV1ProvidersByIdResponses, GetApiV1ProvidersData, GetApiV1ProvidersError, GetApiV1ProvidersErrors, GetApiV1ProvidersResponse, GetApiV1ProvidersResponses, GetApiV1RolesByIdData, GetApiV1RolesByIdError, GetApiV1RolesByIdErrors, GetApiV1RolesByIdPermissionsData, GetApiV1RolesByIdPermissionsError, GetApiV1RolesByIdPermissionsErrors, GetApiV1RolesByIdPermissionsResponse, GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdResponse, GetApiV1RolesByIdResponses, GetApiV1RolesData, GetApiV1RolesError, GetApiV1RolesErrors, GetApiV1RolesResponse, GetApiV1RolesResponses, GetApiV1SignalsReceiptsData, GetApiV1SignalsReceiptsError, GetApiV1SignalsReceiptsErrors, GetApiV1SignalsReceiptsResponse, GetApiV1SignalsReceiptsResponses, GetApiV1TasksByIdData, GetApiV1TasksByIdError, GetApiV1TasksByIdErrors, GetApiV1TasksByIdResponse, GetApiV1TasksByIdResponses, GetApiV1TasksByIdRunsData, GetApiV1TasksByIdRunsError, GetApiV1TasksByIdRunsErrors, GetApiV1TasksByIdRunsResponse, GetApiV1TasksByIdRunsResponses, GetApiV1TasksData, GetApiV1TasksError, GetApiV1TasksErrors, GetApiV1TasksResponse, GetApiV1TasksResponses, GetApiV1TopicsByIdData, GetApiV1TopicsByIdError, GetApiV1TopicsByIdErrors, GetApiV1TopicsByIdResponse, GetApiV1TopicsByIdResponses, GetApiV1TopicsByTopicIdThreadsData, GetApiV1TopicsByTopicIdThreadsError, GetApiV1TopicsByTopicIdThreadsErrors, GetApiV1TopicsByTopicIdThreadsResponse, GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsData, GetApiV1TopicsError, GetApiV1TopicsErrors, GetApiV1TopicsResponse, GetApiV1TopicsResponses, GetApiV1UsageData, GetApiV1UsageError, GetApiV1UsageErrors, GetApiV1UsageResponse, GetApiV1UsageResponses, GetApiV1UsersByIdData, GetApiV1UsersByIdError, GetApiV1UsersByIdErrors, GetApiV1UsersByIdResponse, GetApiV1UsersByIdResponses, GetApiV1UsersByIdRolesData, GetApiV1UsersByIdRolesError, GetApiV1UsersByIdRolesErrors, GetApiV1UsersByIdRolesResponse, GetApiV1UsersByIdRolesResponses, GetApiV1UsersData, GetApiV1UsersError, GetApiV1UsersErrors, GetApiV1UsersMeData, GetApiV1UsersMeError, GetApiV1UsersMeErrors, GetApiV1UsersMeResponse, GetApiV1UsersMeResponses, GetApiV1UsersResponse, GetApiV1UsersResponses, Goal, GoalAdvanceResult, GoalDecisionOption, GoalGraph, GoalGraphDecision, GoalGraphEdge, GoalGraphEvent, GoalGraphNode, GoalGraphSnapshot, GoalGraphWorkVersionLink, GoalList, GoalListItem, GoalRestartResult, GoalSupervision, IdempotencyKey, ImMessage, ImReadResult, ImSendResult, ImSyncResult, InstalledPlugin, InstalledPluginList, KnowledgeBase, KnowledgeBaseDetail, KnowledgeBaseFileOperationResult, KnowledgeBaseList, KnowledgeBaseListItem, McpServer, McpServerSyncResult, McpServerTool, MemoryActivity, MemoryCategoryEntries, MemoryContext, MemoryExperience, MemoryIdentity, MemoryPersona, MemoryPersonaVersion, MemoryPreference, Message, MessageTranslation, MessageTranslationWrite, Model, Notification, NotificationCategoryCount, NotificationSettings, NotificationUnreadCount, PageHasMore, PageNextCursor, PageTotal, PatchApiV1AgentGroupsByIdData, PatchApiV1AgentGroupsByIdError, PatchApiV1AgentGroupsByIdErrors, PatchApiV1AgentGroupsByIdResponse, PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentsByIdAccountsByAccountIdData, PatchApiV1AgentsByIdAccountsByAccountIdError, PatchApiV1AgentsByIdAccountsByAccountIdErrors, PatchApiV1AgentsByIdAccountsByAccountIdResponse, PatchApiV1AgentsByIdAccountsByAccountIdResponses, PatchApiV1AgentsByIdData, PatchApiV1AgentsByIdError, PatchApiV1AgentsByIdErrors, PatchApiV1AgentsByIdResponse, PatchApiV1AgentsByIdResponses, PatchApiV1ApiKeysByIdData, PatchApiV1ApiKeysByIdError, PatchApiV1ApiKeysByIdErrors, PatchApiV1ApiKeysByIdResponse, PatchApiV1ApiKeysByIdResponses, PatchApiV1ChatGroupsByIdData, PatchApiV1ChatGroupsByIdError, PatchApiV1ChatGroupsByIdErrors, PatchApiV1ChatGroupsByIdResponse, PatchApiV1ChatGroupsByIdResponses, PatchApiV1DocumentsByIdData, PatchApiV1DocumentsByIdError, PatchApiV1DocumentsByIdErrors, PatchApiV1DocumentsByIdResponse, PatchApiV1DocumentsByIdResponses, PatchApiV1EvalBenchmarksByIdData, PatchApiV1EvalBenchmarksByIdError, PatchApiV1EvalBenchmarksByIdErrors, PatchApiV1EvalBenchmarksByIdResponse, PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalDatasetsByIdData, PatchApiV1EvalDatasetsByIdError, PatchApiV1EvalDatasetsByIdErrors, PatchApiV1EvalDatasetsByIdResponse, PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalRunsByIdStatusData, PatchApiV1EvalRunsByIdStatusError, PatchApiV1EvalRunsByIdStatusErrors, PatchApiV1EvalRunsByIdStatusResponse, PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalTestCasesByIdData, PatchApiV1EvalTestCasesByIdError, PatchApiV1EvalTestCasesByIdErrors, PatchApiV1EvalTestCasesByIdResponse, PatchApiV1EvalTestCasesByIdResponses, PatchApiV1FilesByIdData, PatchApiV1FilesByIdError, PatchApiV1FilesByIdErrors, PatchApiV1FilesByIdResponse, PatchApiV1FilesByIdResponses, PatchApiV1GoalsByIdData, PatchApiV1GoalsByIdError, PatchApiV1GoalsByIdErrors, PatchApiV1GoalsByIdResponse, PatchApiV1GoalsByIdResponses, PatchApiV1KnowledgeBasesByIdData, PatchApiV1KnowledgeBasesByIdError, PatchApiV1KnowledgeBasesByIdErrors, PatchApiV1KnowledgeBasesByIdResponse, PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1McpServersByIdData, PatchApiV1McpServersByIdError, PatchApiV1McpServersByIdErrors, PatchApiV1McpServersByIdResponse, PatchApiV1McpServersByIdResponses, PatchApiV1MessageTranslationsByMessageIdData, PatchApiV1MessageTranslationsByMessageIdError, PatchApiV1MessageTranslationsByMessageIdErrors, PatchApiV1MessageTranslationsByMessageIdResponse, PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1ModelsByProviderIdByModelIdData, PatchApiV1ModelsByProviderIdByModelIdError, PatchApiV1ModelsByProviderIdByModelIdErrors, PatchApiV1ModelsByProviderIdByModelIdResponse, PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1NotificationsSettingsData, PatchApiV1NotificationsSettingsError, PatchApiV1NotificationsSettingsErrors, PatchApiV1NotificationsSettingsResponse, PatchApiV1NotificationsSettingsResponses, PatchApiV1PermissionsByIdData, PatchApiV1PermissionsByIdError, PatchApiV1PermissionsByIdErrors, PatchApiV1PermissionsByIdResponse, PatchApiV1PermissionsByIdResponses, PatchApiV1ProvidersByIdData, PatchApiV1ProvidersByIdError, PatchApiV1ProvidersByIdErrors, PatchApiV1ProvidersByIdResponse, PatchApiV1ProvidersByIdResponses, PatchApiV1RolesByIdData, PatchApiV1RolesByIdError, PatchApiV1RolesByIdErrors, PatchApiV1RolesByIdPermissionsData, PatchApiV1RolesByIdPermissionsError, PatchApiV1RolesByIdPermissionsErrors, PatchApiV1RolesByIdPermissionsResponse, PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdResponse, PatchApiV1RolesByIdResponses, PatchApiV1TasksByIdData, PatchApiV1TasksByIdError, PatchApiV1TasksByIdErrors, PatchApiV1TasksByIdResponse, PatchApiV1TasksByIdResponses, PatchApiV1TasksByIdStatusData, PatchApiV1TasksByIdStatusError, PatchApiV1TasksByIdStatusErrors, PatchApiV1TasksByIdStatusResponse, PatchApiV1TasksByIdStatusResponses, PatchApiV1TopicsByIdData, PatchApiV1TopicsByIdError, PatchApiV1TopicsByIdErrors, PatchApiV1TopicsByIdResponse, PatchApiV1TopicsByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdError, PatchApiV1UsersByIdErrors, PatchApiV1UsersByIdResponse, PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdRolesData, PatchApiV1UsersByIdRolesError, PatchApiV1UsersByIdRolesErrors, PatchApiV1UsersByIdRolesResponse, PatchApiV1UsersByIdRolesResponses, Permission, PermissionList, PostApiV1AgentGroupsData, PostApiV1AgentGroupsError, PostApiV1AgentGroupsErrors, PostApiV1AgentGroupsResponse, PostApiV1AgentGroupsResponses, PostApiV1AgentsByIdAccountsData, PostApiV1AgentsByIdAccountsError, PostApiV1AgentsByIdAccountsErrors, PostApiV1AgentsByIdAccountsResponse, PostApiV1AgentsByIdAccountsResponses, PostApiV1AgentsByIdDuplicateData, PostApiV1AgentsByIdDuplicateError, PostApiV1AgentsByIdDuplicateErrors, PostApiV1AgentsByIdDuplicateResponse, PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsData, PostApiV1AgentsError, PostApiV1AgentsErrors, PostApiV1AgentsResponse, PostApiV1AgentsResponses, PostApiV1ApiKeysData, PostApiV1ApiKeysError, PostApiV1ApiKeysErrors, PostApiV1ApiKeysResponse, PostApiV1ApiKeysResponses, PostApiV1AudioSpeechData, PostApiV1AudioSpeechError, PostApiV1AudioSpeechErrors, PostApiV1AudioSpeechResponse, PostApiV1AudioSpeechResponses, PostApiV1ChatData, PostApiV1ChatError, PostApiV1ChatErrors, PostApiV1ChatGenerateReplyData, PostApiV1ChatGenerateReplyError, PostApiV1ChatGenerateReplyErrors, PostApiV1ChatGenerateReplyResponse, PostApiV1ChatGenerateReplyResponses, PostApiV1ChatGroupsByIdMembersData, PostApiV1ChatGroupsByIdMembersError, PostApiV1ChatGroupsByIdMembersErrors, PostApiV1ChatGroupsByIdMembersResponse, PostApiV1ChatGroupsByIdMembersResponses, PostApiV1ChatGroupsData, PostApiV1ChatGroupsError, PostApiV1ChatGroupsErrors, PostApiV1ChatGroupsResponse, PostApiV1ChatGroupsResponses, PostApiV1ChatResponse, PostApiV1ChatResponses, PostApiV1ChatTranslateData, PostApiV1ChatTranslateError, PostApiV1ChatTranslateErrors, PostApiV1ChatTranslateResponse, PostApiV1ChatTranslateResponses, PostApiV1DocumentsData, PostApiV1DocumentsError, PostApiV1DocumentsErrors, PostApiV1DocumentsResponse, PostApiV1DocumentsResponses, PostApiV1EvalBenchmarksData, PostApiV1EvalBenchmarksError, PostApiV1EvalBenchmarksErrors, PostApiV1EvalBenchmarksResponse, PostApiV1EvalBenchmarksResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesData, PostApiV1EvalDatasetsByDatasetIdTestCasesError, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, PostApiV1EvalDatasetsByDatasetIdTestCasesResponse, PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsData, PostApiV1EvalDatasetsError, PostApiV1EvalDatasetsErrors, PostApiV1EvalDatasetsResponse, PostApiV1EvalDatasetsResponses, PostApiV1EvalRunsByIdClaimData, PostApiV1EvalRunsByIdClaimError, PostApiV1EvalRunsByIdClaimErrors, PostApiV1EvalRunsByIdClaimResponse, PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdResultsData, PostApiV1EvalRunsByIdResultsError, PostApiV1EvalRunsByIdResultsErrors, PostApiV1EvalRunsByIdResultsResponse, PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdRetryErrorsData, PostApiV1EvalRunsByIdRetryErrorsError, PostApiV1EvalRunsByIdRetryErrorsErrors, PostApiV1EvalRunsByIdRetryErrorsResponse, PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsData, PostApiV1EvalRunsError, PostApiV1EvalRunsErrors, PostApiV1EvalRunsResponse, PostApiV1EvalRunsResponses, PostApiV1FilesBatchesData, PostApiV1FilesBatchesError, PostApiV1FilesBatchesErrors, PostApiV1FilesBatchesResponse, PostApiV1FilesBatchesResponses, PostApiV1FilesByIdChunksData, PostApiV1FilesByIdChunksError, PostApiV1FilesByIdChunksErrors, PostApiV1FilesByIdChunksResponse, PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdParsesData, PostApiV1FilesByIdParsesError, PostApiV1FilesByIdParsesErrors, PostApiV1FilesByIdParsesResponse, PostApiV1FilesByIdParsesResponses, PostApiV1FilesData, PostApiV1FilesError, PostApiV1FilesErrors, PostApiV1FilesQueriesData, PostApiV1FilesQueriesError, PostApiV1FilesQueriesErrors, PostApiV1FilesQueriesResponse, PostApiV1FilesQueriesResponses, PostApiV1FilesResponse, PostApiV1FilesResponses, PostApiV1GoalsByIdAdvanceData, PostApiV1GoalsByIdAdvanceError, PostApiV1GoalsByIdAdvanceErrors, PostApiV1GoalsByIdAdvanceResponse, PostApiV1GoalsByIdAdvanceResponses, PostApiV1GoalsByIdPauseData, PostApiV1GoalsByIdPauseError, PostApiV1GoalsByIdPauseErrors, PostApiV1GoalsByIdPauseResponse, PostApiV1GoalsByIdPauseResponses, PostApiV1GoalsByIdRestartData, PostApiV1GoalsByIdRestartError, PostApiV1GoalsByIdRestartErrors, PostApiV1GoalsByIdRestartResponse, PostApiV1GoalsByIdRestartResponses, PostApiV1GoalsByIdResumeData, PostApiV1GoalsByIdResumeError, PostApiV1GoalsByIdResumeErrors, PostApiV1GoalsByIdResumeResponse, PostApiV1GoalsByIdResumeResponses, PostApiV1GoalsData, PostApiV1GoalsError, PostApiV1GoalsErrors, PostApiV1GoalsResponse, PostApiV1GoalsResponses, PostApiV1ImMessagesData, PostApiV1ImMessagesError, PostApiV1ImMessagesErrors, PostApiV1ImMessagesResponse, PostApiV1ImMessagesResponses, PostApiV1ImTopicsByTopicIdReadData, PostApiV1ImTopicsByTopicIdReadError, PostApiV1ImTopicsByTopicIdReadErrors, PostApiV1ImTopicsByTopicIdReadResponse, PostApiV1ImTopicsByTopicIdReadResponses, PostApiV1KnowledgeBasesByIdFilesBatchData, PostApiV1KnowledgeBasesByIdFilesBatchError, PostApiV1KnowledgeBasesByIdFilesBatchErrors, PostApiV1KnowledgeBasesByIdFilesBatchResponse, PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesMoveData, PostApiV1KnowledgeBasesByIdFilesMoveError, PostApiV1KnowledgeBasesByIdFilesMoveErrors, PostApiV1KnowledgeBasesByIdFilesMoveResponse, PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesData, PostApiV1KnowledgeBasesError, PostApiV1KnowledgeBasesErrors, PostApiV1KnowledgeBasesResponse, PostApiV1KnowledgeBasesResponses, PostApiV1McpServersByIdSyncData, PostApiV1McpServersByIdSyncError, PostApiV1McpServersByIdSyncErrors, PostApiV1McpServersByIdSyncResponse, PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersData, PostApiV1McpServersError, PostApiV1McpServersErrors, PostApiV1McpServersResponse, PostApiV1McpServersResponses, PostApiV1MessagesData, PostApiV1MessagesError, PostApiV1MessagesErrors, PostApiV1MessagesRepliesData, PostApiV1MessagesRepliesError, PostApiV1MessagesRepliesErrors, PostApiV1MessagesRepliesResponse, PostApiV1MessagesRepliesResponses, PostApiV1MessagesResponse, PostApiV1MessagesResponses, PostApiV1MessageTranslationsByMessageIdData, PostApiV1MessageTranslationsByMessageIdError, PostApiV1MessageTranslationsByMessageIdErrors, PostApiV1MessageTranslationsByMessageIdResponse, PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1ModelsData, PostApiV1ModelsError, PostApiV1ModelsErrors, PostApiV1ModelsResponse, PostApiV1ModelsResponses, PostApiV1NotificationsArchiveAllData, PostApiV1NotificationsArchiveAllError, PostApiV1NotificationsArchiveAllErrors, PostApiV1NotificationsArchiveAllResponse, PostApiV1NotificationsArchiveAllResponses, PostApiV1NotificationsByIdArchiveData, PostApiV1NotificationsByIdArchiveError, PostApiV1NotificationsByIdArchiveErrors, PostApiV1NotificationsByIdArchiveResponse, PostApiV1NotificationsByIdArchiveResponses, PostApiV1NotificationsReadAllData, PostApiV1NotificationsReadAllError, PostApiV1NotificationsReadAllErrors, PostApiV1NotificationsReadAllResponse, PostApiV1NotificationsReadAllResponses, PostApiV1NotificationsReadData, PostApiV1NotificationsReadError, PostApiV1NotificationsReadErrors, PostApiV1NotificationsReadResponse, PostApiV1NotificationsReadResponses, PostApiV1PermissionsData, PostApiV1PermissionsError, PostApiV1PermissionsErrors, PostApiV1PermissionsResponse, PostApiV1PermissionsResponses, PostApiV1ProvidersData, PostApiV1ProvidersError, PostApiV1ProvidersErrors, PostApiV1ProvidersResponse, PostApiV1ProvidersResponses, PostApiV1ResponsesData, PostApiV1ResponsesError, PostApiV1ResponsesErrors, PostApiV1ResponsesResponse, PostApiV1ResponsesResponses, PostApiV1RolesData, PostApiV1RolesError, PostApiV1RolesErrors, PostApiV1RolesResponse, PostApiV1RolesResponses, PostApiV1SignalsSourceEventsData, PostApiV1SignalsSourceEventsError, PostApiV1SignalsSourceEventsErrors, PostApiV1SignalsSourceEventsResponse, PostApiV1SignalsSourceEventsResponses, PostApiV1SignalsTriggerData, PostApiV1SignalsTriggerError, PostApiV1SignalsTriggerErrors, PostApiV1SignalsTriggerResponse, PostApiV1SignalsTriggerResponses, PostApiV1TasksByIdRunsData, PostApiV1TasksByIdRunsError, PostApiV1TasksByIdRunsErrors, PostApiV1TasksByIdRunsResponse, PostApiV1TasksByIdRunsResponses, PostApiV1TasksData, PostApiV1TasksError, PostApiV1TasksErrors, PostApiV1TasksResponse, PostApiV1TasksResponses, PostApiV1TopicsData, PostApiV1TopicsError, PostApiV1TopicsErrors, PostApiV1TopicsResponse, PostApiV1TopicsResponses, PostApiV1UsersData, PostApiV1UsersError, PostApiV1UsersErrors, PostApiV1UsersResponse, PostApiV1UsersResponses, Provider, PushTokenRegistration, PutApiV1AgentsByIdAccountsByAccountIdCredentialData, PutApiV1AgentsByIdAccountsByAccountIdCredentialError, PutApiV1AgentsByIdAccountsByAccountIdCredentialErrors, PutApiV1AgentsByIdAccountsByAccountIdCredentialResponse, PutApiV1AgentsByIdAccountsByAccountIdCredentialResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultError, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponse, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, PutApiV1PushTokensByDeviceIdData, PutApiV1PushTokensByDeviceIdError, PutApiV1PushTokensByDeviceIdErrors, PutApiV1PushTokensByDeviceIdResponse, PutApiV1PushTokensByDeviceIdResponses, ResponseError, ResponseFunctionCall, ResponseFunctionCallOutput, ResponseObject, ResponseOutputItem, ResponseOutputMessage, ResponseOutputText, ResponseUsage, Role, RoleList, RolePermission, RolePermissionList, RolePermissionsUpdateResult, Task, TaskDetail, TaskDetailActivity, TaskDetailSubtask, TaskDetailWorkspaceNode, TaskLabelRef, TaskList, TaskListItem, TaskRun, TaskRunStarted, TaskStatusUpdateResult, Topic, TopicSummary, TopicThread, Usage, User, UserIdentity, UserList, UserRole } from './types.gen';+export type { Agent, AgentAccount, AgentAccountCapabilities, AgentAccountList, AgentDetail, AgentFile, AgentGroup, AgentKnowledgeBase, AgentList, AgentPlugin, AgentSignalEmission, AgentSignalReceipt, AgentSignalReceiptList, ApiError, ApiErrorCode, ApiKey, AsyncTaskError, BatchFileUploadResult, BatchGetFilesResult, ChatGenerateReplyResponse, ChatGroup, ChatGroupList, ChatGroupMember, ChatResponse, ChatTranslateResponse, ClientOptions, CreatedAgentGroup, CreatedApiKey, DeleteApiV1AgentGroupsByIdData, DeleteApiV1AgentGroupsByIdError, DeleteApiV1AgentGroupsByIdErrors, DeleteApiV1AgentGroupsByIdResponse, DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentsByIdAccountsByAccountIdData, DeleteApiV1AgentsByIdAccountsByAccountIdError, DeleteApiV1AgentsByIdAccountsByAccountIdErrors, DeleteApiV1AgentsByIdAccountsByAccountIdResponse, DeleteApiV1AgentsByIdAccountsByAccountIdResponses, DeleteApiV1AgentsByIdData, DeleteApiV1AgentsByIdError, DeleteApiV1AgentsByIdErrors, DeleteApiV1AgentsByIdResponse, DeleteApiV1AgentsByIdResponses, DeleteApiV1ApiKeysByIdData, DeleteApiV1ApiKeysByIdError, DeleteApiV1ApiKeysByIdErrors, DeleteApiV1ApiKeysByIdResponse, DeleteApiV1ApiKeysByIdResponses, DeleteApiV1ChatGroupsByIdData, DeleteApiV1ChatGroupsByIdError, DeleteApiV1ChatGroupsByIdErrors, DeleteApiV1ChatGroupsByIdMembersData, DeleteApiV1ChatGroupsByIdMembersError, DeleteApiV1ChatGroupsByIdMembersErrors, DeleteApiV1ChatGroupsByIdMembersResponse, DeleteApiV1ChatGroupsByIdMembersResponses, DeleteApiV1ChatGroupsByIdResponse, DeleteApiV1ChatGroupsByIdResponses, DeleteApiV1EvalBenchmarksByIdData, DeleteApiV1EvalBenchmarksByIdError, DeleteApiV1EvalBenchmarksByIdErrors, DeleteApiV1EvalBenchmarksByIdResponse, DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalDatasetsByIdData, DeleteApiV1EvalDatasetsByIdError, DeleteApiV1EvalDatasetsByIdErrors, DeleteApiV1EvalDatasetsByIdResponse, DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalTestCasesByIdData, DeleteApiV1EvalTestCasesByIdError, DeleteApiV1EvalTestCasesByIdErrors, DeleteApiV1EvalTestCasesByIdResponse, DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1FilesByIdData, DeleteApiV1FilesByIdError, DeleteApiV1FilesByIdErrors, DeleteApiV1FilesByIdResponse, DeleteApiV1FilesByIdResponses, DeleteApiV1GoalsByIdData, DeleteApiV1GoalsByIdError, DeleteApiV1GoalsByIdErrors, DeleteApiV1GoalsByIdResponse, DeleteApiV1GoalsByIdResponses, DeleteApiV1KnowledgeBasesByIdData, DeleteApiV1KnowledgeBasesByIdError, DeleteApiV1KnowledgeBasesByIdErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchData, DeleteApiV1KnowledgeBasesByIdFilesBatchError, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, DeleteApiV1KnowledgeBasesByIdFilesBatchResponse, DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdResponse, DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1McpServersByIdData, DeleteApiV1McpServersByIdError, DeleteApiV1McpServersByIdErrors, DeleteApiV1McpServersByIdResponse, DeleteApiV1McpServersByIdResponses, DeleteApiV1MemoriesByCategoryByIdData, DeleteApiV1MemoriesByCategoryByIdError, DeleteApiV1MemoriesByCategoryByIdErrors, DeleteApiV1MemoriesByCategoryByIdResponse, DeleteApiV1MemoriesByCategoryByIdResponses, DeleteApiV1MemoriesData, DeleteApiV1MemoriesError, DeleteApiV1MemoriesErrors, DeleteApiV1MemoriesResponse, DeleteApiV1MemoriesResponses, DeleteApiV1MessagesByIdData, DeleteApiV1MessagesByIdError, DeleteApiV1MessagesByIdErrors, DeleteApiV1MessagesByIdResponse, DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesData, DeleteApiV1MessagesError, DeleteApiV1MessagesErrors, DeleteApiV1MessagesResponse, DeleteApiV1MessagesResponses, DeleteApiV1MessageTranslationsByMessageIdData, DeleteApiV1MessageTranslationsByMessageIdError, DeleteApiV1MessageTranslationsByMessageIdErrors, DeleteApiV1MessageTranslationsByMessageIdResponse, DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1PermissionsByIdData, DeleteApiV1PermissionsByIdError, DeleteApiV1PermissionsByIdErrors, DeleteApiV1PermissionsByIdResponse, DeleteApiV1PermissionsByIdResponses, DeleteApiV1ProvidersByIdData, DeleteApiV1ProvidersByIdError, DeleteApiV1ProvidersByIdErrors, DeleteApiV1ProvidersByIdResponse, DeleteApiV1ProvidersByIdResponses, DeleteApiV1PushTokensByDeviceIdData, DeleteApiV1PushTokensByDeviceIdError, DeleteApiV1PushTokensByDeviceIdErrors, DeleteApiV1PushTokensByDeviceIdResponse, DeleteApiV1PushTokensByDeviceIdResponses, DeleteApiV1RolesByIdData, DeleteApiV1RolesByIdError, DeleteApiV1RolesByIdErrors, DeleteApiV1RolesByIdPermissionsData, DeleteApiV1RolesByIdPermissionsError, DeleteApiV1RolesByIdPermissionsErrors, DeleteApiV1RolesByIdPermissionsResponse, DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdResponse, DeleteApiV1RolesByIdResponses, DeleteApiV1TasksByIdData, DeleteApiV1TasksByIdError, DeleteApiV1TasksByIdErrors, DeleteApiV1TasksByIdResponse, DeleteApiV1TasksByIdResponses, DeleteApiV1TopicsByIdData, DeleteApiV1TopicsByIdError, DeleteApiV1TopicsByIdErrors, DeleteApiV1TopicsByIdResponse, DeleteApiV1TopicsByIdResponses, DeleteApiV1UsersByIdData, DeleteApiV1UsersByIdError, DeleteApiV1UsersByIdErrors, DeleteApiV1UsersByIdResponse, DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdRolesData, DeleteApiV1UsersByIdRolesError, DeleteApiV1UsersByIdRolesErrors, DeleteApiV1UsersByIdRolesResponse, DeleteApiV1UsersByIdRolesResponses, DeletedResource, DeletedResources, Document, DocumentSummary, EvalBatchReportResult, EvalBenchmark, EvalBenchmarkRubric, EvalCaseResult, EvalDataset, EvalReportReceipt, EvalReportResult, EvalRetryErrors, EvalRubricScore, EvalRun, EvalRunMetrics, EvalRunResult, EvalRunTopic, EvalStoredResult, EvalTestCase, EvalThreadResult, File, FileAsyncTask, FileChunkStatus, FileChunkTask, FileDetail, FileKnowledgeBaseRef, FileList, FileListItem, FileParseResult, FileUrl, FileUser, GetApiV1AgentGroupsByIdData, GetApiV1AgentGroupsByIdError, GetApiV1AgentGroupsByIdErrors, GetApiV1AgentGroupsByIdResponse, GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsData, GetApiV1AgentGroupsError, GetApiV1AgentGroupsErrors, GetApiV1AgentGroupsResponse, GetApiV1AgentGroupsResponses, GetApiV1AgentsByIdAccountsByAccountIdData, GetApiV1AgentsByIdAccountsByAccountIdError, GetApiV1AgentsByIdAccountsByAccountIdErrors, GetApiV1AgentsByIdAccountsByAccountIdResponse, GetApiV1AgentsByIdAccountsByAccountIdResponses, GetApiV1AgentsByIdAccountsData, GetApiV1AgentsByIdAccountsError, GetApiV1AgentsByIdAccountsErrors, GetApiV1AgentsByIdAccountsResponse, GetApiV1AgentsByIdAccountsResponses, GetApiV1AgentsByIdData, GetApiV1AgentsByIdError, GetApiV1AgentsByIdErrors, GetApiV1AgentsByIdResponse, GetApiV1AgentsByIdResponses, GetApiV1AgentsData, GetApiV1AgentsError, GetApiV1AgentsErrors, GetApiV1AgentsResponse, GetApiV1AgentsResponses, GetApiV1ApiKeysByIdData, GetApiV1ApiKeysByIdError, GetApiV1ApiKeysByIdErrors, GetApiV1ApiKeysByIdResponse, GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysData, GetApiV1ApiKeysError, GetApiV1ApiKeysErrors, GetApiV1ApiKeysResponse, GetApiV1ApiKeysResponses, GetApiV1ChatGroupsByIdData, GetApiV1ChatGroupsByIdError, GetApiV1ChatGroupsByIdErrors, GetApiV1ChatGroupsByIdResponse, GetApiV1ChatGroupsByIdResponses, GetApiV1ChatGroupsData, GetApiV1ChatGroupsError, GetApiV1ChatGroupsErrors, GetApiV1ChatGroupsResponse, GetApiV1ChatGroupsResponses, GetApiV1DocumentsByIdData, GetApiV1DocumentsByIdError, GetApiV1DocumentsByIdErrors, GetApiV1DocumentsByIdResponse, GetApiV1DocumentsByIdResponses, GetApiV1DocumentsData, GetApiV1DocumentsError, GetApiV1DocumentsErrors, GetApiV1DocumentsResponse, GetApiV1DocumentsResponses, GetApiV1EvalBenchmarksByIdData, GetApiV1EvalBenchmarksByIdError, GetApiV1EvalBenchmarksByIdErrors, GetApiV1EvalBenchmarksByIdResponse, GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksData, GetApiV1EvalBenchmarksError, GetApiV1EvalBenchmarksErrors, GetApiV1EvalBenchmarksResponse, GetApiV1EvalBenchmarksResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesData, GetApiV1EvalDatasetsByDatasetIdTestCasesError, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, GetApiV1EvalDatasetsByDatasetIdTestCasesResponse, GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByIdData, GetApiV1EvalDatasetsByIdError, GetApiV1EvalDatasetsByIdErrors, GetApiV1EvalDatasetsByIdResponse, GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsData, GetApiV1EvalDatasetsError, GetApiV1EvalDatasetsErrors, GetApiV1EvalDatasetsResponse, GetApiV1EvalDatasetsResponses, GetApiV1EvalRunsByIdData, GetApiV1EvalRunsByIdError, GetApiV1EvalRunsByIdErrors, GetApiV1EvalRunsByIdResponse, GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdResultsData, GetApiV1EvalRunsByIdResultsError, GetApiV1EvalRunsByIdResultsErrors, GetApiV1EvalRunsByIdResultsResponse, GetApiV1EvalRunsByIdResultsResponses, GetApiV1EvalRunsByIdTopicsData, GetApiV1EvalRunsByIdTopicsError, GetApiV1EvalRunsByIdTopicsErrors, GetApiV1EvalRunsByIdTopicsResponse, GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsData, GetApiV1EvalRunsError, GetApiV1EvalRunsErrors, GetApiV1EvalRunsResponse, GetApiV1EvalRunsResponses, GetApiV1EvalTestCasesByIdData, GetApiV1EvalTestCasesByIdError, GetApiV1EvalTestCasesByIdErrors, GetApiV1EvalTestCasesByIdResponse, GetApiV1EvalTestCasesByIdResponses, GetApiV1FilesByIdChunksData, GetApiV1FilesByIdChunksError, GetApiV1FilesByIdChunksErrors, GetApiV1FilesByIdChunksResponse, GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdData, GetApiV1FilesByIdError, GetApiV1FilesByIdErrors, GetApiV1FilesByIdResponse, GetApiV1FilesByIdResponses, GetApiV1FilesByIdUrlData, GetApiV1FilesByIdUrlError, GetApiV1FilesByIdUrlErrors, GetApiV1FilesByIdUrlResponse, GetApiV1FilesByIdUrlResponses, GetApiV1FilesData, GetApiV1FilesError, GetApiV1FilesErrors, GetApiV1FilesResponse, GetApiV1FilesResponses, GetApiV1GoalsByIdData, GetApiV1GoalsByIdError, GetApiV1GoalsByIdErrors, GetApiV1GoalsByIdResponse, GetApiV1GoalsByIdResponses, GetApiV1GoalsByIdSupervisionData, GetApiV1GoalsByIdSupervisionError, GetApiV1GoalsByIdSupervisionErrors, GetApiV1GoalsByIdSupervisionResponse, GetApiV1GoalsByIdSupervisionResponses, GetApiV1GoalsData, GetApiV1GoalsError, GetApiV1GoalsErrors, GetApiV1GoalsResponse, GetApiV1GoalsResponses, GetApiV1HealthData, GetApiV1HealthResponse, GetApiV1HealthResponses, GetApiV1ImTopicsByTopicIdSyncData, GetApiV1ImTopicsByTopicIdSyncError, GetApiV1ImTopicsByTopicIdSyncErrors, GetApiV1ImTopicsByTopicIdSyncResponse, GetApiV1ImTopicsByTopicIdSyncResponses, GetApiV1KnowledgeBasesByIdData, GetApiV1KnowledgeBasesByIdError, GetApiV1KnowledgeBasesByIdErrors, GetApiV1KnowledgeBasesByIdFilesData, GetApiV1KnowledgeBasesByIdFilesError, GetApiV1KnowledgeBasesByIdFilesErrors, GetApiV1KnowledgeBasesByIdFilesResponse, GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdResponse, GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesData, GetApiV1KnowledgeBasesError, GetApiV1KnowledgeBasesErrors, GetApiV1KnowledgeBasesResponse, GetApiV1KnowledgeBasesResponses, GetApiV1McpServersByIdData, GetApiV1McpServersByIdError, GetApiV1McpServersByIdErrors, GetApiV1McpServersByIdResponse, GetApiV1McpServersByIdResponses, GetApiV1McpServersData, GetApiV1McpServersError, GetApiV1McpServersErrors, GetApiV1McpServersResponse, GetApiV1McpServersResponses, GetApiV1MemoriesByCategoryData, GetApiV1MemoriesByCategoryError, GetApiV1MemoriesByCategoryErrors, GetApiV1MemoriesByCategoryResponse, GetApiV1MemoriesByCategoryResponses, GetApiV1MemoriesPersonaData, GetApiV1MemoriesPersonaError, GetApiV1MemoriesPersonaErrors, GetApiV1MemoriesPersonaResponse, GetApiV1MemoriesPersonaResponses, GetApiV1MemoriesPersonaVersionsData, GetApiV1MemoriesPersonaVersionsError, GetApiV1MemoriesPersonaVersionsErrors, GetApiV1MemoriesPersonaVersionsResponse, GetApiV1MemoriesPersonaVersionsResponses, GetApiV1MessagesByIdData, GetApiV1MessagesByIdError, GetApiV1MessagesByIdErrors, GetApiV1MessagesByIdResponse, GetApiV1MessagesByIdResponses, GetApiV1MessagesCountData, GetApiV1MessagesCountError, GetApiV1MessagesCountErrors, GetApiV1MessagesCountResponse, GetApiV1MessagesCountResponses, GetApiV1MessagesData, GetApiV1MessagesError, GetApiV1MessagesErrors, GetApiV1MessagesResponse, GetApiV1MessagesResponses, GetApiV1MessageTranslationsByMessageIdData, GetApiV1MessageTranslationsByMessageIdError, GetApiV1MessageTranslationsByMessageIdErrors, GetApiV1MessageTranslationsByMessageIdResponse, GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1ModelsByProviderIdByModelIdData, GetApiV1ModelsByProviderIdByModelIdError, GetApiV1ModelsByProviderIdByModelIdErrors, GetApiV1ModelsByProviderIdByModelIdResponse, GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsData, GetApiV1ModelsError, GetApiV1ModelsErrors, GetApiV1ModelsResponse, GetApiV1ModelsResponses, GetApiV1NotificationsCountsData, GetApiV1NotificationsCountsError, GetApiV1NotificationsCountsErrors, GetApiV1NotificationsCountsResponse, GetApiV1NotificationsCountsResponses, GetApiV1NotificationsData, GetApiV1NotificationsError, GetApiV1NotificationsErrors, GetApiV1NotificationsResponse, GetApiV1NotificationsResponses, GetApiV1NotificationsSettingsData, GetApiV1NotificationsSettingsError, GetApiV1NotificationsSettingsErrors, GetApiV1NotificationsSettingsResponse, GetApiV1NotificationsSettingsResponses, GetApiV1NotificationsUnreadCountData, GetApiV1NotificationsUnreadCountError, GetApiV1NotificationsUnreadCountErrors, GetApiV1NotificationsUnreadCountResponse, GetApiV1NotificationsUnreadCountResponses, GetApiV1PermissionsByIdData, GetApiV1PermissionsByIdError, GetApiV1PermissionsByIdErrors, GetApiV1PermissionsByIdResponse, GetApiV1PermissionsByIdResponses, GetApiV1PermissionsData, GetApiV1PermissionsError, GetApiV1PermissionsErrors, GetApiV1PermissionsResponse, GetApiV1PermissionsResponses, GetApiV1PluginsData, GetApiV1PluginsError, GetApiV1PluginsErrors, GetApiV1PluginsResponse, GetApiV1PluginsResponses, GetApiV1ProvidersByIdData, GetApiV1ProvidersByIdError, GetApiV1ProvidersByIdErrors, GetApiV1ProvidersByIdResponse, GetApiV1ProvidersByIdResponses, GetApiV1ProvidersData, GetApiV1ProvidersError, GetApiV1ProvidersErrors, GetApiV1ProvidersResponse, GetApiV1ProvidersResponses, GetApiV1RolesByIdData, GetApiV1RolesByIdError, GetApiV1RolesByIdErrors, GetApiV1RolesByIdPermissionsData, GetApiV1RolesByIdPermissionsError, GetApiV1RolesByIdPermissionsErrors, GetApiV1RolesByIdPermissionsResponse, GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdResponse, GetApiV1RolesByIdResponses, GetApiV1RolesData, GetApiV1RolesError, GetApiV1RolesErrors, GetApiV1RolesResponse, GetApiV1RolesResponses, GetApiV1SignalsReceiptsData, GetApiV1SignalsReceiptsError, GetApiV1SignalsReceiptsErrors, GetApiV1SignalsReceiptsResponse, GetApiV1SignalsReceiptsResponses, GetApiV1TasksByIdData, GetApiV1TasksByIdError, GetApiV1TasksByIdErrors, GetApiV1TasksByIdResponse, GetApiV1TasksByIdResponses, GetApiV1TasksByIdRunsData, GetApiV1TasksByIdRunsError, GetApiV1TasksByIdRunsErrors, GetApiV1TasksByIdRunsResponse, GetApiV1TasksByIdRunsResponses, GetApiV1TasksData, GetApiV1TasksError, GetApiV1TasksErrors, GetApiV1TasksResponse, GetApiV1TasksResponses, GetApiV1TopicsByIdData, GetApiV1TopicsByIdError, GetApiV1TopicsByIdErrors, GetApiV1TopicsByIdResponse, GetApiV1TopicsByIdResponses, GetApiV1TopicsByTopicIdThreadsData, GetApiV1TopicsByTopicIdThreadsError, GetApiV1TopicsByTopicIdThreadsErrors, GetApiV1TopicsByTopicIdThreadsResponse, GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsData, GetApiV1TopicsError, GetApiV1TopicsErrors, GetApiV1TopicsResponse, GetApiV1TopicsResponses, GetApiV1UsageData, GetApiV1UsageError, GetApiV1UsageErrors, GetApiV1UsageResponse, GetApiV1UsageResponses, GetApiV1UsersByIdData, GetApiV1UsersByIdError, GetApiV1UsersByIdErrors, GetApiV1UsersByIdResponse, GetApiV1UsersByIdResponses, GetApiV1UsersByIdRolesData, GetApiV1UsersByIdRolesError, GetApiV1UsersByIdRolesErrors, GetApiV1UsersByIdRolesResponse, GetApiV1UsersByIdRolesResponses, GetApiV1UsersData, GetApiV1UsersError, GetApiV1UsersErrors, GetApiV1UsersMeData, GetApiV1UsersMeError, GetApiV1UsersMeErrors, GetApiV1UsersMeResponse, GetApiV1UsersMeResponses, GetApiV1UsersResponse, GetApiV1UsersResponses, Goal, GoalAdvanceResult, GoalDecisionOption, GoalGraph, GoalGraphDecision, GoalGraphEdge, GoalGraphEvent, GoalGraphNode, GoalGraphSnapshot, GoalGraphWorkVersionLink, GoalList, GoalListItem, GoalRestartResult, GoalSupervision, IdempotencyKey, ImMessage, ImReadResult, ImSendResult, ImSyncResult, InstalledPlugin, InstalledPluginList, KnowledgeBase, KnowledgeBaseDetail, KnowledgeBaseFileOperationResult, KnowledgeBaseList, KnowledgeBaseListItem, McpServer, McpServerSyncResult, McpServerTool, MemoryActivity, MemoryCategoryEntries, MemoryContext, MemoryExperience, MemoryIdentity, MemoryPersona, MemoryPersonaVersion, MemoryPreference, Message, MessageTranslation, MessageTranslationWrite, Model, Notification, NotificationCategoryCount, NotificationSettings, NotificationUnreadCount, PageHasMore, PageNextCursor, PageTotal, PatchApiV1AgentGroupsByIdData, PatchApiV1AgentGroupsByIdError, PatchApiV1AgentGroupsByIdErrors, PatchApiV1AgentGroupsByIdResponse, PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentsByIdAccountsByAccountIdData, PatchApiV1AgentsByIdAccountsByAccountIdError, PatchApiV1AgentsByIdAccountsByAccountIdErrors, PatchApiV1AgentsByIdAccountsByAccountIdResponse, PatchApiV1AgentsByIdAccountsByAccountIdResponses, PatchApiV1AgentsByIdData, PatchApiV1AgentsByIdError, PatchApiV1AgentsByIdErrors, PatchApiV1AgentsByIdResponse, PatchApiV1AgentsByIdResponses, PatchApiV1ApiKeysByIdData, PatchApiV1ApiKeysByIdError, PatchApiV1ApiKeysByIdErrors, PatchApiV1ApiKeysByIdResponse, PatchApiV1ApiKeysByIdResponses, PatchApiV1ChatGroupsByIdData, PatchApiV1ChatGroupsByIdError, PatchApiV1ChatGroupsByIdErrors, PatchApiV1ChatGroupsByIdResponse, PatchApiV1ChatGroupsByIdResponses, PatchApiV1DocumentsByIdData, PatchApiV1DocumentsByIdError, PatchApiV1DocumentsByIdErrors, PatchApiV1DocumentsByIdResponse, PatchApiV1DocumentsByIdResponses, PatchApiV1EvalBenchmarksByIdData, PatchApiV1EvalBenchmarksByIdError, PatchApiV1EvalBenchmarksByIdErrors, PatchApiV1EvalBenchmarksByIdResponse, PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalDatasetsByIdData, PatchApiV1EvalDatasetsByIdError, PatchApiV1EvalDatasetsByIdErrors, PatchApiV1EvalDatasetsByIdResponse, PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalRunsByIdStatusData, PatchApiV1EvalRunsByIdStatusError, PatchApiV1EvalRunsByIdStatusErrors, PatchApiV1EvalRunsByIdStatusResponse, PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalTestCasesByIdData, PatchApiV1EvalTestCasesByIdError, PatchApiV1EvalTestCasesByIdErrors, PatchApiV1EvalTestCasesByIdResponse, PatchApiV1EvalTestCasesByIdResponses, PatchApiV1FilesByIdData, PatchApiV1FilesByIdError, PatchApiV1FilesByIdErrors, PatchApiV1FilesByIdResponse, PatchApiV1FilesByIdResponses, PatchApiV1GoalsByIdData, PatchApiV1GoalsByIdError, PatchApiV1GoalsByIdErrors, PatchApiV1GoalsByIdResponse, PatchApiV1GoalsByIdResponses, PatchApiV1KnowledgeBasesByIdData, PatchApiV1KnowledgeBasesByIdError, PatchApiV1KnowledgeBasesByIdErrors, PatchApiV1KnowledgeBasesByIdResponse, PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1McpServersByIdData, PatchApiV1McpServersByIdError, PatchApiV1McpServersByIdErrors, PatchApiV1McpServersByIdResponse, PatchApiV1McpServersByIdResponses, PatchApiV1MessageTranslationsByMessageIdData, PatchApiV1MessageTranslationsByMessageIdError, PatchApiV1MessageTranslationsByMessageIdErrors, PatchApiV1MessageTranslationsByMessageIdResponse, PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1ModelsByProviderIdByModelIdData, PatchApiV1ModelsByProviderIdByModelIdError, PatchApiV1ModelsByProviderIdByModelIdErrors, PatchApiV1ModelsByProviderIdByModelIdResponse, PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1NotificationsSettingsData, PatchApiV1NotificationsSettingsError, PatchApiV1NotificationsSettingsErrors, PatchApiV1NotificationsSettingsResponse, PatchApiV1NotificationsSettingsResponses, PatchApiV1PermissionsByIdData, PatchApiV1PermissionsByIdError, PatchApiV1PermissionsByIdErrors, PatchApiV1PermissionsByIdResponse, PatchApiV1PermissionsByIdResponses, PatchApiV1ProvidersByIdData, PatchApiV1ProvidersByIdError, PatchApiV1ProvidersByIdErrors, PatchApiV1ProvidersByIdResponse, PatchApiV1ProvidersByIdResponses, PatchApiV1RolesByIdData, PatchApiV1RolesByIdError, PatchApiV1RolesByIdErrors, PatchApiV1RolesByIdPermissionsData, PatchApiV1RolesByIdPermissionsError, PatchApiV1RolesByIdPermissionsErrors, PatchApiV1RolesByIdPermissionsResponse, PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdResponse, PatchApiV1RolesByIdResponses, PatchApiV1TasksByIdData, PatchApiV1TasksByIdError, PatchApiV1TasksByIdErrors, PatchApiV1TasksByIdResponse, PatchApiV1TasksByIdResponses, PatchApiV1TasksByIdStatusData, PatchApiV1TasksByIdStatusError, PatchApiV1TasksByIdStatusErrors, PatchApiV1TasksByIdStatusResponse, PatchApiV1TasksByIdStatusResponses, PatchApiV1TopicsByIdData, PatchApiV1TopicsByIdError, PatchApiV1TopicsByIdErrors, PatchApiV1TopicsByIdResponse, PatchApiV1TopicsByIdResponses, PatchApiV1UsersByIdData, PatchApiV1UsersByIdError, PatchApiV1UsersByIdErrors, PatchApiV1UsersByIdResponse, PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdRolesData, PatchApiV1UsersByIdRolesError, PatchApiV1UsersByIdRolesErrors, PatchApiV1UsersByIdRolesResponse, PatchApiV1UsersByIdRolesResponses, Permission, PermissionList, PostApiV1AgentGroupsData, PostApiV1AgentGroupsError, PostApiV1AgentGroupsErrors, PostApiV1AgentGroupsResponse, PostApiV1AgentGroupsResponses, PostApiV1AgentsByIdAccountsData, PostApiV1AgentsByIdAccountsError, PostApiV1AgentsByIdAccountsErrors, PostApiV1AgentsByIdAccountsResponse, PostApiV1AgentsByIdAccountsResponses, PostApiV1AgentsByIdDuplicateData, PostApiV1AgentsByIdDuplicateError, PostApiV1AgentsByIdDuplicateErrors, PostApiV1AgentsByIdDuplicateResponse, PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsData, PostApiV1AgentsError, PostApiV1AgentsErrors, PostApiV1AgentsResponse, PostApiV1AgentsResponses, PostApiV1ApiKeysData, PostApiV1ApiKeysError, PostApiV1ApiKeysErrors, PostApiV1ApiKeysResponse, PostApiV1ApiKeysResponses, PostApiV1AudioSpeechData, PostApiV1AudioSpeechError, PostApiV1AudioSpeechErrors, PostApiV1AudioSpeechResponse, PostApiV1AudioSpeechResponses, PostApiV1ChatData, PostApiV1ChatError, PostApiV1ChatErrors, PostApiV1ChatGenerateReplyData, PostApiV1ChatGenerateReplyError, PostApiV1ChatGenerateReplyErrors, PostApiV1ChatGenerateReplyResponse, PostApiV1ChatGenerateReplyResponses, PostApiV1ChatGroupsByIdMembersData, PostApiV1ChatGroupsByIdMembersError, PostApiV1ChatGroupsByIdMembersErrors, PostApiV1ChatGroupsByIdMembersResponse, PostApiV1ChatGroupsByIdMembersResponses, PostApiV1ChatGroupsData, PostApiV1ChatGroupsError, PostApiV1ChatGroupsErrors, PostApiV1ChatGroupsResponse, PostApiV1ChatGroupsResponses, PostApiV1ChatResponse, PostApiV1ChatResponses, PostApiV1ChatTranslateData, PostApiV1ChatTranslateError, PostApiV1ChatTranslateErrors, PostApiV1ChatTranslateResponse, PostApiV1ChatTranslateResponses, PostApiV1DocumentsData, PostApiV1DocumentsError, PostApiV1DocumentsErrors, PostApiV1DocumentsResponse, PostApiV1DocumentsResponses, PostApiV1EvalBenchmarksData, PostApiV1EvalBenchmarksError, PostApiV1EvalBenchmarksErrors, PostApiV1EvalBenchmarksResponse, PostApiV1EvalBenchmarksResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesData, PostApiV1EvalDatasetsByDatasetIdTestCasesError, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, PostApiV1EvalDatasetsByDatasetIdTestCasesResponse, PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsData, PostApiV1EvalDatasetsError, PostApiV1EvalDatasetsErrors, PostApiV1EvalDatasetsResponse, PostApiV1EvalDatasetsResponses, PostApiV1EvalRunsByIdClaimData, PostApiV1EvalRunsByIdClaimError, PostApiV1EvalRunsByIdClaimErrors, PostApiV1EvalRunsByIdClaimResponse, PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdResultsData, PostApiV1EvalRunsByIdResultsError, PostApiV1EvalRunsByIdResultsErrors, PostApiV1EvalRunsByIdResultsResponse, PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdRetryErrorsData, PostApiV1EvalRunsByIdRetryErrorsError, PostApiV1EvalRunsByIdRetryErrorsErrors, PostApiV1EvalRunsByIdRetryErrorsResponse, PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsData, PostApiV1EvalRunsError, PostApiV1EvalRunsErrors, PostApiV1EvalRunsResponse, PostApiV1EvalRunsResponses, PostApiV1FilesBatchesData, PostApiV1FilesBatchesError, PostApiV1FilesBatchesErrors, PostApiV1FilesBatchesResponse, PostApiV1FilesBatchesResponses, PostApiV1FilesByIdChunksData, PostApiV1FilesByIdChunksError, PostApiV1FilesByIdChunksErrors, PostApiV1FilesByIdChunksResponse, PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdParsesData, PostApiV1FilesByIdParsesError, PostApiV1FilesByIdParsesErrors, PostApiV1FilesByIdParsesResponse, PostApiV1FilesByIdParsesResponses, PostApiV1FilesData, PostApiV1FilesError, PostApiV1FilesErrors, PostApiV1FilesQueriesData, PostApiV1FilesQueriesError, PostApiV1FilesQueriesErrors, PostApiV1FilesQueriesResponse, PostApiV1FilesQueriesResponses, PostApiV1FilesResponse, PostApiV1FilesResponses, PostApiV1GoalsByIdAdvanceData, PostApiV1GoalsByIdAdvanceError, PostApiV1GoalsByIdAdvanceErrors, PostApiV1GoalsByIdAdvanceResponse, PostApiV1GoalsByIdAdvanceResponses, PostApiV1GoalsByIdPauseData, PostApiV1GoalsByIdPauseError, PostApiV1GoalsByIdPauseErrors, PostApiV1GoalsByIdPauseResponse, PostApiV1GoalsByIdPauseResponses, PostApiV1GoalsByIdRestartData, PostApiV1GoalsByIdRestartError, PostApiV1GoalsByIdRestartErrors, PostApiV1GoalsByIdRestartResponse, PostApiV1GoalsByIdRestartResponses, PostApiV1GoalsByIdResumeData, PostApiV1GoalsByIdResumeError, PostApiV1GoalsByIdResumeErrors, PostApiV1GoalsByIdResumeResponse, PostApiV1GoalsByIdResumeResponses, PostApiV1GoalsData, PostApiV1GoalsError, PostApiV1GoalsErrors, PostApiV1GoalsResponse, PostApiV1GoalsResponses, PostApiV1ImMessagesData, PostApiV1ImMessagesError, PostApiV1ImMessagesErrors, PostApiV1ImMessagesResponse, PostApiV1ImMessagesResponses, PostApiV1ImTopicsByTopicIdReadData, PostApiV1ImTopicsByTopicIdReadError, PostApiV1ImTopicsByTopicIdReadErrors, PostApiV1ImTopicsByTopicIdReadResponse, PostApiV1ImTopicsByTopicIdReadResponses, PostApiV1KnowledgeBasesByIdFilesBatchData, PostApiV1KnowledgeBasesByIdFilesBatchError, PostApiV1KnowledgeBasesByIdFilesBatchErrors, PostApiV1KnowledgeBasesByIdFilesBatchResponse, PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesMoveData, PostApiV1KnowledgeBasesByIdFilesMoveError, PostApiV1KnowledgeBasesByIdFilesMoveErrors, PostApiV1KnowledgeBasesByIdFilesMoveResponse, PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesData, PostApiV1KnowledgeBasesError, PostApiV1KnowledgeBasesErrors, PostApiV1KnowledgeBasesResponse, PostApiV1KnowledgeBasesResponses, PostApiV1McpServersByIdSyncData, PostApiV1McpServersByIdSyncError, PostApiV1McpServersByIdSyncErrors, PostApiV1McpServersByIdSyncResponse, PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersData, PostApiV1McpServersError, PostApiV1McpServersErrors, PostApiV1McpServersResponse, PostApiV1McpServersResponses, PostApiV1MessagesData, PostApiV1MessagesError, PostApiV1MessagesErrors, PostApiV1MessagesRepliesData, PostApiV1MessagesRepliesError, PostApiV1MessagesRepliesErrors, PostApiV1MessagesRepliesResponse, PostApiV1MessagesRepliesResponses, PostApiV1MessagesResponse, PostApiV1MessagesResponses, PostApiV1MessageTranslationsByMessageIdData, PostApiV1MessageTranslationsByMessageIdError, PostApiV1MessageTranslationsByMessageIdErrors, PostApiV1MessageTranslationsByMessageIdResponse, PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1ModelsData, PostApiV1ModelsError, PostApiV1ModelsErrors, PostApiV1ModelsResponse, PostApiV1ModelsResponses, PostApiV1NotificationsArchiveAllData, PostApiV1NotificationsArchiveAllError, PostApiV1NotificationsArchiveAllErrors, PostApiV1NotificationsArchiveAllResponse, PostApiV1NotificationsArchiveAllResponses, PostApiV1NotificationsByIdArchiveData, PostApiV1NotificationsByIdArchiveError, PostApiV1NotificationsByIdArchiveErrors, PostApiV1NotificationsByIdArchiveResponse, PostApiV1NotificationsByIdArchiveResponses, PostApiV1NotificationsReadAllData, PostApiV1NotificationsReadAllError, PostApiV1NotificationsReadAllErrors, PostApiV1NotificationsReadAllResponse, PostApiV1NotificationsReadAllResponses, PostApiV1NotificationsReadData, PostApiV1NotificationsReadError, PostApiV1NotificationsReadErrors, PostApiV1NotificationsReadResponse, PostApiV1NotificationsReadResponses, PostApiV1PermissionsData, PostApiV1PermissionsError, PostApiV1PermissionsErrors, PostApiV1PermissionsResponse, PostApiV1PermissionsResponses, PostApiV1ProvidersData, PostApiV1ProvidersError, PostApiV1ProvidersErrors, PostApiV1ProvidersResponse, PostApiV1ProvidersResponses, PostApiV1ResponsesData, PostApiV1ResponsesError, PostApiV1ResponsesErrors, PostApiV1ResponsesResponse, PostApiV1ResponsesResponses, PostApiV1RolesData, PostApiV1RolesError, PostApiV1RolesErrors, PostApiV1RolesResponse, PostApiV1RolesResponses, PostApiV1SignalsSourceEventsData, PostApiV1SignalsSourceEventsError, PostApiV1SignalsSourceEventsErrors, PostApiV1SignalsSourceEventsResponse, PostApiV1SignalsSourceEventsResponses, PostApiV1SignalsTriggerData, PostApiV1SignalsTriggerError, PostApiV1SignalsTriggerErrors, PostApiV1SignalsTriggerResponse, PostApiV1SignalsTriggerResponses, PostApiV1TasksByIdRunsData, PostApiV1TasksByIdRunsError, PostApiV1TasksByIdRunsErrors, PostApiV1TasksByIdRunsResponse, PostApiV1TasksByIdRunsResponses, PostApiV1TasksData, PostApiV1TasksError, PostApiV1TasksErrors, PostApiV1TasksResponse, PostApiV1TasksResponses, PostApiV1TopicsData, PostApiV1TopicsError, PostApiV1TopicsErrors, PostApiV1TopicsResponse, PostApiV1TopicsResponses, PostApiV1UsersData, PostApiV1UsersError, PostApiV1UsersErrors, PostApiV1UsersResponse, PostApiV1UsersResponses, Provider, PushTokenRegistration, PutApiV1AgentsByIdAccountsByAccountIdCredentialData, PutApiV1AgentsByIdAccountsByAccountIdCredentialError, PutApiV1AgentsByIdAccountsByAccountIdCredentialErrors, PutApiV1AgentsByIdAccountsByAccountIdCredentialResponse, PutApiV1AgentsByIdAccountsByAccountIdCredentialResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultError, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponse, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, PutApiV1PushTokensByDeviceIdData, PutApiV1PushTokensByDeviceIdError, PutApiV1PushTokensByDeviceIdErrors, PutApiV1PushTokensByDeviceIdResponse, PutApiV1PushTokensByDeviceIdResponses, ResponseCompletedEvent, ResponseContentPartAddedEvent, ResponseContentPartDoneEvent, ResponseCreatedEvent, ResponseError, ResponseFailedEvent, ResponseFunctionCall, ResponseFunctionCallArgumentsDeltaEvent, ResponseFunctionCallArgumentsDoneEvent, ResponseFunctionCallOutput, ResponseIncompleteEvent, ResponseInProgressEvent, ResponseObject, ResponseOutputItem, ResponseOutputItemAddedEvent, ResponseOutputItemDoneEvent, ResponseOutputMessage, ResponseOutputText, ResponseOutputTextDeltaEvent, ResponseOutputTextDoneEvent, ResponseStreamEvent, ResponseUsage, Role, RoleList, RolePermission, RolePermissionList, RolePermissionsUpdateResult, Task, TaskDetail, TaskDetailActivity, TaskDetailSubtask, TaskDetailWorkspaceNode, TaskLabelRef, TaskList, TaskListItem, TaskRun, TaskRunStarted, TaskStatusUpdateResult, Topic, TopicSummary, TopicThread, Usage, User, UserIdentity, UserList, UserRole, WorkspaceId } from './types.gen';diff --git a/packages/sdk/src/generated/sdk.gen.ts b/packages/sdk/src/generated/sdk.gen.tsindex e7bf9744c0d..55779aeaf76 100644--- a/packages/sdk/src/generated/sdk.gen.ts+++ b/packages/sdk/src/generated/sdk.gen.ts@@ -75,6 +75,8 @@ export class AgentGroups extends HeyApiClient {* List agent groups** Paginated with `limit` + `cursor`; answers `{ items, total, hasMore, nextCursor }`. Clients that still expect the former bare array can pass the deprecated `format=array`, which returns every item as a plain array.+ *+ * **API key scopes:** `agent:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1AgentGroupsData, ThrowOnError>): RequestResult<GetApiV1AgentGroupsResponses, GetApiV1AgentGroupsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1AgentGroupsResponses, GetApiV1AgentGroupsErrors, ThrowOnError>({@@ -86,6 +88,8 @@ export class AgentGroups extends HeyApiClient {/*** Create an agent group+ *+ * **API key scopes:** `agent:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1AgentGroupsData, ThrowOnError>): RequestResult<PostApiV1AgentGroupsResponses, PostApiV1AgentGroupsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1AgentGroupsResponses, PostApiV1AgentGroupsErrors, ThrowOnError>({@@ -98,6 +102,8 @@ export class AgentGroups extends HeyApiClient {/*** Delete an agent group+ *+ * **API key scopes:** `agent:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AgentGroupsByIdData, ThrowOnError>): RequestResult<DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentGroupsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1AgentGroupsByIdResponses, DeleteApiV1AgentGroupsByIdErrors, ThrowOnError>({@@ -109,6 +115,8 @@ export class AgentGroups extends HeyApiClient {/*** Get an agent group+ *+ * **API key scopes:** `agent:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1AgentGroupsByIdData, ThrowOnError>): RequestResult<GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1AgentGroupsByIdResponses, GetApiV1AgentGroupsByIdErrors, ThrowOnError>({@@ -120,6 +128,8 @@ export class AgentGroups extends HeyApiClient {/*** Update an agent group+ *+ * **API key scopes:** `agent:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1AgentGroupsByIdData, ThrowOnError>): RequestResult<PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentGroupsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1AgentGroupsByIdResponses, PatchApiV1AgentGroupsByIdErrors, ThrowOnError>({@@ -134,6 +144,8 @@ export class AgentGroups extends HeyApiClient {export class Agents extends HeyApiClient {/*** List agents+ *+ * **API key scopes:** `agent:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1AgentsData, ThrowOnError>): RequestResult<GetApiV1AgentsResponses, GetApiV1AgentsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1AgentsResponses, GetApiV1AgentsErrors, ThrowOnError>({@@ -145,6 +157,8 @@ export class Agents extends HeyApiClient {/*** Create an agent+ *+ * **API key scopes:** `agent:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1AgentsData, ThrowOnError>): RequestResult<PostApiV1AgentsResponses, PostApiV1AgentsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1AgentsResponses, PostApiV1AgentsErrors, ThrowOnError>({@@ -157,6 +171,8 @@ export class Agents extends HeyApiClient {/*** Delete an agent+ *+ * **API key scopes:** `agent:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AgentsByIdData, ThrowOnError>): RequestResult<DeleteApiV1AgentsByIdResponses, DeleteApiV1AgentsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1AgentsByIdResponses, DeleteApiV1AgentsByIdErrors, ThrowOnError>({@@ -168,6 +184,8 @@ export class Agents extends HeyApiClient {/*** Get an agent with its mounted files and knowledge bases+ *+ * **API key scopes:** `agent:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1AgentsByIdData, ThrowOnError>): RequestResult<GetApiV1AgentsByIdResponses, GetApiV1AgentsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1AgentsByIdResponses, GetApiV1AgentsByIdErrors, ThrowOnError>({@@ -179,6 +197,8 @@ export class Agents extends HeyApiClient {/*** Update an agent+ *+ * **API key scopes:** `agent:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1AgentsByIdData, ThrowOnError>): RequestResult<PatchApiV1AgentsByIdResponses, PatchApiV1AgentsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1AgentsByIdResponses, PatchApiV1AgentsByIdErrors, ThrowOnError>({@@ -191,6 +211,8 @@ export class Agents extends HeyApiClient {/*** Duplicate an agent+ *+ * **API key scopes:** `agent:write`.*/public createDuplicate<ThrowOnError extends boolean = false>(options: Options<PostApiV1AgentsByIdDuplicateData, ThrowOnError>): RequestResult<PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsByIdDuplicateErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1AgentsByIdDuplicateResponses, PostApiV1AgentsByIdDuplicateErrors, ThrowOnError>({@@ -203,6 +225,8 @@ export class Agents extends HeyApiClient {/*** List an agent's accounts+ *+ * **API key scopes:** `agent:read`.*/public listAccounts<ThrowOnError extends boolean = false>(options: Options<GetApiV1AgentsByIdAccountsData, ThrowOnError>): RequestResult<GetApiV1AgentsByIdAccountsResponses, GetApiV1AgentsByIdAccountsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1AgentsByIdAccountsResponses, GetApiV1AgentsByIdAccountsErrors, ThrowOnError>({@@ -214,6 +238,8 @@ export class Agents extends HeyApiClient {/*** Mount or provision an agent account+ *+ * **API key scopes:** `agent:write`.*/public createAccount<ThrowOnError extends boolean = false>(options: Options<PostApiV1AgentsByIdAccountsData, ThrowOnError>): RequestResult<PostApiV1AgentsByIdAccountsResponses, PostApiV1AgentsByIdAccountsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1AgentsByIdAccountsResponses, PostApiV1AgentsByIdAccountsErrors, ThrowOnError>({@@ -228,6 +254,8 @@ export class Agents extends HeyApiClient {* Revoke an agent account** Releases the account and marks it revoked. The row is kept for audit, so the response is the revoked account.+ *+ * **API key scopes:** `agent:write`.*/public deleteAccount<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1AgentsByIdAccountsByAccountIdData, ThrowOnError>): RequestResult<DeleteApiV1AgentsByIdAccountsByAccountIdResponses, DeleteApiV1AgentsByIdAccountsByAccountIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1AgentsByIdAccountsByAccountIdResponses, DeleteApiV1AgentsByIdAccountsByAccountIdErrors, ThrowOnError>({@@ -239,6 +267,8 @@ export class Agents extends HeyApiClient {/*** Get an agent account+ *+ * **API key scopes:** `agent:read`.*/public getAccount<ThrowOnError extends boolean = false>(options: Options<GetApiV1AgentsByIdAccountsByAccountIdData, ThrowOnError>): RequestResult<GetApiV1AgentsByIdAccountsByAccountIdResponses, GetApiV1AgentsByIdAccountsByAccountIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1AgentsByIdAccountsByAccountIdResponses, GetApiV1AgentsByIdAccountsByAccountIdErrors, ThrowOnError>({@@ -250,6 +280,8 @@ export class Agents extends HeyApiClient {/*** Update an agent account+ *+ * **API key scopes:** `agent:write`.*/public updateAccount<ThrowOnError extends boolean = false>(options: Options<PatchApiV1AgentsByIdAccountsByAccountIdData, ThrowOnError>): RequestResult<PatchApiV1AgentsByIdAccountsByAccountIdResponses, PatchApiV1AgentsByIdAccountsByAccountIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1AgentsByIdAccountsByAccountIdResponses, PatchApiV1AgentsByIdAccountsByAccountIdErrors, ThrowOnError>({@@ -264,6 +296,8 @@ export class Agents extends HeyApiClient {* Write an agent account credential** Write-only: the response carries the non-secret hint and `hasCredential`, never the secret.+ *+ * **API key scopes:** `agent:credential:write` + `agent:write`.*/public updateAccountCredential<ThrowOnError extends boolean = false>(options: Options<PutApiV1AgentsByIdAccountsByAccountIdCredentialData, ThrowOnError>): RequestResult<PutApiV1AgentsByIdAccountsByAccountIdCredentialResponses, PutApiV1AgentsByIdAccountsByAccountIdCredentialErrors, ThrowOnError> {return (options.client ?? this.client).put<PutApiV1AgentsByIdAccountsByAccountIdCredentialResponses, PutApiV1AgentsByIdAccountsByAccountIdCredentialErrors, ThrowOnError>({@@ -280,6 +314,8 @@ export class ApiKeys extends HeyApiClient {* List API keys** Paginated with `limit` + `cursor`; answers `{ items, total, hasMore, nextCursor }`. Clients that still expect the former bare array can pass the deprecated `format=array`, which returns every item as a plain array.+ *+ * **API key scopes:** a full-access API key (`*`).*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1ApiKeysData, ThrowOnError>): RequestResult<GetApiV1ApiKeysResponses, GetApiV1ApiKeysErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1ApiKeysResponses, GetApiV1ApiKeysErrors, ThrowOnError>({@@ -293,6 +329,8 @@ export class ApiKeys extends HeyApiClient {* Create an API key** The plaintext key is returned only in this response.+ *+ * **API key scopes:** a full-access API key (`*`).*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1ApiKeysData, ThrowOnError>): RequestResult<PostApiV1ApiKeysResponses, PostApiV1ApiKeysErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ApiKeysResponses, PostApiV1ApiKeysErrors, ThrowOnError>({@@ -305,6 +343,8 @@ export class ApiKeys extends HeyApiClient {/*** Delete an API key+ *+ * **API key scopes:** a full-access API key (`*`).*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1ApiKeysByIdData, ThrowOnError>): RequestResult<DeleteApiV1ApiKeysByIdResponses, DeleteApiV1ApiKeysByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1ApiKeysByIdResponses, DeleteApiV1ApiKeysByIdErrors, ThrowOnError>({@@ -316,6 +356,8 @@ export class ApiKeys extends HeyApiClient {/*** Get an API key+ *+ * **API key scopes:** a full-access API key (`*`).*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1ApiKeysByIdData, ThrowOnError>): RequestResult<GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1ApiKeysByIdResponses, GetApiV1ApiKeysByIdErrors, ThrowOnError>({@@ -327,6 +369,8 @@ export class ApiKeys extends HeyApiClient {/*** Update an API key+ *+ * **API key scopes:** a full-access API key (`*`).*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1ApiKeysByIdData, ThrowOnError>): RequestResult<PatchApiV1ApiKeysByIdResponses, PatchApiV1ApiKeysByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1ApiKeysByIdResponses, PatchApiV1ApiKeysByIdErrors, ThrowOnError>({@@ -343,6 +387,8 @@ export class Audio extends HeyApiClient {* Create speech** OpenAI-compatible text-to-speech. Point an OpenAI SDK at `/api/v1` and call `audio.speech.create`. `model` takes `provider/model` (for example `lobehub/speech-2.8-hd`) or a bare model id; the optional `provider` and `params` (emotion, pitch, volume, sampleRate) are LobeHub extensions. Returns the audio bytes; usage is reported in `X-LobeHub-*` headers. Synthesis errors use OpenAI's `{ error: { message, type, code, param } }` body; authentication and permission errors use the platform `ApiError` envelope.+ *+ * **API key scopes:** `model:invoke`.*/public createSpeech<ThrowOnError extends boolean = false>(options?: Options<PostApiV1AudioSpeechData, ThrowOnError>): RequestResult<PostApiV1AudioSpeechResponses, PostApiV1AudioSpeechErrors, ThrowOnError> {return (options?.client ?? this.client).post<PostApiV1AudioSpeechResponses, PostApiV1AudioSpeechErrors, ThrowOnError>({@@ -356,6 +402,8 @@ export class Audio extends HeyApiClient {export class Chat extends HeyApiClient {/*** Run a non-streaming chat completion+ *+ * **API key scopes:** `model:invoke`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatData, ThrowOnError>): RequestResult<PostApiV1ChatResponses, PostApiV1ChatErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ChatResponses, PostApiV1ChatErrors, ThrowOnError>({@@ -368,6 +416,8 @@ export class Chat extends HeyApiClient {/*** Translate text+ *+ * **API key scopes:** `model:invoke`.*/public createTranslate<ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatTranslateData, ThrowOnError>): RequestResult<PostApiV1ChatTranslateResponses, PostApiV1ChatTranslateErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ChatTranslateResponses, PostApiV1ChatTranslateErrors, ThrowOnError>({@@ -380,6 +430,8 @@ export class Chat extends HeyApiClient {/*** Generate a reply to a message+ *+ * **API key scopes:** `model:invoke`.*/public createGenerateReply<ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatGenerateReplyData, ThrowOnError>): RequestResult<PostApiV1ChatGenerateReplyResponses, PostApiV1ChatGenerateReplyErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ChatGenerateReplyResponses, PostApiV1ChatGenerateReplyErrors, ThrowOnError>({@@ -394,6 +446,8 @@ export class Chat extends HeyApiClient {export class ChatGroups extends HeyApiClient {/*** List chat groups+ *+ * **API key scopes:** `agent:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1ChatGroupsData, ThrowOnError>): RequestResult<GetApiV1ChatGroupsResponses, GetApiV1ChatGroupsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1ChatGroupsResponses, GetApiV1ChatGroupsErrors, ThrowOnError>({@@ -405,6 +459,8 @@ export class ChatGroups extends HeyApiClient {/*** Create a chat group with its supervisor and members+ *+ * **API key scopes:** `agent:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatGroupsData, ThrowOnError>): RequestResult<PostApiV1ChatGroupsResponses, PostApiV1ChatGroupsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ChatGroupsResponses, PostApiV1ChatGroupsErrors, ThrowOnError>({@@ -417,6 +473,8 @@ export class ChatGroups extends HeyApiClient {/*** Delete a chat group+ *+ * **API key scopes:** `agent:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1ChatGroupsByIdData, ThrowOnError>): RequestResult<DeleteApiV1ChatGroupsByIdResponses, DeleteApiV1ChatGroupsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1ChatGroupsByIdResponses, DeleteApiV1ChatGroupsByIdErrors, ThrowOnError>({@@ -428,6 +486,8 @@ export class ChatGroups extends HeyApiClient {/*** Get a chat group+ *+ * **API key scopes:** `agent:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1ChatGroupsByIdData, ThrowOnError>): RequestResult<GetApiV1ChatGroupsByIdResponses, GetApiV1ChatGroupsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1ChatGroupsByIdResponses, GetApiV1ChatGroupsByIdErrors, ThrowOnError>({@@ -439,6 +499,8 @@ export class ChatGroups extends HeyApiClient {/*** Update a chat group+ *+ * **API key scopes:** `agent:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1ChatGroupsByIdData, ThrowOnError>): RequestResult<PatchApiV1ChatGroupsByIdResponses, PatchApiV1ChatGroupsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1ChatGroupsByIdResponses, PatchApiV1ChatGroupsByIdErrors, ThrowOnError>({@@ -453,6 +515,8 @@ export class ChatGroups extends HeyApiClient {* Remove members from a chat group** Detaches the agents and answers with the updated group.+ *+ * **API key scopes:** `agent:write`.*/public removeMembers<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1ChatGroupsByIdMembersData, ThrowOnError>): RequestResult<DeleteApiV1ChatGroupsByIdMembersResponses, DeleteApiV1ChatGroupsByIdMembersErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1ChatGroupsByIdMembersResponses, DeleteApiV1ChatGroupsByIdMembersErrors, ThrowOnError>({@@ -465,6 +529,8 @@ export class ChatGroups extends HeyApiClient {/*** Add members to a chat group+ *+ * **API key scopes:** `agent:write`.*/public addMembers<ThrowOnError extends boolean = false>(options: Options<PostApiV1ChatGroupsByIdMembersData, ThrowOnError>): RequestResult<PostApiV1ChatGroupsByIdMembersResponses, PostApiV1ChatGroupsByIdMembersErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ChatGroupsByIdMembersResponses, PostApiV1ChatGroupsByIdMembersErrors, ThrowOnError>({@@ -479,6 +545,8 @@ export class ChatGroups extends HeyApiClient {export class Documents extends HeyApiClient {/*** List documents+ *+ * **API key scopes:** `knowledge:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1DocumentsData, ThrowOnError>): RequestResult<GetApiV1DocumentsResponses, GetApiV1DocumentsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1DocumentsResponses, GetApiV1DocumentsErrors, ThrowOnError>({@@ -492,6 +560,8 @@ export class Documents extends HeyApiClient {* Create a document** Creates a page from Markdown, or a folder with `fileType: "custom/folder"`.+ *+ * **API key scopes:** `knowledge:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1DocumentsData, ThrowOnError>): RequestResult<PostApiV1DocumentsResponses, PostApiV1DocumentsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1DocumentsResponses, PostApiV1DocumentsErrors, ThrowOnError>({@@ -504,6 +574,8 @@ export class Documents extends HeyApiClient {/*** Get a document+ *+ * **API key scopes:** `knowledge:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1DocumentsByIdData, ThrowOnError>): RequestResult<GetApiV1DocumentsByIdResponses, GetApiV1DocumentsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1DocumentsByIdResponses, GetApiV1DocumentsByIdErrors, ThrowOnError>({@@ -517,6 +589,8 @@ export class Documents extends HeyApiClient {* Update a document** Replaces the title and/or the whole Markdown body. A page open in the editor receives the write through its live room.+ *+ * **API key scopes:** `knowledge:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1DocumentsByIdData, ThrowOnError>): RequestResult<PatchApiV1DocumentsByIdResponses, PatchApiV1DocumentsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1DocumentsByIdResponses, PatchApiV1DocumentsByIdErrors, ThrowOnError>({@@ -531,6 +605,8 @@ export class Documents extends HeyApiClient {export class Eval extends HeyApiClient {/*** List eval runs+ *+ * **API key scopes:** `eval:read`.*/public listRuns<ThrowOnError extends boolean = false>(options?: Options<GetApiV1EvalRunsData, ThrowOnError>): RequestResult<GetApiV1EvalRunsResponses, GetApiV1EvalRunsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1EvalRunsResponses, GetApiV1EvalRunsErrors, ThrowOnError>({@@ -544,6 +620,8 @@ export class Eval extends HeyApiClient {* Create an eval run** Queues an asynchronous QStash-backed evaluation run and returns immediately.+ *+ * **API key scopes:** `eval:write`.*/public createRuns<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsData, ThrowOnError>): RequestResult<PostApiV1EvalRunsResponses, PostApiV1EvalRunsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalRunsResponses, PostApiV1EvalRunsErrors, ThrowOnError>({@@ -556,6 +634,8 @@ export class Eval extends HeyApiClient {/*** List topic results of an eval run+ *+ * **API key scopes:** `eval:read`.*/public listRunsTopics<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalRunsByIdTopicsData, ThrowOnError>): RequestResult<GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsByIdTopicsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalRunsByIdTopicsResponses, GetApiV1EvalRunsByIdTopicsErrors, ThrowOnError>({@@ -567,6 +647,8 @@ export class Eval extends HeyApiClient {/*** Get an eval run+ *+ * **API key scopes:** `eval:read`.*/public getRuns<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalRunsByIdData, ThrowOnError>): RequestResult<GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalRunsByIdResponses, GetApiV1EvalRunsByIdErrors, ThrowOnError>({@@ -578,6 +660,8 @@ export class Eval extends HeyApiClient {/*** List case results of an eval run+ *+ * **API key scopes:** `eval:read`.*/public listRunsResults<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalRunsByIdResultsData, ThrowOnError>): RequestResult<GetApiV1EvalRunsByIdResultsResponses, GetApiV1EvalRunsByIdResultsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalRunsByIdResultsResponses, GetApiV1EvalRunsByIdResultsErrors, ThrowOnError>({@@ -591,6 +675,8 @@ export class Eval extends HeyApiClient {* Report results for a batch of run topics** Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ *+ * **API key scopes:** `eval:write`.*/public createRunsResults<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsByIdResultsData, ThrowOnError>): RequestResult<PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdResultsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalRunsByIdResultsResponses, PostApiV1EvalRunsByIdResultsErrors, ThrowOnError>({@@ -605,6 +691,8 @@ export class Eval extends HeyApiClient {* List benchmarks** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:read`.*/public listBenchmarks<ThrowOnError extends boolean = false>(options?: Options<GetApiV1EvalBenchmarksData, ThrowOnError>): RequestResult<GetApiV1EvalBenchmarksResponses, GetApiV1EvalBenchmarksErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1EvalBenchmarksResponses, GetApiV1EvalBenchmarksErrors, ThrowOnError>({@@ -618,6 +706,8 @@ export class Eval extends HeyApiClient {* Create a benchmark** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public createBenchmarks<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalBenchmarksData, ThrowOnError>): RequestResult<PostApiV1EvalBenchmarksResponses, PostApiV1EvalBenchmarksErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalBenchmarksResponses, PostApiV1EvalBenchmarksErrors, ThrowOnError>({@@ -632,6 +722,8 @@ export class Eval extends HeyApiClient {* Delete a benchmark** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public deleteBenchmarks<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1EvalBenchmarksByIdData, ThrowOnError>): RequestResult<DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalBenchmarksByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1EvalBenchmarksByIdResponses, DeleteApiV1EvalBenchmarksByIdErrors, ThrowOnError>({@@ -645,6 +737,8 @@ export class Eval extends HeyApiClient {* Get a benchmark** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:read`.*/public getBenchmarks<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalBenchmarksByIdData, ThrowOnError>): RequestResult<GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalBenchmarksByIdResponses, GetApiV1EvalBenchmarksByIdErrors, ThrowOnError>({@@ -658,6 +752,8 @@ export class Eval extends HeyApiClient {* Update a benchmark** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public updateBenchmarks<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalBenchmarksByIdData, ThrowOnError>): RequestResult<PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalBenchmarksByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1EvalBenchmarksByIdResponses, PatchApiV1EvalBenchmarksByIdErrors, ThrowOnError>({@@ -672,6 +768,8 @@ export class Eval extends HeyApiClient {* List datasets** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:read`.*/public listDatasets<ThrowOnError extends boolean = false>(options?: Options<GetApiV1EvalDatasetsData, ThrowOnError>): RequestResult<GetApiV1EvalDatasetsResponses, GetApiV1EvalDatasetsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1EvalDatasetsResponses, GetApiV1EvalDatasetsErrors, ThrowOnError>({@@ -685,6 +783,8 @@ export class Eval extends HeyApiClient {* Create a dataset** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public createDatasets<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalDatasetsData, ThrowOnError>): RequestResult<PostApiV1EvalDatasetsResponses, PostApiV1EvalDatasetsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalDatasetsResponses, PostApiV1EvalDatasetsErrors, ThrowOnError>({@@ -699,6 +799,8 @@ export class Eval extends HeyApiClient {* Delete a dataset** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public deleteDatasets<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1EvalDatasetsByIdData, ThrowOnError>): RequestResult<DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalDatasetsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1EvalDatasetsByIdResponses, DeleteApiV1EvalDatasetsByIdErrors, ThrowOnError>({@@ -712,6 +814,8 @@ export class Eval extends HeyApiClient {* Get a dataset** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:read`.*/public getDatasets<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalDatasetsByIdData, ThrowOnError>): RequestResult<GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalDatasetsByIdResponses, GetApiV1EvalDatasetsByIdErrors, ThrowOnError>({@@ -725,6 +829,8 @@ export class Eval extends HeyApiClient {* Update a dataset** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public updateDatasets<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalDatasetsByIdData, ThrowOnError>): RequestResult<PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalDatasetsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1EvalDatasetsByIdResponses, PatchApiV1EvalDatasetsByIdErrors, ThrowOnError>({@@ -739,6 +845,8 @@ export class Eval extends HeyApiClient {* List test cases of a dataset** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:read`.*/public listDatasetsTestCases<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalDatasetsByDatasetIdTestCasesData, ThrowOnError>): RequestResult<GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalDatasetsByDatasetIdTestCasesResponses, GetApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError>({@@ -752,6 +860,8 @@ export class Eval extends HeyApiClient {* Create a test case** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public createDatasetsTestCases<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalDatasetsByDatasetIdTestCasesData, ThrowOnError>): RequestResult<PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalDatasetsByDatasetIdTestCasesResponses, PostApiV1EvalDatasetsByDatasetIdTestCasesErrors, ThrowOnError>({@@ -766,6 +876,8 @@ export class Eval extends HeyApiClient {* Delete a test case** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public deleteTestCases<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1EvalTestCasesByIdData, ThrowOnError>): RequestResult<DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1EvalTestCasesByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1EvalTestCasesByIdResponses, DeleteApiV1EvalTestCasesByIdErrors, ThrowOnError>({@@ -779,6 +891,8 @@ export class Eval extends HeyApiClient {* Get a test case** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:read`.*/public getTestCases<ThrowOnError extends boolean = false>(options: Options<GetApiV1EvalTestCasesByIdData, ThrowOnError>): RequestResult<GetApiV1EvalTestCasesByIdResponses, GetApiV1EvalTestCasesByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1EvalTestCasesByIdResponses, GetApiV1EvalTestCasesByIdErrors, ThrowOnError>({@@ -792,6 +906,8 @@ export class Eval extends HeyApiClient {* Update a test case** Creates accept an optional id: an identical replay returns the resource; conflicting id or identifier returns 409. Lists are paginated.+ *+ * **API key scopes:** `eval:write`.*/public updateTestCases<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalTestCasesByIdData, ThrowOnError>): RequestResult<PatchApiV1EvalTestCasesByIdResponses, PatchApiV1EvalTestCasesByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1EvalTestCasesByIdResponses, PatchApiV1EvalTestCasesByIdErrors, ThrowOnError>({@@ -806,6 +922,8 @@ export class Eval extends HeyApiClient {* Claim a pending external eval run** Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ *+ * **API key scopes:** `eval:write`.*/public createRunsClaim<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsByIdClaimData, ThrowOnError>): RequestResult<PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdClaimErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalRunsByIdClaimResponses, PostApiV1EvalRunsByIdClaimErrors, ThrowOnError>({@@ -819,6 +937,8 @@ export class Eval extends HeyApiClient {* Set the status of an external eval run** Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ *+ * **API key scopes:** `eval:write`.*/public updateRunsStatus<ThrowOnError extends boolean = false>(options: Options<PatchApiV1EvalRunsByIdStatusData, ThrowOnError>): RequestResult<PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalRunsByIdStatusErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1EvalRunsByIdStatusResponses, PatchApiV1EvalRunsByIdStatusErrors, ThrowOnError>({@@ -833,6 +953,8 @@ export class Eval extends HeyApiClient {* Retry the errored cases of an eval run** Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ *+ * **API key scopes:** `eval:write`.*/public createRunsRetryErrors<ThrowOnError extends boolean = false>(options: Options<PostApiV1EvalRunsByIdRetryErrorsData, ThrowOnError>): RequestResult<PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsByIdRetryErrorsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1EvalRunsByIdRetryErrorsResponses, PostApiV1EvalRunsByIdRetryErrorsErrors, ThrowOnError>({@@ -846,6 +968,8 @@ export class Eval extends HeyApiClient {* Report the result of one run topic** Claim: one pending worker succeeds, others receive 409. Reports: identical replays succeed; different results conflict. Batches are atomic. External workers can supply testCaseId to associate their own topic with a dataset case on first report. Retry: only terminal runs, concurrent repeats conflict.+ *+ * **API key scopes:** `eval:write`.*/public updateRunsTopicsResult<ThrowOnError extends boolean = false>(options: Options<PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData, ThrowOnError>): RequestResult<PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, ThrowOnError> {return (options.client ?? this.client).put<PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponses, PutApiV1EvalRunsByRunIdTopicsByTopicIdResultErrors, ThrowOnError>({@@ -860,6 +984,8 @@ export class Eval extends HeyApiClient {export class Plugins extends HeyApiClient {/*** List installed plugins in the current workspace or personal scope+ *+ * **API key scopes:** `agent:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1PluginsData, ThrowOnError>): RequestResult<GetApiV1PluginsResponses, GetApiV1PluginsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1PluginsResponses, GetApiV1PluginsErrors, ThrowOnError>({@@ -873,6 +999,8 @@ export class Plugins extends HeyApiClient {export class Files extends HeyApiClient {/*** List files+ *+ * **API key scopes:** `file:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1FilesData, ThrowOnError>): RequestResult<GetApiV1FilesResponses, GetApiV1FilesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1FilesResponses, GetApiV1FilesErrors, ThrowOnError>({@@ -884,6 +1012,8 @@ export class Files extends HeyApiClient {/*** Upload a file and return the corresponding file record+ *+ * **API key scopes:** `file:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1FilesData, ThrowOnError>): RequestResult<PostApiV1FilesResponses, PostApiV1FilesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1FilesResponses, PostApiV1FilesErrors, ThrowOnError>({@@ -897,6 +1027,8 @@ export class Files extends HeyApiClient {/*** Delete a file+ *+ * **API key scopes:** `file:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1FilesByIdData, ThrowOnError>): RequestResult<DeleteApiV1FilesByIdResponses, DeleteApiV1FilesByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1FilesByIdResponses, DeleteApiV1FilesByIdErrors, ThrowOnError>({@@ -910,6 +1042,8 @@ export class Files extends HeyApiClient {* Get a file** Non-image files include their parse result. A file that does not exist answers 400.+ *+ * **API key scopes:** `file:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1FilesByIdData, ThrowOnError>): RequestResult<GetApiV1FilesByIdResponses, GetApiV1FilesByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1FilesByIdResponses, GetApiV1FilesByIdErrors, ThrowOnError>({@@ -921,6 +1055,8 @@ export class Files extends HeyApiClient {/*** Update a file+ *+ * **API key scopes:** `file:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1FilesByIdData, ThrowOnError>): RequestResult<PatchApiV1FilesByIdResponses, PatchApiV1FilesByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1FilesByIdResponses, PatchApiV1FilesByIdErrors, ThrowOnError>({@@ -933,6 +1069,8 @@ export class Files extends HeyApiClient {/*** Get a pre-signed file URL+ *+ * **API key scopes:** `file:read`.*/public getUrl<ThrowOnError extends boolean = false>(options: Options<GetApiV1FilesByIdUrlData, ThrowOnError>): RequestResult<GetApiV1FilesByIdUrlResponses, GetApiV1FilesByIdUrlErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1FilesByIdUrlResponses, GetApiV1FilesByIdUrlErrors, ThrowOnError>({@@ -944,6 +1082,8 @@ export class Files extends HeyApiClient {/*** Parse file content+ *+ * **API key scopes:** `file:write`.*/public parse<ThrowOnError extends boolean = false>(options: Options<PostApiV1FilesByIdParsesData, ThrowOnError>): RequestResult<PostApiV1FilesByIdParsesResponses, PostApiV1FilesByIdParsesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1FilesByIdParsesResponses, PostApiV1FilesByIdParsesErrors, ThrowOnError>({@@ -955,6 +1095,8 @@ export class Files extends HeyApiClient {/*** Get file chunking status+ *+ * **API key scopes:** `file:read`.*/public listChunks<ThrowOnError extends boolean = false>(options: Options<GetApiV1FilesByIdChunksData, ThrowOnError>): RequestResult<GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdChunksErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1FilesByIdChunksResponses, GetApiV1FilesByIdChunksErrors, ThrowOnError>({@@ -966,6 +1108,8 @@ export class Files extends HeyApiClient {/*** Start a file chunking task+ *+ * **API key scopes:** `file:write`.*/public createChunks<ThrowOnError extends boolean = false>(options: Options<PostApiV1FilesByIdChunksData, ThrowOnError>): RequestResult<PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdChunksErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1FilesByIdChunksResponses, PostApiV1FilesByIdChunksErrors, ThrowOnError>({@@ -978,6 +1122,8 @@ export class Files extends HeyApiClient {/*** Batch file upload+ *+ * **API key scopes:** `file:write`.*/public uploadBatch<ThrowOnError extends boolean = false>(options: Options<PostApiV1FilesBatchesData, ThrowOnError>): RequestResult<PostApiV1FilesBatchesResponses, PostApiV1FilesBatchesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1FilesBatchesResponses, PostApiV1FilesBatchesErrors, ThrowOnError>({@@ -991,6 +1137,8 @@ export class Files extends HeyApiClient {/*** Get several files+ *+ * **API key scopes:** `file:read`.*/public query<ThrowOnError extends boolean = false>(options: Options<PostApiV1FilesQueriesData, ThrowOnError>): RequestResult<PostApiV1FilesQueriesResponses, PostApiV1FilesQueriesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1FilesQueriesResponses, PostApiV1FilesQueriesErrors, ThrowOnError>({@@ -1005,6 +1153,8 @@ export class Files extends HeyApiClient {export class Goals extends HeyApiClient {/*** List goals+ *+ * **API key scopes:** `agent:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1GoalsData, ThrowOnError>): RequestResult<GetApiV1GoalsResponses, GetApiV1GoalsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1GoalsResponses, GetApiV1GoalsErrors, ThrowOnError>({@@ -1018,6 +1168,8 @@ export class Goals extends HeyApiClient {* Create a goal** Creates the goal graph and hands it to the coordinator.+ *+ * **API key scopes:** `agent:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1GoalsData, ThrowOnError>): RequestResult<PostApiV1GoalsResponses, PostApiV1GoalsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1GoalsResponses, PostApiV1GoalsErrors, ThrowOnError>({@@ -1030,6 +1182,8 @@ export class Goals extends HeyApiClient {/*** Delete a goal+ *+ * **API key scopes:** `agent:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1GoalsByIdData, ThrowOnError>): RequestResult<DeleteApiV1GoalsByIdResponses, DeleteApiV1GoalsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1GoalsByIdResponses, DeleteApiV1GoalsByIdErrors, ThrowOnError>({@@ -1041,6 +1195,8 @@ export class Goals extends HeyApiClient {/*** Get a goal and its graph+ *+ * **API key scopes:** `agent:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1GoalsByIdData, ThrowOnError>): RequestResult<GetApiV1GoalsByIdResponses, GetApiV1GoalsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1GoalsByIdResponses, GetApiV1GoalsByIdErrors, ThrowOnError>({@@ -1052,6 +1208,8 @@ export class Goals extends HeyApiClient {/*** Update a goal requirement or budget+ *+ * **API key scopes:** `agent:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1GoalsByIdData, ThrowOnError>): RequestResult<PatchApiV1GoalsByIdResponses, PatchApiV1GoalsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1GoalsByIdResponses, PatchApiV1GoalsByIdErrors, ThrowOnError>({@@ -1064,6 +1222,8 @@ export class Goals extends HeyApiClient {/*** Get goal supervision state+ *+ * **API key scopes:** `agent:read`.*/public getSupervision<ThrowOnError extends boolean = false>(options: Options<GetApiV1GoalsByIdSupervisionData, ThrowOnError>): RequestResult<GetApiV1GoalsByIdSupervisionResponses, GetApiV1GoalsByIdSupervisionErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1GoalsByIdSupervisionResponses, GetApiV1GoalsByIdSupervisionErrors, ThrowOnError>({@@ -1075,6 +1235,8 @@ export class Goals extends HeyApiClient {/*** Run the goal coordinator now+ *+ * **API key scopes:** `agent:write`.*/public advance<ThrowOnError extends boolean = false>(options: Options<PostApiV1GoalsByIdAdvanceData, ThrowOnError>): RequestResult<PostApiV1GoalsByIdAdvanceResponses, PostApiV1GoalsByIdAdvanceErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1GoalsByIdAdvanceResponses, PostApiV1GoalsByIdAdvanceErrors, ThrowOnError>({@@ -1086,6 +1248,8 @@ export class Goals extends HeyApiClient {/*** Pause a goal+ *+ * **API key scopes:** `agent:write`.*/public pause<ThrowOnError extends boolean = false>(options: Options<PostApiV1GoalsByIdPauseData, ThrowOnError>): RequestResult<PostApiV1GoalsByIdPauseResponses, PostApiV1GoalsByIdPauseErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1GoalsByIdPauseResponses, PostApiV1GoalsByIdPauseErrors, ThrowOnError>({@@ -1097,6 +1261,8 @@ export class Goals extends HeyApiClient {/*** Resume a paused goal+ *+ * **API key scopes:** `agent:write`.*/public resume<ThrowOnError extends boolean = false>(options: Options<PostApiV1GoalsByIdResumeData, ThrowOnError>): RequestResult<PostApiV1GoalsByIdResumeResponses, PostApiV1GoalsByIdResumeErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1GoalsByIdResumeResponses, PostApiV1GoalsByIdResumeErrors, ThrowOnError>({@@ -1108,6 +1274,8 @@ export class Goals extends HeyApiClient {/*** Restart every unfinished task of a goal+ *+ * **API key scopes:** `agent:write`.*/public restart<ThrowOnError extends boolean = false>(options: Options<PostApiV1GoalsByIdRestartData, ThrowOnError>): RequestResult<PostApiV1GoalsByIdRestartResponses, PostApiV1GoalsByIdRestartErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1GoalsByIdRestartResponses, PostApiV1GoalsByIdRestartErrors, ThrowOnError>({@@ -1122,6 +1290,8 @@ export class Goals extends HeyApiClient {export class Im extends HeyApiClient {/*** Send a message to an agent; the reply arrives asynchronously via sync+ *+ * **API key scopes:** `agent:write` + `chat:write` + `model:invoke`.*/public send<ThrowOnError extends boolean = false>(options: Options<PostApiV1ImMessagesData, ThrowOnError>): RequestResult<PostApiV1ImMessagesResponses, PostApiV1ImMessagesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ImMessagesResponses, PostApiV1ImMessagesErrors, ThrowOnError>({@@ -1134,6 +1304,8 @@ export class Im extends HeyApiClient {/*** Long-poll a conversation for whole new messages, typing and read receipts+ *+ * **API key scopes:** `chat:read`.*/public sync<ThrowOnError extends boolean = false>(options: Options<GetApiV1ImTopicsByTopicIdSyncData, ThrowOnError>): RequestResult<GetApiV1ImTopicsByTopicIdSyncResponses, GetApiV1ImTopicsByTopicIdSyncErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1ImTopicsByTopicIdSyncResponses, GetApiV1ImTopicsByTopicIdSyncErrors, ThrowOnError>({@@ -1145,6 +1317,8 @@ export class Im extends HeyApiClient {/*** Mark the agent's messages read up to a message+ *+ * **API key scopes:** `chat:write`.*/public markRead<ThrowOnError extends boolean = false>(options: Options<PostApiV1ImTopicsByTopicIdReadData, ThrowOnError>): RequestResult<PostApiV1ImTopicsByTopicIdReadResponses, PostApiV1ImTopicsByTopicIdReadErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ImTopicsByTopicIdReadResponses, PostApiV1ImTopicsByTopicIdReadErrors, ThrowOnError>({@@ -1159,6 +1333,8 @@ export class Im extends HeyApiClient {export class KnowledgeBases extends HeyApiClient {/*** List knowledge bases+ *+ * **API key scopes:** `knowledge:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1KnowledgeBasesData, ThrowOnError>): RequestResult<GetApiV1KnowledgeBasesResponses, GetApiV1KnowledgeBasesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1KnowledgeBasesResponses, GetApiV1KnowledgeBasesErrors, ThrowOnError>({@@ -1170,6 +1346,8 @@ export class KnowledgeBases extends HeyApiClient {/*** Create a knowledge base+ *+ * **API key scopes:** `knowledge:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1KnowledgeBasesData, ThrowOnError>): RequestResult<PostApiV1KnowledgeBasesResponses, PostApiV1KnowledgeBasesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1KnowledgeBasesResponses, PostApiV1KnowledgeBasesErrors, ThrowOnError>({@@ -1184,6 +1362,8 @@ export class KnowledgeBases extends HeyApiClient {* Delete a knowledge base** Also deletes the files that belong to no other knowledge base.+ *+ * **API key scopes:** `knowledge:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1KnowledgeBasesByIdData, ThrowOnError>): RequestResult<DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1KnowledgeBasesByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1KnowledgeBasesByIdResponses, DeleteApiV1KnowledgeBasesByIdErrors, ThrowOnError>({@@ -1195,6 +1375,8 @@ export class KnowledgeBases extends HeyApiClient {/*** Get a knowledge base+ *+ * **API key scopes:** `knowledge:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1KnowledgeBasesByIdData, ThrowOnError>): RequestResult<GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1KnowledgeBasesByIdResponses, GetApiV1KnowledgeBasesByIdErrors, ThrowOnError>({@@ -1206,6 +1388,8 @@ export class KnowledgeBases extends HeyApiClient {/*** Update a knowledge base+ *+ * **API key scopes:** `knowledge:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1KnowledgeBasesByIdData, ThrowOnError>): RequestResult<PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1KnowledgeBasesByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1KnowledgeBasesByIdResponses, PatchApiV1KnowledgeBasesByIdErrors, ThrowOnError>({@@ -1218,6 +1402,8 @@ export class KnowledgeBases extends HeyApiClient {/*** List the files of a knowledge base+ *+ * **API key scopes:** `knowledge:read`.*/public listFiles<ThrowOnError extends boolean = false>(options: Options<GetApiV1KnowledgeBasesByIdFilesData, ThrowOnError>): RequestResult<GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdFilesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1KnowledgeBasesByIdFilesResponses, GetApiV1KnowledgeBasesByIdFilesErrors, ThrowOnError>({@@ -1231,6 +1417,8 @@ export class KnowledgeBases extends HeyApiClient {* Remove files from a knowledge base** Detaches the files from the knowledge base without deleting them, and reports per file which ones were detached.+ *+ * **API key scopes:** `knowledge:write`.*/public removeFiles<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1KnowledgeBasesByIdFilesBatchData, ThrowOnError>): RequestResult<DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1KnowledgeBasesByIdFilesBatchResponses, DeleteApiV1KnowledgeBasesByIdFilesBatchErrors, ThrowOnError>({@@ -1243,6 +1431,8 @@ export class KnowledgeBases extends HeyApiClient {/*** Add files to a knowledge base+ *+ * **API key scopes:** `knowledge:write`.*/public addFiles<ThrowOnError extends boolean = false>(options: Options<PostApiV1KnowledgeBasesByIdFilesBatchData, ThrowOnError>): RequestResult<PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesBatchErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1KnowledgeBasesByIdFilesBatchResponses, PostApiV1KnowledgeBasesByIdFilesBatchErrors, ThrowOnError>({@@ -1255,6 +1445,8 @@ export class KnowledgeBases extends HeyApiClient {/*** Move files to another knowledge base+ *+ * **API key scopes:** `knowledge:write`.*/public moveFiles<ThrowOnError extends boolean = false>(options: Options<PostApiV1KnowledgeBasesByIdFilesMoveData, ThrowOnError>): RequestResult<PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesByIdFilesMoveErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1KnowledgeBasesByIdFilesMoveResponses, PostApiV1KnowledgeBasesByIdFilesMoveErrors, ThrowOnError>({@@ -1271,6 +1463,8 @@ export class McpServers extends HeyApiClient {* List remote MCP servers** Paginated with `limit` + `cursor`; answers `{ items, total, hasMore, nextCursor }`. Clients that still expect the former bare array can pass the deprecated `format=array`, which returns every item as a plain array.+ *+ * **API key scopes:** `mcp:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1McpServersData, ThrowOnError>): RequestResult<GetApiV1McpServersResponses, GetApiV1McpServersErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1McpServersResponses, GetApiV1McpServersErrors, ThrowOnError>({@@ -1282,6 +1476,8 @@ export class McpServers extends HeyApiClient {/*** Add a remote MCP server+ *+ * **API key scopes:** `mcp:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1McpServersData, ThrowOnError>): RequestResult<PostApiV1McpServersResponses, PostApiV1McpServersErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1McpServersResponses, PostApiV1McpServersErrors, ThrowOnError>({@@ -1294,6 +1490,8 @@ export class McpServers extends HeyApiClient {/*** Delete a remote MCP server+ *+ * **API key scopes:** `mcp:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1McpServersByIdData, ThrowOnError>): RequestResult<DeleteApiV1McpServersByIdResponses, DeleteApiV1McpServersByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1McpServersByIdResponses, DeleteApiV1McpServersByIdErrors, ThrowOnError>({@@ -1305,6 +1503,8 @@ export class McpServers extends HeyApiClient {/*** Get a remote MCP server+ *+ * **API key scopes:** `mcp:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1McpServersByIdData, ThrowOnError>): RequestResult<GetApiV1McpServersByIdResponses, GetApiV1McpServersByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1McpServersByIdResponses, GetApiV1McpServersByIdErrors, ThrowOnError>({@@ -1318,6 +1518,8 @@ export class McpServers extends HeyApiClient {* Update a remote MCP server** Changing `serverUrl` or `credentials` resets the status to `disconnected`.+ *+ * **API key scopes:** `mcp:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1McpServersByIdData, ThrowOnError>): RequestResult<PatchApiV1McpServersByIdResponses, PatchApiV1McpServersByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1McpServersByIdResponses, PatchApiV1McpServersByIdErrors, ThrowOnError>({@@ -1330,6 +1532,8 @@ export class McpServers extends HeyApiClient {/*** Discover and sync MCP tools+ *+ * **API key scopes:** `mcp:write`.*/public createSync<ThrowOnError extends boolean = false>(options: Options<PostApiV1McpServersByIdSyncData, ThrowOnError>): RequestResult<PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersByIdSyncErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1McpServersByIdSyncResponses, PostApiV1McpServersByIdSyncErrors, ThrowOnError>({@@ -1345,6 +1549,8 @@ export class Memories extends HeyApiClient {* Get the current persona document** `data` is null until a persona has been written.+ *+ * **API key scopes:** `user:read`.*/public getPersona<ThrowOnError extends boolean = false>(options?: Options<GetApiV1MemoriesPersonaData, ThrowOnError>): RequestResult<GetApiV1MemoriesPersonaResponses, GetApiV1MemoriesPersonaErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1MemoriesPersonaResponses, GetApiV1MemoriesPersonaErrors, ThrowOnError>({@@ -1356,6 +1562,8 @@ export class Memories extends HeyApiClient {/*** List persona document versions+ *+ * **API key scopes:** `user:read`.*/public listPersonaVersions<ThrowOnError extends boolean = false>(options?: Options<GetApiV1MemoriesPersonaVersionsData, ThrowOnError>): RequestResult<GetApiV1MemoriesPersonaVersionsResponses, GetApiV1MemoriesPersonaVersionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1MemoriesPersonaVersionsResponses, GetApiV1MemoriesPersonaVersionsErrors, ThrowOnError>({@@ -1369,6 +1577,8 @@ export class Memories extends HeyApiClient {* Delete all memory entries** Removes every memory, the persona and the per-topic extraction status; `count` is the number of memories removed.+ *+ * **API key scopes:** `user:write`.*/public deleteAll<ThrowOnError extends boolean = false>(options?: Options<DeleteApiV1MemoriesData, ThrowOnError>): RequestResult<DeleteApiV1MemoriesResponses, DeleteApiV1MemoriesErrors, ThrowOnError> {return (options?.client ?? this.client).delete<DeleteApiV1MemoriesResponses, DeleteApiV1MemoriesErrors, ThrowOnError>({@@ -1380,6 +1590,8 @@ export class Memories extends HeyApiClient {/*** Delete a memory entry+ *+ * **API key scopes:** `user:write`.*/public deleteEntry<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1MemoriesByCategoryByIdData, ThrowOnError>): RequestResult<DeleteApiV1MemoriesByCategoryByIdResponses, DeleteApiV1MemoriesByCategoryByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1MemoriesByCategoryByIdResponses, DeleteApiV1MemoriesByCategoryByIdErrors, ThrowOnError>({@@ -1393,6 +1605,8 @@ export class Memories extends HeyApiClient {* List the entries of a memory category** Every identity, or the newest entries of the other categories; the array shape follows `category`.+ *+ * **API key scopes:** `user:read`.*/public listCategory<ThrowOnError extends boolean = false>(options: Options<GetApiV1MemoriesByCategoryData, ThrowOnError>): RequestResult<GetApiV1MemoriesByCategoryResponses, GetApiV1MemoriesByCategoryErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1MemoriesByCategoryResponses, GetApiV1MemoriesByCategoryErrors, ThrowOnError>({@@ -1408,6 +1622,8 @@ export class MessageTranslations extends HeyApiClient {* Delete a message's translation** `id` is the id of the message whose translation was removed.+ *+ * **API key scopes:** `chat:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1MessageTranslationsByMessageIdData, ThrowOnError>): RequestResult<DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1MessageTranslationsByMessageIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1MessageTranslationsByMessageIdResponses, DeleteApiV1MessageTranslationsByMessageIdErrors, ThrowOnError>({@@ -1421,6 +1637,8 @@ export class MessageTranslations extends HeyApiClient {* Get a message's translation** `null` when the message has no stored translation.+ *+ * **API key scopes:** `chat:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1MessageTranslationsByMessageIdData, ThrowOnError>): RequestResult<GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1MessageTranslationsByMessageIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1MessageTranslationsByMessageIdResponses, GetApiV1MessageTranslationsByMessageIdErrors, ThrowOnError>({@@ -1432,6 +1650,8 @@ export class MessageTranslations extends HeyApiClient {/*** Set a message's translation+ *+ * **API key scopes:** `chat:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1MessageTranslationsByMessageIdData, ThrowOnError>): RequestResult<PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1MessageTranslationsByMessageIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1MessageTranslationsByMessageIdResponses, PatchApiV1MessageTranslationsByMessageIdErrors, ThrowOnError>({@@ -1444,6 +1664,8 @@ export class MessageTranslations extends HeyApiClient {/*** Translate a message+ *+ * **API key scopes:** `chat:write` + `model:invoke`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1MessageTranslationsByMessageIdData, ThrowOnError>): RequestResult<PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1MessageTranslationsByMessageIdErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1MessageTranslationsByMessageIdResponses, PostApiV1MessageTranslationsByMessageIdErrors, ThrowOnError>({@@ -1458,6 +1680,8 @@ export class MessageTranslations extends HeyApiClient {export class Messages extends HeyApiClient {/*** Count messages+ *+ * **API key scopes:** `chat:read`.*/public getCount<ThrowOnError extends boolean = false>(options?: Options<GetApiV1MessagesCountData, ThrowOnError>): RequestResult<GetApiV1MessagesCountResponses, GetApiV1MessagesCountErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1MessagesCountResponses, GetApiV1MessagesCountErrors, ThrowOnError>({@@ -1471,6 +1695,8 @@ export class Messages extends HeyApiClient {* Delete messages in batch** Best effort: ids the caller may not delete or that no longer exist are skipped. `count` is the number of messages actually removed.+ *+ * **API key scopes:** `chat:write`.*/public deleteMany<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1MessagesData, ThrowOnError>): RequestResult<DeleteApiV1MessagesResponses, DeleteApiV1MessagesErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1MessagesResponses, DeleteApiV1MessagesErrors, ThrowOnError>({@@ -1483,6 +1709,8 @@ export class Messages extends HeyApiClient {/*** List messages+ *+ * **API key scopes:** `chat:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1MessagesData, ThrowOnError>): RequestResult<GetApiV1MessagesResponses, GetApiV1MessagesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1MessagesResponses, GetApiV1MessagesErrors, ThrowOnError>({@@ -1494,6 +1722,8 @@ export class Messages extends HeyApiClient {/*** Create a message+ *+ * **API key scopes:** `chat:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1MessagesData, ThrowOnError>): RequestResult<PostApiV1MessagesResponses, PostApiV1MessagesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1MessagesResponses, PostApiV1MessagesErrors, ThrowOnError>({@@ -1506,6 +1736,8 @@ export class Messages extends HeyApiClient {/*** Delete a message+ *+ * **API key scopes:** `chat:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1MessagesByIdData, ThrowOnError>): RequestResult<DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1MessagesByIdResponses, DeleteApiV1MessagesByIdErrors, ThrowOnError>({@@ -1517,6 +1749,8 @@ export class Messages extends HeyApiClient {/*** Get a message+ *+ * **API key scopes:** `chat:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1MessagesByIdData, ThrowOnError>): RequestResult<GetApiV1MessagesByIdResponses, GetApiV1MessagesByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1MessagesByIdResponses, GetApiV1MessagesByIdErrors, ThrowOnError>({@@ -1530,6 +1764,8 @@ export class Messages extends HeyApiClient {* Create a user message and generate an AI reply** Stores the user message, then generates and stores the assistant reply. Answers with the reply; `null` only if it could not be read back.+ *+ * **API key scopes:** `chat:write` + `model:invoke`.*/public createReply<ThrowOnError extends boolean = false>(options: Options<PostApiV1MessagesRepliesData, ThrowOnError>): RequestResult<PostApiV1MessagesRepliesResponses, PostApiV1MessagesRepliesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1MessagesRepliesResponses, PostApiV1MessagesRepliesErrors, ThrowOnError>({@@ -1544,6 +1780,8 @@ export class Messages extends HeyApiClient {export class Models extends HeyApiClient {/*** List models+ *+ * **API key scopes:** `model:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1ModelsData, ThrowOnError>): RequestResult<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1ModelsResponses, GetApiV1ModelsErrors, ThrowOnError>({@@ -1555,6 +1793,8 @@ export class Models extends HeyApiClient {/*** Create a model+ *+ * **API key scopes:** `model:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1ModelsData, ThrowOnError>): RequestResult<PostApiV1ModelsResponses, PostApiV1ModelsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ModelsResponses, PostApiV1ModelsErrors, ThrowOnError>({@@ -1567,6 +1807,8 @@ export class Models extends HeyApiClient {/*** Get a model+ *+ * **API key scopes:** `model:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1ModelsByProviderIdByModelIdData, ThrowOnError>): RequestResult<GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsByProviderIdByModelIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1ModelsByProviderIdByModelIdResponses, GetApiV1ModelsByProviderIdByModelIdErrors, ThrowOnError>({@@ -1578,6 +1820,8 @@ export class Models extends HeyApiClient {/*** Update a model+ *+ * **API key scopes:** `model:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1ModelsByProviderIdByModelIdData, ThrowOnError>): RequestResult<PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1ModelsByProviderIdByModelIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1ModelsByProviderIdByModelIdResponses, PatchApiV1ModelsByProviderIdByModelIdErrors, ThrowOnError>({@@ -1594,6 +1838,8 @@ export class Notifications extends HeyApiClient {* List notifications** Unarchived notifications, newest first; pass the last `id` as `cursor` for the next page.+ *+ * **API key scopes:** any API key (no scope needed).*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1NotificationsData, ThrowOnError>): RequestResult<GetApiV1NotificationsResponses, GetApiV1NotificationsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1NotificationsResponses, GetApiV1NotificationsErrors, ThrowOnError>({@@ -1605,6 +1851,8 @@ export class Notifications extends HeyApiClient {/*** Get notification delivery settings+ *+ * **API key scopes:** any API key (no scope needed).*/public listSettings<ThrowOnError extends boolean = false>(options?: Options<GetApiV1NotificationsSettingsData, ThrowOnError>): RequestResult<GetApiV1NotificationsSettingsResponses, GetApiV1NotificationsSettingsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1NotificationsSettingsResponses, GetApiV1NotificationsSettingsErrors, ThrowOnError>({@@ -1618,6 +1866,8 @@ export class Notifications extends HeyApiClient {* Update notification delivery settings** Answers with the merged settings now stored for the scope.+ *+ * **API key scopes:** any API key (no scope needed).*/public updateSettings<ThrowOnError extends boolean = false>(options: Options<PatchApiV1NotificationsSettingsData, ThrowOnError>): RequestResult<PatchApiV1NotificationsSettingsResponses, PatchApiV1NotificationsSettingsErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1NotificationsSettingsResponses, PatchApiV1NotificationsSettingsErrors, ThrowOnError>({@@ -1630,6 +1880,8 @@ export class Notifications extends HeyApiClient {/*** Get the unread notification count+ *+ * **API key scopes:** any API key (no scope needed).*/public getUnreadCount<ThrowOnError extends boolean = false>(options?: Options<GetApiV1NotificationsUnreadCountData, ThrowOnError>): RequestResult<GetApiV1NotificationsUnreadCountResponses, GetApiV1NotificationsUnreadCountErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1NotificationsUnreadCountResponses, GetApiV1NotificationsUnreadCountErrors, ThrowOnError>({@@ -1641,6 +1893,8 @@ export class Notifications extends HeyApiClient {/*** Get per-category notification counts+ *+ * **API key scopes:** any API key (no scope needed).*/public getCounts<ThrowOnError extends boolean = false>(options?: Options<GetApiV1NotificationsCountsData, ThrowOnError>): RequestResult<GetApiV1NotificationsCountsResponses, GetApiV1NotificationsCountsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1NotificationsCountsResponses, GetApiV1NotificationsCountsErrors, ThrowOnError>({@@ -1652,6 +1906,8 @@ export class Notifications extends HeyApiClient {/*** Mark notifications as read+ *+ * **API key scopes:** `chat:write`.*/public markRead<ThrowOnError extends boolean = false>(options: Options<PostApiV1NotificationsReadData, ThrowOnError>): RequestResult<PostApiV1NotificationsReadResponses, PostApiV1NotificationsReadErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1NotificationsReadResponses, PostApiV1NotificationsReadErrors, ThrowOnError>({@@ -1664,6 +1920,8 @@ export class Notifications extends HeyApiClient {/*** Mark every notification as read+ *+ * **API key scopes:** `chat:write`.*/public markAllRead<ThrowOnError extends boolean = false>(options?: Options<PostApiV1NotificationsReadAllData, ThrowOnError>): RequestResult<PostApiV1NotificationsReadAllResponses, PostApiV1NotificationsReadAllErrors, ThrowOnError> {return (options?.client ?? this.client).post<PostApiV1NotificationsReadAllResponses, PostApiV1NotificationsReadAllErrors, ThrowOnError>({@@ -1675,6 +1933,8 @@ export class Notifications extends HeyApiClient {/*** Archive every notification+ *+ * **API key scopes:** `chat:write`.*/public archiveAll<ThrowOnError extends boolean = false>(options?: Options<PostApiV1NotificationsArchiveAllData, ThrowOnError>): RequestResult<PostApiV1NotificationsArchiveAllResponses, PostApiV1NotificationsArchiveAllErrors, ThrowOnError> {return (options?.client ?? this.client).post<PostApiV1NotificationsArchiveAllResponses, PostApiV1NotificationsArchiveAllErrors, ThrowOnError>({@@ -1686,6 +1946,8 @@ export class Notifications extends HeyApiClient {/*** Archive a notification+ *+ * **API key scopes:** `chat:write`.*/public archive<ThrowOnError extends boolean = false>(options: Options<PostApiV1NotificationsByIdArchiveData, ThrowOnError>): RequestResult<PostApiV1NotificationsByIdArchiveResponses, PostApiV1NotificationsByIdArchiveErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1NotificationsByIdArchiveResponses, PostApiV1NotificationsByIdArchiveErrors, ThrowOnError>({@@ -1699,6 +1961,8 @@ export class Notifications extends HeyApiClient {export class Permissions extends HeyApiClient {/*** List permissions+ *+ * **API key scopes:** a full-access API key (`*`).*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1PermissionsData, ThrowOnError>): RequestResult<GetApiV1PermissionsResponses, GetApiV1PermissionsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1PermissionsResponses, GetApiV1PermissionsErrors, ThrowOnError>({@@ -1710,6 +1974,8 @@ export class Permissions extends HeyApiClient {/*** Create a permission+ *+ * **API key scopes:** a full-access API key (`*`).*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1PermissionsData, ThrowOnError>): RequestResult<PostApiV1PermissionsResponses, PostApiV1PermissionsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1PermissionsResponses, PostApiV1PermissionsErrors, ThrowOnError>({@@ -1722,6 +1988,8 @@ export class Permissions extends HeyApiClient {/*** Delete a permission+ *+ * **API key scopes:** a full-access API key (`*`).*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1PermissionsByIdData, ThrowOnError>): RequestResult<DeleteApiV1PermissionsByIdResponses, DeleteApiV1PermissionsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1PermissionsByIdResponses, DeleteApiV1PermissionsByIdErrors, ThrowOnError>({@@ -1733,6 +2001,8 @@ export class Permissions extends HeyApiClient {/*** Get a permission+ *+ * **API key scopes:** a full-access API key (`*`).*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1PermissionsByIdData, ThrowOnError>): RequestResult<GetApiV1PermissionsByIdResponses, GetApiV1PermissionsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1PermissionsByIdResponses, GetApiV1PermissionsByIdErrors, ThrowOnError>({@@ -1744,6 +2014,8 @@ export class Permissions extends HeyApiClient {/*** Update a permission+ *+ * **API key scopes:** a full-access API key (`*`).*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1PermissionsByIdData, ThrowOnError>): RequestResult<PatchApiV1PermissionsByIdResponses, PatchApiV1PermissionsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1PermissionsByIdResponses, PatchApiV1PermissionsByIdErrors, ThrowOnError>({@@ -1758,6 +2030,8 @@ export class Permissions extends HeyApiClient {export class Providers extends HeyApiClient {/*** List providers+ *+ * **API key scopes:** `model:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1ProvidersData, ThrowOnError>): RequestResult<GetApiV1ProvidersResponses, GetApiV1ProvidersErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1ProvidersResponses, GetApiV1ProvidersErrors, ThrowOnError>({@@ -1769,6 +2043,8 @@ export class Providers extends HeyApiClient {/*** Create a provider+ *+ * **API key scopes:** `model:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1ProvidersData, ThrowOnError>): RequestResult<PostApiV1ProvidersResponses, PostApiV1ProvidersErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ProvidersResponses, PostApiV1ProvidersErrors, ThrowOnError>({@@ -1783,6 +2059,8 @@ export class Providers extends HeyApiClient {* Delete a provider** Also removes the models configured under the provider.+ *+ * **API key scopes:** `model:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1ProvidersByIdData, ThrowOnError>): RequestResult<DeleteApiV1ProvidersByIdResponses, DeleteApiV1ProvidersByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1ProvidersByIdResponses, DeleteApiV1ProvidersByIdErrors, ThrowOnError>({@@ -1794,6 +2072,8 @@ export class Providers extends HeyApiClient {/*** Get a provider+ *+ * **API key scopes:** `model:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1ProvidersByIdData, ThrowOnError>): RequestResult<GetApiV1ProvidersByIdResponses, GetApiV1ProvidersByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1ProvidersByIdResponses, GetApiV1ProvidersByIdErrors, ThrowOnError>({@@ -1805,6 +2085,8 @@ export class Providers extends HeyApiClient {/*** Update a provider+ *+ * **API key scopes:** `model:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1ProvidersByIdData, ThrowOnError>): RequestResult<PatchApiV1ProvidersByIdResponses, PatchApiV1ProvidersByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1ProvidersByIdResponses, PatchApiV1ProvidersByIdErrors, ThrowOnError>({@@ -1821,6 +2103,8 @@ export class PushTokens extends HeyApiClient {* Stop pushing to this device (sign-out)** `id` is the device id. Idempotent: a stale `expoToken` removes nothing and leaves the rotated registration in place.+ *+ * **API key scopes:** `chat:read`.*/public unregister<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1PushTokensByDeviceIdData, ThrowOnError>): RequestResult<DeleteApiV1PushTokensByDeviceIdResponses, DeleteApiV1PushTokensByDeviceIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1PushTokensByDeviceIdResponses, DeleteApiV1PushTokensByDeviceIdErrors, ThrowOnError>({@@ -1832,6 +2116,8 @@ export class PushTokens extends HeyApiClient {/*** Register or rotate this device's push token+ *+ * **API key scopes:** `chat:read`.*/public register<ThrowOnError extends boolean = false>(options: Options<PutApiV1PushTokensByDeviceIdData, ThrowOnError>): RequestResult<PutApiV1PushTokensByDeviceIdResponses, PutApiV1PushTokensByDeviceIdErrors, ThrowOnError> {return (options.client ?? this.client).put<PutApiV1PushTokensByDeviceIdResponses, PutApiV1PushTokensByDeviceIdErrors, ThrowOnError>({@@ -1847,7 +2133,9 @@ export class Responses extends HeyApiClient {/*** Create a model response*- * OpenResponses-compatible: `model` takes an agent id. Without `stream` the response object is the whole JSON body (no success envelope); a run that fails still answers 200 with `status: "failed"` and `error`. With `stream: true` the same object arrives through `response.*` server-sent events.+ * OpenResponses-compatible: `model` takes an agent id. Without `stream` the response object is the whole JSON body (no success envelope); a run that fails still answers 200 with `status: "failed"` and `error`. With `stream: true` the body is `text/event-stream`: each message is `event: <type>` plus `data: <ResponseStreamEvent JSON>`, and the final `response.completed` / `response.failed` / `response.incomplete` event carries the same response object.+ *+ * **API key scopes:** `agent:write` + `chat:write` + `model:invoke`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1ResponsesData, ThrowOnError>): RequestResult<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1ResponsesResponses, PostApiV1ResponsesErrors, ThrowOnError>({@@ -1862,6 +2150,8 @@ export class Responses extends HeyApiClient {export class Roles extends HeyApiClient {/*** List roles+ *+ * **API key scopes:** a full-access API key (`*`).*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1RolesData, ThrowOnError>): RequestResult<GetApiV1RolesResponses, GetApiV1RolesErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1RolesResponses, GetApiV1RolesErrors, ThrowOnError>({@@ -1873,6 +2163,8 @@ export class Roles extends HeyApiClient {/*** Create a role+ *+ * **API key scopes:** a full-access API key (`*`).*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1RolesData, ThrowOnError>): RequestResult<PostApiV1RolesResponses, PostApiV1RolesErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1RolesResponses, PostApiV1RolesErrors, ThrowOnError>({@@ -1885,6 +2177,8 @@ export class Roles extends HeyApiClient {/*** Delete a role+ *+ * **API key scopes:** a full-access API key (`*`).*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1RolesByIdData, ThrowOnError>): RequestResult<DeleteApiV1RolesByIdResponses, DeleteApiV1RolesByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1RolesByIdResponses, DeleteApiV1RolesByIdErrors, ThrowOnError>({@@ -1896,6 +2190,8 @@ export class Roles extends HeyApiClient {/*** Get a role+ *+ * **API key scopes:** a full-access API key (`*`).*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1RolesByIdData, ThrowOnError>): RequestResult<GetApiV1RolesByIdResponses, GetApiV1RolesByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1RolesByIdResponses, GetApiV1RolesByIdErrors, ThrowOnError>({@@ -1907,6 +2203,8 @@ export class Roles extends HeyApiClient {/*** Update a role+ *+ * **API key scopes:** a full-access API key (`*`).*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1RolesByIdData, ThrowOnError>): RequestResult<PatchApiV1RolesByIdResponses, PatchApiV1RolesByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1RolesByIdResponses, PatchApiV1RolesByIdErrors, ThrowOnError>({@@ -1921,6 +2219,8 @@ export class Roles extends HeyApiClient {* Clear a role's permissions** `count` is the number of permission mappings removed.+ *+ * **API key scopes:** a full-access API key (`*`).*/public deletePermissions<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1RolesByIdPermissionsData, ThrowOnError>): RequestResult<DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdPermissionsErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1RolesByIdPermissionsResponses, DeleteApiV1RolesByIdPermissionsErrors, ThrowOnError>({@@ -1932,6 +2232,8 @@ export class Roles extends HeyApiClient {/*** List a role's permissions+ *+ * **API key scopes:** a full-access API key (`*`).*/public listPermissions<ThrowOnError extends boolean = false>(options: Options<GetApiV1RolesByIdPermissionsData, ThrowOnError>): RequestResult<GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdPermissionsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1RolesByIdPermissionsResponses, GetApiV1RolesByIdPermissionsErrors, ThrowOnError>({@@ -1945,6 +2247,8 @@ export class Roles extends HeyApiClient {* Update a role's permissions** Grants and revokes permissions by id; returns how many mappings changed.+ *+ * **API key scopes:** a full-access API key (`*`).*/public updatePermissions<ThrowOnError extends boolean = false>(options: Options<PatchApiV1RolesByIdPermissionsData, ThrowOnError>): RequestResult<PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdPermissionsErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1RolesByIdPermissionsResponses, PatchApiV1RolesByIdPermissionsErrors, ThrowOnError>({@@ -1959,6 +2263,8 @@ export class Roles extends HeyApiClient {export class Signals extends HeyApiClient {/*** Emit an agent signal source event+ *+ * **API key scopes:** `agent:write` + `model:invoke`.*/public emit<ThrowOnError extends boolean = false>(options: Options<PostApiV1SignalsSourceEventsData, ThrowOnError>): RequestResult<PostApiV1SignalsSourceEventsResponses, PostApiV1SignalsSourceEventsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1SignalsSourceEventsResponses, PostApiV1SignalsSourceEventsErrors, ThrowOnError>({@@ -1971,6 +2277,8 @@ export class Signals extends HeyApiClient {/*** Trigger a synthesized agent signal source event+ *+ * **API key scopes:** `agent:write` + `model:invoke`.*/public trigger<ThrowOnError extends boolean = false>(options: Options<PostApiV1SignalsTriggerData, ThrowOnError>): RequestResult<PostApiV1SignalsTriggerResponses, PostApiV1SignalsTriggerErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1SignalsTriggerResponses, PostApiV1SignalsTriggerErrors, ThrowOnError>({@@ -1983,6 +2291,8 @@ export class Signals extends HeyApiClient {/*** List agent signal receipts for a topic+ *+ * **API key scopes:** `agent:read`.*/public listReceipts<ThrowOnError extends boolean = false>(options: Options<GetApiV1SignalsReceiptsData, ThrowOnError>): RequestResult<GetApiV1SignalsReceiptsResponses, GetApiV1SignalsReceiptsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1SignalsReceiptsResponses, GetApiV1SignalsReceiptsErrors, ThrowOnError>({@@ -1996,6 +2306,8 @@ export class Signals extends HeyApiClient {export class Tasks extends HeyApiClient {/*** List tasks+ *+ * **API key scopes:** `agent:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1TasksData, ThrowOnError>): RequestResult<GetApiV1TasksResponses, GetApiV1TasksErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1TasksResponses, GetApiV1TasksErrors, ThrowOnError>({@@ -2007,6 +2319,8 @@ export class Tasks extends HeyApiClient {/*** Create a task+ *+ * **API key scopes:** `agent:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksData, ThrowOnError>): RequestResult<PostApiV1TasksResponses, PostApiV1TasksErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1TasksResponses, PostApiV1TasksErrors, ThrowOnError>({@@ -2019,6 +2333,8 @@ export class Tasks extends HeyApiClient {/*** Delete a task+ *+ * **API key scopes:** `agent:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1TasksByIdData, ThrowOnError>): RequestResult<DeleteApiV1TasksByIdResponses, DeleteApiV1TasksByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1TasksByIdResponses, DeleteApiV1TasksByIdErrors, ThrowOnError>({@@ -2030,6 +2346,8 @@ export class Tasks extends HeyApiClient {/*** Get a task+ *+ * **API key scopes:** `agent:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdData, ThrowOnError>): RequestResult<GetApiV1TasksByIdResponses, GetApiV1TasksByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1TasksByIdResponses, GetApiV1TasksByIdErrors, ThrowOnError>({@@ -2041,6 +2359,8 @@ export class Tasks extends HeyApiClient {/*** Update a task+ *+ * **API key scopes:** `agent:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1TasksByIdData, ThrowOnError>): RequestResult<PatchApiV1TasksByIdResponses, PatchApiV1TasksByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1TasksByIdResponses, PatchApiV1TasksByIdErrors, ThrowOnError>({@@ -2053,6 +2373,8 @@ export class Tasks extends HeyApiClient {/*** Change a task status+ *+ * **API key scopes:** `agent:write`.*/public updateStatus<ThrowOnError extends boolean = false>(options: Options<PatchApiV1TasksByIdStatusData, ThrowOnError>): RequestResult<PatchApiV1TasksByIdStatusResponses, PatchApiV1TasksByIdStatusErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1TasksByIdStatusResponses, PatchApiV1TasksByIdStatusErrors, ThrowOnError>({@@ -2065,6 +2387,8 @@ export class Tasks extends HeyApiClient {/*** List past runs of a task+ *+ * **API key scopes:** `agent:read`.*/public listRuns<ThrowOnError extends boolean = false>(options: Options<GetApiV1TasksByIdRunsData, ThrowOnError>): RequestResult<GetApiV1TasksByIdRunsResponses, GetApiV1TasksByIdRunsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1TasksByIdRunsResponses, GetApiV1TasksByIdRunsErrors, ThrowOnError>({@@ -2078,6 +2402,8 @@ export class Tasks extends HeyApiClient {* Run a task now** Starts the run and answers once the agent operation is accepted; follow it with `operationId`.+ *+ * **API key scopes:** `agent:write`.*/public run<ThrowOnError extends boolean = false>(options: Options<PostApiV1TasksByIdRunsData, ThrowOnError>): RequestResult<PostApiV1TasksByIdRunsResponses, PostApiV1TasksByIdRunsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1TasksByIdRunsResponses, PostApiV1TasksByIdRunsErrors, ThrowOnError>({@@ -2092,6 +2418,8 @@ export class Tasks extends HeyApiClient {export class Topics extends HeyApiClient {/*** List topics+ *+ * **API key scopes:** `chat:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1TopicsData, ThrowOnError>): RequestResult<GetApiV1TopicsResponses, GetApiV1TopicsErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1TopicsResponses, GetApiV1TopicsErrors, ThrowOnError>({@@ -2103,6 +2431,8 @@ export class Topics extends HeyApiClient {/*** Create a topic+ *+ * **API key scopes:** `chat:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1TopicsData, ThrowOnError>): RequestResult<PostApiV1TopicsResponses, PostApiV1TopicsErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1TopicsResponses, PostApiV1TopicsErrors, ThrowOnError>({@@ -2115,6 +2445,8 @@ export class Topics extends HeyApiClient {/*** Delete a topic+ *+ * **API key scopes:** `chat:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1TopicsByIdData, ThrowOnError>): RequestResult<DeleteApiV1TopicsByIdResponses, DeleteApiV1TopicsByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1TopicsByIdResponses, DeleteApiV1TopicsByIdErrors, ThrowOnError>({@@ -2126,6 +2458,8 @@ export class Topics extends HeyApiClient {/*** Get a topic+ *+ * **API key scopes:** `chat:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1TopicsByIdData, ThrowOnError>): RequestResult<GetApiV1TopicsByIdResponses, GetApiV1TopicsByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1TopicsByIdResponses, GetApiV1TopicsByIdErrors, ThrowOnError>({@@ -2137,6 +2471,8 @@ export class Topics extends HeyApiClient {/*** Update a topic+ *+ * **API key scopes:** `chat:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1TopicsByIdData, ThrowOnError>): RequestResult<PatchApiV1TopicsByIdResponses, PatchApiV1TopicsByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1TopicsByIdResponses, PatchApiV1TopicsByIdErrors, ThrowOnError>({@@ -2149,6 +2485,8 @@ export class Topics extends HeyApiClient {/*** List topic threads+ *+ * **API key scopes:** `chat:read`.*/public listThreads<ThrowOnError extends boolean = false>(options: Options<GetApiV1TopicsByTopicIdThreadsData, ThrowOnError>): RequestResult<GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsByTopicIdThreadsErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1TopicsByTopicIdThreadsResponses, GetApiV1TopicsByTopicIdThreadsErrors, ThrowOnError>({@@ -2164,6 +2502,8 @@ export class Users extends HeyApiClient {* Get current authenticated user** Reachable by every authenticated caller. An API key without `user:read` receives only `{ id }`; `messageCount` is included only with `?includeCount=1` and `chat:read`.+ *+ * **API key scopes:** any API key (no scope needed).*/public me<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UsersMeData, ThrowOnError>): RequestResult<GetApiV1UsersMeResponses, GetApiV1UsersMeErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1UsersMeResponses, GetApiV1UsersMeErrors, ThrowOnError>({@@ -2175,6 +2515,8 @@ export class Users extends HeyApiClient {/*** List users+ *+ * **API key scopes:** `user:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UsersData, ThrowOnError>): RequestResult<GetApiV1UsersResponses, GetApiV1UsersErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1UsersResponses, GetApiV1UsersErrors, ThrowOnError>({@@ -2186,6 +2528,8 @@ export class Users extends HeyApiClient {/*** Create a user+ *+ * **API key scopes:** `user:write`.*/public create<ThrowOnError extends boolean = false>(options: Options<PostApiV1UsersData, ThrowOnError>): RequestResult<PostApiV1UsersResponses, PostApiV1UsersErrors, ThrowOnError> {return (options.client ?? this.client).post<PostApiV1UsersResponses, PostApiV1UsersErrors, ThrowOnError>({@@ -2198,6 +2542,8 @@ export class Users extends HeyApiClient {/*** Delete a user+ *+ * **API key scopes:** `user:write`.*/public delete<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1UsersByIdData, ThrowOnError>): RequestResult<DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1UsersByIdResponses, DeleteApiV1UsersByIdErrors, ThrowOnError>({@@ -2209,6 +2555,8 @@ export class Users extends HeyApiClient {/*** Get a user+ *+ * **API key scopes:** `user:read`.*/public get<ThrowOnError extends boolean = false>(options: Options<GetApiV1UsersByIdData, ThrowOnError>): RequestResult<GetApiV1UsersByIdResponses, GetApiV1UsersByIdErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1UsersByIdResponses, GetApiV1UsersByIdErrors, ThrowOnError>({@@ -2220,6 +2568,8 @@ export class Users extends HeyApiClient {/*** Update a user+ *+ * **API key scopes:** `user:write`.*/public update<ThrowOnError extends boolean = false>(options: Options<PatchApiV1UsersByIdData, ThrowOnError>): RequestResult<PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1UsersByIdResponses, PatchApiV1UsersByIdErrors, ThrowOnError>({@@ -2234,6 +2584,8 @@ export class Users extends HeyApiClient {* Clear a user's roles** `count` is the number of role assignments removed.+ *+ * **API key scopes:** a full-access API key (`*`).*/public deleteRoles<ThrowOnError extends boolean = false>(options: Options<DeleteApiV1UsersByIdRolesData, ThrowOnError>): RequestResult<DeleteApiV1UsersByIdRolesResponses, DeleteApiV1UsersByIdRolesErrors, ThrowOnError> {return (options.client ?? this.client).delete<DeleteApiV1UsersByIdRolesResponses, DeleteApiV1UsersByIdRolesErrors, ThrowOnError>({@@ -2245,6 +2597,8 @@ export class Users extends HeyApiClient {/*** List a user's roles+ *+ * **API key scopes:** a full-access API key (`*`).*/public listRoles<ThrowOnError extends boolean = false>(options: Options<GetApiV1UsersByIdRolesData, ThrowOnError>): RequestResult<GetApiV1UsersByIdRolesResponses, GetApiV1UsersByIdRolesErrors, ThrowOnError> {return (options.client ?? this.client).get<GetApiV1UsersByIdRolesResponses, GetApiV1UsersByIdRolesErrors, ThrowOnError>({@@ -2258,6 +2612,8 @@ export class Users extends HeyApiClient {* Update a user's roles** Adds and removes role assignments, then returns all of the user's roles.+ *+ * **API key scopes:** a full-access API key (`*`).*/public updateRoles<ThrowOnError extends boolean = false>(options: Options<PatchApiV1UsersByIdRolesData, ThrowOnError>): RequestResult<PatchApiV1UsersByIdRolesResponses, PatchApiV1UsersByIdRolesErrors, ThrowOnError> {return (options.client ?? this.client).patch<PatchApiV1UsersByIdRolesResponses, PatchApiV1UsersByIdRolesErrors, ThrowOnError>({@@ -2272,6 +2628,8 @@ export class Users extends HeyApiClient {export class Usage extends HeyApiClient {/*** Get usage and quota summary+ *+ * **API key scopes:** `usage:read`.*/public list<ThrowOnError extends boolean = false>(options?: Options<GetApiV1UsageData, ThrowOnError>): RequestResult<GetApiV1UsageResponses, GetApiV1UsageErrors, ThrowOnError> {return (options?.client ?? this.client).get<GetApiV1UsageResponses, GetApiV1UsageErrors, ThrowOnError>({diff --git a/packages/sdk/src/generated/types.gen.ts b/packages/sdk/src/generated/types.gen.tsindex b8ca2ce203e..ac3d194d07c 100644--- a/packages/sdk/src/generated/types.gen.ts+++ b/packages/sdk/src/generated/types.gen.ts@@ -1054,10 +1054,10 @@ export type GoalGraphWorkVersionLink = {identifier: string | null;mimeType?: string;resourceId: string | null;- resourceType?: 'canvas' | 'document' | 'github_issue' | 'github_pull_request' | 'linear_document' | 'linear_issue' | 'link' | 'file' | 'collection' | 'goal_report' | 'task';+ resourceType?: 'artboard' | 'canvas' | 'document' | 'github_issue' | 'github_pull_request' | 'linear_document' | 'linear_issue' | 'link' | 'file' | 'collection' | 'goal_report' | 'task';status: string | null;title: string | null;- type: 'canvas' | 'document' | 'external' | 'file' | 'collection' | 'goal_report' | 'task';+ type: 'artboard' | 'canvas' | 'document' | 'external' | 'file' | 'collection' | 'goal_report' | 'task';url: string | null;workId: string;};@@ -1928,6 +1928,124 @@ export type ResponseUsage = {total_tokens: number;};+export type ResponseStreamEvent = ResponseCreatedEvent | ResponseInProgressEvent | ResponseCompletedEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseOutputTextDeltaEvent | ResponseOutputTextDoneEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent;++export type ResponseCreatedEvent = {+ sequence_number: number;+ type: 'response.created';+ response: ResponseObject;+};++export type ResponseInProgressEvent = {+ sequence_number: number;+ type: 'response.in_progress';+ response: ResponseObject;+};++export type ResponseCompletedEvent = {+ sequence_number: number;+ type: 'response.completed';+ response: ResponseObject;+};++export type ResponseFailedEvent = {+ sequence_number: number;+ type: 'response.failed';+ response: ResponseObject;+};++export type ResponseIncompleteEvent = {+ sequence_number: number;+ type: 'response.incomplete';+ response: ResponseObject;+};++export type ResponseOutputItemAddedEvent = {+ sequence_number: number;+ type: 'response.output_item.added';+ item: ResponseOutputItem;+ output_index: number;+};++export type ResponseOutputItemDoneEvent = {+ sequence_number: number;+ type: 'response.output_item.done';+ item: ResponseOutputItem;+ output_index: number;+};++export type ResponseContentPartAddedEvent = {+ sequence_number: number;+ type: 'response.content_part.added';+ item_id: string;+ output_index: number;+ content_index: number;+ part: ResponseOutputText;+};++export type ResponseContentPartDoneEvent = {+ sequence_number: number;+ type: 'response.content_part.done';+ item_id: string;+ output_index: number;+ content_index: number;+ part: ResponseOutputText;+};++export type ResponseOutputTextDeltaEvent = {+ sequence_number: number;+ type: 'response.output_text.delta';+ item_id: string;+ output_index: number;+ content_index: number;+ delta: string;+ logprobs: Array<{+ bytes: Array<number>;+ logprob: number;+ token: string;+ top_logprobs: Array<{+ bytes: Array<number>;+ logprob: number;+ token: string;+ }>;+ }>;+};++export type ResponseOutputTextDoneEvent = {+ sequence_number: number;+ type: 'response.output_text.done';+ item_id: string;+ output_index: number;+ content_index: number;+ logprobs: Array<{+ bytes: Array<number>;+ logprob: number;+ token: string;+ top_logprobs: Array<{+ bytes: Array<number>;+ logprob: number;+ token: string;+ }>;+ }>;+ text: string;+};++export type ResponseFunctionCallArgumentsDeltaEvent = {+ sequence_number: number;+ type: 'response.function_call_arguments.delta';+ item_id: string;+ output_index: number;+ delta: string;+};++export type ResponseFunctionCallArgumentsDoneEvent = {+ sequence_number: number;+ type: 'response.function_call_arguments.done';+ item_id: string;+ output_index: number;+ arguments: string;+};+export type RoleList = {hasMore: PageHasMore;nextCursor: PageNextCursor;@@ -2687,6 +2805,11 @@ export type Usage = {*/export type IdempotencyKey = string;+/**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+export type WorkspaceId = string;+export type GetApiV1HealthData = {body?: never;path?: never;@@ -2709,6 +2832,12 @@ export type GetApiV1HealthResponse = GetApiV1HealthResponses[keyof GetApiV1Healtexport type GetApiV1AgentGroupsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -2779,6 +2908,10 @@ export type PostApiV1AgentGroupsData = {sort?: number | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -2830,6 +2963,12 @@ export type PostApiV1AgentGroupsResponse = PostApiV1AgentGroupsResponses[keyof Pexport type DeleteApiV1AgentGroupsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -2878,6 +3017,12 @@ export type DeleteApiV1AgentGroupsByIdResponse = DeleteApiV1AgentGroupsByIdRespoexport type GetApiV1AgentGroupsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -2933,6 +3078,12 @@ export type PatchApiV1AgentGroupsByIdData = {name?: string | null;sort?: number | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -2981,6 +3132,12 @@ export type PatchApiV1AgentGroupsByIdResponse = PatchApiV1AgentGroupsByIdResponsexport type GetApiV1AgentsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -3132,6 +3289,10 @@ export type PostApiV1AgentsData = {title: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -3183,6 +3344,12 @@ export type PostApiV1AgentsResponse = PostApiV1AgentsResponses[keyof PostApiV1Agexport type DeleteApiV1AgentsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -3231,6 +3398,12 @@ export type DeleteApiV1AgentsByIdResponse = DeleteApiV1AgentsByIdResponses[keyofexport type GetApiV1AgentsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -3364,6 +3537,12 @@ export type PatchApiV1AgentsByIdData = {systemRole?: string | null;title?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -3415,6 +3594,10 @@ export type PostApiV1AgentsByIdDuplicateData = {title?: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -3472,6 +3655,12 @@ export type PostApiV1AgentsByIdDuplicateResponse = PostApiV1AgentsByIdDuplicateRexport type GetApiV1AgentsByIdAccountsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -3545,6 +3734,10 @@ export type PostApiV1AgentsByIdAccountsData = {provider: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -3606,6 +3799,12 @@ export type PostApiV1AgentsByIdAccountsResponse = PostApiV1AgentsByIdAccountsResexport type DeleteApiV1AgentsByIdAccountsByAccountIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {accountId: string;id: string;@@ -3662,6 +3861,12 @@ export type DeleteApiV1AgentsByIdAccountsByAccountIdResponse = DeleteApiV1Agentsexport type GetApiV1AgentsByIdAccountsByAccountIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {accountId: string;id: string;@@ -3726,6 +3931,12 @@ export type PatchApiV1AgentsByIdAccountsByAccountIdData = {[key: string]: unknown;};};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {accountId: string;id: string;@@ -3792,6 +4003,12 @@ export type PutApiV1AgentsByIdAccountsByAccountIdCredentialData = {username?: string;};};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {accountId: string;id: string;@@ -3845,6 +4062,12 @@ export type PutApiV1AgentsByIdAccountsByAccountIdCredentialResponse = PutApiV1Agexport type GetApiV1ApiKeysData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -3916,6 +4139,10 @@ export type PostApiV1ApiKeysData = {scopes?: Array<'*' | 'agent:read' | 'agent:write' | 'agent:credential:write' | 'eval:read' | 'eval:write' | 'chat:read' | 'chat:write' | 'model:invoke' | 'model:read' | 'model:write' | 'file:read' | 'file:write' | 'knowledge:read' | 'knowledge:write' | 'mcp:read' | 'mcp:write' | 'usage:read' | 'workspace:read' | 'workspace:write' | 'user:read' | 'user:write'> | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -3967,6 +4194,12 @@ export type PostApiV1ApiKeysResponse = PostApiV1ApiKeysResponses[keyof PostApiV1export type DeleteApiV1ApiKeysByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4019,6 +4252,12 @@ export type DeleteApiV1ApiKeysByIdResponse = DeleteApiV1ApiKeysByIdResponses[keyexport type GetApiV1ApiKeysByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4075,6 +4314,12 @@ export type PatchApiV1ApiKeysByIdData = {expiresAt?: string | null;name?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4128,6 +4373,10 @@ export type PatchApiV1ApiKeysByIdResponse = PatchApiV1ApiKeysByIdResponses[keyofexport type PostApiV1AudioSpeechData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4231,6 +4480,10 @@ export type PostApiV1ChatData = {top_p?: number;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4289,6 +4542,10 @@ export type PostApiV1ChatTranslateData = {to: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4367,6 +4624,10 @@ export type PostApiV1ChatGenerateReplyData = {userMessage: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4418,6 +4679,12 @@ export type PostApiV1ChatGenerateReplyResponse = PostApiV1ChatGenerateReplyRespoexport type GetApiV1ChatGroupsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -4497,6 +4764,10 @@ export type PostApiV1ChatGroupsData = {title: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4556,6 +4827,12 @@ export type PostApiV1ChatGroupsResponse = PostApiV1ChatGroupsResponses[keyof Posexport type DeleteApiV1ChatGroupsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4608,6 +4885,12 @@ export type DeleteApiV1ChatGroupsByIdResponse = DeleteApiV1ChatGroupsByIdResponsexport type GetApiV1ChatGroupsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4667,6 +4950,12 @@ export type PatchApiV1ChatGroupsByIdData = {pinned?: boolean;title?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4725,6 +5014,12 @@ export type DeleteApiV1ChatGroupsByIdMembersData = {body: {agentIds: Array<string>;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -4784,6 +5079,10 @@ export type PostApiV1ChatGroupsByIdMembersData = {agentIds: Array<string>;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4841,6 +5140,12 @@ export type PostApiV1ChatGroupsByIdMembersResponse = PostApiV1ChatGroupsByIdMembexport type GetApiV1DocumentsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -4920,6 +5225,10 @@ export type PostApiV1DocumentsData = {title: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -4975,6 +5284,12 @@ export type PostApiV1DocumentsResponse = PostApiV1DocumentsResponses[keyof PostAexport type GetApiV1DocumentsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5033,6 +5348,12 @@ export type PatchApiV1DocumentsByIdData = {content?: string;title?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5085,6 +5406,12 @@ export type PatchApiV1DocumentsByIdResponse = PatchApiV1DocumentsByIdResponses[kexport type GetApiV1EvalRunsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -5186,6 +5513,10 @@ export type PostApiV1EvalRunsData = {targetAgentId: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -5245,6 +5576,12 @@ export type PostApiV1EvalRunsResponse = PostApiV1EvalRunsResponses[keyof PostApiexport type GetApiV1EvalRunsByIdTopicsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5330,6 +5667,12 @@ export type GetApiV1EvalRunsByIdTopicsResponse = GetApiV1EvalRunsByIdTopicsRespoexport type GetApiV1EvalRunsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5382,6 +5725,12 @@ export type GetApiV1EvalRunsByIdResponse = GetApiV1EvalRunsByIdResponses[keyof Gexport type GetApiV1EvalRunsByIdResultsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5479,6 +5828,10 @@ export type PostApiV1EvalRunsByIdResultsData = {}>;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -5540,6 +5893,12 @@ export type PostApiV1EvalRunsByIdResultsResponse = PostApiV1EvalRunsByIdResultsRexport type GetApiV1EvalBenchmarksData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -5692,6 +6051,10 @@ export type PostApiV1EvalBenchmarksData = {}>;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -5747,6 +6110,12 @@ export type PostApiV1EvalBenchmarksResponse = PostApiV1EvalBenchmarksResponses[kexport type DeleteApiV1EvalBenchmarksByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5799,6 +6168,12 @@ export type DeleteApiV1EvalBenchmarksByIdResponse = DeleteApiV1EvalBenchmarksByIexport type GetApiV1EvalBenchmarksByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5923,6 +6298,12 @@ export type PatchApiV1EvalBenchmarksByIdData = {};}>;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -5979,6 +6360,12 @@ export type PatchApiV1EvalBenchmarksByIdResponse = PatchApiV1EvalBenchmarksByIdRexport type GetApiV1EvalDatasetsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -6072,6 +6459,10 @@ export type PostApiV1EvalDatasetsData = {evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -6131,6 +6522,12 @@ export type PostApiV1EvalDatasetsResponse = PostApiV1EvalDatasetsResponses[keyofexport type DeleteApiV1EvalDatasetsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6183,6 +6580,12 @@ export type DeleteApiV1EvalDatasetsByIdResponse = DeleteApiV1EvalDatasetsByIdResexport type GetApiV1EvalDatasetsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6247,6 +6650,12 @@ export type PatchApiV1EvalDatasetsByIdData = {} | null;evalMode?: 'equals' | 'contains' | 'regex' | 'starts-with' | 'ends-with' | 'any-of' | 'numeric' | 'extract-match' | 'json-schema' | 'javascript' | 'python' | 'llm-rubric' | 'factuality' | 'answer-relevance' | 'similar' | 'levenshtein' | 'rubric' | 'external' | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6303,6 +6712,12 @@ export type PatchApiV1EvalDatasetsByIdResponse = PatchApiV1EvalDatasetsByIdRespoexport type GetApiV1EvalDatasetsByDatasetIdTestCasesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {datasetId: string;};@@ -6447,6 +6862,10 @@ export type PostApiV1EvalDatasetsByDatasetIdTestCasesData = {} | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -6508,6 +6927,12 @@ export type PostApiV1EvalDatasetsByDatasetIdTestCasesResponse = PostApiV1EvalDatexport type DeleteApiV1EvalTestCasesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6560,6 +6985,12 @@ export type DeleteApiV1EvalTestCasesByIdResponse = DeleteApiV1EvalTestCasesByIdRexport type GetApiV1EvalTestCasesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6670,6 +7101,12 @@ export type PatchApiV1EvalTestCasesByIdData = {[key: string]: unknown;} | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6723,6 +7160,10 @@ export type PatchApiV1EvalTestCasesByIdResponse = PatchApiV1EvalTestCasesByIdResexport type PostApiV1EvalRunsByIdClaimData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -6786,6 +7227,12 @@ export type PatchApiV1EvalRunsByIdStatusData = {body: {status: 'running' | 'external' | 'completed' | 'failed' | 'aborted';};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -6843,6 +7290,10 @@ export type PatchApiV1EvalRunsByIdStatusResponse = PatchApiV1EvalRunsByIdStatusRexport type PostApiV1EvalRunsByIdRetryErrorsData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -6912,6 +7363,12 @@ export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultData = {};threadId?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {runId: string;topicId: string;@@ -6969,6 +7426,12 @@ export type PutApiV1EvalRunsByRunIdTopicsByTopicIdResultResponse = PutApiV1EvalRexport type GetApiV1PluginsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -7042,6 +7505,12 @@ export type GetApiV1PluginsResponse = GetApiV1PluginsResponses[keyof GetApiV1Pluexport type GetApiV1FilesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -7125,6 +7594,10 @@ export type PostApiV1FilesData = {skipDeduplication?: boolean;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -7176,6 +7649,12 @@ export type PostApiV1FilesResponse = PostApiV1FilesResponses[keyof PostApiV1Fileexport type DeleteApiV1FilesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7224,6 +7703,12 @@ export type DeleteApiV1FilesByIdResponse = DeleteApiV1FilesByIdResponses[keyof Dexport type GetApiV1FilesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7274,6 +7759,12 @@ export type PatchApiV1FilesByIdData = {body: {knowledgeBaseId?: string | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7326,6 +7817,12 @@ export type PatchApiV1FilesByIdResponse = PatchApiV1FilesByIdResponses[keyof Patexport type GetApiV1FilesByIdUrlData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7377,6 +7874,10 @@ export type GetApiV1FilesByIdUrlResponse = GetApiV1FilesByIdUrlResponses[keyof Gexport type PostApiV1FilesByIdParsesData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -7432,6 +7933,12 @@ export type PostApiV1FilesByIdParsesResponse = PostApiV1FilesByIdParsesResponsesexport type GetApiV1FilesByIdChunksData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7484,6 +7991,10 @@ export type PostApiV1FilesByIdChunksData = {skipExist?: boolean;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -7545,6 +8056,10 @@ export type PostApiV1FilesBatchesData = {skipCheckFileType?: boolean;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -7599,6 +8114,10 @@ export type PostApiV1FilesQueriesData = {fileIds: Array<string>;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -7650,6 +8169,12 @@ export type PostApiV1FilesQueriesResponse = PostApiV1FilesQueriesResponses[keyofexport type GetApiV1GoalsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {agentId?: string;@@ -7736,6 +8261,10 @@ export type PostApiV1GoalsData = {title: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -7791,6 +8320,12 @@ export type PostApiV1GoalsResponse = PostApiV1GoalsResponses[keyof PostApiV1Goalexport type DeleteApiV1GoalsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7851,6 +8386,12 @@ export type DeleteApiV1GoalsByIdResponse = DeleteApiV1GoalsByIdResponses[keyof Dexport type GetApiV1GoalsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7915,6 +8456,12 @@ export type PatchApiV1GoalsByIdData = {};requirement?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -7967,6 +8514,12 @@ export type PatchApiV1GoalsByIdResponse = PatchApiV1GoalsByIdResponses[keyof Patexport type GetApiV1GoalsByIdSupervisionData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -8020,6 +8573,10 @@ export type GetApiV1GoalsByIdSupervisionResponse = GetApiV1GoalsByIdSupervisionRexport type PostApiV1GoalsByIdAdvanceData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8078,6 +8635,10 @@ export type PostApiV1GoalsByIdAdvanceResponse = PostApiV1GoalsByIdAdvanceResponsexport type PostApiV1GoalsByIdPauseData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8144,6 +8705,10 @@ export type PostApiV1GoalsByIdPauseResponse = PostApiV1GoalsByIdPauseResponses[kexport type PostApiV1GoalsByIdResumeData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8212,6 +8777,10 @@ export type PostApiV1GoalsByIdRestartData = {agentId?: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8288,6 +8857,10 @@ export type PostApiV1ImMessagesData = {topicId?: string | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8347,6 +8920,12 @@ export type PostApiV1ImMessagesResponse = PostApiV1ImMessagesResponses[keyof Posexport type GetApiV1ImTopicsByTopicIdSyncData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {topicId: string;};@@ -8407,6 +8986,10 @@ export type PostApiV1ImTopicsByTopicIdReadData = {messageId: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8464,6 +9047,12 @@ export type PostApiV1ImTopicsByTopicIdReadResponse = PostApiV1ImTopicsByTopicIdRexport type GetApiV1KnowledgeBasesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -8537,6 +9126,10 @@ export type PostApiV1KnowledgeBasesData = {name: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8588,6 +9181,12 @@ export type PostApiV1KnowledgeBasesResponse = PostApiV1KnowledgeBasesResponses[kexport type DeleteApiV1KnowledgeBasesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -8640,6 +9239,12 @@ export type DeleteApiV1KnowledgeBasesByIdResponse = DeleteApiV1KnowledgeBasesByIexport type GetApiV1KnowledgeBasesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -8696,6 +9301,12 @@ export type PatchApiV1KnowledgeBasesByIdData = {description?: string;name?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -8748,6 +9359,12 @@ export type PatchApiV1KnowledgeBasesByIdResponse = PatchApiV1KnowledgeBasesByIdRexport type GetApiV1KnowledgeBasesByIdFilesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -8825,6 +9442,12 @@ export type DeleteApiV1KnowledgeBasesByIdFilesBatchData = {body: {fileIds: Array<string>;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -8880,6 +9503,10 @@ export type PostApiV1KnowledgeBasesByIdFilesBatchData = {fileIds: Array<string>;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8941,6 +9568,10 @@ export type PostApiV1KnowledgeBasesByIdFilesMoveData = {targetKnowledgeBaseId: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -8998,6 +9629,12 @@ export type PostApiV1KnowledgeBasesByIdFilesMoveResponse = PostApiV1KnowledgeBasexport type GetApiV1McpServersData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -9083,6 +9720,10 @@ export type PostApiV1McpServersData = {serverUrl: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -9138,6 +9779,12 @@ export type PostApiV1McpServersResponse = PostApiV1McpServersResponses[keyof Posexport type DeleteApiV1McpServersByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -9190,6 +9837,12 @@ export type DeleteApiV1McpServersByIdResponse = DeleteApiV1McpServersByIdResponsexport type GetApiV1McpServersByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -9259,6 +9912,12 @@ export type PatchApiV1McpServersByIdData = {name?: string;serverUrl?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -9312,6 +9971,10 @@ export type PatchApiV1McpServersByIdResponse = PatchApiV1McpServersByIdResponsesexport type PostApiV1McpServersByIdSyncData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -9369,6 +10032,12 @@ export type PostApiV1McpServersByIdSyncResponse = PostApiV1McpServersByIdSyncResexport type GetApiV1MemoriesPersonaData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/memories/persona';@@ -9411,6 +10080,12 @@ export type GetApiV1MemoriesPersonaResponse = GetApiV1MemoriesPersonaResponses[kexport type GetApiV1MemoriesPersonaVersionsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/memories/persona/versions';@@ -9453,6 +10128,12 @@ export type GetApiV1MemoriesPersonaVersionsResponse = GetApiV1MemoriesPersonaVerexport type DeleteApiV1MemoriesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/memories';@@ -9495,6 +10176,12 @@ export type DeleteApiV1MemoriesResponse = DeleteApiV1MemoriesResponses[keyof Delexport type DeleteApiV1MemoriesByCategoryByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {category: 'identities' | 'preferences' | 'contexts' | 'activities' | 'experiences';id: string;@@ -9548,6 +10235,12 @@ export type DeleteApiV1MemoriesByCategoryByIdResponse = DeleteApiV1MemoriesByCatexport type GetApiV1MemoriesByCategoryData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {category: 'identities' | 'preferences' | 'contexts' | 'activities' | 'experiences';};@@ -9596,6 +10289,12 @@ export type GetApiV1MemoriesByCategoryResponse = GetApiV1MemoriesByCategoryRespoexport type DeleteApiV1MessageTranslationsByMessageIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {messageId: string;};@@ -9648,6 +10347,12 @@ export type DeleteApiV1MessageTranslationsByMessageIdResponse = DeleteApiV1Messaexport type GetApiV1MessageTranslationsByMessageIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {messageId: string;};@@ -9702,6 +10407,12 @@ export type PatchApiV1MessageTranslationsByMessageIdData = {to: string;content?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {messageId: string;};@@ -9756,6 +10467,10 @@ export type PostApiV1MessageTranslationsByMessageIdData = {to: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -9809,6 +10524,12 @@ export type PostApiV1MessageTranslationsByMessageIdResponse = PostApiV1MessageTrexport type GetApiV1MessagesCountData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {topicId?: string;@@ -9864,6 +10585,12 @@ export type DeleteApiV1MessagesData = {body: {messageIds: Array<string>;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/messages';@@ -9910,6 +10637,12 @@ export type DeleteApiV1MessagesResponse = DeleteApiV1MessagesResponses[keyof Delexport type GetApiV1MessagesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {threadId?: string;@@ -10013,6 +10746,10 @@ export type PostApiV1MessagesData = {favorite?: boolean | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10064,6 +10801,12 @@ export type PostApiV1MessagesResponse = PostApiV1MessagesResponses[keyof PostApiexport type DeleteApiV1MessagesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -10116,6 +10859,12 @@ export type DeleteApiV1MessagesByIdResponse = DeleteApiV1MessagesByIdResponses[kexport type GetApiV1MessagesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -10188,6 +10937,10 @@ export type PostApiV1MessagesRepliesData = {favorite?: boolean | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10239,6 +10992,12 @@ export type PostApiV1MessagesRepliesResponse = PostApiV1MessagesRepliesResponsesexport type GetApiV1ModelsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -10340,6 +11099,10 @@ export type PostApiV1ModelsData = {providerId: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10391,6 +11154,12 @@ export type PostApiV1ModelsResponse = PostApiV1ModelsResponses[keyof PostApiV1Moexport type GetApiV1ModelsByProviderIdByModelIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {modelId: string;providerId: string;@@ -10466,6 +11235,12 @@ export type PatchApiV1ModelsByProviderIdByModelIdData = {source?: 'remote' | 'custom' | 'builtin' | null;type?: 'chat' | 'embedding' | 'tts' | 'asr' | 'image' | 'text2video' | 'text2music' | 'realtime' | 'decision' | 'stt' | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {modelId: string;providerId: string;@@ -10519,6 +11294,12 @@ export type PatchApiV1ModelsByProviderIdByModelIdResponse = PatchApiV1ModelsByPrexport type GetApiV1NotificationsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {category?: string;@@ -10571,6 +11352,12 @@ export type GetApiV1NotificationsResponse = GetApiV1NotificationsResponses[keyofexport type GetApiV1NotificationsSettingsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {scope?: 'personal' | 'workspace';@@ -10666,6 +11453,12 @@ export type PatchApiV1NotificationsSettingsData = {};};};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {scope?: 'personal' | 'workspace';@@ -10714,6 +11507,12 @@ export type PatchApiV1NotificationsSettingsResponse = PatchApiV1NotificationsSetexport type GetApiV1NotificationsUnreadCountData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/notifications/unread-count';@@ -10756,6 +11555,12 @@ export type GetApiV1NotificationsUnreadCountResponse = GetApiV1NotificationsUnreexport type GetApiV1NotificationsCountsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/notifications/counts';@@ -10801,6 +11606,10 @@ export type PostApiV1NotificationsReadData = {ids: Array<string>;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10852,6 +11661,10 @@ export type PostApiV1NotificationsReadResponse = PostApiV1NotificationsReadRespoexport type PostApiV1NotificationsReadAllData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10899,6 +11712,10 @@ export type PostApiV1NotificationsReadAllResponse = PostApiV1NotificationsReadAlexport type PostApiV1NotificationsArchiveAllData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10946,6 +11763,10 @@ export type PostApiV1NotificationsArchiveAllResponse = PostApiV1NotificationsArcexport type PostApiV1NotificationsByIdArchiveData = {body?: never;headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -10998,6 +11819,12 @@ export type PostApiV1NotificationsByIdArchiveResponse = PostApiV1NotificationsByexport type GetApiV1PermissionsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {active?: string | null;@@ -11075,6 +11902,10 @@ export type PostApiV1PermissionsData = {name: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -11126,6 +11957,12 @@ export type PostApiV1PermissionsResponse = PostApiV1PermissionsResponses[keyof Pexport type DeleteApiV1PermissionsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -11178,6 +12015,12 @@ export type DeleteApiV1PermissionsByIdResponse = DeleteApiV1PermissionsByIdRespoexport type GetApiV1PermissionsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -11236,6 +12079,12 @@ export type PatchApiV1PermissionsByIdData = {isActive?: boolean | null;name?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -11288,6 +12137,12 @@ export type PatchApiV1PermissionsByIdResponse = PatchApiV1PermissionsByIdResponsexport type GetApiV1ProvidersData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -11382,6 +12237,10 @@ export type PostApiV1ProvidersData = {id: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -11433,6 +12292,12 @@ export type PostApiV1ProvidersResponse = PostApiV1ProvidersResponses[keyof PostAexport type DeleteApiV1ProvidersByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -11485,6 +12350,12 @@ export type DeleteApiV1ProvidersByIdResponse = DeleteApiV1ProvidersByIdResponsesexport type GetApiV1ProvidersByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -11555,6 +12426,12 @@ export type PatchApiV1ProvidersByIdData = {sort?: number | null;source?: 'builtin' | 'custom';};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -11607,6 +12484,12 @@ export type PatchApiV1ProvidersByIdResponse = PatchApiV1ProvidersByIdResponses[kexport type DeleteApiV1PushTokensByDeviceIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {deviceId: string;};@@ -11662,6 +12545,12 @@ export type PutApiV1PushTokensByDeviceIdData = {locale?: string;platform: 'ios' | 'android';};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {deviceId: string;};@@ -11786,6 +12675,10 @@ export type PostApiV1ResponsesData = {[key: string]: unknown;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -11872,6 +12765,12 @@ export type PostApiV1ResponsesResponse = PostApiV1ResponsesResponses[keyof PostAexport type GetApiV1RolesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {active?: string | null;@@ -11949,6 +12848,10 @@ export type PostApiV1RolesData = {name: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -12000,6 +12903,12 @@ export type PostApiV1RolesResponse = PostApiV1RolesResponses[keyof PostApiV1Roleexport type DeleteApiV1RolesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12052,6 +12961,12 @@ export type DeleteApiV1RolesByIdResponse = DeleteApiV1RolesByIdResponses[keyof Dexport type GetApiV1RolesByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12110,6 +13025,12 @@ export type PatchApiV1RolesByIdData = {isSystem?: boolean | null;name?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12162,6 +13083,12 @@ export type PatchApiV1RolesByIdResponse = PatchApiV1RolesByIdResponses[keyof Patexport type DeleteApiV1RolesByIdPermissionsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12214,6 +13141,12 @@ export type DeleteApiV1RolesByIdPermissionsResponse = DeleteApiV1RolesByIdPermisexport type GetApiV1RolesByIdPermissionsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12287,6 +13220,12 @@ export type PatchApiV1RolesByIdPermissionsData = {grant?: Array<string> | null;revoke?: Array<string> | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12348,6 +13287,10 @@ export type PostApiV1SignalsSourceEventsData = {timestamp?: number;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -12414,6 +13357,10 @@ export type PostApiV1SignalsTriggerData = {topicId?: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -12469,6 +13416,12 @@ export type PostApiV1SignalsTriggerResponse = PostApiV1SignalsTriggerResponses[kexport type GetApiV1SignalsReceiptsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query: {agentId: string;@@ -12521,6 +13474,12 @@ export type GetApiV1SignalsReceiptsResponse = GetApiV1SignalsReceiptsResponses[kexport type GetApiV1TasksData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {assigneeAgentId?: string;@@ -12603,6 +13562,10 @@ export type PostApiV1TasksData = {visibility?: 'private' | 'public';};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -12662,6 +13625,12 @@ export type PostApiV1TasksResponse = PostApiV1TasksResponses[keyof PostApiV1Taskexport type DeleteApiV1TasksByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12718,6 +13687,12 @@ export type DeleteApiV1TasksByIdResponse = DeleteApiV1TasksByIdResponses[keyof Dexport type GetApiV1TasksByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12786,6 +13761,12 @@ export type PatchApiV1TasksByIdData = {schedulePattern?: string | null;scheduleTimezone?: string | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12849,6 +13830,12 @@ export type PatchApiV1TasksByIdStatusData = {error?: string;status: 'backlog' | 'running' | 'scheduled' | 'paused' | 'completed' | 'failed' | 'canceled';};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12905,6 +13892,12 @@ export type PatchApiV1TasksByIdStatusResponse = PatchApiV1TasksByIdStatusResponsexport type GetApiV1TasksByIdRunsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -12962,6 +13955,10 @@ export type PostApiV1TasksByIdRunsData = {prompt?: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -13027,6 +14024,12 @@ export type PostApiV1TasksByIdRunsResponse = PostApiV1TasksByIdRunsResponses[keyexport type GetApiV1TopicsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {agentId?: string | null;@@ -13112,6 +14115,10 @@ export type PostApiV1TopicsData = {title: string;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -13163,6 +14170,12 @@ export type PostApiV1TopicsResponse = PostApiV1TopicsResponses[keyof PostApiV1Toexport type DeleteApiV1TopicsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13215,6 +14228,12 @@ export type DeleteApiV1TopicsByIdResponse = DeleteApiV1TopicsByIdResponses[keyofexport type GetApiV1TopicsByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13277,6 +14296,12 @@ export type PatchApiV1TopicsByIdData = {};title?: string;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13329,6 +14354,12 @@ export type PatchApiV1TopicsByIdResponse = PatchApiV1TopicsByIdResponses[keyof Pexport type GetApiV1TopicsByTopicIdThreadsData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {topicId: string;};@@ -13413,6 +14444,12 @@ export type GetApiV1TopicsByTopicIdThreadsResponse = GetApiV1TopicsByTopicIdThreexport type GetApiV1UsersMeData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/users/me';@@ -13459,6 +14496,12 @@ export type GetApiV1UsersMeResponse = GetApiV1UsersMeResponses[keyof GetApiV1Useexport type GetApiV1UsersData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: {/**@@ -13538,6 +14581,10 @@ export type PostApiV1UsersData = {username?: string | null;};headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;/*** Makes the request safe to retry: the first request with a key runs, and repeats with the same key and the same request within 24 hours get its stored response back (with `Idempotent-Replayed: true`). A repeat while the first is still running answers 409, and reusing a key for a different request (method, path or body) answers 422 (both `idempotency_conflict`). Server errors, 429s and streamed responses are not stored. Keys are scoped to the authenticated user, the credential (API key) and the resolved workspace. A request still running after 5 minutes releases its in-flight claim, after which a retry with the same key runs again.*/@@ -13589,6 +14636,12 @@ export type PostApiV1UsersResponse = PostApiV1UsersResponses[keyof PostApiV1Userexport type DeleteApiV1UsersByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13641,6 +14694,12 @@ export type DeleteApiV1UsersByIdResponse = DeleteApiV1UsersByIdResponses[keyof Dexport type GetApiV1UsersByIdData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13704,6 +14763,12 @@ export type PatchApiV1UsersByIdData = {roleIds?: Array<string> | null;username?: string | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13756,6 +14821,12 @@ export type PatchApiV1UsersByIdResponse = PatchApiV1UsersByIdResponses[keyof Patexport type DeleteApiV1UsersByIdRolesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13808,6 +14879,12 @@ export type DeleteApiV1UsersByIdRolesResponse = DeleteApiV1UsersByIdRolesResponsexport type GetApiV1UsersByIdRolesData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13866,6 +14943,12 @@ export type PatchApiV1UsersByIdRolesData = {}> | null;removeRoles?: Array<string> | null;};+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path: {id: string;};@@ -13918,6 +15001,12 @@ export type PatchApiV1UsersByIdRolesResponse = PatchApiV1UsersByIdRolesResponsesexport type GetApiV1UsageData = {body?: never;+ headers?: {+ /**+ * Run the request inside a workspace instead of the caller's personal space. Omit it for personal data. A personal API key cannot send it (403 `workspace_mismatch`); a workspace API key is bound to its workspace, so the header may be omitted and, when sent, must name that same workspace (403 `workspace_mismatch` otherwise). An unknown workspace answers 404, and a caller who is not a member answers 403 `workspace_mismatch`. Workspace API key access also depends on the workspace's plan. Routes that change workspace-wide settings additionally require the admin or owner role.+ */+ 'X-Workspace-Id'?: string;+ };path?: never;query?: never;url: '/api/v1/usage';diff --git a/packages/sdk/src/http.integration.test.ts b/packages/sdk/src/http.integration.test.tsnew file mode 100644index 00000000000..1d134b0304c--- /dev/null+++ b/packages/sdk/src/http.integration.test.ts@@ -0,0 +1,201 @@+/**+ * The runtime layer over a real socket: Node's own `fetch` (undici) against a+ * local HTTP server, so body cloning, abort signals, chunked SSE and multipart+ * encoding are exercised for real rather than through a mock `fetch`.+ */+import type { IncomingMessage, ServerResponse } from 'node:http';+import { createServer } from 'node:http';+import type { AddressInfo } from 'node:net';++import { afterAll, beforeAll, describe, expect, it } from 'vitest';++import { createLobeHub, LobeHubTimeoutError } from './index';++interface Seen {+ body: string;+ headers: IncomingMessage['headers'];+ method: string;+ url: string;+}++const seen: Seen[] = [];+let attempts = 0;+let endlessClosed = false;++const send = (res: ServerResponse, status: number, body: unknown, headers = {}) => {+ res.writeHead(status, { 'Content-Type': 'application/json', ...headers });+ res.end(JSON.stringify(body));+};++const server = createServer(async (req, res) => {+ const chunks: Buffer[] = [];+ for await (const chunk of req) chunks.push(chunk as Buffer);+ const record = {+ body: Buffer.concat(chunks).toString('utf8'),+ headers: req.headers,+ method: req.method!,+ url: req.url!,+ };+ seen.push(record);+ const url = new URL(req.url!, 'http://local');++ if (url.pathname === '/api/v1/agents' && req.method === 'POST') {+ // Fail the first attempt so the keyed POST has to be resent with its body.+ if (++attempts === 1)+ return send(+ res,+ 503,+ { code: 'service_unavailable', message: 'busy' },+ { 'Retry-After': '0' },+ );+ return send(res, 200, {+ data: { id: 'agt_1', title: JSON.parse(record.body).title },+ success: true,+ });+ }+ if (url.pathname === '/api/v1/agents') {+ const cursor = url.searchParams.get('cursor');+ return send(res, 200, {+ data: cursor+ ? { agents: [{ id: 'a2' }], hasMore: false, nextCursor: null, total: 2 }+ : { agents: [{ id: 'a1' }], hasMore: true, nextCursor: 'next', total: 2 },+ success: true,+ });+ }+ if (url.pathname === '/api/v1/topics') {+ // Never answers: lets the client-side timeout fire.+ return;+ }+ if (url.pathname === '/api/v1/responses' && JSON.parse(record.body).input === 'endless') {+ // An endless stream: only the client closing the connection ends it.+ res.writeHead(200, { 'Content-Type': 'text/event-stream' });+ let index = 0;+ const tick = setInterval(() => {+ res.write(+ `data: ${JSON.stringify({ delta: '.', sequence_number: index++, type: 'response.output_text.delta' })}\n\n`,+ );+ }, 10);+ res.on('close', () => {+ clearInterval(tick);+ endlessClosed = true;+ });+ return;+ }+ if (url.pathname === '/api/v1/responses') {+ res.writeHead(200, { 'Content-Type': 'text/event-stream' });+ const events = [+ { delta: 'Hi', type: 'response.output_text.delta' },+ { delta: ' there', type: 'response.output_text.delta' },+ { response: { output_text: 'Hi there', status: 'completed' }, type: 'response.completed' },+ ];+ for (const [index, event] of events.entries()) {+ res.write(+ `event: ${event.type}\ndata: ${JSON.stringify({ ...event, sequence_number: index })}\n\n`,+ );+ await new Promise((resolve) => setTimeout(resolve, 10));+ }+ return res.end();+ }+ if (url.pathname === '/api/v1/files') {+ return send(res, 200, { data: { file: { id: 'file_1' } }, success: true });+ }+ send(res, 404, { code: 'not_found', message: 'nope', requestId: 'req_x', success: false });+});++let baseURL = '';++beforeAll(async () => {+ await new Promise<void>((resolve) => server.listen(0, '127.0.0.1', resolve));+ baseURL = `http://127.0.0.1:${(server.address() as AddressInfo).port}`;+});++afterAll(() => {+ server.closeAllConnections();+ server.close();+});++describe('over real HTTP', () => {+ it('resends a keyed POST with its body and the workspace / idempotency headers', async () => {+ const lobehub = createLobeHub({ apiKey: 'sk-lh-it', baseURL, workspaceId: 'ws_it' });++ const { data, error } = await lobehub.agents.create({+ body: { title: 'Retried' },+ idempotencyKey: 'it-key',+ });++ expect(error).toBeUndefined();+ expect(data?.data.title).toBe('Retried');+ const posts = seen.filter((entry) => entry.method === 'POST' && entry.url === '/api/v1/agents');+ expect(posts).toHaveLength(2);+ for (const post of posts) {+ expect(JSON.parse(post.body)).toEqual({ title: 'Retried' });+ expect(post.headers['idempotency-key']).toBe('it-key');+ expect(post.headers['x-workspace-id']).toBe('ws_it');+ expect(post.headers.authorization).toBe('Bearer sk-lh-it');+ }+ });++ it('paginates across real responses', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', baseURL });+ const ids: string[] = [];+ for await (const agent of lobehub.paginate(lobehub.agents.list)) ids.push(agent.id);+ expect(ids).toEqual(['a1', 'a2']);+ });++ it('times out a request whose headers never arrive', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', baseURL, maxRetries: 0, timeout: 50 });+ const { error } = await lobehub.topics.list();+ expect(error).toBeInstanceOf(LobeHubTimeoutError);+ });++ it('streams server-sent events as they are written', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', baseURL });+ let text = '';+ for await (const event of lobehub.responses.stream({ input: 'hi', model: 'agt_1' })) {+ if (event.type === 'response.output_text.delta') text += event.delta;+ }+ expect(text).toBe('Hi there');+ });++ it('closes a stream mid-body on abort() and on the caller signal', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', baseURL });++ for (const cancel of ['abort', 'signal'] as const) {+ endlessClosed = false;+ const caller = new AbortController();+ const stream = lobehub.responses.stream(+ { input: 'endless', model: 'agt_1' },+ { signal: caller.signal },+ );+ let received = 0;+ const consume = (async () => {+ for await (const _ of stream) {+ if (++received === 3) cancel === 'abort' ? stream.abort() : caller.abort();+ }+ })();++ // Aborting ends the loop with an AbortError instead of more events.+ await expect(consume).rejects.toMatchObject({ name: 'AbortError' });+ expect(received).toBeLessThan(10);+ await expect.poll(() => endlessClosed, { timeout: 2000 }).toBe(true);+ }+ });++ it('uploads multipart form data', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', baseURL, throwOnError: true });++ const { data } = await lobehub.files.upload(Buffer.from('real bytes'), { name: 'real.txt' });++ expect(data.data.file.id).toBe('file_1');+ const upload = seen.findLast((entry) => entry.url === '/api/v1/files')!;+ expect(upload.headers['content-type']).toMatch(/^multipart\/form-data; boundary=/);+ expect(upload.body).toContain('filename="real.txt"');+ expect(upload.body).toContain('real bytes');+ });++ it('surfaces a real error answer as LobeHubAPIError', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', baseURL });+ const { error } = await lobehub.users.me();+ expect(error).toMatchObject({ code: 'not_found', requestId: 'req_x', status: 404 });+ });+});diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.tsindex 9a8f92569ba..796a5ba9c7f 100644--- a/packages/sdk/src/index.ts+++ b/packages/sdk/src/index.ts@@ -1,45 +1,20 @@-import { DEFAULT_BASE_URL } from './constants';-import type { Config } from './generated/client';-import { createClient, createConfig } from './generated/client';-import { LobeHub } from './generated/sdk.gen';--export { DEFAULT_BASE_URL } from './constants';--export interface LobeHubOptions extends Omit<Config, 'auth' | 'baseUrl'> {- /**- * Called before every request for the OIDC access token to send. Refresh it- * here (see `refreshAccessToken`) so long-lived clients never send an expired- * one. Takes precedence over `apiKey`.- */- accessToken?: () => Promise<string> | string;- /** LobeHub API Key (`sk-lh-...`) or an OIDC JWT */- apiKey?: string;- /** API origin, defaults to LobeHub Cloud (`https://app.lobehub.com`) */- baseURL?: string;-}--/**- * Create a resource-style LobeHub API client: `lobehub.agents.list()`,- * `lobehub.files.uploadBatch()`, `lobehub.users.me()`, …- *- * Resources, methods, and schemas are generated from- * `packages/openapi/openapi.yml` — run `bun generate` after the spec changes.- */-export const createLobeHub = (options: LobeHubOptions): LobeHub => {- const { accessToken, apiKey, baseURL = DEFAULT_BASE_URL, ...clientConfig } = options;- if (!accessToken && !apiKey)- throw new Error('createLobeHub needs an apiKey or an accessToken provider');-- const config: Config = {- ...clientConfig,- auth: accessToken ? () => accessToken() : () => apiKey,- baseUrl: baseURL,- };-- return new LobeHub({ client: createClient(createConfig(config)) });-};-export * from './auth';+export type {+ FilesResource,+ LobeHubOptions,+ ResponsesResource,+ ResponseStreamOptions,+ ThrowingLobeHubClient,+ UploadRequestOptions,+} from './client';+export { createLobeHub, LobeHubClient, WORKSPACE_HEADER } from './client';+export { DEFAULT_BASE_URL } from './constants';+export { LobeHubAPIError, LobeHubConnectionError, LobeHubTimeoutError } from './errors';export type { Client, Config } from './generated/client';export { LobeHub } from './generated/sdk.gen';export type * from './generated/types.gen';+export type { PageItem, PageOf, PaginateOptions } from './pagination';+export type { ServerSentEvent } from './streaming';+export { parseServerSentEvents, ResponseStream } from './streaming';+export { DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT, IDEMPOTENCY_KEY_HEADER } from './transport';+export type { Uploadable, UploadOptions } from './uploads';diff --git a/packages/sdk/src/pagination.ts b/packages/sdk/src/pagination.tsnew file mode 100644index 00000000000..1f1df6ab197--- /dev/null+++ b/packages/sdk/src/pagination.ts@@ -0,0 +1,69 @@+import type { Client } from './generated/client';++/** The page shape every list endpoint answers with inside `data`. */+interface PageShape {+ hasMore: boolean;+ nextCursor: string | null;+}++type AnyFn = (options: any) => Promise<any>;++/** `data` of the success envelope for a list method. */+export type PageOf<M extends AnyFn> =+ NonNullable<Awaited<ReturnType<M>>['data']> extends { data: infer Page } ? Page : never;++/** Items of a page: the `items` array, or the endpoint's own array key (`agents`, `topics`, …). */+export type PageItem<P> = P extends { items: Array<infer I> }+ ? I+ : { [K in keyof P]: P[K] extends Array<infer I> ? I : never }[keyof P];++export type PaginateOptions<M extends AnyFn> = NonNullable<Parameters<M>[0]>;++const PAGE_FIELDS = new Set(['hasMore', 'nextCursor', 'total', 'totalSize']);++/** Find the item array on a page: `items` first, else the one array-valued key. */+export const pageItems = (page: Record<string, unknown>): unknown[] => {+ if (Array.isArray(page.items)) return page.items;+ const arrays = Object.entries(page).filter(+ ([key, value]) => !PAGE_FIELDS.has(key) && Array.isArray(value),+ );+ if (arrays.length !== 1) {+ throw new Error(+ `paginate: cannot tell the item array apart on a page with keys ${Object.keys(page).join(', ')}`,+ );+ }+ return arrays[0][1] as unknown[];+};++/**+ * Walk every page of a cursor-paginated list, yielding its items: pass+ * `nextCursor` back as `cursor` until `hasMore` is false or `nextCursor` null.+ *+ * `method` may be passed unbound (`lobehub.agents.list`): the call carries the+ * client explicitly.+ */+export async function* paginate<M extends AnyFn>(+ client: Client,+ method: M,+ options?: PaginateOptions<M>,+): AsyncGenerator<PageItem<PageOf<M>>> {+ const base = (options ?? {}) as { query?: Record<string, unknown> };+ let cursor = base.query?.cursor as string | undefined;++ while (true) {+ const { data } = await method({+ ...base,+ client,+ query: { ...base.query, ...(cursor ? { cursor } : {}) },+ // The loop reads the envelope's `data`: a client configured for+ // data-only results must not strip it here.+ responseStyle: 'fields',+ throwOnError: true,+ });+ const page = (data as { data: PageShape & Record<string, unknown> }).data;+ for (const item of pageItems(page)) yield item as PageItem<PageOf<M>>;++ if (!page.hasMore || !page.nextCursor || page.nextCursor === cursor) return;+ cursor = page.nextCursor;+ }+}diff --git a/packages/sdk/src/readme.test.ts b/packages/sdk/src/readme.test.tsnew file mode 100644index 00000000000..af25b3be5be--- /dev/null+++ b/packages/sdk/src/readme.test.ts@@ -0,0 +1,43 @@+import { readFileSync } from 'node:fs';+import path from 'node:path';++import { describe, expect, it } from 'vitest';++import { LobeHub } from './generated/sdk.gen';++const methodsOf = (instance: object) =>+ Object.getOwnPropertyNames(Object.getPrototypeOf(instance))+ .filter((name) => name !== 'constructor')+ .sort();++/** `resource → methods` of the generated SDK, read off the class itself. */+const generatedResources = () => {+ const root = new LobeHub();+ const getters = Object.entries(Object.getOwnPropertyDescriptors(LobeHub.prototype))+ .filter(([, descriptor]) => descriptor.get)+ .map(([name]) => name);+ return Object.fromEntries(+ getters.map((name) => [name, methodsOf((root as unknown as Record<string, object>)[name])]),+ );+};++/** `resource → methods` from the README's Resources table. */+const documentedResources = () => {+ const readme = readFileSync(path.join(import.meta.dirname, '..', 'README.md'), 'utf8');+ // Cells are padded by the markdown formatter.+ const rows = [...readme.matchAll(/^\|\s*`(\w+)`\s*\|(.+)\|$/gm)];+ return Object.fromEntries(+ rows.map(([, resource, methods]) => [+ resource,+ [...methods.matchAll(/`(\w+)`/g)].map(([, method]) => method).sort(),+ ]),+ );+};++describe('README', () => {+ it('lists every generated resource and method in its Resources table', () => {+ const generated = generatedResources();+ expect(Object.keys(generated).length).toBeGreaterThanOrEqual(28);+ expect(documentedResources()).toEqual(generated);+ });+});diff --git a/packages/sdk/src/streaming.test.ts b/packages/sdk/src/streaming.test.tsnew file mode 100644index 00000000000..4f3dc117d05--- /dev/null+++ b/packages/sdk/src/streaming.test.ts@@ -0,0 +1,55 @@+import { describe, expect, it } from 'vitest';++import { parseServerSentEvents } from './streaming';++const streamOf = (...chunks: string[]) => {+ const encoder = new TextEncoder();+ return new ReadableStream<Uint8Array>({+ start(controller) {+ for (const chunk of chunks) controller.enqueue(encoder.encode(chunk));+ controller.close();+ },+ });+};++const collect = async (stream: ReadableStream<Uint8Array>) => {+ const events = [];+ for await (const event of parseServerSentEvents(stream)) events.push(event);+ return events;+};++describe('parseServerSentEvents', () => {+ it('splits messages on blank lines and reads event/data/id', async () => {+ expect(+ await collect(streamOf('event: a\ndata: {"x":1}\nid: 7\n\n', 'data: plain\n\n')),+ ).toEqual([+ { data: '{"x":1}', event: 'a', id: '7' },+ { data: 'plain', event: undefined, id: '7' },+ ]);+ });++ it('joins multi-line data and skips comments', async () => {+ expect(await collect(streamOf(': keep-alive\n', 'data: a\ndata: b\n\n'))).toEqual([+ { data: 'a\nb', event: undefined, id: undefined },+ ]);+ });++ it('handles CRLF, a CRLF split across chunks, and a missing final blank line', async () => {+ expect(await collect(streamOf('data: one\r', '\n\r\ndata: two'))).toEqual([+ { data: 'one', event: undefined, id: undefined },+ { data: 'two', event: undefined, id: undefined },+ ]);+ });++ it('decodes multi-byte characters split across chunks', async () => {+ const bytes = new TextEncoder().encode('data: 你好\n\n');+ const stream = new ReadableStream<Uint8Array>({+ start(controller) {+ controller.enqueue(bytes.slice(0, 8));+ controller.enqueue(bytes.slice(8));+ controller.close();+ },+ });+ expect((await collect(stream))[0].data).toBe('你好');+ });+});diff --git a/packages/sdk/src/streaming.ts b/packages/sdk/src/streaming.tsnew file mode 100644index 00000000000..b9ac1d7e902--- /dev/null+++ b/packages/sdk/src/streaming.ts@@ -0,0 +1,121 @@+import type { ResponseObject, ResponseStreamEvent } from './generated/types.gen';++export interface ServerSentEvent {+ data: string;+ event?: string;+ id?: string;+}++/**+ * Parse a `text/event-stream` body into its messages (WHATWG SSE framing:+ * `field: value` lines, a blank line ends a message, `:` lines are comments).+ */+export async function* parseServerSentEvents(+ body: ReadableStream<Uint8Array>,+): AsyncGenerator<ServerSentEvent> {+ // TextDecoder (not TextDecoderStream) so hosts like JavaScriptCore work too.+ const decoder = new TextDecoder();+ const reader = body.getReader();+ let buffer = '';+ let data: string[] = [];+ let event: string | undefined;+ let id: string | undefined;++ /** Apply one line; returns a message when the line ends one. */+ const processLine = (line: string): ServerSentEvent | undefined => {+ if (line === '') {+ const message = data.length > 0 ? { data: data.join('\n'), event, id } : undefined;+ data = [];+ event = undefined;+ return message;+ }+ if (line.startsWith(':')) return;++ const colon = line.indexOf(':');+ const field = colon === -1 ? line : line.slice(0, colon);+ const raw = colon === -1 ? '' : line.slice(colon + 1);+ const value = raw.startsWith(' ') ? raw.slice(1) : raw;+ if (field === 'data') data.push(value);+ else if (field === 'event') event = value;+ else if (field === 'id') id = value;+ };++ try {+ while (true) {+ const { done, value } = await reader.read();+ buffer += done ? decoder.decode() : decoder.decode(value, { stream: true });++ let newline: number;+ while ((newline = buffer.search(/\r\n|\r|\n/)) !== -1) {+ // A lone trailing `\r` may be the first half of `\r\n`: wait for more.+ if (!done && buffer[newline] === '\r' && newline === buffer.length - 1) break;+ const line = buffer.slice(0, newline);+ buffer = buffer.slice(newline + (buffer.startsWith('\r\n', newline) ? 2 : 1));+ const message = processLine(line);+ if (message) yield message;+ }++ if (done) {+ // Be lenient with a body that ends without the final blank line.+ if (buffer) processLine(buffer);+ const message = processLine('');+ if (message) yield message;+ return;+ }+ }+ } finally {+ await reader.cancel().catch(() => {});+ }+}++const TERMINAL_EVENTS = new Set(['response.completed', 'response.failed', 'response.incomplete']);++/**+ * `responses.stream()` result: iterate it for typed OpenResponses events, or+ * await `finalResponse()` for the response object the last event carries.+ * Iterate it once; `abort()` (or breaking out of the loop) closes the stream.+ */+export class ResponseStream implements AsyncIterable<ResponseStreamEvent> {+ readonly controller = new AbortController();+ #consumed = false;+ #final?: ResponseObject;+ readonly #open: (signal: AbortSignal) => Promise<ReadableStream<Uint8Array>>;++ constructor(open: (signal: AbortSignal) => Promise<ReadableStream<Uint8Array>>) {+ this.#open = open;+ }++ abort() {+ this.controller.abort();+ }++ async *[Symbol.asyncIterator](): AsyncIterator<ResponseStreamEvent> {+ if (this.#consumed) throw new Error('A ResponseStream can only be iterated once');+ this.#consumed = true;++ const body = await this.#open(this.controller.signal);+ try {+ for await (const message of parseServerSentEvents(body)) {+ if (!message.data || message.data === '[DONE]') continue;+ const event = JSON.parse(message.data) as ResponseStreamEvent;+ if (TERMINAL_EVENTS.has(event.type) && 'response' in event) this.#final = event.response;+ yield event;+ }+ } finally {+ // Breaking out early must not leave the connection (and the run's+ // server-side subscription) open.+ if (!this.controller.signal.aborted) this.controller.abort();+ }+ }++ /** Drain the stream and resolve with the final response object. */+ async finalResponse(): Promise<ResponseObject> {+ if (!this.#consumed) {+ for await (const _ of this) {+ // drain+ }+ }+ if (!this.#final) throw new Error('The stream ended without a final response event');+ return this.#final;+ }+}diff --git a/packages/sdk/src/transport.test.ts b/packages/sdk/src/transport.test.tsnew file mode 100644index 00000000000..69fab48934a--- /dev/null+++ b/packages/sdk/src/transport.test.ts@@ -0,0 +1,201 @@+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';++import { createLobeHub, LobeHubConnectionError, LobeHubTimeoutError } from './index';+import { backoffDelay, parseRetryAfter } from './transport';++const ok = () =>+ new Response(JSON.stringify({ data: {}, success: true }), {+ headers: { 'Content-Type': 'application/json' },+ });++const status = (code: number, headers: Record<string, string> = {}) =>+ new Response(JSON.stringify({ code: `http_${code}`, message: 'x', success: false }), {+ headers: { 'Content-Type': 'application/json', ...headers },+ status: code,+ });++/** Answer each call from `script` in order (the last entry repeats). */+const scripted = (script: Array<() => Response | Promise<Response>>) => {+ const calls: Array<{ at: number; request: Request; signal?: AbortSignal | null }> = [];+ const fetch = (async (request: Request, init?: RequestInit) => {+ calls.push({ at: Date.now(), request, signal: init?.signal });+ return script[Math.min(calls.length - 1, script.length - 1)]();+ }) as typeof globalThis.fetch;+ return { calls, fetch };+};++describe('retries', () => {+ beforeEach(() => {+ vi.useFakeTimers();+ });+ afterEach(() => {+ vi.useRealTimers();+ });++ it('retries 429 after the Retry-After seconds', async () => {+ const { calls, fetch } = scripted([() => status(429, { 'Retry-After': '2' }), ok]);+ const lobehub = createLobeHub({ apiKey: 'k', fetch });++ const pending = lobehub.agents.list();+ await vi.advanceTimersByTimeAsync(1999);+ expect(calls).toHaveLength(1);+ await vi.advanceTimersByTimeAsync(1);+ const { error } = await pending;++ expect(error).toBeUndefined();+ expect(calls).toHaveLength(2);+ expect(calls[1].at - calls[0].at).toBe(2000);+ });++ it('does not retry a streaming POST even though it carries an idempotency key', async () => {+ const { calls, fetch } = scripted([() => status(503), ok]);+ const lobehub = createLobeHub({ apiKey: 'k', fetch, maxRetries: 3 });++ const iterate = async () => {+ for await (const _ of lobehub.responses.stream(+ { input: 'hi', model: 'agt_1' },+ { idempotencyKey: 'run-1' },+ )) {+ // the first attempt fails before any event arrives+ }+ };++ await expect(iterate()).rejects.toMatchObject({ status: 503 });+ expect(calls).toHaveLength(1);+ expect(calls[0].request.headers.get('Idempotency-Key')).toBe('run-1');+ });++ it('backs off exponentially on 5xx and gives up after maxRetries', async () => {+ const { calls, fetch } = scripted([() => status(503)]);+ const lobehub = createLobeHub({ apiKey: 'k', fetch, maxRetries: 3 });+ vi.spyOn(Math, 'random').mockReturnValue(0.5); // no jitter++ const pending = lobehub.agents.list();+ await vi.runAllTimersAsync();+ const { error, response } = await pending;++ expect(response?.status).toBe(503);+ expect(error).toMatchObject({ status: 503 });+ expect(calls).toHaveLength(4);+ expect(calls.slice(1).map((call, index) => call.at - calls[index].at)).toEqual([+ 500, 1000, 2000,+ ]);+ });++ it('retries network failures of idempotent requests', async () => {+ let attempt = 0;+ const fetch = (async () => {+ if (++attempt < 3) throw new TypeError('fetch failed');+ return ok();+ }) as typeof globalThis.fetch;+ const lobehub = createLobeHub({ apiKey: 'k', fetch });++ const pending = lobehub.agents.delete({ path: { id: 'agt_1' } });+ await vi.runAllTimersAsync();++ expect((await pending).error).toBeUndefined();+ expect(attempt).toBe(3);+ });++ it('does not retry 4xx answers other than 408/429', async () => {+ const { calls, fetch } = scripted([() => status(404)]);+ await createLobeHub({ apiKey: 'k', fetch }).agents.list();+ expect(calls).toHaveLength(1);+ });++ it('honors a per-call maxRetries', async () => {+ const { calls, fetch } = scripted([() => status(500)]);+ const lobehub = createLobeHub({ apiKey: 'k', fetch, maxRetries: 5 });++ const pending = lobehub.agents.list({ maxRetries: 1 });+ await vi.runAllTimersAsync();+ await pending;++ expect(calls).toHaveLength(2);+ });++ it('returns the answer instead of waiting out a long Retry-After', async () => {+ const { calls, fetch } = scripted([() => status(429, { 'Retry-After': '3600' }), ok]);+ const { response } = await createLobeHub({ apiKey: 'k', fetch }).agents.list();++ expect(response?.status).toBe(429);+ expect(calls).toHaveLength(1);+ });+});++describe('timeout', () => {+ /** A fetch that only settles when its signal aborts. */+ const hanging = (() => {+ const fetch = ((_request: Request, init?: RequestInit) =>+ new Promise((_, reject) => {+ init?.signal?.addEventListener('abort', () =>+ reject(new DOMException('aborted', 'AbortError')),+ );+ })) as typeof globalThis.fetch;+ return fetch;+ })();++ it('fails a request without response headers within `timeout`', async () => {+ const lobehub = createLobeHub({ apiKey: 'k', fetch: hanging, maxRetries: 0, timeout: 20 });++ const { error } = await lobehub.agents.list();++ expect(error).toBeInstanceOf(LobeHubTimeoutError);+ expect(error).toBeInstanceOf(LobeHubConnectionError);+ expect((error as unknown as LobeHubTimeoutError).timeout).toBe(20);+ });++ it('applies a per-call timeout and retries a timed-out GET', async () => {+ let attempts = 0;+ const fetch = ((request: Request, init?: RequestInit) => {+ attempts++;+ return attempts === 1 ? hanging(request, init) : Promise.resolve(ok());+ }) as typeof globalThis.fetch;+ const lobehub = createLobeHub({ apiKey: 'k', fetch, timeout: 60_000 });++ const { error } = await lobehub.agents.list({ timeout: 10 });++ expect(error).toBeUndefined();+ expect(attempts).toBe(2);+ });++ it('leaves a caller abort as an AbortError without retrying', async () => {+ let attempts = 0;+ const fetch = ((request: Request, init?: RequestInit) => {+ attempts++;+ return hanging(request, init);+ }) as typeof globalThis.fetch;+ const controller = new AbortController();+ const lobehub = createLobeHub({ apiKey: 'k', fetch });++ const pending = lobehub.agents.list({ signal: controller.signal });+ await new Promise((resolve) => setTimeout(resolve, 5));+ expect(attempts).toBe(1);+ controller.abort();+ const { error } = await pending;++ expect((error as unknown as Error).name).toBe('AbortError');+ expect(attempts).toBe(1);++ // Aborted before it was sent: never reaches fetch at all.+ const { error: early } = await lobehub.agents.list({ signal: AbortSignal.abort() });+ expect((early as unknown as Error).name).toBe('AbortError');+ expect(attempts).toBe(1);+ });+});++describe('helpers', () => {+ it('parses Retry-After seconds and HTTP dates', () => {+ expect(parseRetryAfter('3')).toBe(3000);+ expect(parseRetryAfter('Thu, 01 Jan 2026 00:00:05 GMT', Date.UTC(2026, 0, 1))).toBe(5000);+ expect(parseRetryAfter('soon')).toBeUndefined();+ expect(parseRetryAfter(null)).toBeUndefined();+ });++ it('caps the backoff at 8s with ±25% jitter', () => {+ expect(backoffDelay(0, () => 0.5)).toBe(500);+ expect(backoffDelay(10, () => 0.5)).toBe(8000);+ expect(backoffDelay(0, () => 0)).toBe(375);+ expect(backoffDelay(0, () => 1)).toBe(625);+ });+});diff --git a/packages/sdk/src/transport.ts b/packages/sdk/src/transport.tsnew file mode 100644index 00000000000..4cac4c1f53f--- /dev/null+++ b/packages/sdk/src/transport.ts@@ -0,0 +1,172 @@+import { LobeHubConnectionError, LobeHubTimeoutError } from './errors';++export const IDEMPOTENCY_KEY_HEADER = 'Idempotency-Key';++// Generous on purpose: a non-streaming `responses.create` answers only once the agent run ends.+export const DEFAULT_TIMEOUT = 600_000;+export const DEFAULT_MAX_RETRIES = 2;++/** Safe to resend as-is: the server applies them at most once by definition. */+const IDEMPOTENT_METHODS = new Set(['DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT']);+const RETRYABLE_STATUSES = new Set([408, 429, 500, 502, 503, 504]);++const INITIAL_RETRY_DELAY = 500;+const MAX_RETRY_DELAY = 8000;+/** A server asking for a longer pause than this gets its answer returned instead. */+const MAX_RETRY_AFTER = 60_000;++export interface TransportSettings {+ maxRetries: number;+ /**+ * The caller asked for the response body itself (`parseAs: 'stream'`), which+ * the server answers as `text/event-stream`. Its idempotency middleware keeps+ * no replay record for that media type, so a retry starts a second run+ * instead of replaying the first one: such requests never retry.+ */+ streaming?: boolean;+ timeout: number;+}++/**+ * Per-request settings, keyed by the `Request` the generated client built:+ * the request interceptor (which sees the call's options) records them, and+ * the fetch wrapper (which only sees the `Request`) reads them.+ */+export const requestSettings = new WeakMap<Request, TransportSettings>();++/** `Retry-After` as delay-seconds or an HTTP date, in milliseconds. */+export const parseRetryAfter = (value: string | null, now = Date.now()): number | undefined => {+ if (!value) return;+ const seconds = Number(value);+ if (Number.isFinite(seconds)) return Math.max(0, seconds * 1000);+ const date = Date.parse(value);+ return Number.isNaN(date) ? undefined : Math.max(0, date - now);+};++/** Exponential backoff with ±25% jitter: ~0.5s, 1s, 2s, … capped at 8s. */+export const backoffDelay = (attempt: number, random = Math.random) =>+ Math.min(INITIAL_RETRY_DELAY * 2 ** attempt, MAX_RETRY_DELAY) * (0.75 + random() * 0.5);++const sleep = (ms: number, signal: AbortSignal | null) =>+ new Promise<void>((resolve, reject) => {+ if (signal?.aborted) return reject(signal.reason);+ const timer = setTimeout(resolve, ms);+ signal?.addEventListener(+ 'abort',+ () => {+ clearTimeout(timer);+ reject(signal.reason);+ },+ { once: true },+ );+ });++/**+ * Only resend what cannot double-apply: idempotent methods, or a POST the+ * server deduplicates through its `Idempotency-Key` (the server honors the key+ * on POST only, so a keyed PATCH is still not safe to resend).+ */+export const isRetryable = (request: Request) => {+ const method = request.method.toUpperCase();+ return (+ IDEMPOTENT_METHODS.has(method) ||+ (method === 'POST' && request.headers.has(IDEMPOTENCY_KEY_HEADER))+ );+};++/**+ * Whether an answer is worth another attempt. A keyed POST resent while the+ * first attempt is still running on the server (typical after a timeout or a+ * dropped connection) gets 409 `idempotency_conflict`; waiting and retrying+ * then yields the stored answer. A 422 with that code means a different+ * request reused the key, which a retry cannot fix.+ */+const shouldRetryStatus = async (request: Request, response: Response) => {+ if (RETRYABLE_STATUSES.has(response.status)) return true;+ if (response.status !== 409 || !request.headers.has(IDEMPOTENCY_KEY_HEADER)) return false;+ const body = (await response+ .clone()+ .json()+ .catch(() => undefined)) as { code?: unknown } | undefined;+ return body?.code === 'idempotency_conflict';+};++/**+ * Wrap `fetch` with a per-attempt timeout (until the response headers arrive)+ * and retries with exponential backoff on 408/429/5xx, network failures and a+ * keyed POST's in-flight 409, honoring `Retry-After`. Network failures surface as `LobeHubConnectionError`+ * and timeouts as `LobeHubTimeoutError`; a caller abort stays an `AbortError`.+ */+export const createTransport = (+ baseFetch: typeof globalThis.fetch,+ defaults: TransportSettings,+ options: { random?: () => number } = {},+): typeof globalThis.fetch => {+ const transport = async (input: RequestInfo | URL, init?: RequestInit): Promise<Response> => {+ const request = input instanceof Request && !init ? input : new Request(input, init);+ const settings = requestSettings.get(request) ?? defaults;+ const { maxRetries, timeout } = settings;+ // A streaming answer is never safe to resend, even keyed: the server+ // deduplicates JSON bodies only, so a retry would start another run.+ const retries = !settings.streaming && isRetryable(request) ? Math.max(0, maxRetries) : 0;+ const callerSignal = request.signal;++ for (let attempt = 0; ; attempt++) {+ // `abort` events do not replay, so a signal aborted before this attempt+ // (even before the request was sent) has to be checked directly.+ if (callerSignal.aborted) throw callerSignal.reason;+ const canRetry = attempt < retries;+ // The body can only be read once, so every attempt that may be followed+ // by another sends a clone.+ const current = canRetry ? request.clone() : request;+ const controller = new AbortController();+ // Forwarded for the life of the response, not just until its headers:+ // aborting must also stop a body that is still streaming. The listener+ // lives on this request's own signal, so it is collected with it.+ const forwardAbort = () => controller.abort(callerSignal.reason);+ callerSignal.addEventListener('abort', forwardAbort, { once: true });+ let timedOut = false;+ const timer =+ timeout > 0+ ? setTimeout(() => {+ timedOut = true;+ controller.abort();+ }, timeout)+ : undefined;++ let response: Response | undefined;+ let failure: Error | undefined;+ try {+ response = await baseFetch(current, { signal: controller.signal });+ } catch (error) {+ if (callerSignal.aborted) throw error;+ failure = timedOut+ ? new LobeHubTimeoutError(timeout)+ : new LobeHubConnectionError(error instanceof Error ? error.message : undefined, {+ cause: error,+ });+ } finally {+ // The timeout only bounds the wait for the headers.+ clearTimeout(timer);+ }++ if (response && !(canRetry && (await shouldRetryStatus(current, response)))) return response;+ if (!canRetry) throw failure;++ let delay = backoffDelay(attempt, options.random);+ if (response) {+ const retryAfter = parseRetryAfter(response.headers.get('Retry-After'));+ if (retryAfter !== undefined) {+ if (retryAfter > MAX_RETRY_AFTER) return response;+ delay = retryAfter;+ }+ await response.body?.cancel().catch(() => {});+ }+ // This attempt is discarded: stop forwarding aborts to it.+ callerSignal.removeEventListener('abort', forwardAbort);+ await sleep(delay, callerSignal);+ }+ };++ return transport as typeof globalThis.fetch;+};diff --git a/packages/sdk/src/uploads.ts b/packages/sdk/src/uploads.tsnew file mode 100644index 00000000000..9b112e586bd--- /dev/null+++ b/packages/sdk/src/uploads.ts@@ -0,0 +1,43 @@+import type { PostApiV1FilesData } from './generated/types.gen';++/** Anything `files.upload` accepts: a `File`/`Blob`, raw bytes, or a local path (Node, Bun, Deno). */+export type Uploadable = ArrayBuffer | Blob | Uint8Array | string;++export type UploadFields = Omit<PostApiV1FilesData['body'], 'file'>;++export interface UploadOptions extends UploadFields {+ /** File name sent to the server; defaults to the `File` name or the path's base name. */+ name?: string;+ /** MIME type; defaults to the `Blob` type (`application/octet-stream` for bytes). */+ type?: string;+}++const baseName = (path: string) => path.split(/[/\\]/).pop() || 'file';++/** Turn an `Uploadable` into a `File` the multipart serializer can send. */+export const toUploadFile = async (source: Uploadable, options: UploadOptions = {}) => {+ const { name, type } = options;++ if (typeof source === 'string') {+ // Loaded on demand (through a variable, so bundlers leave it alone) to+ // keep the SDK loadable in browsers.+ const fsModule = 'node:fs/promises';+ const { readFile } = (await import(/* @vite-ignore */ fsModule)) as {+ readFile: (path: string) => Promise<Uint8Array>;+ };+ const bytes = await readFile(source);+ return new File([bytes as BlobPart], name ?? baseName(source), {+ type: type ?? 'application/octet-stream',+ });+ }++ if (source instanceof Blob) {+ const fileName = name ?? (source instanceof File ? source.name : 'file');+ if (source instanceof File && !name && !type) return source;+ return new File([source], fileName, { type: type ?? source.type });+ }++ return new File([source as BlobPart], name ?? 'file', {+ type: type ?? 'application/octet-stream',+ });+};diff --git a/packages/sdk/tsconfig.json b/packages/sdk/tsconfig.jsonindex d1afea2f64f..d41c74c1b54 100644--- a/packages/sdk/tsconfig.json+++ b/packages/sdk/tsconfig.json@@ -1,7 +1,10 @@{"compilerOptions": {- "rootDir": "../../"+ "rootDir": "../../",+ "paths": {+ "@lobehub/sdk": ["./src/index.ts"]+ }},"extends": "../../tsconfig.json",- "include": ["src/**/*.ts"]+ "include": ["src/**/*.ts", "scripts/**/*.ts", "examples/**/*.ts"]}diff --git a/packages/types/src/work.ts b/packages/types/src/work.tsindex 63dc4752faf..07ec0a95da1 100644--- a/packages/types/src/work.ts+++ b/packages/types/src/work.ts@@ -23,7 +23,14 @@ export type LinkWorkResourceType = 'link';export type ExternalWorkResourceType =GithubWorkResourceType | LinearWorkResourceType | LinkWorkResourceType;export type WorkResourceType =- 'artboard' | 'canvas' | 'document' | ExternalWorkResourceType | 'file' | 'collection' | 'goal_report' | 'task';+ | 'artboard'+ | 'canvas'+ | 'document'+ | ExternalWorkResourceType+ | 'file'+ | 'collection'+ | 'goal_report'+ | 'task';export type WorkVisibility = 'private' | 'public';/*** How a version changed the Work. Not derivable from `version === 1`: updatingdiff --git a/scripts/densityTokens.test.ts b/scripts/densityTokens.test.tsindex 8bd0a463750..252404784a6 100644--- a/scripts/densityTokens.test.ts+++ b/scripts/densityTokens.test.ts@@ -1,4 +1,4 @@-import { existsSync, readFileSync, readdirSync } from 'node:fs';+import { existsSync, readdirSync, readFileSync } from 'node:fs';import path from 'node:path';import { describe, expect, it } from 'vitest';diff --git a/scripts/densityTokensCore.ts b/scripts/densityTokensCore.tsindex cbc65f3c9d1..f75e94d9d4c 100644--- a/scripts/densityTokensCore.ts+++ b/scripts/densityTokensCore.ts@@ -99,7 +99,10 @@ const readHandMaintainedTail = (root: string): string => {);}- return source.slice(markerIndex + HAND_MAINTAINED_MARKER.length).replace(/^\n+/, '').trimEnd();+ return source+ .slice(markerIndex + HAND_MAINTAINED_MARKER.length)+ .replace(/^\n+/, '')+ .trimEnd();};export interface GeneratedFile {diff --git a/src/features/Channels/CreateChannel/index.tsx b/src/features/Channels/CreateChannel/index.tsxindex 51022b7c8a8..2f3daab13ad 100644--- a/src/features/Channels/CreateChannel/index.tsx+++ b/src/features/Channels/CreateChannel/index.tsx@@ -157,8 +157,8 @@ function CreateChannel({ existing, onCreated, projectId }: CreateChannelProps) {emptyHint={existing ? undefined : t('create.onlyYou')}exclude={existing?.agentIds}options={options}- value={agents}people={{ channelId: existing?.id, onChange: setPeople, value: people }}+ value={agents}onChange={setAgents}/></Flexbox>