F4: verify task recovery and document Prompt background jobs
This commit is contained in:
@@ -5082,6 +5082,148 @@
|
||||
"title": "StateUpdateRule",
|
||||
"type": "object"
|
||||
},
|
||||
"SubmitTask": {
|
||||
"properties": {
|
||||
"assistantId": {
|
||||
"title": "Assistantid",
|
||||
"type": "string"
|
||||
},
|
||||
"instruction": {
|
||||
"maxLength": 12000,
|
||||
"minLength": 1,
|
||||
"title": "Instruction",
|
||||
"type": "string"
|
||||
},
|
||||
"requestId": {
|
||||
"maxLength": 80,
|
||||
"minLength": 1,
|
||||
"title": "Requestid",
|
||||
"type": "string"
|
||||
},
|
||||
"toolId": {
|
||||
"title": "Toolid",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"assistantId",
|
||||
"toolId",
|
||||
"instruction",
|
||||
"requestId"
|
||||
],
|
||||
"title": "SubmitTask",
|
||||
"type": "object"
|
||||
},
|
||||
"TaskInput": {
|
||||
"properties": {
|
||||
"answers": {
|
||||
"anyOf": [
|
||||
{
|
||||
"items": {
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Answers"
|
||||
},
|
||||
"reply": {
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"type": "null"
|
||||
}
|
||||
],
|
||||
"title": "Reply"
|
||||
}
|
||||
},
|
||||
"title": "TaskInput",
|
||||
"type": "object"
|
||||
},
|
||||
"TaskToolConfig": {
|
||||
"properties": {
|
||||
"allowInterruptions": {
|
||||
"const": true,
|
||||
"default": true,
|
||||
"title": "Allowinterruptions",
|
||||
"type": "boolean"
|
||||
},
|
||||
"directory": {
|
||||
"maxLength": 2048,
|
||||
"minLength": 1,
|
||||
"title": "Directory",
|
||||
"type": "string"
|
||||
},
|
||||
"executionMode": {
|
||||
"const": "immediate",
|
||||
"default": "immediate",
|
||||
"title": "Executionmode",
|
||||
"type": "string"
|
||||
},
|
||||
"provider": {
|
||||
"const": "opencode",
|
||||
"default": "opencode",
|
||||
"title": "Provider",
|
||||
"type": "string"
|
||||
},
|
||||
"timeoutSeconds": {
|
||||
"default": 600,
|
||||
"maximum": 7200.0,
|
||||
"minimum": 30.0,
|
||||
"title": "Timeoutseconds",
|
||||
"type": "integer"
|
||||
},
|
||||
"url": {
|
||||
"maxLength": 2048,
|
||||
"minLength": 1,
|
||||
"title": "Url",
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"default": "opencode",
|
||||
"maxLength": 128,
|
||||
"title": "Username",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"url",
|
||||
"directory"
|
||||
],
|
||||
"title": "TaskToolConfig",
|
||||
"type": "object"
|
||||
},
|
||||
"TaskToolDefinition": {
|
||||
"properties": {
|
||||
"config": {
|
||||
"$ref": "#/components/schemas/TaskToolConfig"
|
||||
},
|
||||
"schemaVersion": {
|
||||
"default": 2,
|
||||
"title": "Schemaversion",
|
||||
"type": "integer"
|
||||
},
|
||||
"type": {
|
||||
"const": "task",
|
||||
"default": "task",
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"config"
|
||||
],
|
||||
"title": "TaskToolDefinition",
|
||||
"type": "object"
|
||||
},
|
||||
"TemplateValueSource": {
|
||||
"properties": {
|
||||
"source": {
|
||||
@@ -5648,7 +5790,8 @@
|
||||
"mapping": {
|
||||
"client": "#/components/schemas/ClientToolDefinition",
|
||||
"http": "#/components/schemas/HttpToolDefinition",
|
||||
"mcp": "#/components/schemas/McpToolDefinition"
|
||||
"mcp": "#/components/schemas/McpToolDefinition",
|
||||
"task": "#/components/schemas/TaskToolDefinition"
|
||||
},
|
||||
"propertyName": "type"
|
||||
},
|
||||
@@ -5661,6 +5804,9 @@
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/McpToolDefinition"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/TaskToolDefinition"
|
||||
}
|
||||
],
|
||||
"title": "Definition"
|
||||
@@ -5727,7 +5873,8 @@
|
||||
"enum": [
|
||||
"http",
|
||||
"mcp",
|
||||
"client"
|
||||
"client",
|
||||
"task"
|
||||
],
|
||||
"title": "Type",
|
||||
"type": "string"
|
||||
@@ -5927,7 +6074,8 @@
|
||||
"mapping": {
|
||||
"client": "#/components/schemas/ClientToolDefinition",
|
||||
"http": "#/components/schemas/HttpToolDefinition",
|
||||
"mcp": "#/components/schemas/McpToolDefinition"
|
||||
"mcp": "#/components/schemas/McpToolDefinition",
|
||||
"task": "#/components/schemas/TaskToolDefinition"
|
||||
},
|
||||
"propertyName": "type"
|
||||
},
|
||||
@@ -5940,6 +6088,9 @@
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/McpToolDefinition"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/TaskToolDefinition"
|
||||
}
|
||||
],
|
||||
"title": "Definition"
|
||||
@@ -6541,6 +6692,253 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/background-tasks": {
|
||||
"get": {
|
||||
"operationId": "list_tasks_api_background_tasks_get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "assistant_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Assistant Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "List Tasks",
|
||||
"tags": [
|
||||
"background-tasks"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"operationId": "submit_task_api_background_tasks_post",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SubmitTask"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Submit Task",
|
||||
"tags": [
|
||||
"background-tasks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/background-tasks/{task_id}": {
|
||||
"get": {
|
||||
"operationId": "get_task_api_background_tasks__task_id__get",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "task_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Task Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Get Task",
|
||||
"tags": [
|
||||
"background-tasks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/background-tasks/{task_id}/cancel": {
|
||||
"post": {
|
||||
"operationId": "cancel_task_api_background_tasks__task_id__cancel_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "task_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Task Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Cancel Task",
|
||||
"tags": [
|
||||
"background-tasks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/background-tasks/{task_id}/input": {
|
||||
"post": {
|
||||
"operationId": "send_input_api_background_tasks__task_id__input_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "task_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Task Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TaskInput"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Send Input",
|
||||
"tags": [
|
||||
"background-tasks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/background-tasks/{task_id}/refresh": {
|
||||
"post": {
|
||||
"operationId": "refresh_task_api_background_tasks__task_id__refresh_post",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "task_id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"title": "Task Id",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {}
|
||||
}
|
||||
},
|
||||
"description": "Successful Response"
|
||||
},
|
||||
"422": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HTTPValidationError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Validation Error"
|
||||
}
|
||||
},
|
||||
"summary": "Refresh Task",
|
||||
"tags": [
|
||||
"background-tasks"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/conversations": {
|
||||
"get": {
|
||||
"operationId": "list_conversations_api_conversations_get",
|
||||
|
||||
Reference in New Issue
Block a user