{"openapi":"3.1.0","info":{"title":"Wallie Factory API","version":"1.0.0","description":"Factory commands use a scoped machine token or OAuth access token."},"security":[{"factoryBearer":[]}],"paths":{"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions":{"get":{"operationId":"listFactorySessions","summary":"List sessions in the approved repository","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"cursor","in":"query","required":false,"description":"Use the opaque cursor returned by this operation with the same scope and filters.","schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results. The default is 25.","schema":{"type":"string","pattern":"^(?:[1-9]|[1-4][0-9]|50)$"}}],"responses":{"200":{"description":"Authorized result. Responses may be paginated.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"currentStageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"currentRunId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"specificationStageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"review":{"anyOf":[{"type":"object","properties":{"stageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"stageSlug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"artifactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"artifactVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reviewRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"attemptCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointRunId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"clarification":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"question":{"type":"string"}},"required":["id","question"],"additionalProperties":false},{"type":"null"}]},"href":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["stageId","stageSlug","artifactId","artifactVersion","reviewRevision","runId","attemptCount","checkpointRunId","clarification","href"],"additionalProperties":false},{"type":"null"}]},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["id","number","title","status","archivedAt","createdAt","updatedAt","currentStageId","currentRunId","specificationStageId","review","canonicalUrl"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the requested scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Command admission expired or conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The retained resource lacks readable content or provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until another attempt can be made.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"The read service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createFactorySession","summary":"Start a session with a named factory agent","x-wallie-scope":"sessions:create","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Reuse this UUID for a retry of the same logical command.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"maxLength":200,"type":"string","minLength":1},"prompt":{"maxLength":20000,"type":"string","minLength":1},"agentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"repositoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"draftSpecification":{"default":false,"type":"boolean"},"workflowSelection":{"type":"object","properties":{"workflowId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"activationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["workflowId","activationId"],"additionalProperties":false}},"required":["title","prompt","agentId","repositoryId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Committed command receipt. Retried commands return their original receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"workspaceSlug":{"type":"string","minLength":1},"phaseStatus":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"jobId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"runId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"jobIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"runIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"feedbackBatchId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"clarificationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"executionExhausted":{"type":"boolean"},"replayed":{"type":"boolean"},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"conversationUrl":{"type":"string","pattern":"^\\/api\\/v1\\/.*"}},"required":["receiptId","sessionId","sessionNumber","workspaceSlug","phaseStatus","replayed","canonicalUrl","conversationUrl"],"additionalProperties":false}}}},"201":{"description":"Session created.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"workspaceSlug":{"type":"string","minLength":1},"phaseStatus":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"jobId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"runId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"jobIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"runIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"feedbackBatchId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"clarificationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"executionExhausted":{"type":"boolean"},"replayed":{"type":"boolean"},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"conversationUrl":{"type":"string","pattern":"^\\/api\\/v1\\/.*"}},"required":["receiptId","sessionId","sessionNumber","workspaceSlug","phaseStatus","replayed","canonicalUrl","conversationUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters, idempotency key, or JSON body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the required scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"409":{"description":"The intent is stale, a clarification is pending, or the admission or idempotency key conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"413":{"description":"The JSON request exceeds the supported size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"415":{"description":"The request requires application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"422":{"description":"Current factory or agent configuration cannot admit the session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"The mutation service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions/{sessionId}":{"get":{"operationId":"getFactorySession","summary":"Read a session and its exact current review context","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"sessionId","in":"path","required":true,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"Authorized result. Responses may be paginated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"title":{"type":"string"},"status":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"archivedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"updatedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"currentStageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"currentRunId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"specificationStageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"review":{"anyOf":[{"type":"object","properties":{"stageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"stageSlug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"artifactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"artifactVersion":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reviewRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"attemptCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointRunId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"clarification":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"question":{"type":"string"}},"required":["id","question"],"additionalProperties":false},{"type":"null"}]},"href":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["stageId","stageSlug","artifactId","artifactVersion","reviewRevision","runId","attemptCount","checkpointRunId","clarification","href"],"additionalProperties":false},{"type":"null"}]},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["id","number","title","status","archivedAt","createdAt","updatedAt","currentStageId","currentRunId","specificationStageId","review","canonicalUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the requested scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Command admission expired or conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The retained resource lacks readable content or provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until another attempt can be made.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"The read service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions/{sessionId}/conversation":{"get":{"operationId":"listFactoryConversation","summary":"Read messages and source associations","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"sessionId","in":"path","required":true,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"cursor","in":"query","required":false,"description":"Use the opaque cursor returned by this operation with the same scope and filters.","schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results. The default is 25.","schema":{"type":"string","pattern":"^(?:[1-9]|[1-4][0-9]|50)$"}},{"name":"direction","in":"query","required":false,"description":"Read earlier or later conversation messages.","schema":{"type":"string","enum":["before","after"]}}],"responses":{"200":{"description":"Authorized result. Responses may be paginated.","content":{"application/json":{"schema":{"type":"object","properties":{"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"items":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"kind":{"type":"string","enum":["message","initial_prompt","artifact_feedback","review_ready","system"]},"authorKind":{"type":"string","enum":["user","agent","system","service"]},"authorLabel":{"type":"string"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"bodyTruncated":{"type":"boolean"},"runId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"attemptCount":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"artifactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"source":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"provider":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["id","provider","label","url"],"additionalProperties":false},{"type":"null"}]},"bodyHtml":{"type":"string"}},"required":["sequence","kind","authorKind","authorLabel","createdAt","bodyTruncated","runId","attemptCount","artifactId","source","bodyHtml"],"additionalProperties":false}},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"provider":{"type":"string"},"label":{"anyOf":[{"type":"string"},{"type":"null"}]},"url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["id","provider","label","url"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}]},"resumeCursor":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["canonicalUrl","items","sources","nextCursor","resumeCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the requested scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Command admission expired or conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The retained resource lacks readable content or provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until another attempt can be made.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"The read service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/runs":{"get":{"operationId":"listFactoryRuns","summary":"List runs in the approved repository","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"cursor","in":"query","required":false,"description":"Use the opaque cursor returned by this operation with the same scope and filters.","schema":{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"limit","in":"query","required":false,"description":"Maximum number of results. The default is 25.","schema":{"type":"string","pattern":"^(?:[1-9]|[1-4][0-9]|50)$"}},{"name":"sessionId","in":"query","required":false,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"Authorized result. Responses may be paginated.","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"stageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"stageName":{"anyOf":[{"type":"string"},{"type":"null"}]},"stageSlug":{"anyOf":[{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}]},"status":{"type":"string","enum":["queued","started","running","success","error","canceled"]},"attemptCount":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"artifactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"artifactCoverage":{"type":"string","enum":["available","unavailable"]},"transcriptAvailability":{"type":"string","enum":["expired","not_exposed"]},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["id","sessionId","sessionNumber","stageId","stageName","stageSlug","status","attemptCount","createdAt","startedAt","completedAt","artifactId","artifactCoverage","transcriptAvailability","canonicalUrl"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string","minLength":1,"maxLength":512,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}]}},"required":["items","nextCursor"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the requested scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Command admission expired or conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The retained resource lacks readable content or provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until another attempt can be made.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"The read service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/runs/{runId}":{"get":{"operationId":"getFactoryRun","summary":"Read a run and its available artifact identity","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"runId","in":"path","required":true,"description":"Wallie's canonical run ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"Authorized result. Responses may be paginated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"stageId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"stageName":{"anyOf":[{"type":"string"},{"type":"null"}]},"stageSlug":{"anyOf":[{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},{"type":"null"}]},"status":{"type":"string","enum":["queued","started","running","success","error","canceled"]},"attemptCount":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"startedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"completedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"artifactId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"artifactCoverage":{"type":"string","enum":["available","unavailable"]},"transcriptAvailability":{"type":"string","enum":["expired","not_exposed"]},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["id","sessionId","sessionNumber","stageId","stageName","stageSlug","status","attemptCount","createdAt","startedAt","completedAt","artifactId","artifactCoverage","transcriptAvailability","canonicalUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the requested scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Command admission expired or conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The retained resource lacks readable content or provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until another attempt can be made.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"The read service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions/{sessionId}/artifacts/{artifactId}":{"get":{"operationId":"getFactoryArtifact","summary":"Read one artifact version and its provenance","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"sessionId","in":"path","required":true,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"artifactId","in":"path","required":true,"description":"Wallie's canonical artifact ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"responses":{"200":{"description":"Authorized result. Responses may be paginated.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"stageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"stageSlug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"provenance":{"type":"object","properties":{"runId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"attemptCount":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"checkpointRunId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"commitSha":{"type":"string","pattern":"^[a-f0-9]{40}$"}},"required":["runId","attemptCount","checkpointRunId","commitSha"],"additionalProperties":false},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"bodyHtml":{"type":"string"},"href":{"type":"string","pattern":"^\\/w\\/.*"}},"required":["id","sessionId","sessionNumber","stageId","stageSlug","version","createdAt","provenance","canonicalUrl","bodyHtml","href"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters or cursor.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the requested scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Command admission expired or conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"410":{"description":"The retained resource lacks readable content or provenance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"description":"Seconds until another attempt can be made.","schema":{"type":"integer","minimum":1}}}},"503":{"description":"The read service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions/{sessionId}/follow-ups":{"post":{"operationId":"followUpFactorySession","summary":"Request a revision of an exact artifact","x-wallie-scope":"sessions:follow-up","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"sessionId","in":"path","required":true,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Reuse this UUID for a retry of the same logical command.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"artifactVersion":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"reviewRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"stageId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"feedback":{"maxLength":4000,"type":"string","minLength":1}},"required":["artifactId","artifactVersion","reviewRevision","stageId","feedback"],"additionalProperties":false}}}},"responses":{"200":{"description":"Committed command receipt. Retried commands return their original receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"workspaceSlug":{"type":"string","minLength":1},"phaseStatus":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"jobId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"runId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"jobIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"runIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"feedbackBatchId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"clarificationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"executionExhausted":{"type":"boolean"},"replayed":{"type":"boolean"},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"conversationUrl":{"type":"string","pattern":"^\\/api\\/v1\\/.*"}},"required":["receiptId","sessionId","sessionNumber","workspaceSlug","phaseStatus","replayed","canonicalUrl","conversationUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters, idempotency key, or JSON body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the required scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"409":{"description":"The intent is stale, a clarification is pending, or the admission or idempotency key conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"413":{"description":"The JSON request exceeds the supported size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"415":{"description":"The request requires application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"422":{"description":"Current factory or agent configuration cannot admit the session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"The mutation service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions/{sessionId}/clarifications/{clarificationId}/answers":{"post":{"operationId":"answerFactorySessionClarification","summary":"Answer an exact pending clarification","x-wallie-scope":"sessions:clarify","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"sessionId","in":"path","required":true,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"clarificationId","in":"path","required":true,"description":"Wallie's exact pending clarification ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Reuse this UUID for a retry of the same logical command.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"artifactId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"artifactVersion":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"reviewRevision":{"type":"integer","minimum":0,"maximum":9007199254740991},"answer":{"maxLength":2000,"type":"string","minLength":1}},"required":["artifactId","artifactVersion","reviewRevision","answer"],"additionalProperties":false}}}},"responses":{"200":{"description":"Committed command receipt. Retried commands return their original receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"workspaceSlug":{"type":"string","minLength":1},"phaseStatus":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"jobId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"runId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"jobIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"runIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"feedbackBatchId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"clarificationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"executionExhausted":{"type":"boolean"},"replayed":{"type":"boolean"},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"conversationUrl":{"type":"string","pattern":"^\\/api\\/v1\\/.*"}},"required":["receiptId","sessionId","sessionNumber","workspaceSlug","phaseStatus","replayed","canonicalUrl","conversationUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters, idempotency key, or JSON body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the required scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"409":{"description":"The intent is stale, a clarification is pending, or the admission or idempotency key conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"413":{"description":"The JSON request exceeds the supported size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"415":{"description":"The request requires application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"422":{"description":"Current factory or agent configuration cannot admit the session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"The mutation service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/sessions/{sessionId}/cancel":{"post":{"operationId":"cancelFactorySession","summary":"Cancel the expected session run","x-wallie-scope":"sessions:cancel","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"sessionId","in":"path","required":true,"description":"Wallie's canonical session ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"Idempotency-Key","in":"header","required":true,"description":"Reuse this UUID for a retry of the same logical command.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedRunId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"required":["expectedRunId"],"additionalProperties":false}}}},"responses":{"200":{"description":"Committed command receipt. Retried commands return their original receipt.","content":{"application/json":{"schema":{"type":"object","properties":{"receiptId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"sessionNumber":{"type":"integer","exclusiveMinimum":0,"maximum":2147483647},"workspaceSlug":{"type":"string","minLength":1},"phaseStatus":{"type":"string","enum":["in_progress","awaiting_review","approved","rejected"]},"jobId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"runId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"jobIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"runIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},"feedbackBatchId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"clarificationId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},{"type":"null"}]},"executionExhausted":{"type":"boolean"},"replayed":{"type":"boolean"},"canonicalUrl":{"type":"string","pattern":"^\\/w\\/.*"},"conversationUrl":{"type":"string","pattern":"^\\/api\\/v1\\/.*"}},"required":["receiptId","sessionId","sessionNumber","workspaceSlug","phaseStatus","replayed","canonicalUrl","conversationUrl"],"additionalProperties":false}}}},"400":{"description":"Invalid request parameters, idempotency key, or JSON body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential lacks the required scope or factory access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"404":{"description":"The resource is absent, deleted, or outside the approved scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"409":{"description":"The intent is stale, a clarification is pending, or the admission or idempotency key conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"413":{"description":"The JSON request exceeds the supported size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"415":{"description":"The request requires application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"422":{"description":"Current factory or agent configuration cannot admit the session.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"The mutation service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MutationError"}}}}}}},"/api/v1/workspaces/{workspaceId}/factories/{factoryId}/deployment-observations":{"post":{"operationId":"recordFactoryDeploymentObservation","summary":"Report an observed deployment outcome for an approved source","x-wallie-scope":"deployments:observe","parameters":[{"name":"workspaceId","in":"path","required":true,"description":"Wallie's canonical workspace ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}},{"name":"factoryId","in":"path","required":true,"description":"Wallie's canonical factory ID.","schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"environment":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$"},"externalDeploymentId":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:/-]{0,159}$"},"revision":{"type":"integer","minimum":1,"maximum":2147483647},"outcome":{"type":"string","enum":["pending","failed","unknown","succeeded"]},"sourceRevision":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"providerOccurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]}},"required":["sourceId","environment","externalDeploymentId","revision","outcome","sourceRevision","providerOccurredAt"],"additionalProperties":false}}}},"responses":{"200":{"description":"Replay of the same provider revision.","content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"observationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"revision":{"type":"integer","minimum":1,"maximum":2147483647},"currentRevision":{"type":"integer","minimum":1,"maximum":2147483647},"repositoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"environment":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$"},"outcome":{"type":"string","enum":["pending","failed","unknown","succeeded"]},"sourceRevision":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"providerOccurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"authoritativeOccurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"observedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"replayed":{"type":"boolean"}},"required":["deploymentId","observationId","revision","currentRevision","repositoryId","environment","outcome","sourceRevision","providerOccurredAt","authoritativeOccurredAt","observedAt","replayed"],"additionalProperties":false}}}},"201":{"description":"New provider revision recorded.","content":{"application/json":{"schema":{"type":"object","properties":{"deploymentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"observationId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"revision":{"type":"integer","minimum":1,"maximum":2147483647},"currentRevision":{"type":"integer","minimum":1,"maximum":2147483647},"repositoryId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"},"environment":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$"},"outcome":{"type":"string","enum":["pending","failed","unknown","succeeded"]},"sourceRevision":{"anyOf":[{"type":"string","pattern":"^[a-f0-9]{40}$"},{"type":"null"}]},"providerOccurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"authoritativeOccurredAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},{"type":"null"}]},"observedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-]\\d{2}:\\d{2})))$"},"replayed":{"type":"boolean"}},"required":["deploymentId","observationId","revision","currentRevision","repositoryId","environment","outcome","sourceRevision","providerOccurredAt","authoritativeOccurredAt","observedAt","replayed"],"additionalProperties":false}}}},"400":{"description":"Invalid deployment report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}}},"401":{"description":"A live machine or OAuth access credential is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}},"headers":{"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}}},"403":{"description":"The credential or report does not match the approved source.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}}},"409":{"description":"The admission or provider revision conflicted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}}},"413":{"description":"The JSON request exceeds the supported size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}}},"415":{"description":"The request requires application/json.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}}},"429":{"description":"The workspace or service principal reached a request limit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1}}}},"503":{"description":"The deployment observation service is temporarily unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeploymentObservationError"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_cursor","unauthorized","forbidden","not_found","resource_unavailable","unavailable","request_conflict","already_admitted","rate_limited","concurrency_limited"]},"error":{"type":"string"},"retryAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","error"],"additionalProperties":false},"MutationError":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","forbidden","not_found","stale_intent","idempotency_conflict","clarification_required","request_conflict","already_admitted","request_too_large","unsupported_media_type","unready","rate_limited","concurrency_limited","unavailable"]},"error":{"type":"string"},"retryAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","error"],"additionalProperties":false},"DeploymentObservationError":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","unauthorized","forbidden","request_conflict","already_admitted","request_too_large","unsupported_media_type","rate_limited","concurrency_limited","unavailable"]},"error":{"type":"string"},"retryAfterSeconds":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["code","error"],"additionalProperties":false}},"securitySchemes":{"factoryBearer":{"type":"http","scheme":"bearer","bearerFormat":"Wallie credential"}}}}