mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: Add workspace agent lifecycle state reporting (#5785)
This commit is contained in:
Generated
+66
-6
@@ -3493,6 +3493,38 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workspaceagents/me/report-lifecycle": {
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"CoderSessionToken": []
|
||||
}
|
||||
],
|
||||
"consumes": ["application/json"],
|
||||
"tags": ["Agents"],
|
||||
"summary": "Submit workspace agent lifecycle state",
|
||||
"operationId": "submit-workspace-agent-lifecycle-state",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Workspace agent lifecycle request",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/codersdk.PostWorkspaceAgentLifecycleRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"204": {
|
||||
"description": "Success"
|
||||
}
|
||||
},
|
||||
"x-apidocgen": {
|
||||
"skip": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"/workspaceagents/me/report-stats": {
|
||||
"post": {
|
||||
"security": [
|
||||
@@ -6006,6 +6038,14 @@
|
||||
"ParameterSourceSchemeData"
|
||||
]
|
||||
},
|
||||
"codersdk.PostWorkspaceAgentLifecycleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentLifecycle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.PostWorkspaceAgentVersionRequest": {
|
||||
"description": "x-apidocgen:skip",
|
||||
"type": "object",
|
||||
@@ -6886,6 +6926,10 @@
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"delay_login_until_ready": {
|
||||
"description": "DelayLoginUntilReady if true, the agent will delay logins until it is ready (e.g. executing startup script has ended).",
|
||||
"type": "boolean"
|
||||
},
|
||||
"directory": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6921,6 +6965,9 @@
|
||||
"$ref": "#/definitions/codersdk.DERPRegion"
|
||||
}
|
||||
},
|
||||
"lifecycle_state": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentLifecycle"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -6934,13 +6981,12 @@
|
||||
"startup_script": {
|
||||
"type": "string"
|
||||
},
|
||||
"startup_script_timeout_seconds": {
|
||||
"description": "StartupScriptTimeoutSeconds is the number of seconds to wait for the startup script to complete. If the script does not complete within this time, the agent lifecycle will be marked as start_timeout.",
|
||||
"type": "integer"
|
||||
},
|
||||
"status": {
|
||||
"enum": ["connecting", "connected", "disconnected", "timeout"],
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentStatus"
|
||||
}
|
||||
]
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentStatus"
|
||||
},
|
||||
"troubleshooting_url": {
|
||||
"type": "string"
|
||||
@@ -6984,6 +7030,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.WorkspaceAgentLifecycle": {
|
||||
"type": "string",
|
||||
"enum": ["created", "starting", "start_timeout", "start_error", "ready"],
|
||||
"x-enum-varnames": [
|
||||
"WorkspaceAgentLifecycleCreated",
|
||||
"WorkspaceAgentLifecycleStarting",
|
||||
"WorkspaceAgentLifecycleStartTimeout",
|
||||
"WorkspaceAgentLifecycleStartError",
|
||||
"WorkspaceAgentLifecycleReady"
|
||||
]
|
||||
},
|
||||
"codersdk.WorkspaceAgentMetadata": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -7015,6 +7072,9 @@
|
||||
"startup_script": {
|
||||
"type": "string"
|
||||
},
|
||||
"startup_script_timeout": {
|
||||
"type": "integer"
|
||||
},
|
||||
"vscode_port_proxy_uri": {
|
||||
"type": "string"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user