mirror of
https://github.com/block/goose.git
synced 2026-04-30 20:49:36 +00:00
Add support for changing working dir and extensions in same window/session (#6057)
This commit is contained in:
parent
4a60f026d5
commit
9a01fcb740
49 changed files with 1865 additions and 1204 deletions
|
|
@ -209,6 +209,45 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/agent/restart": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::agent"
|
||||
],
|
||||
"operationId": "restart_agent",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RestartAgentRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Agent restarted successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/RestartAgentResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized - invalid secret key"
|
||||
},
|
||||
"404": {
|
||||
"description": "Session not found"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/agent/resume": {
|
||||
"post": {
|
||||
"tags": [
|
||||
|
|
@ -231,7 +270,7 @@
|
|||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/Session"
|
||||
"$ref": "#/components/schemas/ResumeAgentResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -418,6 +457,41 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/agent/update_working_dir": {
|
||||
"post": {
|
||||
"tags": [
|
||||
"super::routes::agent"
|
||||
],
|
||||
"operationId": "update_working_dir",
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/UpdateWorkingDirRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Working directory updated and agent restarted successfully"
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request - invalid directory path"
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized - invalid secret key"
|
||||
},
|
||||
"404": {
|
||||
"description": "Session not found"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/config": {
|
||||
"get": {
|
||||
"tags": [
|
||||
|
|
@ -2272,6 +2346,51 @@
|
|||
]
|
||||
}
|
||||
},
|
||||
"/sessions/{session_id}/extensions": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Session Management"
|
||||
],
|
||||
"operationId": "get_session_extensions",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "session_id",
|
||||
"in": "path",
|
||||
"description": "Unique identifier for the session",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Session extensions retrieved successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SessionExtensionsResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized - Invalid or missing API key"
|
||||
},
|
||||
"404": {
|
||||
"description": "Session not found"
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error"
|
||||
}
|
||||
},
|
||||
"security": [
|
||||
{
|
||||
"api_key": []
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"/sessions/{session_id}/name": {
|
||||
"put": {
|
||||
"tags": [
|
||||
|
|
@ -3535,6 +3654,25 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"ExtensionLoadResult": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"success"
|
||||
],
|
||||
"properties": {
|
||||
"error": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"success": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"ExtensionQuery": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -4920,6 +5058,31 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"RestartAgentRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"session_id"
|
||||
],
|
||||
"properties": {
|
||||
"session_id": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RestartAgentResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"extension_results"
|
||||
],
|
||||
"properties": {
|
||||
"extension_results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ExtensionLoadResult"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ResumeAgentRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -4935,6 +5098,24 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"ResumeAgentResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"session"
|
||||
],
|
||||
"properties": {
|
||||
"extension_results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ExtensionLoadResult"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"session": {
|
||||
"$ref": "#/components/schemas/Session"
|
||||
}
|
||||
}
|
||||
},
|
||||
"RetryConfig": {
|
||||
"type": "object",
|
||||
"description": "Configuration for retry logic in recipe execution",
|
||||
|
|
@ -5275,6 +5456,20 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"SessionExtensionsResponse": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"extensions"
|
||||
],
|
||||
"properties": {
|
||||
"extensions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ExtensionConfig"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"SessionInsights": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
@ -5431,6 +5626,13 @@
|
|||
"working_dir"
|
||||
],
|
||||
"properties": {
|
||||
"extension_overrides": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/ExtensionConfig"
|
||||
},
|
||||
"nullable": true
|
||||
},
|
||||
"recipe": {
|
||||
"allOf": [
|
||||
{
|
||||
|
|
@ -5974,6 +6176,21 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"UpdateWorkingDirRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"session_id",
|
||||
"working_dir"
|
||||
],
|
||||
"properties": {
|
||||
"session_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"working_dir": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"UpsertConfigQuery": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue