feat(cursor): wire executor through portal, admin, and wechat routes

Register cursor in LLM executor bindings, route page/code tasks through
cursor runtime selection, and bootstrap wechat cursor policy services.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
john
2026-08-27 09:33:47 +08:00
parent a29e1ec5c8
commit ad6dcc283f
17 changed files with 343 additions and 16 deletions
+23 -1
View File
@@ -622,7 +622,7 @@ CREATE TABLE IF NOT EXISTS h5_llm_provider_keys (
CREATE TABLE IF NOT EXISTS h5_llm_executor_bindings (
id CHAR(36) PRIMARY KEY,
executor ENUM('goose', 'aider', 'openhands') NOT NULL,
executor ENUM('goose', 'aider', 'openhands', 'cursor') NOT NULL,
purpose VARCHAR(32) NOT NULL DEFAULT 'default',
provider_key_id CHAR(36) NULL,
model VARCHAR(128) NOT NULL,
@@ -634,6 +634,28 @@ CREATE TABLE IF NOT EXISTS h5_llm_executor_bindings (
CONSTRAINT fk_h5_llm_executor_provider FOREIGN KEY (provider_key_id) REFERENCES h5_llm_provider_keys(id) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS h5_help_escalations (
id CHAR(36) PRIMARY KEY,
user_id CHAR(36) NOT NULL,
channel VARCHAR(32) NOT NULL DEFAULT 'h5',
status ENUM('queued', 'running', 'succeeded', 'failed') NOT NULL DEFAULT 'queued',
user_text MEDIUMTEXT NOT NULL,
context_json JSON NULL,
agent_session_id VARCHAR(128) NULL,
result_text MEDIUMTEXT NULL,
agent_output MEDIUMTEXT NULL,
error_message TEXT NULL,
created_at BIGINT NOT NULL,
updated_at BIGINT NOT NULL,
started_at BIGINT NULL,
completed_at BIGINT NULL,
KEY idx_h5_help_escalation_status_created (status, created_at),
KEY idx_h5_help_escalation_user_created (user_id, created_at),
KEY idx_h5_help_escalation_session (agent_session_id, updated_at),
CONSTRAINT fk_h5_help_escalation_user FOREIGN KEY (user_id) REFERENCES h5_users(id) ON DELETE CASCADE,
CONSTRAINT fk_h5_help_escalation_session FOREIGN KEY (agent_session_id) REFERENCES h5_user_sessions(agent_session_id) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS h5_asset_gateway_config (
config_key VARCHAR(32) PRIMARY KEY,
enabled TINYINT(1) NOT NULL DEFAULT 0,