{"openapi":"3.1.0","info":{"title":"BZ Broker OS NEW Unified Compact API","description":"Compact unified API for GPT actions with a target of staying under 30 operations. Covers workspace, services, workers, database, files, commands, infra, browser orchestration, Python execution, and deep service inspection.","version":"2.3.0"},"servers":[{"url":"https://crm-api.bzbroker.ru/crmapi"}],"paths":{"/health":{"get":{"summary":"Get Health","operationId":"getHealth","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/workspace/context":{"get":{"summary":"Get Workspace Context","operationId":"getWorkspaceContext","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceContextResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/services/status":{"get":{"summary":"Get Services Status","operationId":"getServicesStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServicesStatusResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/services/control":{"post":{"summary":"Control Service","operationId":"controlService","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceControlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/services/inspect":{"post":{"summary":"Inspect Service","operationId":"inspectService","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceInspectRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceInspectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/workers/status":{"get":{"summary":"Get Workers Status","operationId":"getWorkersStatus","security":[{"HTTPBearer":[]}],"parameters":[{"name":"account_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Account Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkersStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/workers/control":{"post":{"summary":"Control Worker","operationId":"controlWorker","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerControlRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerControlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/db/query":{"post":{"summary":"Query Db","operationId":"queryDb","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DbQueryRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DbQueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/db/schema":{"get":{"summary":"Get Db Schema","operationId":"getDbSchema","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DbSchemaResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/files/tree":{"get":{"summary":"List Files","operationId":"listFiles","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","default":".","title":"Path"}},{"name":"recursive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Recursive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileTreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/read":{"get":{"summary":"Read File","operationId":"readFile","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}},{"name":"start_line","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Start Line"}},{"name":"end_line","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"End Line"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/search":{"get":{"summary":"Search Files","operationId":"searchFiles","security":[{"HTTPBearer":[]}],"parameters":[{"name":"pattern","in":"query","required":true,"schema":{"type":"string","title":"Pattern"}},{"name":"root_path","in":"query","required":false,"schema":{"type":"string","default":".","title":"Root Path"}},{"name":"mode","in":"query","required":false,"schema":{"enum":["substring","regex"],"type":"string","default":"substring","title":"Mode"}},{"name":"max_results","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":100,"title":"Max Results"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/files/edit":{"post":{"summary":"Edit Files","operationId":"editFiles","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileEditRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileEditResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/files/diff":{"post":{"summary":"Diff Files","operationId":"diffFiles","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDiffRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileDiffResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/commands/run":{"post":{"summary":"Run Allowlisted Command","operationId":"runCommand","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommandRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/python/exec":{"post":{"summary":"Exec Python","operationId":"execPython","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PythonExecRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PythonExecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/infra/read":{"get":{"summary":"Read Infra","operationId":"readInfra","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InfraReadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/health":{"get":{"summary":"Get Browser Health","operationId":"getBrowserHealth","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserHealthResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/browser/workspaces":{"get":{"summary":"List Browser Workspaces","operationId":"listBrowserWorkspaces","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWorkspaceListResponse"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"summary":"Create Browser Workspace","operationId":"createBrowserWorkspace","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWorkspaceCreateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWorkspaceSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/browser/workspaces/{workspace_id}":{"get":{"summary":"Get Browser Workspace","operationId":"getBrowserWorkspace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWorkspaceSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"summary":"Delete Browser Workspace","operationId":"deleteBrowserWorkspace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWorkspaceDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/state":{"get":{"summary":"Get Browser Workspace State","operationId":"getBrowserWorkspaceState","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWorkspaceStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/reset":{"post":{"summary":"Reset Browser Workspace","operationId":"resetBrowserWorkspace","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserResetRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserResetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/windows":{"get":{"summary":"List Browser Windows","operationId":"listBrowserWindows","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/windows/open":{"post":{"summary":"Open Browser Window","operationId":"openBrowserWindow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowOpenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/windows/{window_id}/navigate":{"post":{"summary":"Navigate Browser Window","operationId":"navigateBrowserWindow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"window_id","in":"path","required":true,"schema":{"type":"string","title":"Window Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowNavigateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/windows/{window_id}/snapshot":{"get":{"summary":"Get Browser Window Snapshot","operationId":"getBrowserWindowSnapshot","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"window_id","in":"path","required":true,"schema":{"type":"string","title":"Window Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowSnapshotResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/browser/workspaces/{workspace_id}/windows/{window_id}":{"delete":{"summary":"Close Browser Window","operationId":"closeBrowserWindow","security":[{"HTTPBearer":[]}],"parameters":[{"name":"workspace_id","in":"path","required":true,"schema":{"type":"string","title":"Workspace Id"}},{"name":"window_id","in":"path","required":true,"schema":{"type":"string","title":"Window Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrowserWindowSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"BrowserHealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"base_dir":{"type":"string","title":"Base Dir"},"engine":{"type":"string","title":"Engine"}},"type":"object","required":["status","base_dir","engine"],"title":"BrowserHealthResponse"},"BrowserResetRequest":{"properties":{"close_all":{"type":"boolean","title":"Close All","default":true},"close_only_stale":{"type":"boolean","title":"Close Only Stale","default":false},"stale_after_minutes":{"type":"integer","maximum":1440.0,"minimum":1.0,"title":"Stale After Minutes","default":30},"hard_kill_orphaned":{"type":"boolean","title":"Hard Kill Orphaned","default":true},"preserve_roles":{"items":{"type":"string"},"type":"array","title":"Preserve Roles"},"reopen":{"items":{"$ref":"#/components/schemas/BrowserResetWindowRequest"},"type":"array","title":"Reopen"}},"type":"object","title":"BrowserResetRequest"},"BrowserResetResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"closed_window_ids":{"items":{"type":"string"},"type":"array","title":"Closed Window Ids"},"opened_windows":{"items":{"$ref":"#/components/schemas/BrowserWindowSummary"},"type":"array","title":"Opened Windows"}},"type":"object","required":["workspace_id","closed_window_ids","opened_windows"],"title":"BrowserResetResponse"},"BrowserResetWindowRequest":{"properties":{"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"url":{"type":"string","title":"Url"},"wait_until":{"type":"string","enum":["domcontentloaded","load","networkidle"],"title":"Wait Until","default":"load"}},"type":"object","required":["url"],"title":"BrowserResetWindowRequest"},"BrowserWindowListResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"windows":{"items":{"$ref":"#/components/schemas/BrowserWindowSummary"},"type":"array","title":"Windows"}},"type":"object","required":["workspace_id","windows"],"title":"BrowserWindowListResponse"},"BrowserWindowNavigateRequest":{"properties":{"url":{"type":"string","title":"Url"},"wait_until":{"type":"string","enum":["domcontentloaded","load","networkidle"],"title":"Wait Until","default":"load"}},"type":"object","required":["url"],"title":"BrowserWindowNavigateRequest"},"BrowserWindowOpenRequest":{"properties":{"role":{"type":"string","title":"Role","default":"fresh-start"},"url":{"type":"string","title":"Url"},"wait_until":{"type":"string","enum":["domcontentloaded","load","networkidle"],"title":"Wait Until","default":"load"}},"type":"object","required":["url"],"title":"BrowserWindowOpenRequest"},"BrowserWindowSnapshotResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"window_id":{"type":"string","title":"Window Id"},"url":{"type":"string","title":"Url"},"title":{"type":"string","title":"Title"},"screenshot_path":{"type":"string","title":"Screenshot Path"},"text_excerpt":{"type":"string","title":"Text Excerpt"},"html_excerpt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Html Excerpt"}},"type":"object","required":["workspace_id","window_id","url","title","screenshot_path","text_excerpt"],"title":"BrowserWindowSnapshotResponse"},"BrowserWindowSummary":{"properties":{"window_id":{"type":"string","title":"Window Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"role":{"type":"string","title":"Role"},"state":{"type":"string","enum":["open","closed","crashed","orphaned"],"title":"State"},"url":{"type":"string","title":"Url"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"pid":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pid"}},"type":"object","required":["window_id","workspace_id","role","state","url"],"title":"BrowserWindowSummary"},"BrowserWorkspaceCreateRequest":{"properties":{"name":{"type":"string","title":"Name"},"headless":{"type":"boolean","title":"Headless","default":true},"max_windows":{"type":"integer","maximum":10.0,"minimum":1.0,"title":"Max Windows","default":4},"allow_hosts":{"items":{"type":"string"},"type":"array","title":"Allow Hosts"}},"type":"object","required":["name","allow_hosts"],"title":"BrowserWorkspaceCreateRequest"},"BrowserWorkspaceDeleteResponse":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"deleted":{"type":"boolean","title":"Deleted"}},"type":"object","required":["workspace_id","deleted"],"title":"BrowserWorkspaceDeleteResponse"},"BrowserWorkspaceListResponse":{"properties":{"workspaces":{"items":{"$ref":"#/components/schemas/BrowserWorkspaceSummary"},"type":"array","title":"Workspaces"}},"type":"object","required":["workspaces"],"title":"BrowserWorkspaceListResponse"},"BrowserWorkspaceStateResponse":{"properties":{"workspace":{"$ref":"#/components/schemas/BrowserWorkspaceSummary"},"windows":{"items":{"$ref":"#/components/schemas/BrowserWindowSummary"},"type":"array","title":"Windows"}},"type":"object","required":["workspace","windows"],"title":"BrowserWorkspaceStateResponse"},"BrowserWorkspaceSummary":{"properties":{"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"headless":{"type":"boolean","title":"Headless"},"max_windows":{"type":"integer","title":"Max Windows"},"state":{"type":"string","enum":["ready","busy","closing","closed","error"],"title":"State"},"window_count":{"type":"integer","title":"Window Count"},"allow_hosts":{"items":{"type":"string"},"type":"array","title":"Allow Hosts"}},"type":"object","required":["workspace_id","name","headless","max_windows","state","window_count"],"title":"BrowserWorkspaceSummary"},"CommandRunRequest":{"properties":{"argv":{"items":{"type":"string"},"type":"array","title":"Argv"},"cwd":{"type":"string","title":"Cwd"},"profile":{"type":"string","enum":["search","archive","build","sqlite","docker","python","pytest"],"title":"Profile"},"allow_destructive":{"type":"boolean","title":"Allow Destructive","default":false}},"type":"object","required":["argv","cwd","profile"],"title":"CommandRunRequest"},"CommandRunResponse":{"properties":{"argv":{"items":{"type":"string"},"type":"array","title":"Argv"},"cwd":{"type":"string","title":"Cwd"},"profile":{"type":"string","title":"Profile"},"exit_code":{"type":"integer","title":"Exit Code"},"stdout":{"type":"string","title":"Stdout"},"stderr":{"type":"string","title":"Stderr"}},"type":"object","required":["argv","cwd","profile","exit_code","stdout","stderr"],"title":"CommandRunResponse"},"DbQueryRequest":{"properties":{"sql":{"type":"string","title":"Sql"},"params":{"type":"object","title":"Params"},"readonly":{"type":"boolean","title":"Readonly","default":true},"max_rows":{"type":"integer","maximum":5000.0,"minimum":1.0,"title":"Max Rows","default":500}},"type":"object","required":["sql"],"title":"DbQueryRequest"},"DbQueryResponse":{"properties":{"kind":{"type":"string","title":"Kind"},"rowcount":{"type":"integer","title":"Rowcount"},"columns":{"items":{"type":"string"},"type":"array","title":"Columns"},"rows":{"items":{"type":"object"},"type":"array","title":"Rows"}},"type":"object","required":["kind","rowcount","columns","rows"],"title":"DbQueryResponse"},"DbSchemaResponse":{"properties":{"tables":{"items":{"type":"object"},"type":"array","title":"Tables"}},"type":"object","required":["tables"],"title":"DbSchemaResponse"},"FileDiffRequest":{"properties":{"path_a":{"type":"string","title":"Path A"},"path_b":{"type":"string","title":"Path B"},"context_lines":{"type":"integer","title":"Context Lines","default":3}},"type":"object","required":["path_a","path_b"],"title":"FileDiffRequest"},"FileDiffResponse":{"properties":{"path_a":{"type":"string","title":"Path A"},"path_b":{"type":"string","title":"Path B"},"diff":{"type":"string","title":"Diff"}},"type":"object","required":["path_a","path_b","diff"],"title":"FileDiffResponse"},"FileEditOperation":{"properties":{"action":{"type":"string","enum":["write","append","replaceRange","insert","deleteRange","replaceText","mkdir","move","copy","delete","chmod","symlink"],"title":"Action"},"path":{"type":"string","title":"Path"},"destination":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Destination"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content"},"start_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Line"},"end_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Line"},"line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Line"},"find":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Find"},"replace_with":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Replace With"},"overwrite":{"type":"boolean","title":"Overwrite","default":false},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},"type":"object","required":["action","path"],"title":"FileEditOperation"},"FileEditRequest":{"properties":{"atomic":{"type":"boolean","title":"Atomic","default":false},"operations":{"items":{"$ref":"#/components/schemas/FileEditOperation"},"type":"array","maxItems":100,"minItems":1,"title":"Operations"}},"type":"object","required":["operations"],"title":"FileEditRequest"},"FileEditResponse":{"properties":{"ok":{"type":"boolean","title":"Ok"},"results":{"items":{"type":"object"},"type":"array","title":"Results"}},"type":"object","required":["ok","results"],"title":"FileEditResponse"},"FileEntry":{"properties":{"name":{"type":"string","title":"Name"},"path":{"type":"string","title":"Path"},"kind":{"type":"string","enum":["file","dir","symlink"],"title":"Kind"},"size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Size"},"mtime_utc":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mtime Utc"}},"type":"object","required":["name","path","kind"],"title":"FileEntry"},"FileReadResponse":{"properties":{"path":{"type":"string","title":"Path"},"encoding":{"type":"string","title":"Encoding"},"content":{"type":"string","title":"Content"},"start_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Line"},"end_line":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Line"},"total_lines":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Lines"}},"type":"object","required":["path","encoding","content"],"title":"FileReadResponse"},"FileSearchResponse":{"properties":{"pattern":{"type":"string","title":"Pattern"},"root_path":{"type":"string","title":"Root Path"},"matches":{"items":{"type":"object"},"type":"array","title":"Matches"}},"type":"object","required":["pattern","root_path","matches"],"title":"FileSearchResponse"},"FileTreeResponse":{"properties":{"path":{"type":"string","title":"Path"},"entries":{"items":{"$ref":"#/components/schemas/FileEntry"},"type":"array","title":"Entries"}},"type":"object","required":["path","entries"],"title":"FileTreeResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"timestamp_utc":{"type":"string","title":"Timestamp Utc"},"workspace":{"type":"string","title":"Workspace"}},"type":"object","required":["status","timestamp_utc","workspace"],"title":"HealthResponse"},"InfraReadResponse":{"properties":{"path":{"type":"string","title":"Path"},"content":{"type":"string","title":"Content"}},"type":"object","required":["path","content"],"title":"InfraReadResponse"},"PythonExecRequest":{"properties":{"interpreter":{"type":"string","enum":["workspace/.venv/bin/python3","workspace/venv/bin/python3","system"],"title":"Interpreter","default":"workspace/.venv/bin/python3"},"cwd":{"type":"string","title":"Cwd","default":"."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"script_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Script Path"},"argv":{"items":{"type":"string"},"type":"array","title":"Argv"},"env":{"type":"object","title":"Env"},"timeout_seconds":{"type":"integer","maximum":300.0,"minimum":1.0,"title":"Timeout Seconds","default":60}},"type":"object","title":"PythonExecRequest"},"PythonExecResponse":{"properties":{"interpreter":{"type":"string","title":"Interpreter"},"cwd":{"type":"string","title":"Cwd"},"exit_code":{"type":"integer","title":"Exit Code"},"stdout":{"type":"string","title":"Stdout"},"stderr":{"type":"string","title":"Stderr"},"resolved_command":{"items":{"type":"string"},"type":"array","title":"Resolved Command"}},"type":"object","required":["interpreter","cwd","exit_code","stdout","stderr","resolved_command"],"title":"PythonExecResponse"},"ServiceControlRequest":{"properties":{"service_name":{"type":"string","title":"Service Name"},"action":{"type":"string","enum":["start","stop","restart","status","logs"],"title":"Action"},"tail_lines":{"type":"integer","maximum":500.0,"minimum":1.0,"title":"Tail Lines","default":200}},"type":"object","required":["service_name","action"],"title":"ServiceControlRequest"},"ServiceControlResponse":{"properties":{"service_name":{"type":"string","title":"Service Name"},"action":{"type":"string","title":"Action"},"ok":{"type":"boolean","title":"Ok"},"returncode":{"type":"integer","title":"Returncode"},"stdout":{"type":"string","title":"Stdout"},"stderr":{"type":"string","title":"Stderr"}},"type":"object","required":["service_name","action","ok","returncode","stdout","stderr"],"title":"ServiceControlResponse"},"ServiceInspectRequest":{"properties":{"service_name":{"type":"string","title":"Service Name"},"tail_lines":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Tail Lines","default":200},"include_unit":{"type":"boolean","title":"Include Unit","default":true},"include_environment":{"type":"boolean","title":"Include Environment","default":true},"include_journal":{"type":"boolean","title":"Include Journal","default":true},"restart_and_wait":{"type":"boolean","title":"Restart And Wait","default":false},"wait_seconds":{"type":"integer","maximum":120.0,"minimum":0.0,"title":"Wait Seconds","default":8}},"type":"object","required":["service_name"],"title":"ServiceInspectRequest"},"ServiceInspectResponse":{"properties":{"service_name":{"type":"string","title":"Service Name"},"ok":{"type":"boolean","title":"Ok"},"active_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active State"},"sub_state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sub State"},"main_pid":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Main Pid"},"exec_start":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exec Start"},"working_directory":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Working Directory"},"fragment_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fragment Path"},"unit_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unit Text"},"environment":{"type":"object","title":"Environment"},"journal_tail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Journal Tail"},"last_exit_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Exit Code"},"last_exit_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Exit Status"},"restart_attempted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Restart Attempted"}},"type":"object","required":["service_name","ok"],"title":"ServiceInspectResponse"},"ServicesStatusResponse":{"properties":{"services":{"additionalProperties":{"type":"object"},"type":"object","title":"Services"}},"type":"object","required":["services"],"title":"ServicesStatusResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WorkerControlRequest":{"properties":{"account_id":{"type":"integer","minimum":1.0,"title":"Account Id"},"action":{"type":"string","enum":["shadowStart","shadowStop","status"],"title":"Action"}},"type":"object","required":["account_id","action"],"title":"WorkerControlRequest"},"WorkerControlResponse":{"properties":{"account_id":{"type":"integer","title":"Account Id"},"action":{"type":"string","title":"Action"},"ok":{"type":"boolean","title":"Ok"},"result":{"type":"object","title":"Result"}},"type":"object","required":["account_id","action","ok","result"],"title":"WorkerControlResponse"},"WorkersStatusResponse":{"properties":{"workers":{"items":{"type":"object"},"type":"array","title":"Workers"}},"type":"object","required":["workers"],"title":"WorkersStatusResponse"},"WorkspaceContextResponse":{"properties":{"workspace":{"type":"string","title":"Workspace"},"git_branch":{"type":"string","title":"Git Branch"},"git_status_short":{"items":{"type":"string"},"type":"array","title":"Git Status Short"},"top_level_dirs":{"items":{"type":"string"},"type":"array","title":"Top Level Dirs"},"top_level_files":{"items":{"type":"string"},"type":"array","title":"Top Level Files"}},"type":"object","required":["workspace","git_branch","git_status_short","top_level_dirs","top_level_files"],"title":"WorkspaceContextResponse"}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}