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
+76
-11
@@ -3973,6 +3973,42 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/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": [
|
||||
@@ -6723,6 +6759,14 @@ const docTemplate = `{
|
||||
"ParameterSourceSchemeData"
|
||||
]
|
||||
},
|
||||
"codersdk.PostWorkspaceAgentLifecycleRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"state": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentLifecycle"
|
||||
}
|
||||
}
|
||||
},
|
||||
"codersdk.PostWorkspaceAgentVersionRequest": {
|
||||
"description": "x-apidocgen:skip",
|
||||
"type": "object",
|
||||
@@ -7651,6 +7695,10 @@ const docTemplate = `{
|
||||
"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"
|
||||
},
|
||||
@@ -7686,6 +7734,9 @@ const docTemplate = `{
|
||||
"$ref": "#/definitions/codersdk.DERPRegion"
|
||||
}
|
||||
},
|
||||
"lifecycle_state": {
|
||||
"$ref": "#/definitions/codersdk.WorkspaceAgentLifecycle"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -7699,18 +7750,12 @@ const docTemplate = `{
|
||||
"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"
|
||||
@@ -7754,6 +7799,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
@@ -7785,6 +7847,9 @@ const docTemplate = `{
|
||||
"startup_script": {
|
||||
"type": "string"
|
||||
},
|
||||
"startup_script_timeout": {
|
||||
"type": "integer"
|
||||
},
|
||||
"vscode_port_proxy_uri": {
|
||||
"type": "string"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user