diff options
| author | Dax Raad <[email protected]> | 2025-05-28 13:22:48 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-05-28 13:22:48 -0400 |
| commit | 3a4d3b249f4b529ead2f80dd0df19a9cdc0c10a6 (patch) | |
| tree | bb77726cba6875a6daa8fe6230d9a2826fab83ed /pkg/client/gen/openapi.json | |
| parent | 55a6fcdd3f5b3c55712e5cfc9dd4d994da38d4c8 (diff) | |
| download | opencode-3a4d3b249f4b529ead2f80dd0df19a9cdc0c10a6.tar.gz opencode-3a4d3b249f4b529ead2f80dd0df19a9cdc0c10a6.zip | |
generate message type
Diffstat (limited to 'pkg/client/gen/openapi.json')
| -rw-r--r-- | pkg/client/gen/openapi.json | 326 |
1 files changed, 323 insertions, 3 deletions
diff --git a/pkg/client/gen/openapi.json b/pkg/client/gen/openapi.json index b7e40b7f9..41e16ad80 100644 --- a/pkg/client/gen/openapi.json +++ b/pkg/client/gen/openapi.json @@ -68,7 +68,12 @@ "description": "Successfully created session", "content": { "application/json": { - "schema": {} + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message" + } + } } } } @@ -173,12 +178,18 @@ "modelID": { "type": "string" }, - "parts": {} + "parts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Part" + } + } }, "required": [ "sessionID", "providerID", - "modelID" + "modelID", + "parts" ] } } @@ -250,6 +261,315 @@ "tokens" ] }, + "Session.Message": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "role": { + "type": "string", + "enum": [ + "system", + "user", + "assistant" + ] + }, + "parts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Session.Message.Part" + } + }, + "metadata": { + "type": "object", + "properties": { + "time": { + "type": "object", + "properties": { + "created": { + "type": "number" + }, + "completed": { + "type": "number" + } + }, + "required": [ + "created" + ] + }, + "sessionID": { + "type": "string" + }, + "tool": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "time", + "sessionID", + "tool" + ] + } + }, + "required": [ + "id", + "role", + "parts", + "metadata" + ] + }, + "Session.Message.Part": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.Part.Text" + }, + { + "$ref": "#/components/schemas/Session.Message.Part.Reasoning" + }, + { + "$ref": "#/components/schemas/Session.Message.Part.ToolInvocation" + }, + { + "$ref": "#/components/schemas/Session.Message.Part.SourceUrl" + }, + { + "$ref": "#/components/schemas/Session.Message.Part.File" + }, + { + "$ref": "#/components/schemas/Session.Message.Part.StepStart" + }, + { + "$ref": "#/components/schemas/Session.Message.Part.Data" + } + ] + }, + "Session.Message.Part.Text": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "text" + }, + "text": { + "type": "string" + } + }, + "required": [ + "type", + "text" + ] + }, + "Session.Message.Part.Reasoning": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "reasoning" + }, + "text": { + "type": "string" + }, + "providerMetadata": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "type", + "text" + ] + }, + "Session.Message.Part.ToolInvocation": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "tool-invocation" + }, + "toolInvocation": { + "$ref": "#/components/schemas/Session.Message.ToolInvocation" + } + }, + "required": [ + "type", + "toolInvocation" + ] + }, + "Session.Message.ToolInvocation": { + "anyOf": [ + { + "$ref": "#/components/schemas/Session.Message.ToolInvocation.ToolCall" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolInvocation.ToolPartialCall" + }, + { + "$ref": "#/components/schemas/Session.Message.ToolInvocation.ToolResult" + } + ] + }, + "Session.Message.ToolInvocation.ToolCall": { + "type": "object", + "properties": { + "state": { + "type": "string", + "const": "call" + }, + "step": { + "type": "number" + }, + "toolCallId": { + "type": "string" + }, + "toolName": { + "type": "string" + }, + "args": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "state", + "toolCallId", + "toolName", + "args" + ] + }, + "Session.Message.ToolInvocation.ToolPartialCall": { + "type": "object", + "properties": { + "state": { + "type": "string", + "const": "partial-call" + }, + "step": { + "type": "number" + }, + "toolCallId": { + "type": "string" + }, + "toolName": { + "type": "string" + }, + "args": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "state", + "toolCallId", + "toolName", + "args" + ] + }, + "Session.Message.ToolInvocation.ToolResult": { + "type": "object", + "properties": { + "state": { + "type": "string", + "const": "result" + }, + "step": { + "type": "number" + }, + "toolCallId": { + "type": "string" + }, + "toolName": { + "type": "string" + }, + "args": { + "type": "object", + "additionalProperties": {} + }, + "result": { + "type": "string" + } + }, + "required": [ + "state", + "toolCallId", + "toolName", + "args", + "result" + ] + }, + "Session.Message.Part.SourceUrl": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "source-url" + }, + "sourceId": { + "type": "string" + }, + "url": { + "type": "string" + }, + "title": { + "type": "string" + }, + "providerMetadata": { + "type": "object", + "additionalProperties": {} + } + }, + "required": [ + "type", + "sourceId", + "url" + ] + }, + "Session.Message.Part.File": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "file" + }, + "mediaType": { + "type": "string" + }, + "filename": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "required": [ + "type", + "mediaType", + "url" + ] + }, + "Session.Message.Part.StepStart": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "step-start" + } + }, + "required": [ + "type" + ] + }, + "Session.Message.Part.Data": { + "type": "object", + "properties": { + "type": {}, + "id": { + "type": "string" + }, + "data": {} + } + }, "Provider.Info": { "type": "object", "properties": { |
