mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-25 15:24:58 +00:00
refactor(core): split out instance and route through workspaces (#19335)
This commit is contained in:
@@ -356,6 +356,90 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/log": {
|
||||
"post": {
|
||||
"operationId": "app.log",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "directory",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "workspace",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"summary": "Write log",
|
||||
"description": "Write a log entry to the server logs with specified level and metadata.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Log entry written successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/BadRequestError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"description": "Service name for the log entry",
|
||||
"type": "string"
|
||||
},
|
||||
"level": {
|
||||
"description": "Log level",
|
||||
"type": "string",
|
||||
"enum": ["debug", "info", "error", "warn"]
|
||||
},
|
||||
"message": {
|
||||
"description": "Log message",
|
||||
"type": "string"
|
||||
},
|
||||
"extra": {
|
||||
"description": "Additional metadata for the log entry",
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {}
|
||||
}
|
||||
},
|
||||
"required": ["service", "level", "message"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "js",
|
||||
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/project": {
|
||||
"get": {
|
||||
"operationId": "project.list",
|
||||
@@ -6762,90 +6846,6 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/log": {
|
||||
"post": {
|
||||
"operationId": "app.log",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"name": "directory",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "workspace",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"summary": "Write log",
|
||||
"description": "Write a log entry to the server logs with specified level and metadata.",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Log entry written successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/BadRequestError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"service": {
|
||||
"description": "Service name for the log entry",
|
||||
"type": "string"
|
||||
},
|
||||
"level": {
|
||||
"description": "Log level",
|
||||
"type": "string",
|
||||
"enum": ["debug", "info", "error", "warn"]
|
||||
},
|
||||
"message": {
|
||||
"description": "Log message",
|
||||
"type": "string"
|
||||
},
|
||||
"extra": {
|
||||
"description": "Additional metadata for the log entry",
|
||||
"type": "object",
|
||||
"propertyNames": {
|
||||
"type": "string"
|
||||
},
|
||||
"additionalProperties": {}
|
||||
}
|
||||
},
|
||||
"required": ["service", "level", "message"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"x-codeSamples": [
|
||||
{
|
||||
"lang": "js",
|
||||
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.app.log({\n ...\n})"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/agent": {
|
||||
"get": {
|
||||
"operationId": "app.agents",
|
||||
|
||||
Reference in New Issue
Block a user