{"info":{"title":"ahfact","version":"c0ef43f702a3470ee713476af231947c410e572c","description":"Everything the factory does, as REST. Every operation is a POST with a JSON body, at the procedure's path under /api; it's the same procedure the oRPC protocol serves at /rpc, which the TypeScript SDK (`@astrohacker/factory`) calls.\n\nAuthenticate with a token as `Authorization: Bearer …`: a person's CLI token (`ahu_…`), a worker's (`ahf_…`) or a session's (`aha_…`). The browser's session cookie works too, with the `x-ahfact-client` header on every call. A few procedures need no credentials (signing in starts from none), and those marked browser only refuse every token.\n\nThe GitHub Actions deploy token is limited to reserving and reporting ahfact's production deploy and recovering an ended workflow attempt.\n\nTimes are ISO 8601 strings. An error is `{ defined, code, status, message, data }` with the code's HTTP status. The version is the commit the server runs."},"components":{"securitySchemes":{"token":{"type":"http","scheme":"bearer","description":"A person's CLI token, a worker's or a session's."},"cookie":{"type":"apiKey","in":"cookie","name":"ahfact_session","description":"The browser's session, with the `x-ahfact-client` header."}}},"security":[{"token":[]},{"cookie":[]}],"openapi":"3.1.1","paths":{"/auth/me":{"post":{"operationId":"auth.me","summary":"The signed-in person","tags":["auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","email","name","picture"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/auth/logout":{"post":{"operationId":"auth.logout","summary":"Revoke this CLI token","tags":["auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/auth/signIn":{"post":{"operationId":"auth.signIn","summary":"What sign-in still lacks","tags":["auth"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"missing":{"type":"array","items":{"type":"string"}}},"required":["missing"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/account/sessions":{"post":{"operationId":"account.sessions","summary":"List active browser sessions","tags":["account"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"userAgent":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"current":{"type":"boolean"}},"required":["id","userAgent","createdAt","lastSeenAt","current"],"additionalProperties":{}}}},"required":["sessions"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/account/signOutSession":{"post":{"operationId":"account.signOutSession","summary":"Sign out a browser session","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","format":"uuid"}},"required":["sessionId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/account/signOutOtherSessions":{"post":{"operationId":"account.signOutOtherSessions","summary":"Sign out every other browser session","tags":["account"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/account/cliSignIns":{"post":{"operationId":"account.cliSignIns","summary":"The person's CLI sign-ins","tags":["account"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"signIns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"machine":{"type":"string"},"signedInAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastUsedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","machine","signedInAt","lastUsedAt"],"additionalProperties":{}}}},"required":["signIns"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/account/signOutCli":{"post":{"operationId":"account.signOutCli","summary":"Sign a computer's CLI out","tags":["account"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tokenId":{"type":"string","format":"uuid"}},"required":["tokenId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"machine":{"type":"string"}},"required":["machine"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/waitlist/list":{"post":{"operationId":"waitlist.list","summary":"The waitlist","tags":["waitlist"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string"},"name":{"type":"string"},"firstSeenAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastSeenAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["email","name","firstSeenAt","lastSeenAt"],"additionalProperties":{}}}},"required":["entries"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/device/start":{"post":{"operationId":"device.start","summary":"Start a CLI sign-in","tags":["device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"machine":{"type":"string","minLength":1,"maxLength":32},"computerId":{"type":"string","pattern":"^[A-Za-z0-9-]{8,64}$"}},"required":["machine"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"interval":{"type":"number"}},"required":["deviceCode","userCode","verificationUrl","expiresAt","interval"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"412":{"description":"412","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PRECONDITION_FAILED"},"status":{"const":412},"message":{"type":"string","default":"Precondition Failed"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/device/poll":{"post":{"operationId":"device.poll","summary":"Poll a CLI sign-in","tags":["device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":100}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","denied","expired","collected"],"type":"string"}},"required":["status"],"additionalProperties":{}},{"type":"object","properties":{"status":{"const":"approved"},"token":{"type":"string"},"email":{"type":"string"}},"required":["status","token","email"],"additionalProperties":{}}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/device/view":{"post":{"operationId":"device.view","summary":"View a CLI sign-in","tags":["device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":20}},"required":["userCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"userCode":{"type":"string"},"machine":{"type":"string"},"status":{"enum":["pending","approved","denied","expired","collected","refused"],"type":"string"}},"required":["userCode","machine","status"],"additionalProperties":{}},{"type":"null"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/device/approve":{"post":{"operationId":"device.approve","summary":"Approve a CLI sign-in","tags":["device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":20}},"required":["userCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"machine":{"type":"string"}},"required":["machine"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/device/deny":{"post":{"operationId":"device.deny","summary":"Deny a CLI sign-in","tags":["device"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":20}},"required":["userCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/confirm/start":{"post":{"operationId":"confirm.start","summary":"Start a browser confirmation","tags":["confirm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"action":{"const":"leases.revoke"},"input":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"leases.handoff"},"input":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"to":{"type":"string","minLength":1,"maxLength":200}},"required":["leaseId","to"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"workers.start"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["project","harness","machine"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"workers.rename"},"input":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["workerId","name"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"workers.revoke"},"input":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"}},"required":["workerId"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"agents.start"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"role":{"type":"string","minLength":1,"maxLength":32},"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32}},"required":["project","role","harness","machine"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"projects.pause"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"reason":{"type":"string","maxLength":1000,"default":""}},"required":["project"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"projects.resume"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}}},"required":["project"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"deploys.hold"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"reason":{"type":"string","maxLength":1000,"default":""}},"required":["project"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"deploys.resume"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"machine":{"type":"string","minLength":1,"maxLength":32}},"required":["project"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"releases.hold"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"reason":{"type":"string","maxLength":1000,"default":""}},"required":["project"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"releases.resumeAuto"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}}},"required":["project"]}},"required":["action","input"]},{"type":"object","properties":{"action":{"const":"reviews.continue"},"input":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"pullRequest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"note":{"type":"string","maxLength":4000,"default":""}},"required":["project","pullRequest"]}},"required":["action","input"]}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationUrl":{"type":"string"},"summary":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"interval":{"type":"number"}},"required":["deviceCode","userCode","verificationUrl","summary","expiresAt","interval"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"412":{"description":"412","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"PRECONDITION_FAILED"},"status":{"const":412},"message":{"type":"string","default":"Precondition Failed"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/confirm/poll":{"post":{"operationId":"confirm.poll","summary":"Poll a browser confirmation","tags":["confirm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":100}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"enum":["pending","approved","denied","used","expired"],"type":"string"}},"required":["status"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/confirm/view":{"post":{"operationId":"confirm.view","summary":"View a browser confirmation","tags":["confirm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":20}},"required":["userCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"kind":{"enum":["action","registration"],"type":"string"},"userCode":{"type":"string"},"action":{"type":"string"},"title":{"type":"string"},"command":{"type":"string"},"summary":{"type":"string"},"facts":{"type":"array","items":{"type":"array","prefixItems":[{"type":"string"},{"type":"string"}]}},"requestedBy":{"type":"string"},"status":{"enum":["pending","approved","denied","used","expired"],"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","userCode","action","title","command","summary","facts","requestedBy","status","expiresAt"],"additionalProperties":{}},{"type":"null"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/confirm/approve":{"post":{"operationId":"confirm.approve","summary":"Approve a browser confirmation","tags":["confirm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":20}},"required":["userCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string"}},"required":["summary"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/confirm/deny":{"post":{"operationId":"confirm.deny","summary":"Deny a browser confirmation","tags":["confirm"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"userCode":{"type":"string","minLength":1,"maxLength":20}},"required":["userCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/register/start":{"post":{"operationId":"register.start","summary":"Start a session's registration","tags":["register"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"role":{"type":"string","minLength":1,"maxLength":32},"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["project","role","harness","machine"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationUrl":{"type":"string"},"summary":{"type":"string"},"name":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"interval":{"type":"number"}},"required":["deviceCode","userCode","verificationUrl","summary","name","expiresAt","interval"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/register/project":{"post":{"operationId":"register.project","summary":"Start a project's registration","tags":["register"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":100},"machine":{"type":"string","minLength":1,"maxLength":32},"session":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":32},"harness":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":64}},"required":["role","harness"]}},"required":["repo","machine"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string"},"userCode":{"type":"string"},"verificationUrl":{"type":"string"},"summary":{"type":"string"},"name":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"interval":{"type":"number"}},"required":["deviceCode","userCode","verificationUrl","summary","name","expiresAt","interval"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/register/pollProject":{"post":{"operationId":"register.pollProject","summary":"Poll a project's registration","tags":["register"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":100}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","denied","expired","used"],"type":"string"}},"required":["status"],"additionalProperties":{}},{"type":"object","properties":{"status":{"const":"approved"},"project":{"type":"object","properties":{"repo":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"}},"required":["repo","slug","name"],"additionalProperties":{}},"session":{"anyOf":[{"type":"object","properties":{"token":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"harness":{"type":"string"},"machine":{"type":"string"}},"required":["token","name","role","harness","machine"],"additionalProperties":{}},{"type":"null"}]}},"required":["status","project","session"],"additionalProperties":{}}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/register/poll":{"post":{"operationId":"register.poll","summary":"Poll a session's registration","tags":["register"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":1,"maxLength":100}},"required":["deviceCode"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"status":{"enum":["pending","denied","expired","used"],"type":"string"}},"required":["status"],"additionalProperties":{}},{"type":"object","properties":{"status":{"const":"approved"},"token":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"repo":{"type":"string"},"harness":{"type":"string"},"machine":{"type":"string"}},"required":["status","token","name","role","repo","harness","machine"],"additionalProperties":{}}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/lastOpened":{"post":{"operationId":"projects.lastOpened","summary":"The person's last project","tags":["projects"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["project"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/remember":{"post":{"operationId":"projects.remember","summary":"Remember the selected project","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/navigation":{"post":{"operationId":"projects.navigation","summary":"Project sidebar summaries","tags":["projects"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"online":{"type":"number"},"workers":{"type":"number"},"needs":{"type":"array","items":{"type":"string"}},"held":{"type":"boolean"}},"required":["slug","name","repo","online","workers","needs","held"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/list":{"post":{"operationId":"projects.list","summary":"List projects","tags":["projects"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/add":{"post":{"operationId":"projects.add","summary":"Register a project","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":100}},"required":["repo"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/get":{"post":{"operationId":"projects.get","summary":"Get a project","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/pause":{"post":{"operationId":"projects.pause","summary":"Pause a project","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"reason":{"type":"string","maxLength":1000,"default":""},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/projects/resume":{"post":{"operationId":"projects.resume","summary":"Resume a project","tags":["projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/history":{"post":{"operationId":"deploys.history","summary":"Deploy history","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"limit":{"type":"integer","minimum":1,"maximum":200,"default":20}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"held":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time","x-native-type":"date"},"by":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"guardHold":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"id":{"type":"string"},"findings":{"type":"object","properties":{"runningCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"resources":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":1024},"previousAddress":{"type":"string","minLength":1,"maxLength":1024},"deposed":{"type":"string","minLength":1,"maxLength":64},"actions":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","pattern":"^[a-z-]{1,32}$"}}},"required":["address","actions"],"additionalProperties":{}}},"migrations":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"file":{"type":"string","maxLength":500},"line":{"type":"integer","minimum":-9007199254740991,"maximum":1000000,"exclusiveMinimum":0},"keyword":{"type":"string","maxLength":128,"pattern":"^(?:[A-Z]{2,8}|\\$[A-Z0-9_]*\\$)$"}},"required":["file","line","keyword"],"additionalProperties":{}}}},"required":["runningCommit","resources","migrations"],"additionalProperties":{}}},"required":["commit","fingerprint","id","findings"],"additionalProperties":{}},{"type":"null"}]}},"required":["at","by","reason"],"additionalProperties":{}},{"type":"null"}]},"machine":{"anyOf":[{"type":"string"},{"type":"null"}]},"main":{"type":"object","properties":{"branch":{"anyOf":[{"type":"string"},{"type":"null"}]},"sha":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["branch","sha"],"additionalProperties":{}},"deployed":{"anyOf":[{"type":"string"},{"type":"null"}]},"deploys":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"jobId":{"type":"string"},"leaseId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"type":"string"},"commit":{"type":"string"},"outcome":{"type":"string"},"message":{"type":"string"},"tail":{"type":"string"},"guardHold":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"id":{"type":"string"},"findings":{"type":"object","properties":{"runningCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"resources":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":1024},"previousAddress":{"type":"string","minLength":1,"maxLength":1024},"deposed":{"type":"string","minLength":1,"maxLength":64},"actions":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","pattern":"^[a-z-]{1,32}$"}}},"required":["address","actions"],"additionalProperties":{}}},"migrations":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"file":{"type":"string","maxLength":500},"line":{"type":"integer","minimum":-9007199254740991,"maximum":1000000,"exclusiveMinimum":0},"keyword":{"type":"string","maxLength":128,"pattern":"^(?:[A-Z]{2,8}|\\$[A-Z0-9_]*\\$)$"}},"required":["file","line","keyword"],"additionalProperties":{}}}},"required":["runningCommit","resources","migrations"],"additionalProperties":{}}},"required":["commit","fingerprint","id","findings"],"additionalProperties":{}},{"type":"null"}]},"approval":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"holdId":{"type":"string"},"by":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"},"usedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["commit","fingerprint","holdId","by","at","usedAt"],"additionalProperties":{}},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","jobId","leaseId","agent","commit","outcome","message","tail","createdAt"],"additionalProperties":{}}}},"required":["project","held","machine","main","deployed","deploys"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/hold":{"post":{"operationId":"deploys.hold","summary":"Hold deploys","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"reason":{"type":"string","maxLength":1000,"default":""},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/resume":{"post":{"operationId":"deploys.resume","summary":"Resume deploys","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"machine":{"type":"string","minLength":1,"maxLength":32},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}},"deploy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"const":"create"},"commit":{"type":"string"},"jobId":{"type":"string"}},"required":["type","commit","jobId"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"supersede"},"commit":{"type":"string"},"jobId":{"type":"string"},"previous":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","commit","jobId","previous"],"additionalProperties":{}}]},{"type":"null"}]}},"required":["project","deploy"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/approve":{"post":{"operationId":"deploys.approve","summary":"Approve a held deploy","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"holdId":{"type":"string","format":"uuid"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["project","holdId","fingerprint"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}},"approval":{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"holdId":{"type":"string"},"by":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"},"usedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["commit","fingerprint","holdId","by","at","usedAt"],"additionalProperties":{}}},"required":["job","approval"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/actionsBegin":{"post":{"operationId":"deploys.actionsBegin","summary":"Reserve a GitHub Actions deploy","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"type":"object","properties":{"commit":{"type":"string"},"approval":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["commit","fingerprint"],"additionalProperties":{}},{"type":"null"}]},"compareWith":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["commit","approval","compareWith"],"additionalProperties":{}},{"type":"object","properties":{"running":{"type":"string"}},"required":["running"],"additionalProperties":{}}]},{"type":"null"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/actionsRecover":{"post":{"operationId":"deploys.actionsRecover","summary":"Recover an ended GitHub Actions deploy","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"completedRun":{"type":"string","pattern":"^\\d{1,20}\\/\\d{1,6}$"}},"required":["completedRun"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"recovered":{"type":"boolean"}},"required":["recovered"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/deploys/actionsFinish":{"post":{"operationId":"deploys.actionsFinish","summary":"Record a GitHub Actions deploy outcome","tags":["deploys"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"message":{"type":"string","maxLength":1000,"default":""},"tail":{"type":"string","maxLength":8000},"findings":{"type":"object","properties":{"runningCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"resources":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":1024},"previousAddress":{"type":"string","minLength":1,"maxLength":1024},"deposed":{"type":"string","minLength":1,"maxLength":64},"actions":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","pattern":"^[a-z-]{1,32}$"}}},"required":["address","actions"]}},"migrations":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"file":{"type":"string","maxLength":500},"line":{"type":"integer","minimum":-9007199254740991,"maximum":1000000,"exclusiveMinimum":0},"keyword":{"type":"string","maxLength":128,"pattern":"^(?:[A-Z]{2,8}|\\$[A-Z0-9_]*\\$)$"}},"required":["file","line","keyword"]}}},"required":["runningCommit","resources","migrations"]},"outcome":{"enum":["deployed","failed","held","skipped"],"type":"string"}},"required":["commit","outcome"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["deployed","failed","held","skipped"],"type":"string"},"commit":{"type":"string"},"held":{"type":"boolean"}},"required":["outcome","commit","held"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/releases/create":{"post":{"operationId":"releases.create","summary":"File a release","tags":["releases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"version":{"type":"string","minLength":5,"maxLength":40},"notes":{"type":"string","maxLength":20000,"default":""},"requirements":{"type":"object","properties":{"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32}},"default":{}}},"required":["project","version"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"release":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"version":{"type":"string"},"notes":{"type":"string"},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"jobId":{"type":"string"},"state":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","projectId","version","notes","issue","jobId","state","commit","agent","message","createdBy","createdAt","finishedAt"],"additionalProperties":{}},"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}}},"required":["release","job"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/releases/history":{"post":{"operationId":"releases.history","summary":"Release history","tags":["releases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"limit":{"type":"integer","minimum":1,"maximum":200,"default":20}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"deployed":{"anyOf":[{"type":"string"},{"type":"null"}]},"automatic":{"type":"object","properties":{"held":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"by":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["at","by","reason"],"additionalProperties":{}},{"type":"null"}]},"paths":{"type":"array","items":{"type":"string"}},"unavailable":{"anyOf":[{"type":"string"},{"type":"null"}]},"base":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"readError":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"kind":{"enum":["failed","missing","moved"],"type":"string"},"error":{"type":"string"},"worker":{"type":"string"},"at":{"type":"string"}},"required":["base","head","kind","error","worker","at"],"additionalProperties":{}},{"type":"null"}]}},"required":["held","paths","unavailable","base","changes","readError"],"additionalProperties":{}},"releases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"version":{"type":"string"},"notes":{"type":"string"},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"jobId":{"type":"string"},"state":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"finishedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"job":{"type":"object","properties":{"id":{"type":"string"},"state":{"type":"string"},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","state","pullRequest"],"additionalProperties":{}}},"required":["id","projectId","version","notes","issue","jobId","state","commit","agent","message","createdBy","createdAt","finishedAt","job"],"additionalProperties":{}}}},"required":["project","deployed","releases"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/releases/resume":{"post":{"operationId":"releases.resume","summary":"Resume a held release","tags":["releases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"version":{"type":"string","minLength":5,"maxLength":40}},"required":["project","version"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"agent":{"type":"string"}},"required":["version","agent"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/releases/hold":{"post":{"operationId":"releases.hold","summary":"Hold automatic releases","tags":["releases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"reason":{"type":"string","maxLength":1000,"default":""},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/releases/resumeAuto":{"post":{"operationId":"releases.resumeAuto","summary":"Resume automatic releases","tags":["releases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"syncHolder":{"anyOf":[{"type":"string"},{"type":"null"}]},"syncUntil":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"fullSyncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pausedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"defaultBranch":{"anyOf":[{"type":"string"},{"type":"null"}]},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployedSha":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"deployHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHeldAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"releaseHeldBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releaseHoldReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasePaths":{"type":"array","items":{"type":"string"}},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"roles":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"rolesError":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","name","repo","createdAt","syncedAt","syncHolder","syncUntil","fullSyncedAt","pausedAt","pausedBy","pauseReason","defaultBranch","mainSha","deployedSha","deployHeldAt","deployHeldBy","deployHoldReason","deployMachine","roles","rolesError"],"additionalProperties":{}},"release":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"jobId":{"type":"string"}},"required":["version","jobId"],"additionalProperties":{}},{"type":"null"}]}},"required":["project","release"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/workers/list":{"post":{"operationId":"workers.list","summary":"List workers","tags":["workers"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"projectSlug":{"type":"string"},"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}},"harness":{"type":"string"},"machine":{"type":"string"},"approvedBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastPolledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"revokedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","projectId","projectSlug","name","previousNames","harness","machine","approvedBy","createdAt","lastSeenAt","lastPolledAt","revokedAt"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/workers/start":{"post":{"operationId":"workers.start","summary":"Start a worker","tags":["workers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32},"name":{"type":"string","minLength":1,"maxLength":64},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project","harness","machine"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"string"},"token":{"type":"string"}},"required":["worker","token"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/workers/rename":{"post":{"operationId":"workers.rename","summary":"Rename a worker","tags":["workers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":64},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["workerId","name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"worker":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}}},"required":["worker","previousNames"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/workers/revoke":{"post":{"operationId":"workers.revoke","summary":"Revoke a worker","tags":["workers"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workerId":{"type":"string","format":"uuid"},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["workerId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agents/list":{"post":{"operationId":"agents.list","summary":"List agents","tags":["agents"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}}},"default":{}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked"],"type":"string"},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"cliBehind":{"type":"boolean"}},"required":["id","name","previousNames","kind","role","project","machine","harness","parent","lease","job","approvedBy","createdAt","lastSeenAt","presence","cliVersion","cliBehind"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agents/start":{"post":{"operationId":"agents.start","summary":"Start a session","tags":["agents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"role":{"type":"string","minLength":1,"maxLength":32},"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project","role","harness","machine"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string"},"role":{"type":"string"},"token":{"type":"string"}},"required":["agent","role","token"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/whoami":{"post":{"operationId":"agent.whoami","summary":"The session's identity","tags":["agent"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}},"role":{"type":"string"},"harness":{"type":"string"},"machine":{"type":"string"},"approvedBy":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"repo":{"type":"string"}},"required":["id","slug","repo"],"additionalProperties":{}}},"required":["id","name","previousNames","role","harness","machine","approvedBy","project"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/recordPost":{"post":{"operationId":"agent.recordPost","summary":"Record a session's post","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["filed","commented"],"type":"string"},"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"url":{"type":"string","maxLength":300,"format":"uri"},"title":{"type":"string","maxLength":500},"agent":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","target","number","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"actor":{"type":"string"}},"required":["ok","actor"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/send":{"post":{"operationId":"agent.send","summary":"Send a message as the session","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["to","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/reply":{"post":{"operationId":"agent.reply","summary":"Reply as the session","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["messageId","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/startReply":{"post":{"operationId":"agent.startReply","summary":"Start a reply as the session","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"status":{"type":"string","maxLength":200}},"required":["messageId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"number"},"startedAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["messageId","startedAt","expiresAt","status"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/ackMessage":{"post":{"operationId":"agent.ackMessage","summary":"Acknowledge a session's message","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"required":["messageId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"ackedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt","ackedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/wait":{"post":{"operationId":"agent.wait","summary":"Wait for the session's messages","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":55,"default":0},"threads":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"inbox":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"enum":["expired","released","escalated","needs-human","loop","stalled","deploy-failed","deploy-held","release-signin","release-approval","release-held","release-failed"],"type":"string"},"project":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","project","subject","message","url","actor","createdAt"],"additionalProperties":{}}},"posts":{"type":"array","items":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}}},"required":["messages","inbox"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/agent/waitStream":{"post":{"operationId":"agent.waitStream","summary":"Stream the session's messages","tags":["agent"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000},"wait":{"type":"integer","minimum":0,"maximum":55},"threads":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"message"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["type","message"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"post"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["type","post"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"inbox"},"item":{"type":"object","properties":{"id":{"type":"number"},"kind":{"enum":["expired","released","escalated","needs-human","loop","stalled","deploy-failed","deploy-held","release-signin","release-approval","release-held","release-failed"],"type":"string"},"project":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","project","subject","message","url","actor","createdAt"],"additionalProperties":{}}},"required":["type","item"],"additionalProperties":{}}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ended":{"enum":["drain","limit","wait"],"type":"string"}},"required":["ended"],"additionalProperties":{}},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/board":{"post":{"operationId":"board","summary":"The factory board","tags":["board"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":32},"repo":{"type":"string","minLength":3,"maxLength":200}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"projects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"release":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["version","at"],"additionalProperties":{}},{"type":"null"}]},"nextRelease":{"type":"string"},"releaseFailed":{"anyOf":[{"type":"object","properties":{"jobId":{"type":"string"},"version":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"},"tail":{"type":"string"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["jobId","version","commit","message","tail","agent","at"],"additionalProperties":{}},{"type":"null"}]},"paused":{"anyOf":[{"type":"object","properties":{"at":{"type":"string","format":"date-time","x-native-type":"date"},"by":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["at","by","reason"],"additionalProperties":{}},{"type":"null"}]},"releases":{"type":"object","properties":{"held":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"by":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["at","by","reason"],"additionalProperties":{}},{"type":"null"}]},"hook":{"type":"boolean"},"paths":{"type":"array","items":{"type":"string"}},"unavailable":{"anyOf":[{"type":"string"},{"type":"null"}]},"base":{"anyOf":[{"type":"string"},{"type":"null"}]},"changes":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"changed":{"type":"boolean"},"pullRequests":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"}},"required":["number","title","url"],"additionalProperties":{}}},"checkedAt":{"type":"string"}},"required":["base","head","changed","pullRequests","checkedAt"],"additionalProperties":{}},{"type":"null"}]},"readError":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"},"kind":{"enum":["failed","missing","moved"],"type":"string"},"error":{"type":"string"},"worker":{"type":"string"},"at":{"type":"string"}},"required":["base","head","kind","error","worker","at"],"additionalProperties":{}},{"type":"null"}]}},"required":["held","hook","paths","unavailable","base","changes"],"additionalProperties":{}},"deploys":{"type":"object","properties":{"held":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"by":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["at","by","reason"],"additionalProperties":{}},{"type":"null"}]},"hook":{"type":"boolean"},"deployed":{"anyOf":[{"type":"string"},{"type":"null"}]},"main":{"anyOf":[{"type":"string"},{"type":"null"}]},"machine":{"anyOf":[{"type":"string"},{"type":"null"}]},"machines":{"type":"array","items":{"type":"string"}},"last":{"anyOf":[{"type":"object","properties":{"jobId":{"type":"string"},"commit":{"type":"string"},"outcome":{"type":"string"},"message":{"type":"string"},"tail":{"type":"string"},"agent":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["jobId","commit","outcome","message","tail","agent","at"],"additionalProperties":{}},{"type":"null"}]},"guardHold":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"},"id":{"type":"string"},"findings":{"type":"object","properties":{"runningCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"resources":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":1024},"previousAddress":{"type":"string","minLength":1,"maxLength":1024},"deposed":{"type":"string","minLength":1,"maxLength":64},"actions":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","pattern":"^[a-z-]{1,32}$"}}},"required":["address","actions"],"additionalProperties":{}}},"migrations":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"file":{"type":"string","maxLength":500},"line":{"type":"integer","minimum":-9007199254740991,"maximum":1000000,"exclusiveMinimum":0},"keyword":{"type":"string","maxLength":128,"pattern":"^(?:[A-Z]{2,8}|\\$[A-Z0-9_]*\\$)$"}},"required":["file","line","keyword"],"additionalProperties":{}}}},"required":["runningCommit","resources","migrations"],"additionalProperties":{}}},"required":["commit","fingerprint","id","findings"],"additionalProperties":{}},{"type":"null"}]}},"required":["held","hook","deployed","main","machine","machines","last"],"additionalProperties":{}},"roles":{"type":"object","properties":{"declared":{"anyOf":[{"type":"object","propertyNames":{"enum":["issues","chat","foreman","worker","code","review","deploy","release","triage"],"type":"string"},"additionalProperties":{"type":"object","properties":{"file":{"type":"string"},"checklists":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string"},"paths":{"type":"array","items":{"type":"string"}}},"required":["skill","paths"],"additionalProperties":{}}},"tools":{"type":"array","items":{"type":"string"}},"requires":{"type":"object","properties":{"machine":{"type":"string"},"harness":{"type":"string"}},"additionalProperties":{}},"hooks":{"type":"array","items":{"enum":["setup","check","deploy","release"],"type":"string"}}},"required":["tools","requires","hooks"],"additionalProperties":{}}},{"type":"null"}]},"error":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"type":"array","items":{"type":"string"}}},"required":["declared","error","notes"],"additionalProperties":{}},"workers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"harness":{"type":"string"},"machine":{"type":"string"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"lastPolledAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked"],"type":"string"},"stalled":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["not-polling","event","quiet-lease"],"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"message":{"type":"string"}},"required":["kind","subject","message"],"additionalProperties":{}}},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"cliBehind":{"type":"boolean"}},"required":["id","name","harness","machine","lastSeenAt","lastPolledAt","presence","stalled","cliVersion","cliBehind"],"additionalProperties":{}}},"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked"],"type":"string"},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"cliBehind":{"type":"boolean"}},"required":["id","name","previousNames","kind","role","project","machine","harness","parent","lease","job","approvedBy","createdAt","lastSeenAt","presence","cliVersion","cliBehind"],"additionalProperties":{}}},"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"enum":["running","paused","expired","ended"],"type":"string"}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn","state"],"additionalProperties":{}},{"type":"null"}]},"waitingFor":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployRun":{"anyOf":[{"type":"string"},{"type":"null"}]},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","lease","waitingFor","kind"],"additionalProperties":{}}},"waiting":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"},"reason":{"type":"string"}},"required":["number","title","url","reason"],"additionalProperties":{}}},"unroutable":{"type":"array","items":{"type":"object","properties":{"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"type":"string"}},"required":["jobId","role","subject","title","url","reason"],"additionalProperties":{}}},"needsHuman":{"type":"array","items":{"type":"object","properties":{"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"},"released":{"anyOf":[{"type":"object","properties":{"agent":{"type":"string"},"reason":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["agent","reason","at"],"additionalProperties":{}},{"type":"null"}]}},"required":["target","number","title","url"],"additionalProperties":{}}},"questions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"enum":["ask","block"],"type":"string"},"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"url":{"type":"string"},"body":{"type":"string"},"asker":{"type":"string"},"leaseId":{"type":"string"},"jobId":{"type":"string"},"askedAt":{"type":"string","format":"date-time","x-native-type":"date"},"needs":{"anyOf":[{"enum":["release"],"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]},"postId":{"anyOf":[{"type":"number"},{"type":"null"}]},"filed":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","target","number","url","body","asker","leaseId","jobId","askedAt","needs","version","postId"],"additionalProperties":{}}},"approvals":{"type":"array","items":{"type":"object","properties":{"jobId":{"type":"string"},"url":{"type":"string"},"accepted":{"type":"boolean"}},"required":["jobId","url","accepted"],"additionalProperties":{}}},"verdicts":{"type":"array","items":{"type":"object","properties":{"jobId":{"type":"string"},"round":{"type":"number"},"verdict":{"type":"string"},"commit":{"type":"string"},"agent":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["jobId","round","verdict","commit","agent","at"],"additionalProperties":{}}},"threadQuestions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"threadVerdicts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}}},"required":["id","slug","name","repo","syncedAt","release","nextRelease","releaseFailed","paused","releases","deploys","roles","workers","agents","jobs","waiting","unroutable","needsHuman","questions","approvals","verdicts","threadQuestions","threadVerdicts"],"additionalProperties":{}}},"confirmations":{"type":"array","items":{"type":"object","properties":{"kind":{"enum":["action","registration"],"type":"string"},"project":{"anyOf":[{"type":"string"},{"type":"null"}]},"userCode":{"type":"string"},"summary":{"type":"string"},"requestedBy":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","userCode","summary","requestedBy","expiresAt"],"additionalProperties":{}}},"recent":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"project":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"state":{"type":"string"},"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"milestone":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","message","actor","createdAt"],"additionalProperties":{}},{"type":"null"}]},"step":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","message","actor","createdAt"],"additionalProperties":{}},{"type":"null"}]},"changedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","role","subject","title","state","holder","milestone","step","changedAt"],"additionalProperties":{}}},"latestCli":{"anyOf":[{"type":"string"},{"type":"null"}]},"dismissed":{"type":"array","items":{"type":"string"}},"now":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["projects","confirmations","recent","latestCli","dismissed","now"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/badges":{"post":{"operationId":"badges","summary":"The top bar's counts","tags":["badges"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"needs":{"type":"number"},"dismissible":{"type":"array","items":{"type":"string"}},"unread":{"type":"number"}},"required":["needs","dismissible","unread"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/needs/dismiss":{"post":{"operationId":"needs.dismiss","summary":"Dismiss a Needs you item","tags":["needs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","maxLength":200,"pattern":"^(deploys|releases|release-failed)-[0-9A-Za-z]"}},"required":["key"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string"}},"required":["key"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/factory/scene":{"post":{"operationId":"factory.scene","summary":"Everything the Floor view draws","tags":["factory"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":32}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"computers":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"harnesses":{"type":"array","items":{"type":"string"}},"roles":{"type":"array","items":{"type":"string"}},"deployMachine":{"type":"boolean"},"sessions":{"type":"array","items":{"type":"string"}}},"required":["name","harnesses","roles","deployMachine","sessions"],"additionalProperties":{}}},"sessions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"cliBehind":{"type":"boolean"},"presence":{"enum":["online","stalled","stale","offline"],"type":"string"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"active":{"type":"boolean"},"stalled":{"type":"array","items":{"type":"string"}}},"required":["id","name","role","project","machine","harness","cliVersion","cliBehind","presence","lastSeenAt","active","stalled"],"additionalProperties":{}}},"subagents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"job":{"type":"object","properties":{"id":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","subject","title","url"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"state":{"enum":["running","paused","expired","ended"],"type":"string"},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","state","waitingOn"],"additionalProperties":{}},"since":{"type":"string","format":"date-time","x-native-type":"date"},"active":{"type":"boolean"},"station":{"enum":["issue","coding","review","passed","merged","deploying","deployed","released"],"type":"string"}},"required":["id","name","parent","role","project","machine","harness","job","lease","since","active","station"],"additionalProperties":{}}},"line":{"type":"array","items":{"type":"object","properties":{"stage":{"enum":["issue","coding","review","passed","merged","deploying","deployed","released"],"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"project":{"type":"string"},"kind":{"enum":["issue","pr","deploy","release"],"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"jobs":{"type":"array","items":{"type":"string"}},"agents":{"type":"array","items":{"type":"string"}},"waitingFor":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["key","project","kind","subject","title","url","issue","pullRequest","jobs","agents","waitingFor","since"],"additionalProperties":{}}}},"required":["stage","items"],"additionalProperties":{}}},"production":{"type":"array","items":{"type":"object","properties":{"project":{"type":"string"},"repo":{"type":"string"},"paused":{"type":"boolean"},"deploys":{"enum":["on","held","off"],"type":"string"},"held":{"anyOf":[{"type":"object","properties":{"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"by":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["at","by","reason"],"additionalProperties":{}},{"type":"null"}]},"machine":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployed":{"anyOf":[{"type":"string"},{"type":"null"}]},"main":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastDeploy":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string"},"outcome":{"type":"string"},"agent":{"type":"string"},"at":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["commit","outcome","agent","at"],"additionalProperties":{}},{"type":"null"}]},"deploying":{"anyOf":[{"type":"object","properties":{"jobId":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["jobId","commit","agent"],"additionalProperties":{}},{"type":"null"}]},"release":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"at":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["version","at"],"additionalProperties":{}},{"type":"null"}]},"releasing":{"anyOf":[{"type":"object","properties":{"jobId":{"type":"string"},"version":{"type":"string"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["jobId","version","agent"],"additionalProperties":{}},{"type":"null"}]}},"required":["project","repo","paused","deploys","held","machine","deployed","main","lastDeploy","deploying","release","releasing"],"additionalProperties":{}}},"needsYou":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"kind":{"type":"string"},"project":{"anyOf":[{"type":"string"},{"type":"null"}]},"summary":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"station":{"anyOf":[{"anyOf":[{"enum":["issue","coding","review","passed","merged","deploying","deployed","released"],"type":"string"},{"const":"production"}]},{"type":"null"}]}},"required":["key","kind","project","summary","url","jobId","agent","station"],"additionalProperties":{}}},"latestCli":{"anyOf":[{"type":"string"},{"type":"null"}]},"now":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["computers","sessions","subagents","line","production","needsYou","latestCli","now"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/factory/flow":{"post":{"operationId":"factory.flow","summary":"Each unit of work's stage history","tags":["factory"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":64},"hours":{"type":"integer","minimum":1,"maximum":168,"default":24}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"since":{"type":"string","format":"date-time","x-native-type":"date"},"now":{"type":"string","format":"date-time","x-native-type":"date"},"stages":{"type":"array","items":{"enum":["filed","blocked","coding","awaiting-review","in-review","changes","waiting-on-you","conflict","merging","merged","deploying","shipped","release","closed"],"type":"string"}},"items":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"project":{"type":"string"},"kind":{"enum":["issue","pr","release"],"type":"string"},"jobId":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"subject":{"type":"string"},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"enum":["filed","blocked","coding","awaiting-review","in-review","changes","waiting-on-you","conflict","merging","merged","deploying","shipped","release","closed"],"type":"string"},"round":{"type":"number"},"holder":{"anyOf":[{"type":"object","properties":{"agent":{"type":"string"},"harness":{"anyOf":[{"type":"string"},{"type":"null"}]},"machine":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["agent","harness","machine"],"additionalProperties":{}},{"type":"null"}]},"transitions":{"type":"array","items":{"type":"object","properties":{"stage":{"enum":["filed","blocked","coding","awaiting-review","in-review","changes","waiting-on-you","conflict","merging","merged","deploying","shipped","release","closed"],"type":"string"},"start":{"type":"string","format":"date-time","x-native-type":"date"},"end":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"holder":{"anyOf":[{"type":"object","properties":{"agent":{"type":"string"},"harness":{"anyOf":[{"type":"string"},{"type":"null"}]},"machine":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["agent","harness","machine"],"additionalProperties":{}},{"type":"null"}]},"cause":{"enum":["filed","hold","lease","ready","verdict","escalation","continue","question","answer","merge","deploy","release","close"],"type":"string"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["stage","start","end","holder","cause","detail"],"additionalProperties":{}}}},"required":["key","project","kind","subject","issue","pullRequest","title","url","stage","round","holder","transitions"],"additionalProperties":{}}},"aggregates":{"type":"object","properties":{"throughput":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"merged":{"type":"number"},"shipped":{"type":"number"},"closed":{"type":"number"}},"required":["day","merged","shipped","closed"],"additionalProperties":{}}},"stages":{"type":"array","items":{"type":"object","properties":{"stage":{"enum":["filed","blocked","coding","awaiting-review","in-review","changes","waiting-on-you","conflict","merging","merged","deploying","shipped","release","closed"],"type":"string"},"count":{"type":"number"},"median":{"anyOf":[{"type":"number"},{"type":"null"}]},"p90":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["stage","count","median","p90"],"additionalProperties":{}}},"wip":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time","x-native-type":"date"},"counts":{"type":"object","propertyNames":{"enum":["filed","blocked","coding","awaiting-review","in-review","changes","waiting-on-you","conflict","merging","merged","deploying","shipped","release","closed"],"type":"string"},"additionalProperties":{"type":"number"}}},"required":["at","counts"],"additionalProperties":{}}}},"required":["throughput","stages","wip"],"additionalProperties":{}}},"required":["since","now","stages","items","aggregates"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/activity/list":{"post":{"operationId":"activity.list","summary":"List activity","tags":["activity"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","maxLength":64},"role":{"type":"string","maxLength":64},"agent":{"type":"string","maxLength":200},"kind":{"type":"string","maxLength":64},"progress":{"type":"boolean","default":false},"before":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"project":{"anyOf":[{"type":"string"},{"type":"null"}]},"jobId":{"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","kind","message","actor","createdAt","project","jobId","role","subject"],"additionalProperties":{}}},"next":{"anyOf":[{"type":"number"},{"type":"null"}]},"now":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["entries","next","now"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/activity/job":{"post":{"operationId":"activity.job","summary":"A job's timeline","tags":["activity"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"project":{"type":"string","minLength":1,"maxLength":32}},"required":["jobId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"enum":["running","paused","expired","ended"],"type":"string"}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn","state"],"additionalProperties":{}},{"type":"null"}]},"kind":{"type":"string"},"project":{"type":"object","properties":{"slug":{"type":"string"},"name":{"type":"string"},"repo":{"type":"string"}},"required":["slug","name","repo"],"additionalProperties":{}}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","lease","kind","project"],"additionalProperties":{}},"leases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"string"},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","agent","acquiredAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}}},"checks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"leaseId":{"type":"string"},"agent":{"type":"string"},"commit":{"type":"string"},"base":{"anyOf":[{"type":"string"},{"type":"null"}]},"ok":{"type":"boolean"},"exitCode":{"anyOf":[{"type":"number"},{"type":"null"}]},"durationMs":{"type":"number"},"summary":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","leaseId","agent","commit","base","ok","exitCode","durationMs","summary","createdAt"],"additionalProperties":{}}},"related":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"state":{"type":"string"}},"required":["id","role","subject","state"],"additionalProperties":{}}},"timeline":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"source":{"enum":["activity","event"],"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"milestone":{"type":"boolean"}},"required":["id","kind","message","actor","createdAt","source","commit","milestone"],"additionalProperties":{}}},"now":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["job","leases","checks","related","timeline","now"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/posts/record":{"post":{"operationId":"posts.record","summary":"Record a person's post","tags":["posts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["filed","commented"],"type":"string"},"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"url":{"type":"string","maxLength":300,"format":"uri"},"title":{"type":"string","maxLength":500},"agent":{"type":"string","minLength":1,"maxLength":200},"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}}},"required":["kind","target","number","url","project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/jobs/create":{"post":{"operationId":"jobs.create","summary":"File a job","tags":["jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":32},"kind":{"type":"string","minLength":1,"maxLength":32},"subject":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","minLength":1,"maxLength":300},"requirements":{"type":"object","properties":{"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32}},"default":{}},"excludedAgents":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":200},"default":[]},"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}}},"required":["subject","title","project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/jobs/cancel":{"post":{"operationId":"jobs.cancel","summary":"Cancel a job","tags":["jobs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"}},"required":["jobId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/jobs/finished":{"post":{"operationId":"jobs.finished","summary":"Finished jobs","tags":["jobs"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":32},"page":{"type":"integer","minimum":1,"maximum":10000,"default":1},"size":{"type":"integer","minimum":1,"maximum":100,"default":25}},"default":{"page":1,"size":25}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"jobs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"enum":["running","paused","expired","ended"],"type":"string"}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn","state"],"additionalProperties":{}},{"type":"null"}]},"kind":{"type":"string"},"project":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","lease","kind","project"],"additionalProperties":{}}},"page":{"type":"number"},"more":{"type":"boolean"}},"required":["jobs","page","more"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inbox":{"post":{"operationId":"inbox","summary":"What needs a person","tags":["inbox"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":55,"default":0}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"enum":["expired","released","escalated","needs-human","loop","stalled","deploy-failed","deploy-held","release-signin","release-approval","release-held","release-failed"],"type":"string"},"project":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","project","subject","message","url","actor","createdAt"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/inboxStream":{"post":{"operationId":"inboxStream","summary":"Stream what needs a person","tags":["inboxStream"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000},"wait":{"type":"integer","minimum":0,"maximum":55}}}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"inbox"},"item":{"type":"object","properties":{"id":{"type":"number"},"kind":{"enum":["expired","released","escalated","needs-human","loop","stalled","deploy-failed","deploy-held","release-signin","release-approval","release-held","release-failed"],"type":"string"},"project":{"type":"string"},"subject":{"type":"string"},"message":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"actor":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","project","subject","message","url","actor","createdAt"],"additionalProperties":{}}},"required":["type","item"],"additionalProperties":{}}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ended":{"enum":["drain","limit","wait"],"type":"string"}},"required":["ended"],"additionalProperties":{}},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/attachments/create":{"post":{"operationId":"attachments.create","summary":"Reserve an attachment upload","tags":["attachments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"leaseId":{"type":"string","format":"uuid"},"name":{"type":"string","minLength":1,"maxLength":255},"contentType":{"type":"string","maxLength":127,"pattern":"^[a-z0-9][a-z0-9!#$&^_.+-]*\\/[a-z0-9][a-z0-9!#$&^_.+-]*$"},"size":{"type":"integer","minimum":0,"maximum":5368709120},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["name","contentType","size","sha256"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"putUrl":{"type":"string"},"headers":{"type":"object","properties":{"content-type":{"type":"string"},"if-none-match":{"const":"*"},"x-amz-checksum-sha256":{"type":"string"}},"required":["content-type","if-none-match","x-amz-checksum-sha256"],"additionalProperties":{}},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","putUrl","headers","expiresAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/attachments/complete":{"post":{"operationId":"attachments.complete","summary":"Verify an uploaded attachment","tags":["attachments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"leaseId":{"type":"string","format":"uuid"}},"required":["id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{"type":"object","properties":{"reason":{"enum":["firstBytes","declaration"],"type":"string"}},"additionalProperties":{}}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/attachments/get":{"post":{"operationId":"attachments.get","summary":"Download a visible attachment","tags":["attachments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"leaseId":{"type":"string","format":"uuid"},"download":{"type":"boolean","default":false}},"required":["id"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"attachment":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}},"getUrl":{"type":"string"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["attachment","getUrl","expiresAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/attachments/usage":{"post":{"operationId":"attachments.usage","summary":"Read attachment storage usage","tags":["attachments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"agentId":{"type":"string","format":"uuid"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string"},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"bytes":{"type":"number"},"reservedBytes":{"type":"number"},"files":{"type":"number"},"quotaBytes":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["userId","agentId","bytes","reservedBytes","files","quotaBytes"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/messages/send":{"post":{"operationId":"messages.send","summary":"Send a message","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["to","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/messages/reply":{"post":{"operationId":"messages.reply","summary":"Reply to a message","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["messageId","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/messages/startReply":{"post":{"operationId":"messages.startReply","summary":"Start a reply","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"status":{"type":"string","maxLength":200}},"required":["messageId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"number"},"startedAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["messageId","startedAt","expiresAt","status"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/messages/inbox":{"post":{"operationId":"messages.inbox","summary":"The person's unread messages","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":55,"default":0}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/messages/inboxStream":{"post":{"operationId":"messages.inboxStream","summary":"Stream the person's unread messages","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000},"wait":{"type":"integer","minimum":0,"maximum":55}}}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"message"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["type","message"],"additionalProperties":{}}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ended":{"enum":["drain","limit","wait"],"type":"string"}},"required":["ended"],"additionalProperties":{}},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/unread":{"post":{"operationId":"chat.unread","summary":"Unread message count","tags":["chat"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unread":{"type":"number"}},"required":["unread"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/agents":{"post":{"operationId":"chat.agents","summary":"Live agents to chat with","tags":["chat"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":32}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"agents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"approvedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked"],"type":"string"},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"cliBehind":{"type":"boolean"},"unread":{"type":"number"}},"required":["id","name","previousNames","kind","role","project","machine","harness","parent","lease","job","approvedBy","createdAt","lastSeenAt","presence","cliVersion","cliBehind","unread"],"additionalProperties":{}}},"unread":{"type":"number"},"latestCli":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["agents","unread","latestCli"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/threads":{"post":{"operationId":"chat.threads","summary":"The person's messages list","tags":["chat"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pinned":{"type":"array","items":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"last":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"child":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["agent","last","unread","responding","child","pinned"],"additionalProperties":{}}},"live":{"type":"array","items":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"last":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"child":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["agent","last","unread","responding","child","pinned"],"additionalProperties":{}}},"past":{"type":"array","items":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"last":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"child":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["agent","last","unread","responding","child","pinned"],"additionalProperties":{}}},"unread":{"type":"number"}},"required":["pinned","live","past","unread"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/conversation":{"post":{"operationId":"chat.conversation","summary":"One conversation","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"},"after":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["agentId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"messages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}}},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"pinned":{"type":"array","items":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"last":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"child":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["agent","last","unread","responding","child","pinned"],"additionalProperties":{}}},"live":{"type":"array","items":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"last":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"child":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["agent","last","unread","responding","child","pinned"],"additionalProperties":{}}},"past":{"type":"array","items":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","subject","title","url"],"additionalProperties":{}},{"type":"null"}]},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"}},"required":["id","name","kind","role","project","machine","harness","parent","job","lastSeenAt","cliVersion","presence"],"additionalProperties":{}},"last":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"deliveredAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"ackedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"readAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["id","from","to","body","replyTo","via","outgoing","createdAt","deliveredAt","ackedAt","readAt"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"responding":{"anyOf":[{"type":"object","properties":{"messageId":{"type":"number"},"started":{"type":"boolean"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"since":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["messageId","started","status","since"],"additionalProperties":{}},{"type":"null"}]},"child":{"type":"boolean"},"pinned":{"type":"boolean"}},"required":["agent","last","unread","responding","child","pinned"],"additionalProperties":{}}}},"required":["agent","messages","responding","unread","pinned","live","past"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/send":{"post":{"operationId":"chat.send","summary":"Send a chat message","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["agentId","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/reply":{"post":{"operationId":"chat.reply","summary":"Reply to a chat message","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["messageId","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/lastOpened":{"post":{"operationId":"chat.lastOpened","summary":"The thread to open","tags":["chat"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"source":{"anyOf":[{"enum":["last","newest"],"type":"string"},{"type":"null"}]},"remembered":{"anyOf":[{"type":"string"},{"type":"null"}]},"filter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["agentId","source","remembered","filter"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/setLastOpened":{"post":{"operationId":"chat.setLastOpened","summary":"Record the last opened thread","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"}},"required":["agentId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string"}},"required":["agentId"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/setFilter":{"post":{"operationId":"chat.setFilter","summary":"Remember the messages filter","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"anyOf":[{"anyOf":[{"type":"string","minLength":1,"maxLength":32},{"const":"~"}]},{"type":"null"}]}},"required":["filter"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"filter":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["filter"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/details":{"post":{"operationId":"chat.details","summary":"An agent's details","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"}},"required":["agentId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"kind":{"enum":["session","subagent"],"type":"string"},"role":{"type":"string"},"project":{"type":"string"},"repo":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}]},"presence":{"enum":["online","offline","revoked","ended"],"type":"string"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"cliVersion":{"anyOf":[{"type":"string"},{"type":"null"}]},"cliBehind":{"type":"boolean"}},"required":["id","name","kind","role","project","repo","machine","harness","parent","presence","lastSeenAt","cliVersion","cliBehind"],"additionalProperties":{}},"latestCli":{"anyOf":[{"type":"string"},{"type":"null"}]},"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"round":{"type":"number"},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"string"},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"enum":["running","paused","expired","ended"],"type":"string"},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","agent","agentId","state","waitingOn","expiresAt","outcome"],"additionalProperties":{}},{"type":"null"}]},"lastLog":{"anyOf":[{"type":"object","properties":{"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["message","createdAt"],"additionalProperties":{}},{"type":"null"}]},"escalated":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","role","subject","title","url","state","pullRequest","round","lease","lastLog","escalated"],"additionalProperties":{}},{"type":"null"}]},"subagents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string"},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"round":{"type":"number"},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"agent":{"type":"string"},"agentId":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"enum":["running","paused","expired","ended"],"type":"string"},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","agent","agentId","state","waitingOn","expiresAt","outcome"],"additionalProperties":{}},{"type":"null"}]},"lastLog":{"anyOf":[{"type":"object","properties":{"message":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["message","createdAt"],"additionalProperties":{}},{"type":"null"}]},"escalated":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","role","subject","title","url","state","pullRequest","round","lease","lastLog","escalated"],"additionalProperties":{}}},"stalls":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["kind","message","subject","url"],"additionalProperties":{}}},"needs":{"anyOf":[{"type":"number"},{"type":"null"}]},"activity":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"source":{"enum":["activity","post"],"type":"string"},"kind":{"type":"string"},"message":{"type":"string"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["key","source","kind","message","subject","createdAt"],"additionalProperties":{}}},"files":{"type":"array","items":{"type":"object","properties":{"attachment":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}},"messageId":{"type":"number"},"outgoing":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["attachment","messageId","outgoing","createdAt"],"additionalProperties":{}}},"open":{"type":"boolean"}},"required":["agent","latestCli","job","subagents","stalls","needs","activity","files","open"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/setDetails":{"post":{"operationId":"chat.setDetails","summary":"Show or hide the details panel","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"open":{"type":"boolean"}},"required":["open"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"open":{"type":"boolean"}},"required":["open"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/pin":{"post":{"operationId":"chat.pin","summary":"Pin an agent","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"}},"required":["agentId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pinned":{"type":"array","items":{"type":"string"}}},"required":["pinned"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/chat/unpin":{"post":{"operationId":"chat.unpin","summary":"Unpin an agent","tags":["chat"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agentId":{"type":"string","format":"uuid"}},"required":["agentId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pinned":{"type":"array","items":{"type":"string"}}},"required":["pinned"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/get":{"post":{"operationId":"threads.get","summary":"A thread's posts","tags":["threads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"subject":{"type":"string","pattern":"^(issue|pr)-[1-9][0-9]{0,8}$"},"leaseId":{"type":"string","format":"uuid"},"after":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":1,"maximum":200,"default":100}},"required":["subject"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string"},"subject":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"next":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["project","subject","posts","next"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/post":{"post":{"operationId":"threads.post","summary":"Post to a thread","tags":["threads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"subject":{"type":"string","pattern":"^(issue|pr)-[1-9][0-9]{0,8}$"},"leaseId":{"type":"string","format":"uuid"},"kind":{"type":"string","pattern":"^[a-z][a-z0-9-]{0,31}$"},"body":{"type":"string","maxLength":60000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}},"answers":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"verdict":{"enum":["pass","changes","conflict"],"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"via":{"enum":["cli","sdk"],"type":"string","default":"sdk"}},"required":["subject","kind","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"delivered":{"type":"array","items":{"type":"string"}}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt","delivered"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/list":{"post":{"operationId":"threads.list","summary":"Threads with activity","tags":["threads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"before":{"type":"string","format":"date-time","x-native-type":"date"},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50}},"default":{"limit":50}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"project":{"type":"string"},"subject":{"type":"string"},"posts":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastPostAt":{"type":"string","format":"date-time","x-native-type":"date"},"last":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["project","subject","posts","createdAt","lastPostAt","last"],"additionalProperties":{}}},"next":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["threads","next"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/ack":{"post":{"operationId":"threads.ack","summary":"Acknowledge a post","tags":["threads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"postId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"leaseId":{"type":"string","format":"uuid"}},"required":["postId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}},"ackedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["kind","id","to","lease","post","ackedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/job":{"post":{"operationId":"threads.job","summary":"A job's threads","tags":["threads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"jobId":{"type":"string","format":"uuid"},"project":{"type":"string","minLength":1,"maxLength":32}},"required":["jobId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"slug":{"type":"string"},"repo":{"type":"string"}},"required":["slug","repo"],"additionalProperties":{}},"threads":{"type":"array","items":{"type":"object","properties":{"subject":{"type":"string"},"posts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"earlier":{"type":"boolean"},"readThrough":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["subject","posts","earlier","readThrough"],"additionalProperties":{}}}},"required":["project","threads"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/recent":{"post":{"operationId":"threads.recent","summary":"The person's recent threads","tags":["threads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":32},"before":{"type":"string","format":"date-time","x-native-type":"date"},"limit":{"type":"integer","minimum":1,"maximum":200,"default":50}},"default":{"limit":50}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"threads":{"type":"array","items":{"type":"object","properties":{"project":{"type":"string"},"subject":{"type":"string"},"posts":{"type":"number"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"lastPostAt":{"type":"string","format":"date-time","x-native-type":"date"},"last":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}},"repo":{"type":"string"},"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"role":{"type":"string"},"title":{"type":"string"},"state":{"type":"string"}},"required":["id","role","title","state"],"additionalProperties":{}},{"type":"null"}]},"unread":{"type":"number"},"waiting":{"type":"number"},"answersYou":{"type":"number"}},"required":["project","subject","posts","createdAt","lastPostAt","last","repo","job","unread","waiting","answersYou"],"additionalProperties":{}}},"next":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]}},"required":["threads","next"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/threads/unread":{"post":{"operationId":"threads.unread","summary":"Unread thread counts","tags":["threads"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"string","minLength":1,"maxLength":32}},"required":["project"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"unread":{"type":"number"},"forYou":{"type":"number"}},"required":["unread","forYou"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/questions/answer":{"post":{"operationId":"questions.answer","summary":"Answer an agent's question","tags":["questions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"questionId":{"type":"string","format":"uuid"},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}}},"required":["questionId","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"questionId":{"type":"string"},"agent":{"type":"string"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["questionId","agent","message"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/leases/revoke":{"post":{"operationId":"leases.revoke","summary":"Take a job back","tags":["leases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/leases/handoff":{"post":{"operationId":"leases.handoff","summary":"Hand a lease to another worker","tags":["leases"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"to":{"type":"string","minLength":1,"maxLength":200},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["leaseId","to"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"from":{"type":"string"}},"required":["job","lease","agent","from"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/reviews/continue":{"post":{"operationId":"reviews.continue","summary":"Continue an escalated PR","tags":["reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"pullRequest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"note":{"type":"string","maxLength":4000,"default":""},"confirmation":{"type":"string","minLength":1,"maxLength":100}},"required":["project","pullRequest"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"pullRequest":{"type":"number"},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"coder":{"anyOf":[{"type":"string"},{"type":"null"}]},"reviewer":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["repo","pullRequest","issue","coder","reviewer"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/labels/clear":{"post":{"operationId":"labels.clear","summary":"Clear a needs-human label","tags":["labels"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"repo":{"type":"string","minLength":3,"maxLength":200},"slug":{"type":"string","minLength":1,"maxLength":32}}},"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"integer","minimum":1,"maximum":1000000000}},"required":["project","target","number"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"repo":{"type":"string"},"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"label":{"type":"string"},"clearedBy":{"type":"string"}},"required":["repo","target","number","label","clearedBy"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/foreman/status":{"post":{"operationId":"foreman.status","summary":"The worker's person's foreman (deprecated)","tags":["foreman"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"person":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"],"additionalProperties":{}},"foreman":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"presence":{"enum":["online","offline"],"type":"string"}},"required":["name","machine","harness","lastSeenAt","presence"],"additionalProperties":{}},{"type":"null"}]},"missing":{"type":"boolean"},"graceSeconds":{"type":"number"},"claim":{"anyOf":[{"type":"object","properties":{"worker":{"type":"string"},"kind":{"enum":["launch","ask"],"type":"string"},"foreman":{"type":"string"},"claimedAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"mine":{"type":"boolean"}},"required":["worker","kind","foreman","claimedAt","expiresAt","mine"],"additionalProperties":{}},{"type":"null"}]},"due":{"type":"boolean"},"launchAs":{"type":"string"}},"required":["person","foreman","missing","graceSeconds","claim","due","launchAs"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/foreman/claim":{"post":{"operationId":"foreman.claim","summary":"Claim launching the person's foreman (deprecated)","tags":["foreman"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["launch","ask"],"type":"string","default":"launch"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"claimed":{"const":true},"kind":{"enum":["launch","ask"],"type":"string"},"foreman":{"type":"string"},"person":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"],"additionalProperties":{}},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"replaces":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["claimed","kind","foreman","person","expiresAt","replaces"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/whoami":{"post":{"operationId":"worker.whoami","summary":"The worker's identity","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}},"harness":{"type":"string"},"machine":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string"},"slug":{"type":"string"},"repo":{"type":"string"},"pausedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"pauseReason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","slug","repo","pausedAt","pauseReason"],"additionalProperties":{}}},"required":["id","name","previousNames","harness","machine","project"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/identity":{"post":{"operationId":"worker.identity","summary":"The worker's names","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"previousNames":{"type":"array","items":{"type":"string"}}},"required":["name","previousNames"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/chatAgent":{"post":{"operationId":"worker.chatAgent","summary":"The worker's chat agent","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"person":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"],"additionalProperties":{}},"chat":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"machine":{"type":"string"},"harness":{"type":"string"},"lastSeenAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"presence":{"enum":["online","offline"],"type":"string"}},"required":["name","machine","harness","lastSeenAt","presence"],"additionalProperties":{}},{"type":"null"}]},"missing":{"type":"boolean"},"graceSeconds":{"type":"number"},"due":{"type":"boolean"},"launchAs":{"type":"string"}},"required":["person","chat","missing","graceSeconds","due","launchAs"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/heartbeat":{"post":{"operationId":"worker.heartbeat","summary":"Worker heartbeat","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true}},"required":["ok"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/next":{"post":{"operationId":"worker.next","summary":"Lease the next job","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":55,"default":0},"acks":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]}},"required":["job","lease","agent","event"],"additionalProperties":{}},{"type":"null"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/nextStream":{"post":{"operationId":"worker.nextStream","summary":"Stream jobs and events","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000},"wait":{"type":"integer","minimum":0,"maximum":55},"acks":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"job"},"claim":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]}},"required":["job","lease","agent","event"],"additionalProperties":{}}},"required":["type","claim"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"event"},"claim":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]}},"required":["job","lease","agent","event"],"additionalProperties":{}}},"required":["type","claim"],"additionalProperties":{}}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ended":{"enum":["drain","limit","wait"],"type":"string"}},"required":["ended"],"additionalProperties":{}},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/wait":{"post":{"operationId":"worker.wait","summary":"Wait for a job, event or message","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":55,"default":0},"threads":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"anyOf":[{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]},"message":{"type":"null"}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"null"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["job","lease","agent","event","message","post"],"additionalProperties":{}}]},{"type":"null"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/waitStream":{"post":{"operationId":"worker.waitStream","summary":"Stream jobs, events and messages","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":1000},"wait":{"type":"integer","minimum":0,"maximum":55},"threads":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"job"},"claim":{"anyOf":[{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]},"message":{"type":"null"}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"null"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["job","lease","agent","event","message","post"],"additionalProperties":{}}]}},"required":["type","claim"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"event"},"claim":{"anyOf":[{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]},"message":{"type":"null"}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"null"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["job","lease","agent","event","message","post"],"additionalProperties":{}}]}},"required":["type","claim"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"message"},"claim":{"anyOf":[{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]},"message":{"type":"null"}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"null"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["job","lease","agent","event","message","post"],"additionalProperties":{}}]}},"required":["type","claim"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"post"},"claim":{"anyOf":[{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]},"message":{"type":"null"}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["job","lease","agent","event","message"],"additionalProperties":{}},{"type":"object","properties":{"job":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},{"type":"null"}]},"lease":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},{"type":"null"}]},"agent":{"type":"string"},"event":{"type":"null"},"message":{"type":"null"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["job","lease","agent","event","message","post"],"additionalProperties":{}}]}},"required":["type","claim"],"additionalProperties":{}}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ended":{"enum":["drain","limit","wait"],"type":"string"}},"required":["ended"],"additionalProperties":{}},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/ack":{"post":{"operationId":"worker.ack","summary":"Acknowledge an event","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"leaseId":{"type":"string","format":"uuid"}},"required":["eventId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"leaseId":{"type":"string"},"ackedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","message","commit","leaseId","ackedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/leases":{"post":{"operationId":"worker.leases","summary":"The worker's live leases","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}},"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"agent":{"type":"string"},"event":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}},{"type":"null"}]},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}}}},"required":["job","lease","agent","event","events"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/jobs":{"post":{"operationId":"worker.jobs","summary":"The project's open jobs","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"kind":{"type":"string"},"subject":{"type":"string"},"state":{"type":"string"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["role","kind","subject","state","agent"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/syncBegin":{"post":{"operationId":"worker.syncBegin","summary":"Begin a GitHub sync","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"force":{"type":"boolean","default":false}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"due":{"const":true},"full":{"type":"boolean"},"since":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"release":{"anyOf":[{"type":"object","properties":{"base":{"type":"string"},"head":{"type":"string"}},"required":["base","head"],"additionalProperties":{}},{"type":"null"}]}},"required":["due","full","since"],"additionalProperties":{}},{"type":"object","properties":{"due":{"const":false},"syncedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"reason":{"enum":["recent","busy"],"type":"string"},"mainSha":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["due","syncedAt","reason"],"additionalProperties":{}}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/syncReport":{"post":{"operationId":"worker.syncReport","summary":"Report a GitHub sync","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"issues":{"type":"array","maxItems":2000,"items":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"title":{"type":"string","maxLength":500},"state":{"enum":["open","closed"],"type":"string"},"labels":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":100}},"url":{"type":"string","maxLength":300,"format":"uri"},"blockedBy":{"type":"array","maxItems":50,"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"default":[]},"parent":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},{"type":"null"}],"default":null},"mergeAfter":{"type":"array","maxItems":50,"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"default":[]},"closedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"missingSections":{"type":"array","maxItems":3,"items":{"enum":["What","Why","Done when"],"type":"string"}},"bodyDigest":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["number","title","state","labels","url"]}},"pullRequests":{"type":"array","maxItems":2000,"items":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"title":{"type":"string","maxLength":500},"state":{"enum":["open","closed","merged"],"type":"string"},"draft":{"type":"boolean"},"headSha":{"type":"string","pattern":"^[0-9a-f]{40}$"},"headRef":{"type":"string","maxLength":300},"baseRef":{"type":"string","maxLength":300},"labels":{"type":"array","maxItems":50,"items":{"type":"string","maxLength":100}},"closingIssues":{"type":"array","maxItems":50,"items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0}},"author":{"type":"string","maxLength":100},"url":{"type":"string","maxLength":300,"format":"uri"},"mergeCommit":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{40}$"},{"type":"null"}]}},"required":["number","title","state","draft","headSha","headRef","baseRef","labels","closingIssues","author","url","mergeCommit"]}},"comments":{"type":"array","maxItems":2000,"items":{"type":"object","properties":{"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"author":{"type":"string","maxLength":100},"agent":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"person":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"default":null},"createdAt":{"type":"string","format":"date-time"},"url":{"type":"string","maxLength":300,"format":"uri"}},"required":["target","number","author","agent","createdAt","url"]},"default":[]},"full":{"type":"boolean","default":false},"main":{"anyOf":[{"type":"object","properties":{"branch":{"type":"string","minLength":1,"maxLength":300},"sha":{"type":"string","pattern":"^[0-9a-f]{40}$"}},"required":["branch","sha"]},{"type":"null"}],"default":null},"github":{"anyOf":[{"type":"object","properties":{"repositoryId":{"type":"string","pattern":"^\\d{1,20}$"},"ownerId":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["repositoryId","ownerId"]},{"type":"null"}],"default":null},"repoConfig":{"anyOf":[{"type":"object","properties":{"text":{"anyOf":[{"type":"string","maxLength":100000},{"type":"null"}]}},"required":["text"]},{"type":"null"}],"default":null},"releaseChanges":{"anyOf":[{"type":"object","properties":{"base":{"type":"string","pattern":"^[0-9a-f]{40}$"},"head":{"type":"string","pattern":"^[0-9a-f]{40}$"},"files":{"type":"array","maxItems":3000,"items":{"type":"string","maxLength":1000}},"truncated":{"type":"boolean"},"pullRequests":{"type":"array","maxItems":250,"items":{"type":"object","properties":{"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"title":{"type":"string","maxLength":500},"url":{"type":"string","maxLength":300,"format":"uri"},"files":{"type":"array","maxItems":3000,"items":{"type":"string","maxLength":1000}}},"required":["number","title","url","files"]}}},"required":["base","head","files","truncated","pullRequests"]},{"type":"null"}],"default":null},"releaseChangesError":{"anyOf":[{"type":"object","properties":{"base":{"type":"string","pattern":"^[0-9a-f]{40}$"},"head":{"type":"string","pattern":"^[0-9a-f]{40}$"},"error":{"type":"string","maxLength":2000}},"required":["base","head","error"]},{"type":"null"}],"default":null}},"required":["issues","pullRequests"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"applied":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"const":"create"},"role":{"enum":["code","review","triage"],"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"requirements":{"type":"object","properties":{"harness":{"type":"string"},"machine":{"type":"string"}},"additionalProperties":{}},"excludedAgents":{"type":"array","items":{"type":"string"}},"specDigest":{"type":"string"}},"required":["type","role","subject","title","url","commit","requirements","excludedAgents"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"release"},"subject":{"type":"string"},"version":{"type":"string"},"issue":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"},"requirements":{"type":"object","properties":{"harness":{"type":"string"},"machine":{"type":"string"}},"additionalProperties":{}}},"required":["type","subject","version","issue","title","url","requirements"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"cancel"},"jobId":{"type":"string"},"subject":{"type":"string"},"reason":{"type":"string"}},"required":["type","jobId","subject","reason"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"retarget"},"jobId":{"type":"string"},"subject":{"type":"string"},"commit":{"type":"string"}},"required":["type","jobId","subject","commit"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"reroute"},"jobId":{"type":"string"},"subject":{"type":"string"},"harness":{"anyOf":[{"type":"string"},{"type":"null"}]},"machine":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","jobId","subject","harness","machine"],"additionalProperties":{}}]}},"issues":{"type":"number"},"pullRequests":{"type":"number"},"paused":{"type":"boolean"},"deploy":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"const":"create"},"commit":{"type":"string"},"jobId":{"type":"string"}},"required":["type","commit","jobId"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"supersede"},"commit":{"type":"string"},"jobId":{"type":"string"},"previous":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["type","commit","jobId","previous"],"additionalProperties":{}}]},{"type":"null"}]},"autoRelease":{"anyOf":[{"type":"object","properties":{"version":{"type":"string"},"jobId":{"type":"string"}},"required":["version","jobId"],"additionalProperties":{}},{"type":"null"}]},"releaseRead":{"anyOf":[{"anyOf":[{"type":"object","properties":{"state":{"const":"recorded"},"changed":{"type":"boolean"}},"required":["state","changed"],"additionalProperties":{}},{"type":"object","properties":{"state":{"enum":["failed","missing","moved"],"type":"string"},"error":{"type":"string"}},"required":["state","error"],"additionalProperties":{}}]},{"type":"null"}]},"closeParents":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"url":{"type":"string"},"children":{"type":"array","items":{"type":"object","properties":{"number":{"type":"number"},"title":{"type":"string"},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["number","title","pullRequest"],"additionalProperties":{}}}},"required":["number","title","url","children"],"additionalProperties":{}}},"removeLabels":{"type":"array","items":{"type":"object","properties":{"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"label":{"type":"string"}},"required":["target","number","label"],"additionalProperties":{}}}},"required":["applied","issues","pullRequests","paused","deploy","closeParents","removeLabels"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/questions":{"post":{"operationId":"worker.questions","summary":"Unanswered questions","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"since":{"type":"string"}},"required":["target","number","since"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/discussionTargets":{"post":{"operationId":"worker.discussionTargets","summary":"Discussion to read","tags":["worker"],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"since":{"type":"string"}},"required":["target","number","since"],"additionalProperties":{}}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/mayPostAs":{"post":{"operationId":"worker.mayPostAs","summary":"Whether the worker may post as an agent","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent":{"type":"string","minLength":1,"maxLength":200}},"required":["agent"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"agent":{"type":"string"}},"required":["ok","agent"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/recordPost":{"post":{"operationId":"worker.recordPost","summary":"Record a subagent's post","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"enum":["filed","commented"],"type":"string"},"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"url":{"type":"string","maxLength":300,"format":"uri"},"title":{"type":"string","maxLength":500},"agent":{"type":"string","minLength":1,"maxLength":200},"leaseId":{"type":"string","format":"uuid"}},"required":["kind","target","number","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"const":true},"actor":{"type":"string"}},"required":["ok","actor"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/send":{"post":{"operationId":"worker.send","summary":"Send a message as the worker","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}},"leaseId":{"type":"string","format":"uuid"}},"required":["to","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/reply":{"post":{"operationId":"worker.reply","summary":"Reply as the worker","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"body":{"type":"string","maxLength":20000},"attachmentIds":{"type":"array","maxItems":64,"items":{"type":"string","format":"uuid"}},"leaseId":{"type":"string","format":"uuid"}},"required":["messageId","body"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/startReply":{"post":{"operationId":"worker.startReply","summary":"Start a reply as the worker","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"status":{"type":"string","maxLength":200},"leaseId":{"type":"string","format":"uuid"}},"required":["messageId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"number"},"startedAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["messageId","startedAt","expiresAt","status"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/ackMessage":{"post":{"operationId":"worker.ackMessage","summary":"Acknowledge a worker's message","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"leaseId":{"type":"string","format":"uuid"}},"required":["messageId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"ackedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt","ackedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/worker/createJob":{"post":{"operationId":"worker.createJob","summary":"File a job as the worker","tags":["worker"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","minLength":1,"maxLength":32},"kind":{"type":"string","minLength":1,"maxLength":32},"subject":{"type":"string","minLength":1,"maxLength":64},"title":{"type":"string","minLength":1,"maxLength":300},"requirements":{"type":"object","properties":{"harness":{"type":"string","minLength":1,"maxLength":32},"machine":{"type":"string","minLength":1,"maxLength":32}},"default":{}},"excludedAgents":{"type":"array","maxItems":20,"items":{"type":"string","maxLength":200},"default":[]}},"required":["subject","title"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/wait":{"post":{"operationId":"lease.wait","summary":"Wait for a subagent's messages","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"wait":{"type":"integer","minimum":0,"maximum":55,"default":0},"threads":{"type":"boolean","default":false}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}},{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}]}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/waitStream":{"post":{"operationId":"lease.waitStream","summary":"Stream a subagent's messages","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"limit":{"type":"integer","minimum":1,"maximum":1000},"wait":{"type":"integer","minimum":0,"maximum":55},"threads":{"type":"boolean","default":false},"events":{"type":"boolean","default":false}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"text/event-stream":{"schema":{"oneOf":[{"type":"object","properties":{"event":{"const":"message"},"data":{"anyOf":[{"type":"object","properties":{"type":{"const":"message"},"message":{"type":"object","properties":{"id":{"type":"number"},"kind":{"const":"message"},"from":{"type":"string"},"to":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"replyTo":{"anyOf":[{"type":"number"},{"type":"null"}]},"via":{"anyOf":[{"const":"web"},{"type":"null"}]},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","kind","from","to","body","replyTo","via","lease","createdAt"],"additionalProperties":{}}},"required":["type","message"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"post"},"post":{"type":"object","properties":{"kind":{"const":"post"},"id":{"type":"number"},"to":{"type":"string"},"lease":{"anyOf":[{"type":"string"},{"type":"null"}]},"post":{"type":"object","properties":{"id":{"type":"number"},"project":{"type":"string"},"subject":{"type":"string"},"author":{"type":"string"},"authorKind":{"enum":["agent","person"],"type":"string"},"via":{"enum":["web","cli","sdk"],"type":"string"},"kind":{"type":"string"},"body":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}},"answers":{"anyOf":[{"type":"number"},{"type":"null"}]},"checklist":{"type":"array","items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"],"additionalProperties":{}}}},"required":["skill","commit","sections"],"additionalProperties":{}}},"verdict":{"anyOf":[{"enum":["pass","changes","conflict"],"type":"string"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","project","subject","author","authorKind","via","kind","body","answers","verdict","commit","createdAt"],"additionalProperties":{}}},"required":["kind","id","to","lease","post"],"additionalProperties":{}}},"required":["type","post"],"additionalProperties":{}},{"type":"object","properties":{"type":{"const":"event"},"event":{"type":"object","properties":{"id":{"type":"number"},"kind":{"type":"string"},"message":{"type":"string"},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"contentType":{"type":"string"},"size":{"type":"number"},"sha256":{"type":"string"}},"required":["id","name","contentType","size","sha256"],"additionalProperties":{}}}},"required":["id","kind","message","commit"],"additionalProperties":{}}},"required":["type","event"],"additionalProperties":{}}]},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event","data"]},{"type":"object","properties":{"event":{"const":"done"},"data":{"type":"object","properties":{"ended":{"enum":["drain","limit","wait"],"type":"string"}},"required":["ended"],"additionalProperties":{}},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]},{"type":"object","properties":{"event":{"const":"error"},"data":{},"id":{"type":"string"},"retry":{"type":"number"}},"required":["event"]}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/log":{"post":{"operationId":"lease.log","summary":"Log a lease's progress","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"message":{"type":"string","minLength":1,"maxLength":4000}},"required":["leaseId","message"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/renew":{"post":{"operationId":"lease.renew","summary":"Renew a lease","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/setAgentRef":{"post":{"operationId":"lease.setAgentRef","summary":"Record a subagent's harness reference","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"ref":{"type":"string","minLength":1,"maxLength":200}},"required":["leaseId","ref"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/setWorktree":{"post":{"operationId":"lease.setWorktree","summary":"Record a lease's worktree","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"path":{"type":"string","minLength":1,"maxLength":1000}},"required":["leaseId","path"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/handedOff":{"post":{"operationId":"lease.handedOff","summary":"A handed-off lease","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"lease":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}},"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"},"kind":{"type":"string"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt","kind"],"additionalProperties":{}}},"required":["lease","job"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/worktreeRetired":{"post":{"operationId":"lease.worktreeRetired","summary":"A handed-off worktree was removed","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"jobId":{"type":"string"},"workerId":{"type":"string"},"agent":{"type":"string"},"agentRef":{"anyOf":[{"type":"string"},{"type":"null"}]},"worktree":{"anyOf":[{"type":"string"},{"type":"null"}]},"acquiredAt":{"type":"string","format":"date-time","x-native-type":"date"},"expiresAt":{"type":"string","format":"date-time","x-native-type":"date"},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"outcome":{"anyOf":[{"type":"string"},{"type":"null"}]},"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jobId","workerId","agent","agentRef","worktree","acquiredAt","expiresAt","releasedAt","outcome","waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/done":{"post":{"operationId":"lease.done","summary":"Finish a job","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"message":{"type":"string","maxLength":4000,"default":""}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/drop":{"post":{"operationId":"lease.drop","summary":"Drop a job with nothing left to do","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"message":{"type":"string","minLength":1,"maxLength":4000}},"required":["leaseId","message"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/release":{"post":{"operationId":"lease.release","summary":"Hand a job back","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"message":{"type":"string","maxLength":4000,"default":""}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/prReady":{"post":{"operationId":"lease.prReady","summary":"Mark a PR ready for review","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"pullRequest":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"exclusiveMinimum":0},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"check":{"type":"string","maxLength":500,"default":""}},"required":["leaseId","pullRequest","commit"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"job":{"type":"object","properties":{"id":{"type":"string"},"projectId":{"type":"string"},"role":{"type":"string"},"subject":{"type":"string"},"title":{"type":"string"},"url":{"anyOf":[{"type":"string"},{"type":"null"}]},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"commit":{"anyOf":[{"type":"string"},{"type":"null"}]},"deployPinned":{"type":"boolean"},"round":{"type":"number"},"state":{"type":"string"},"requiredHarness":{"anyOf":[{"type":"string"},{"type":"null"}]},"requiredMachine":{"anyOf":[{"type":"string"},{"type":"null"}]},"excludedAgents":{"type":"array","items":{"type":"string"}},"releasedBy":{"anyOf":[{"type":"string"},{"type":"null"}]},"releasedAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanAt":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"needsHumanReason":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdBy":{"type":"string"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"},"updatedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","projectId","role","subject","title","url","pullRequest","commit","round","state","requiredHarness","requiredMachine","excludedAgents","releasedBy","releasedAt","createdBy","createdAt","updatedAt"],"additionalProperties":{}},"reviewer":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["job","reviewer"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/verdict":{"post":{"operationId":"lease.verdict","summary":"Record a review's verdict","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"verdict":{"enum":["pass","changes","conflict"],"type":"string"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"base":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{40}$"},{"type":"null"}],"default":null},"checklistRequired":{"type":"boolean","default":false},"checklist":{"type":"array","maxItems":32,"items":{"type":"object","properties":{"skill":{"type":"string","minLength":1,"maxLength":512},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"flag":{"type":"string","minLength":1,"maxLength":200},"sections":{"type":"array","minItems":1,"maxItems":128,"items":{"type":"object","properties":{"section":{"type":"string","minLength":1,"maxLength":512},"result":{"enum":["ok","n/a","finding"],"type":"string"},"note":{"type":"string","maxLength":4000}},"required":["section","result","note"]}}},"required":["skill","commit","sections"]},"default":[]},"via":{"enum":["cli","sdk"],"type":"string","default":"sdk"},"body":{"type":"string","maxLength":60000,"default":""}},"required":["leaseId","verdict","commit"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"round":{"type":"number"},"verdict":{"enum":["pass","changes","conflict"],"type":"string"},"escalated":{"type":"boolean"},"pullRequest":{"type":"number"},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"coder":{"anyOf":[{"type":"string"},{"type":"null"}]},"mergeAfter":{"type":"array","items":{"type":"number"}}},"required":["round","verdict","escalated","pullRequest","issue","coder","mergeAfter"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/check":{"post":{"operationId":"lease.check","summary":"Record a check run","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"base":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{40}$"},{"type":"null"}],"default":null},"ok":{"type":"boolean"},"exitCode":{"anyOf":[{"type":"integer","minimum":-1,"maximum":255},{"type":"null"}]},"durationMs":{"type":"integer","minimum":0,"maximum":86400000},"summary":{"type":"string","maxLength":8000,"default":""}},"required":["leaseId","commit","ok","exitCode","durationMs"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"commit":{"type":"string"},"base":{"anyOf":[{"type":"string"},{"type":"null"}]},"ok":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["id","commit","base","ok","createdAt"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/ask":{"post":{"operationId":"lease.ask","summary":"Pause on a question","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"kind":{"enum":["ask","block"],"type":"string"},"body":{"type":"string","maxLength":20000},"needs":{"enum":["release"],"type":"string"},"version":{"type":"string","minLength":5,"maxLength":40}},"required":["leaseId","kind"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"target":{"enum":["issue","pr"],"type":"string"},"number":{"type":"number"},"agent":{"type":"string"},"kind":{"enum":["ask","block"],"type":"string"},"needs":{"anyOf":[{"enum":["release"],"type":"string"},{"type":"null"}]},"version":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["target","number","agent","kind"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/discussion":{"post":{"operationId":"lease.discussion","summary":"Unanswered discussion","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"unanswered":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"number":{"type":"number"},"url":{"type":"string"},"author":{"type":"string"},"agent":{"anyOf":[{"type":"string"},{"type":"null"}]},"postedAt":{"type":"string","format":"date-time","x-native-type":"date"}},"required":["target","number","url","author","agent","postedAt"],"additionalProperties":{}}}},"required":["holder","unanswered"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/answerDiscussion":{"post":{"operationId":"lease.answerDiscussion","summary":"Answer discussion with a note","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"note":{"type":"string","minLength":1,"maxLength":4000},"url":{"type":"string","minLength":1,"maxLength":300}},"required":["leaseId","note"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"answered":{"type":"array","items":{"type":"string"}}},"required":["answered"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/mergeCheck":{"post":{"operationId":"lease.mergeCheck","summary":"Whether a reviewer may merge","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"base":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{40}$"},{"type":"null"}],"default":null}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pullRequest":{"type":"number"},"mergeAfter":{"type":"array","items":{"type":"number"}},"checked":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["pullRequest","mergeAfter","checked"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/mergeSlot":{"post":{"operationId":"lease.mergeSlot","summary":"Take the project's merge slot","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"base":{"type":"string","pattern":"^[0-9a-f]{40}$"}},"required":["leaseId","base"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"pullRequest":{"type":"number"},"mergeAfter":{"type":"array","items":{"type":"number"}},"held":{"type":"boolean"},"holder":{"anyOf":[{"type":"string"},{"type":"null"}]},"until":{"anyOf":[{"type":"string","format":"date-time","x-native-type":"date"},{"type":"null"}]},"base":{"anyOf":[{"type":"string"},{"type":"null"}]},"checked":{"type":"boolean"}},"required":["pullRequest","mergeAfter","held","holder","until","base","checked"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/releaseMergeSlot":{"post":{"operationId":"lease.releaseMergeSlot","summary":"Release the project's merge slot","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"released":{"type":"boolean"}},"required":["released"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/deployed":{"post":{"operationId":"lease.deployed","summary":"Record a deploy's outcome","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"message":{"type":"string","maxLength":1000,"default":""},"tail":{"type":"string","maxLength":8000},"findings":{"type":"object","properties":{"runningCommit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"resources":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"address":{"type":"string","minLength":1,"maxLength":1024},"previousAddress":{"type":"string","minLength":1,"maxLength":1024},"deposed":{"type":"string","minLength":1,"maxLength":64},"actions":{"type":"array","minItems":1,"maxItems":8,"items":{"type":"string","pattern":"^[a-z-]{1,32}$"}}},"required":["address","actions"]}},"migrations":{"type":"array","maxItems":2048,"items":{"type":"object","properties":{"file":{"type":"string","maxLength":500},"line":{"type":"integer","minimum":-9007199254740991,"maximum":1000000,"exclusiveMinimum":0},"keyword":{"type":"string","maxLength":128,"pattern":"^(?:[A-Z]{2,8}|\\$[A-Z0-9_]*\\$)$"}},"required":["file","line","keyword"]}}},"required":["runningCommit","resources","migrations"]},"leaseId":{"type":"string","format":"uuid"},"outcome":{"enum":["deployed","failed","held"],"type":"string"}},"required":["commit","leaseId","outcome"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["deployed","failed","held"],"type":"string"},"commit":{"type":"string"},"held":{"type":"boolean"}},"required":["outcome","commit","held"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/claimDeployApproval":{"post":{"operationId":"lease.claimDeployApproval","summary":"Claim a deploy approval","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"fingerprint":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["commit","fingerprint"],"additionalProperties":{}},{"type":"null"}]}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/publishInfo":{"post":{"operationId":"lease.publishInfo","summary":"A release's publish details","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"version":{"type":"string"},"notes":{"type":"string"},"issue":{"anyOf":[{"type":"number"},{"type":"null"}]},"state":{"type":"string"},"pullRequest":{"anyOf":[{"type":"number"},{"type":"null"}]},"deployed":{"anyOf":[{"type":"string"},{"type":"null"}]},"deploysHeld":{"type":"boolean"}},"required":["version","notes","issue","state","pullRequest","deployed","deploysHeld"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/publishWait":{"post":{"operationId":"lease.publishWait","summary":"Wait for production to run a release","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"deployed":{"anyOf":[{"type":"string","pattern":"^[0-9a-f]{40}$"},{"type":"null"}]}},"required":["leaseId","commit","deployed"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"waiting":{"type":"boolean"},"deployed":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["waiting","deployed"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/publishSignin":{"post":{"operationId":"lease.publishSignin","summary":"Report a release sign-in","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https:\\/\\/www\\.npmjs\\.com\\/"},{"type":"null"}]}},"required":["leaseId","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/publishApproval":{"post":{"operationId":"lease.publishApproval","summary":"Send a publish approval link","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"url":{"type":"string","maxLength":500,"format":"uri"}},"required":["leaseId","url"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"waitingOn":{"const":"approval"}},"required":["waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/publishAccepted":{"post":{"operationId":"lease.publishAccepted","summary":"The registry accepted a publish","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"}},"required":["leaseId"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"waitingOn":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["waitingOn"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/published":{"post":{"operationId":"lease.published","summary":"Record a release's outcome","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"},"outcome":{"enum":["published","failed","held"],"type":"string"},"message":{"type":"string","maxLength":1000,"default":""},"tail":{"type":"string","maxLength":8000}},"required":["leaseId","commit","outcome"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"outcome":{"enum":["published","failed","held"],"type":"string"},"version":{"type":"string"},"commit":{"type":"string"}},"required":["outcome","version","commit"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}},"/lease/merged":{"post":{"operationId":"lease.merged","summary":"Record a merge","tags":["lease"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leaseId":{"type":"string","format":"uuid"},"commit":{"type":"string","pattern":"^[0-9a-f]{40}$"}},"required":["leaseId","commit"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"coder":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["coder"],"additionalProperties":{}}}}},"400":{"description":"400","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"BAD_REQUEST"},"status":{"const":400},"message":{"type":"string","default":"Bad Request"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"401":{"description":"401","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UNAUTHORIZED"},"status":{"const":401},"message":{"type":"string","default":"Unauthorized"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"403":{"description":"403","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"FORBIDDEN"},"status":{"const":403},"message":{"type":"string","default":"Forbidden"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"404":{"description":"404","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"NOT_FOUND"},"status":{"const":404},"message":{"type":"string","default":"Not Found"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"409":{"description":"409","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"CONFLICT"},"status":{"const":409},"message":{"type":"string","default":"Conflict"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}},"426":{"description":"426","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"defined":{"const":true},"code":{"const":"UPGRADE_REQUIRED"},"status":{"const":426},"message":{"type":"string","default":"UPGRADE_REQUIRED"},"data":{}},"required":["defined","code","status","message"]},{"type":"object","properties":{"defined":{"const":false},"code":{"type":"string"},"status":{"type":"number"},"message":{"type":"string"},"data":{}},"required":["defined","code","status","message"]}]}}}}}}}},"servers":[{"url":"https://ahfact.com/api"}]}