{"openapi":"3.1.1","jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema","info":{"title":"Prooftask Agent API","version":"1.8.0","description":"Scoped human-delegated actions over the same delivery state machine as the workspace. Reads remain available while agent writes are paused. Every request rechecks the active parent authority and exact project. Supplier actions and exports require the named supplier representative. Tokens cannot manage accounts, invite suppliers, resolve concerns or grant further authority. Default body limit is 1,000,000 bytes; result-package export requests are limited to 4096 bytes. Schema validation does not replace state, date, exact-file, confirmation or authorization checks. Legacy records may omit legal context. New production creation requires legalContext and confirmationDigest: getCreationDocuments, previewOperationConfirmation, review the exact terms, then createProject. Public bootstrap operations override the API base URL and require no bearer token."},"servers":[{"url":"https://prooftask.com/api/agents/v1"}],"externalDocs":{"url":"https://prooftask.com/developers#reference","description":"Human guide, client and verification tools"},"security":[{"AgentBearer":[]}],"x-creation-workflow":{"guide":"https://prooftask.com/developers#create","exampleInput":"https://prooftask.com/developers/agent-project.json","client":"https://prooftask.com/developers/agent-client.mjs","operations":["getCreationDocuments","previewOperationConfirmation","createProject"],"consent":"Preview is read-only; review the exact terms before explicitly committing. Preserve the saved payload and requestId for retries."},"paths":{"/capabilities":{"get":{"operationId":"getAgentCapabilities","summary":"Read supported connection, billing and client capabilities without a credential","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentCapabilities"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/connections":{"post":{"operationId":"startAgentConnection","summary":"Start a short-lived connection; grants nothing until a human approves the code and exact access","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionRequest"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Connection"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/connections/poll":{"post":{"operationId":"pollAgentConnection","summary":"Exchange the private device code after approval; honor interval and keep the returned credential private","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionPollRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectionPoll"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[]}},"/api/acceptance/legal-config":{"get":{"operationId":"getCreationDocuments","summary":"Read current documents before preparing a new agreement; public and read-only","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegalConfig"}}}},"400":{"description":"Invalid preview input or body size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicError"}}}},"409":{"description":"Invalid preview input or body size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicError"}}}},"413":{"description":"Invalid preview input or body size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicError"}}}}},"security":[],"servers":[{"url":"https://prooftask.com"}]}},"/api/acceptance/confirmation-preview":{"post":{"operationId":"previewOperationConfirmation","summary":"Preview exact terms and digest; does not record consent or create an agreement","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConfirmationPreview"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Confirmation"}}}},"400":{"description":"Invalid preview input or body size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicError"}}}},"409":{"description":"Invalid preview input or body size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicError"}}}},"413":{"description":"Invalid preview input or body size","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicError"}}}}},"security":[],"servers":[{"url":"https://prooftask.com"}]}},"/me":{"get":{"operationId":"getAgent","summary":"Read own workspace, authorizer, scope, expiry and subjectRequirements for new agreements. Preserve these requirements in creation input; required human decisions cannot be automated.","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Grant"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/drafts":{"post":{"operationId":"prepareExternalDraft","summary":"Prepare an unsent BUYER agreement or SUPPLIER proposal for the same human editor. Role defaults to BUYER. No agreement, invitation, decision, signature or payment is created.","x-required-agent-action":"CREATE_DRAFT","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraft"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreparedDraft"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals":{"get":{"operationId":"listProposals","summary":"Read explicitly scoped supplier and received proposals","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProposal","summary":"Save a supplier proposal without publication","x-required-agent-action":"CREATE_PROPOSAL","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProposal"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"}}],"get":{"operationId":"getProposal","summary":"Read scoped proposal, decision readiness and the final project ID","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects":{"post":{"operationId":"createProject","summary":"Commit a new buyer agreement; retries reuse the exact input and requestId","x-required-agent-action":"CREATE_PROJECT","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProject"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"get":{"operationId":"getProject","summary":"Read current state, confirmations, material references and human link","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/record":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"get":{"operationId":"getRecord","summary":"Read historical record plus unsigned compatibility metadata","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentRecord"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/status":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"getStatus","summary":"Read five-minute signed status with caller nonce; not payment authorization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NonceRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/exports/standard-record":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"exportLegacyRecord","summary":"Legacy transport: requires independent trust for verification","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegacyExport"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/exports/result-package":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"exportResultPackage","summary":"Export portable v2 package and fresh signed status bound to the expected agreement and event head","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultReview"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/respond":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"respondToTerms","summary":"Named supplier response; current confirmation digest required for acceptance","x-required-agent-action":"RESPOND_TERMS","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RespondCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/submit":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"submitMaterials","summary":"Submit exact files for every agreed criterion","x-required-agent-action":"SUBMIT_MATERIALS","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/review":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"reviewDelivery","summary":"ACCEPT requires CONFIRM_COMPLETION, all MET, available originals, exact checkedFiles and current confirmation; other actions require REVIEW_DELIVERY","x-required-agent-action":"REVIEW_DELIVERY or CONFIRM_COMPLETION for ACCEPT","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/date-revision":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"requestDateRevision","summary":"Ask a human to issue revised dates","x-required-agent-action":"REQUEST_DATE_CHANGE","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DateRevisionCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/concern":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"raiseConcern","summary":"Raise a concern against the current confirmation for human resolution","x-required-agent-action":"RAISE_CONCERN","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConcernCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/handoff":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"handoffToHuman","summary":"Pause writes; only a human can resume","x-required-agent-action":"Any granted write action","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandoffCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/projects/{id}/issue-record":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"description":"Exact agreement version, not a revision-chain permission."}],"post":{"operationId":"requestResultIssuance","summary":"Issue this accepted version using existing coverage, or save a bounded continuation for when its payer authorizes coverage; no purchase or new acceptance","x-required-agent-action":"ISSUE_RESULT_RECORD","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueRecordCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"get":{"operationId":"listProjectWebhooks","summary":"List this grant’s subscriptions","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createProjectWebhook","summary":"Authorize exact projects and event types for an HTTPS callback","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreate"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/deliveries":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}},{"name":"after","in":"query","schema":{"type":"string","pattern":"^whc1_whd_[a-f0-9]{64}$","description":"Opaque insertion-order checkpoint bound to this subscription. Do not construct or compare cursors."},"description":"Use the returned next or saved checkpoint. Pre-1.3.1 hash cursors require one restart without after and event-ID deduplication."}],"get":{"operationId":"listWebhookDeliveries","summary":"Read delivery attempts and version references","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveries"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/verify":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"verifyProjectWebhook","summary":"Verify exact raw bytes, timestamp and current authorization","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookVerify"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifiedProjectEvent"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs":{"post":{"operationId":"prepareAutomationJob","summary":"Map materials and durably save a submission request","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationJobInput"}}}},"responses":{"201":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationJob"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"listAutomationJobs","summary":"Read jobs for the exact authorized project","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationJobList"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"parameters":[{"name":"projectId","in":"query","required":true,"schema":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"}}]}},"/jobs/{jobId}":{"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"get":{"operationId":"getAutomationJob","summary":"Read current state correlated to the saved submission","responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationJobStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/jobs/{jobId}/submit":{"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"submitAutomationJob","summary":"Explicitly submit the same persisted request on every retry","x-required-agent-action":"SUBMIT_MATERIALS","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExplicitJobSubmit"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutomationJobStatus"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/pause":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"webhook_pause","summary":"pause the subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/resume":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"webhook_resume","summary":"resume the subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/revoke":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"webhook_revoke","summary":"revoke the subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/rotate-secret":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"webhook_rotate_secret","summary":"rotate-secret the subscription","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResult"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks/{subscriptionId}/deliveries/{deliveryId}/redeliver":{"parameters":[{"name":"subscriptionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}},{"name":"deliveryId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":4000}}],"post":{"operationId":"redeliverProjectEvent","summary":"Replay the same event ID after rechecking authority","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmptyRequest"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReplay"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{id}/update":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"}}],"post":{"operationId":"updateProposal","summary":"update the exact proposal; publication does not confirm the final party binding","x-required-agent-action":"UPDATE_PROPOSAL","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalUpdateCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{id}/publish":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"}}],"post":{"operationId":"publishProposal","summary":"publish the exact proposal; publication does not confirm the final party binding","x-required-agent-action":"PUBLISH_PROPOSAL","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalPublishCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{id}/respond":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"}}],"post":{"operationId":"respondProposal","summary":"respond the exact proposal; publication does not confirm the final party binding","x-required-agent-action":"RESPOND_PROPOSAL","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalResponseCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{id}/withdraw":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"}}],"post":{"operationId":"withdrawProposal","summary":"withdraw the exact proposal; publication does not confirm the final party binding","x-required-agent-action":"WITHDRAW_PROPOSAL","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalWithdrawCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/proposals/{id}/handoff":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"}}],"post":{"operationId":"handoffProposal","summary":"handoff the exact proposal; publication does not confirm the final party binding","x-required-agent-action":"Any granted proposal action","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalHandoffCommand"}}}},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProposalView"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Credential invalid, expired, revoked, or parent authority ended","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Action or exact project not authorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project or route not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Business precondition, pause, stale state, or request conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Request body too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Saved-job, subscription or redelivery limit reached; stop and review the limit, not a timed automatic retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Export issuer not configured","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"AgentBearer":{"type":"http","scheme":"bearer","bearerFormat":"ptag_ credential","description":"Issued by an authorized human in /agents; HTTPS only; never use customer sessions or put tokens in URLs."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","minLength":1,"maxLength":4000},"retryable":{"const":false},"nextAction":{"type":"string","enum":["ASK_OWNER_TO_REAUTHORIZE","WAIT_FOR_HUMAN","READ_PROJECT_AND_REPLAN","REVIEW_PERMISSIONS_AND_REQUEST","REVIEW_CREATION_REQUIREMENTS","RESTART_DELIVERY_HISTORY"]},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"documentationUrl":{"type":"string","minLength":1,"maxLength":4000},"requiredHumanAction":{"type":"string","minLength":1,"maxLength":4000}},"required":["error","retryable"],"additionalProperties":false},"BlockedAction":{"type":"object","properties":{"action":{"type":"string","enum":["CREATE_DRAFT","CREATE_PROJECT","CREATE_PROPOSAL","UPDATE_PROPOSAL","PUBLISH_PROPOSAL","RESPOND_PROPOSAL","WITHDRAW_PROPOSAL","RESPOND_TERMS","SUBMIT_MATERIALS","REVIEW_DELIVERY","CONFIRM_COMPLETION","REQUEST_DATE_CHANGE","RAISE_CONCERN","ISSUE_RESULT_RECORD"]},"reason":{"type":"string","minLength":1,"maxLength":4000},"nextAction":{"const":"WAIT_FOR_HUMAN"},"requiredHumanAction":{"type":"string","minLength":1,"maxLength":4000},"humanUrl":{"type":"string","minLength":1,"maxLength":4000}},"required":["action","reason","nextAction","requiredHumanAction","humanUrl"],"additionalProperties":false},"DecisionAction":{"type":"object","properties":{"action":{"type":"string","enum":["RESPOND_TERMS","REVIEW_DELIVERY","CONFIRM_COMPLETION"]},"decision":{"type":"string","enum":["ACCEPT","REQUEST_CHANGES","DECLINE","REQUEST_EVIDENCE","REJECT"]},"allowed":{"type":"boolean"},"reason":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"nextAction":{"type":"string","enum":["EXECUTE","WAIT_FOR_HUMAN"]},"requiredHumanAction":{"type":"string","minLength":1,"maxLength":4000}},"required":["action","decision","allowed","reason","humanUrl","nextAction"],"additionalProperties":false},"Grant":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":4000},"agentId":{"type":"string","minLength":1,"maxLength":4000},"name":{"type":"string","minLength":1,"maxLength":100},"delegatedBy":{"type":"string","minLength":1,"maxLength":4000,"description":"Accountable authorizer; not the independent agentId."},"tenantId":{"type":"string","minLength":1,"maxLength":4000,"description":"Authorized workspace boundary. Compare with the intended workspace before planning an operation."},"organizationId":{"type":"string","minLength":1,"maxLength":4000,"description":"Organization represented within that workspace. A role or credential does not independently establish a company mandate."},"role":{"const":"TECHNICAL_OWNER"},"projectIds":{"type":"array","items":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"minItems":0,"maxItems":50},"proposalIds":{"type":"array","items":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"},"minItems":0,"maxItems":50},"actions":{"type":"array","items":{"type":"string","enum":["CREATE_DRAFT","CREATE_PROJECT","CREATE_PROPOSAL","UPDATE_PROPOSAL","PUBLISH_PROPOSAL","RESPOND_PROPOSAL","WITHDRAW_PROPOSAL","RESPOND_TERMS","SUBMIT_MATERIALS","REVIEW_DELIVERY","CONFIRM_COMPLETION","REQUEST_DATE_CHANGE","RAISE_CONCERN","ISSUE_RESULT_RECORD"]},"minItems":0,"maxItems":14},"createdAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"status":{"type":"string","enum":["ACTIVE","REVOKED","EXPIRED","AUTHORITY_ENDED"]},"subjectRequirements":{"type":"object","properties":{"revision":{"type":"integer","minimum":0},"requirements":{"$ref":"#/components/schemas/SubjectRequirements"}},"required":["revision","requirements"],"additionalProperties":false}},"required":["id","agentId","name","delegatedBy","tenantId","organizationId","role","projectIds","actions","createdAt","expiresAt","status"],"additionalProperties":false},"ProjectState":{"type":"string","minLength":1,"maxLength":4000,"description":"Current business state, separate from HTTP success, job preparation, record issuance, external signing and payment. Unknown future values require readback or human review; never infer success.","x-known-state-meanings":{"CANCELLED":"Buyer cancelled before supplier agreement; retain the history.","TERMINATED":"Both parties ended this agreement; payment and signing records remain separate.","AWAITING_SUPPLIER":"Named supplier must review the exact terms.","AGREEMENT_CHANGES_REQUESTED":"Humans must agree replacement terms before delivery continues.","SUPPLIER_DECLINED":"Supplier declined; stop this agreement's delivery actions.","LOCKED":"Terms agreed; supplier may deliver if currently authorized.","SUBMITTED":"Materials submitted; await the buyer's decision on this submission.","CHANGES_REQUESTED":"Supplier corrections requested; use the current review and submission IDs.","AWAITING_EVIDENCE":"More evidence required; no acceptance or rejection is implied.","BUYER_CONFIRMED":"Buyer acceptance recorded; not record issuance, independent quality verification, signing or payment completion.","BUYER_REJECTED":"Buyer rejected; stop delivery actions for this agreement.","SUPERSEDED":"Replaced by a different project ID; access does not transfer.","CONFIRMATION_CONTESTED":"Pause reliance on the confirmation; a human must resolve the concern.","CONFIRMATION_WITHDRAWN":"Stop reliance on the withdrawn confirmation; historical signatures remain historical."}},"ProjectHistoryEntry":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"kind":{"type":"string","minLength":1,"maxLength":4000},"at":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"actor":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":4000},"organizationId":{"type":"string","minLength":1,"maxLength":4000},"tenantId":{"type":"string","minLength":1,"maxLength":4000},"execution":{"type":"object","properties":{"agentId":{"type":"string","minLength":1,"maxLength":4000},"grantId":{"type":"string","minLength":1,"maxLength":4000},"delegatedBy":{"type":"string","minLength":1,"maxLength":4000},"action":{"type":"string","minLength":1,"maxLength":4000}},"required":["agentId","grantId","delegatedBy","action"],"additionalProperties":true}},"required":["id","organizationId"],"additionalProperties":true},"payload":{"type":"object"},"event":{"type":"object","description":"Original signed JEP event; use the published verifier and independent trust before relying on signed evidence."}},"required":["id","requestId","kind","at","actor","payload","event"],"additionalProperties":true},"ProjectView":{"type":"object","properties":{"project":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"state":{"$ref":"#/components/schemas/ProjectState"},"headEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"agreement":{"type":"object","properties":{"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"version":{"type":"integer","minimum":1},"criteria":{"type":"array","items":{"$ref":"#/components/schemas/Criterion"},"minItems":1,"maxItems":20},"deadline":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."}},"required":["digest","version","criteria","deadline"],"additionalProperties":true},"events":{"type":"array","items":{"$ref":"#/components/schemas/ProjectHistoryEntry"},"description":"Authorized history for this exact project; reconcile a saved operation using kind, requestId, agreement and actor.execution.grantId, not title or time proximity."},"submission":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"payload":{"type":"object"}},"required":["id","requestId","payload"],"additionalProperties":true},{"type":"null"}]},"review":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"payload":{"type":"object","properties":{"submissionId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"action":{"type":"string","enum":["ACCEPT","REQUEST_CHANGES","REQUEST_EVIDENCE","REJECT"]}},"required":["submissionId","action"],"additionalProperties":true}},"required":["id","payload"],"additionalProperties":true},{"type":"null"}]}},"required":["taskId","state","headEventHash","agreement","events"],"additionalProperties":true},"automation":{"type":"object","properties":{"mode":{"type":"string","enum":["AGENT","HUMAN"]},"revision":{"type":"integer","minimum":0}},"required":["mode","revision"],"additionalProperties":true},"nextAction":{"$ref":"#/components/schemas/NextAction"},"recordIssuance":{"$ref":"#/components/schemas/RecordIssuance"},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"availableActions":{"type":"array","items":{"type":"string","enum":["CREATE_DRAFT","CREATE_PROJECT","CREATE_PROPOSAL","UPDATE_PROPOSAL","PUBLISH_PROPOSAL","RESPOND_PROPOSAL","WITHDRAW_PROPOSAL","RESPOND_TERMS","SUBMIT_MATERIALS","REVIEW_DELIVERY","CONFIRM_COMPLETION","REQUEST_DATE_CHANGE","RAISE_CONCERN","ISSUE_RESULT_RECORD"]},"minItems":0,"maxItems":14},"blockedActions":{"type":"array","items":{"$ref":"#/components/schemas/BlockedAction"},"minItems":0,"maxItems":14},"decisionActions":{"type":"array","items":{"$ref":"#/components/schemas/DecisionAction"},"minItems":0,"maxItems":8},"note":{"type":"string","minLength":1,"maxLength":4000},"replayed":{"type":"boolean"},"emailUpdate":{"type":"object","description":"Notification outcome; FAILED or DISABLED never reverses a saved decision."}},"required":["project","automation","humanUrl","availableActions","blockedActions","note"],"additionalProperties":false},"Signature":{"type":"object","properties":{"algorithm":{"const":"Ed25519"},"value":{"type":"string","pattern":"^[A-Za-z0-9_-]+$"}},"required":["algorithm","value"],"additionalProperties":false},"NativeRecord":{"type":"object","properties":{"body":{"type":"object","properties":{"schema":{"type":"string","pattern":"^prooftask\\.buyer-confirmed-record/v[1-7]$"},"recordId":{"type":"string","minLength":1,"maxLength":4000},"issuedAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"agreement":{"type":"object"},"events":{"type":"array","items":{"type":"object"}},"conclusion":{"type":"object"}},"required":["schema","recordId","issuedAt","agreement","events","conclusion"],"additionalProperties":true},"signature":{"$ref":"#/components/schemas/Signature"}},"required":["body","signature"],"additionalProperties":false},"ExternalAssertions":{"type":"array","items":{"type":"object"},"description":"Unsigned compatibility metadata; not external verification, authority evidence or payment evidence."},"SignedStatus":{"type":"object","properties":{"body":{"type":"object","properties":{"schema":{"const":"prooftask.buyer-confirmed-status/v1"},"taskId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"headEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"state":{"$ref":"#/components/schemas/ProjectState"},"statusAsOf":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"freshUntil":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"nonce":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"recordDigest":{"type":"string","minLength":1,"maxLength":4000},"issuer":{"type":"object","properties":{"service":{"const":"Prooftask"},"keyId":{"type":"string","minLength":1,"maxLength":4000}},"required":["service","keyId"],"additionalProperties":false}},"required":["schema","taskId","agreementDigest","headEventHash","state","statusAsOf","freshUntil","nonce","recordDigest","issuer"],"additionalProperties":false},"record":{"$ref":"#/components/schemas/NativeRecord"},"signature":{"$ref":"#/components/schemas/Signature"}},"required":["body","record","signature"],"additionalProperties":false},"LegacyExport":{"type":"object","properties":{"schema":{"const":"prooftask.agent-standard-record-export/v1"},"mediaType":{"const":"application/json"},"record":{"$ref":"#/components/schemas/NativeRecord"},"externalAssertions":{"$ref":"#/components/schemas/ExternalAssertions"},"historicalValidity":{"const":"HISTORICAL_RECORD_AT_ISSUANCE"},"limitations":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4000},"minItems":1,"maxItems":10}},"required":["schema","mediaType","record","externalAssertions","historicalValidity","limitations"],"additionalProperties":false},"ExportRequest":{"type":"object","properties":{"expectedAgreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"nonce":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"}},"required":["expectedAgreementDigest","expectedEventHash","nonce"],"additionalProperties":false},"ResultReview":{"type":"object","properties":{"schema":{"const":"prooftask.result-review/v1"},"record":{"type":"object","properties":{"protected":{"type":"string","minLength":1,"maxLength":8192},"payload":{"type":"string","minLength":1,"maxLength":16777216},"signature":{"type":"string","minLength":1,"maxLength":1024}},"required":["protected","payload","signature"],"additionalProperties":false},"trust":{"type":"object","properties":{"schema":{"const":"prooftask.trust-bundle/v1"},"service":{"const":"Prooftask"},"keys":{"type":"array","items":{"type":"object"},"minItems":1,"maxItems":33},"releases":{"type":"array"}},"required":["schema","service","keys","releases"],"additionalProperties":false},"status":{"$ref":"#/components/schemas/SignedStatus"}},"required":["schema","record","trust","status"],"additionalProperties":false},"NonceRequest":{"type":"object","properties":{"nonce":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"}},"required":["nonce"],"additionalProperties":true,"examples":[{"nonce":"11111111-1111-4111-8111-111111111111"}]},"Criterion":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"title":{"type":"string","minLength":1,"maxLength":200},"requirement":{"type":"string","minLength":10,"maxLength":4000},"evidenceRequired":{"type":"string","minLength":3,"maxLength":4000}},"required":["id","title","requirement","evidenceRequired"],"additionalProperties":false},"File":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^(https:|urn:)"},"name":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","minimum":0,"maximum":2147483648},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["reference","name","size","sha256"],"additionalProperties":false},"TermsPolicy":{"type":"object","properties":{"reviewDeadline":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"noResponse":{"const":"NO_AUTOMATIC_ACCEPTANCE"},"originals":{"type":"object","properties":{"custodian":{"type":"string","minLength":3,"maxLength":500},"location":{"type":"string","minLength":3,"maxLength":1000},"access":{"type":"string","minLength":10,"maxLength":1000},"retainUntil":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."}},"required":["custodian","location","access","retainUntil"],"additionalProperties":false}},"required":["reviewDeadline","noResponse","originals"],"additionalProperties":false},"TextSnapshot":{"type":"object","properties":{"reference":{"type":"string","minLength":1,"maxLength":1000},"version":{"type":"string","minLength":1,"maxLength":100},"text":{"type":"string","minLength":1,"maxLength":30000},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["reference","version","text","digest"],"additionalProperties":false},"Documents":{"type":"object","properties":{"schema":{"const":"prooftask.operation-documents/v1"},"agreementEffect":{"$ref":"#/components/schemas/TextSnapshot"},"acceptanceEffect":{"$ref":"#/components/schemas/TextSnapshot"},"serviceTerms":{"anyOf":[{"$ref":"#/components/schemas/TextSnapshot"},{"type":"null"}]},"acceptanceNotice":{"anyOf":[{"$ref":"#/components/schemas/TextSnapshot"},{"type":"null"}]}},"required":["schema","agreementEffect","acceptanceEffect","serviceTerms","acceptanceNotice"],"additionalProperties":false},"LegalConfig":{"type":"object","properties":{"documents":{"$ref":"#/components/schemas/Documents"},"issuerDeclaration":{"anyOf":[{"type":"object"},{"type":"null"}]},"businessUse":{"type":"object","properties":{"paymentReviewPrerequisitesConfigured":{"type":"boolean"},"missing":{"type":"array","items":{"type":"string","minLength":1,"maxLength":4000},"minItems":0,"maxItems":20}},"required":["paymentReviewPrerequisitesConfigured","missing"],"additionalProperties":false}},"required":["documents","issuerDeclaration","businessUse"],"additionalProperties":false},"ConfirmationPreview":{"type":"object","properties":{"legalContext":{"$ref":"#/components/schemas/LegalContext"},"operation":{"type":"string","enum":["AGREEMENT","ACCEPTANCE"]}},"required":["legalContext","operation"],"additionalProperties":false},"Confirmation":{"type":"object","properties":{"confirmation":{"type":"object","properties":{"schema":{"const":"prooftask.operation-confirmation/v1"},"operation":{"type":"string","enum":["AGREEMENT","ACCEPTANCE"]},"effect":{"$ref":"#/components/schemas/TextSnapshot"},"serviceTerms":{"anyOf":[{"$ref":"#/components/schemas/TextSnapshot"},{"type":"null"}]},"acceptanceNotice":{"anyOf":[{"$ref":"#/components/schemas/TextSnapshot"},{"type":"null"}]},"serviceTermsAgreement":{"type":"string","enum":["CONFIRMED_WITH_OPERATION","NOT_CONFIGURED"]},"privacyConsent":{"const":"NOT_REQUESTED_BY_THIS_OPERATION"},"boundariesDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["schema","operation","effect","serviceTerms","acceptanceNotice","serviceTermsAgreement","privacyConsent","boundariesDigest","digest"],"additionalProperties":false}},"required":["confirmation"],"additionalProperties":false},"PublicError":{"type":"object","properties":{"error":{"type":"string","minLength":1,"maxLength":4000}},"required":["error"],"additionalProperties":false},"LegalContext":{"type":"object","properties":{"schema":{"const":"prooftask.agreement-boundaries/v1"},"purpose":{"type":"string","enum":["BUSINESS","TEST","DEMO"]},"contract":{"oneOf":[{"type":"object","properties":{"basis":{"const":"STANDALONE_AGREEMENT"}},"required":["basis"],"additionalProperties":false},{"type":"object","properties":{"basis":{"const":"EXISTING_CONTRACT"},"reference":{"type":"string","minLength":1,"maxLength":1000},"relevantTerms":{"type":"string","minLength":1,"maxLength":4000}},"required":["basis","reference","relevantTerms"],"additionalProperties":false}]},"sharing":{"type":"object","properties":{"rule":{"type":"string","enum":["PARTY_AUTHORIZED","PARTIES_ONLY","NAMED_REVIEWERS"]},"recipients":{"type":"array","items":{"type":"string","format":"email","maxLength":254},"minItems":0,"maxItems":10,"uniqueItems":true}},"required":["rule","recipients"],"additionalProperties":false},"documents":{"$ref":"#/components/schemas/Documents"}},"required":["schema","purpose","contract","sharing","documents"],"additionalProperties":false},"PartyRequirements":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"string","enum":["REGISTRATION","PERSON_IDENTITY","DOMAIN_CONTROL","REPRESENTATION"]},"minItems":0,"maxItems":4,"uniqueItems":true},"humanRequired":{"type":"boolean"}},"required":["checks","humanRequired"],"additionalProperties":false},"SubjectRequirements":{"type":"object","properties":{"schema":{"const":"prooftask.subject-requirements/v1"},"buyer":{"$ref":"#/components/schemas/PartyRequirements"},"provider":{"$ref":"#/components/schemas/PartyRequirements"}},"required":["schema","buyer","provider"],"additionalProperties":false},"CreateProject":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"subjectRequirements":{"$ref":"#/components/schemas/SubjectRequirements"},"title":{"type":"string","minLength":3,"maxLength":200},"scope":{"type":"string","minLength":10,"maxLength":4000},"buyerName":{"type":"string","minLength":1,"maxLength":200},"providerName":{"type":"string","minLength":1,"maxLength":200},"deadline":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"baselineStatement":{"type":"string","minLength":10,"maxLength":4000},"criteria":{"type":"array","items":{"$ref":"#/components/schemas/Criterion"},"minItems":1,"maxItems":20},"commercialReference":{"type":"string","minLength":1,"maxLength":500},"materialPolicy":{"const":"FILE_DIGESTS"},"termsPolicy":{"$ref":"#/components/schemas/TermsPolicy"},"legalContext":{"$ref":"#/components/schemas/LegalContext"},"confirmationDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"historyReference":{"type":"object","properties":{"schema":{"const":"prooftask.agreement-history-reference/v1"},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"adoptedArrangement":{"type":"string","minLength":1,"maxLength":240},"meaning":{"const":"HISTORICAL_CONTEXT_ONLY"}},"required":["schema","digest","adoptedArrangement","meaning"],"additionalProperties":false},"templateBinding":{"type":"object","description":"Optional validated result-template binding from the workspace; never invent template IDs or digests."}},"required":["requestId","title","scope","buyerName","providerName","deadline","baselineStatement","criteria","materialPolicy","termsPolicy","legalContext","confirmationDigest"],"additionalProperties":false},"Respond":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"action":{"type":"string","enum":["ACCEPT","REQUEST_CHANGES","DECLINE"]},"actorId":{"type":"string","minLength":3,"maxLength":200},"actorRole":{"type":"string","minLength":1,"maxLength":200},"authorityAttested":{"const":true},"reason":{"type":"string","minLength":10,"maxLength":4000},"confirmationDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["requestId","agreementDigest","action","authorityAttested","reason"],"additionalProperties":false},"Submit":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"previousSubmissionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},{"type":"null"}],"description":"Current submission being replaced, or null for the first submission."},"respondsToReviewId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},{"type":"null"}],"description":"Current REQUEST_CHANGES/REQUEST_EVIDENCE review being answered, otherwise null."},"summary":{"type":"string","minLength":10,"maxLength":4000},"items":{"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string","minLength":1,"maxLength":64},"summary":{"type":"string","minLength":3,"maxLength":4000},"references":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^(https:|urn:)"},"minItems":1,"maxItems":5},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"},"minItems":1,"maxItems":5}},"required":["criterionId","summary","references","files"],"additionalProperties":false},"minItems":1,"maxItems":20},"reusedFrom":{"type":"object","properties":{"taskId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"submissionId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"}},"required":["taskId","agreementDigest","submissionId"],"additionalProperties":false}},"required":["requestId","agreementDigest","previousSubmissionId","respondsToReviewId","summary","items"],"additionalProperties":false},"Review":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"submissionId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"action":{"type":"string","enum":["ACCEPT","REQUEST_CHANGES","REQUEST_EVIDENCE","REJECT"]},"reason":{"type":"string","minLength":10,"maxLength":4000},"nextAction":{"type":"string","enum":["PAYMENT_REVIEW","NEXT_STEP","WAIT_FOR_CORRECTION","WAIT_FOR_EVIDENCE","DO_NOT_PROCEED"]},"confirmationDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"criteria":{"type":"array","items":{"type":"object","properties":{"criterionId":{"type":"string","minLength":1,"maxLength":64},"verdict":{"type":"string","enum":["MET","NEEDS_CHANGES","NOT_MET","UNDETERMINED"]},"note":{"type":"string","minLength":3,"maxLength":4000},"checkedFiles":{"type":"array","items":{"$ref":"#/components/schemas/File"},"minItems":1,"maxItems":5},"materialAccess":{"type":"string","enum":["AVAILABLE","UNAVAILABLE","NOT_CHECKED"]}},"required":["criterionId","verdict","note"],"additionalProperties":false},"minItems":1,"maxItems":20}},"required":["requestId","agreementDigest","submissionId","expectedEventHash","action","reason","nextAction","criteria"],"additionalProperties":false},"DateRevision":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"purpose":{"type":"string","enum":["DELIVERY","REVIEW"]},"reason":{"type":"string","minLength":10,"maxLength":4000}},"required":["requestId","agreementDigest","expectedEventHash","purpose","reason"],"additionalProperties":false},"Concern":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"confirmationId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"reason":{"type":"string","minLength":10,"maxLength":4000}},"required":["requestId","agreementDigest","expectedEventHash","confirmationId","reason"],"additionalProperties":false},"Handoff":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"reason":{"type":"string","minLength":3,"maxLength":1000}},"required":["requestId","reason"],"additionalProperties":false,"examples":[{"requestId":"11111111-1111-4111-8111-111111111111","reason":"Please review the current original materials before automation continues."}]},"RecordIssuance":{"type":"object","properties":{"state":{"type":"string","enum":["NOT_READY","PENDING","ISSUED"]},"coverageReady":{"type":"boolean"},"maxCredits":{"const":1},"canRequest":{"type":"boolean"},"continuation":{"type":"string","enum":["NONE","WAITING_COVERAGE","ISSUED","NEEDS_REVIEW"]},"humanUrl":{"type":"string","minLength":1,"maxLength":4000}},"required":["state","coverageReady","maxCredits","canRequest","continuation","humanUrl"],"additionalProperties":false},"IssueRecord":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"confirmationId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"maxCredits":{"const":1}},"required":["requestId","agreementDigest","confirmationId","maxCredits"],"additionalProperties":false},"IssueRecordCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/IssueRecord"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"ConnectionRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"requestedActions":{"type":"array","items":{"type":"string","enum":["CREATE_DRAFT","CREATE_PROJECT","CREATE_PROPOSAL","UPDATE_PROPOSAL","PUBLISH_PROPOSAL","RESPOND_PROPOSAL","WITHDRAW_PROPOSAL","RESPOND_TERMS","SUBMIT_MATERIALS","REVIEW_DELIVERY","CONFIRM_COMPLETION","REQUEST_DATE_CHANGE","RAISE_CONCERN","ISSUE_RESULT_RECORD"]},"minItems":0,"maxItems":14}},"required":["name"],"additionalProperties":false},"Connection":{"type":"object","properties":{"schema":{"const":"prooftask.agent-connection/v1"},"deviceCode":{"type":"string","minLength":43,"maxLength":43},"userCode":{"type":"string","minLength":16,"maxLength":16},"verificationPath":{"type":"string","minLength":1,"maxLength":4000},"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"interval":{"type":"integer","minimum":5}},"required":["schema","deviceCode","userCode","verificationPath","expiresAt","interval"],"additionalProperties":false},"ConnectionPollRequest":{"type":"object","properties":{"deviceCode":{"type":"string","minLength":43,"maxLength":43}},"required":["deviceCode"],"additionalProperties":false},"ConnectionPoll":{"oneOf":[{"type":"object","properties":{"state":{"type":"string","enum":["PENDING","SLOW_DOWN"]},"interval":{"type":"integer","minimum":5}},"required":["state","interval"],"additionalProperties":false},{"type":"object","properties":{"state":{"const":"CONNECTED"},"token":{"type":"string","minLength":1,"maxLength":4000},"tokenType":{"const":"Bearer"},"grant":{"$ref":"#/components/schemas/Grant"},"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."}},"required":["state","token","tokenType","grant","expiresAt"],"additionalProperties":false}]},"AgentCapabilities":{"type":"object","properties":{"schema":{"const":"prooftask.agent-capabilities/v1"},"apiVersion":{"type":"string","minLength":1,"maxLength":4000},"connection":{"type":"object"},"billing":{"type":"object"},"workflow":{"type":"object"},"mcp":{"const":false},"clients":{"type":"object"},"documentationUrl":{"type":"string","minLength":1,"maxLength":4000}},"required":["schema","apiVersion","connection","billing","workflow","mcp","clients","documentationUrl"],"additionalProperties":false},"AgentRecord":{"type":"object","properties":{"body":{"type":"object","properties":{"schema":{"type":"string","pattern":"^prooftask\\.buyer-confirmed-record/v[1-7]$"},"recordId":{"type":"string","minLength":1,"maxLength":4000},"issuedAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"agreement":{"type":"object"},"events":{"type":"array","items":{"type":"object"}},"conclusion":{"type":"object"}},"required":["schema","recordId","issuedAt","agreement","events","conclusion"],"additionalProperties":true},"signature":{"$ref":"#/components/schemas/Signature"},"externalAssertions":{"$ref":"#/components/schemas/ExternalAssertions"}},"required":["body","signature","externalAssertions"],"additionalProperties":false},"AgentStatus":{"type":"object","properties":{"body":{"type":"object","properties":{"schema":{"const":"prooftask.buyer-confirmed-status/v1"},"taskId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"headEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"state":{"$ref":"#/components/schemas/ProjectState"},"statusAsOf":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"freshUntil":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"nonce":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"recordDigest":{"type":"string","minLength":1,"maxLength":4000},"issuer":{"type":"object","properties":{"service":{"const":"Prooftask"},"keyId":{"type":"string","minLength":1,"maxLength":4000}},"required":["service","keyId"],"additionalProperties":false}},"required":["schema","taskId","agreementDigest","headEventHash","state","statusAsOf","freshUntil","nonce","recordDigest","issuer"],"additionalProperties":false},"record":{"$ref":"#/components/schemas/NativeRecord"},"signature":{"$ref":"#/components/schemas/Signature"},"externalAssertions":{"$ref":"#/components/schemas/ExternalAssertions"}},"required":["body","record","signature","externalAssertions"],"additionalProperties":false},"RespondCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/Respond"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"SubmitCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/Submit"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"ReviewCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/Review"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"DateRevisionCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/DateRevision"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"ConcernCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/Concern"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"HandoffCommand":{"type":"object","properties":{"expectedEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/Handoff"}},"required":["expectedEventHash","automationRevision","input"],"additionalProperties":false},"WebhookCreate":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"target":{"type":"string","format":"uri","pattern":"^https://","maxLength":2048},"projectIds":{"type":"array","items":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"minItems":1,"maxItems":50},"eventTypes":{"type":"array","items":{"type":"string","enum":["agreement.confirmed","delivery.submitted","changes.requested","acceptance.decided","record.changed"]},"minItems":1,"maxItems":5},"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"confirmed":{"const":true}},"required":["requestId","target","projectIds","eventTypes","expiresAt","confirmed"],"additionalProperties":false},"NextAction":{"type":"object","properties":{"subjectType":{"const":"PROJECT"},"subjectId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"state":{"type":"string","enum":["NEEDS_YOU","WAITING_OTHER_PARTY","BLOCKED","COMPLETED","READY_TO_REUSE"]},"responsibleParty":{"anyOf":[{"type":"string","enum":["BUYER","SUPPLIER","BOTH"]},{"type":"null"}]},"action":{"type":"string","minLength":1,"maxLength":4000},"label":{"type":"string","minLength":1,"maxLength":4000},"reason":{"type":"string","minLength":1,"maxLength":4000},"dueAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},{"type":"null"}]},"overdue":{"type":"boolean"},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"agentAction":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]},"agreementVersion":{"type":"integer","minimum":1},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"expectedHeadEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"needsYourAction":{"type":"boolean"},"requiresHuman":{"type":"boolean"},"authoritativeState":{"$ref":"#/components/schemas/ProjectState"},"humanHandoff":{"type":"object","properties":{"revision":{"type":"integer","minimum":1},"at":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."}},"required":["revision","at"],"additionalProperties":false}},"required":["subjectType","subjectId","state","responsibleParty","action","reason","dueAt","overdue","humanUrl","agentAction","agreementVersion","expectedHeadEventHash","needsYourAction"],"additionalProperties":false},"CreateDraft":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"role":{"type":"string","enum":["BUYER","SUPPLIER"]},"source":{"type":"string","enum":["CRM","AGENT","API"]},"sourceReference":{"type":"string","minLength":0,"maxLength":200},"buyer":{"type":"string","minLength":0,"maxLength":200},"supplier":{"type":"string","minLength":0,"maxLength":200},"schema":{"const":"prooftask.agreement-draft/v1"},"title":{"type":"string","minLength":0,"maxLength":200},"scope":{"type":"string","minLength":0,"maxLength":4000},"baselineStatement":{"type":"string","minLength":0,"maxLength":4000},"buyerName":{"type":"string","minLength":0,"maxLength":200},"providerName":{"type":"string","minLength":0,"maxLength":200},"deadline":{"type":"string","minLength":0,"maxLength":24,"description":"An explicit UTC timestamp with milliseconds, or empty for an unfinished draft.","pattern":"^(?:$|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)$"},"commercialReference":{"type":"string","minLength":0,"maxLength":500},"criteria":{"type":"array","maxItems":20,"items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z][a-z0-9_-]*$"},"title":{"type":"string","minLength":0,"maxLength":200},"requirement":{"type":"string","minLength":0,"maxLength":4000},"evidenceRequired":{"type":"string","minLength":0,"maxLength":4000}},"additionalProperties":false}},"termsPolicy":{"type":"object","properties":{"reviewDeadline":{"type":"string","minLength":0,"maxLength":24,"description":"An explicit UTC timestamp with milliseconds, or empty for an unfinished draft.","pattern":"^(?:$|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)$"},"noResponse":{"const":"NO_AUTOMATIC_ACCEPTANCE"},"originals":{"type":"object","properties":{"custodian":{"type":"string","minLength":0,"maxLength":500},"location":{"type":"string","minLength":0,"maxLength":1000},"access":{"type":"string","minLength":0,"maxLength":1000},"retainUntil":{"type":"string","minLength":0,"maxLength":24,"description":"An explicit UTC timestamp with milliseconds, or empty for an unfinished draft.","pattern":"^(?:$|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)$"}},"additionalProperties":false}},"additionalProperties":false},"legalContext":{"type":"object","properties":{"schema":{"const":"prooftask.agreement-boundaries/v1"},"purpose":{"type":"string","enum":["BUSINESS","TEST","DEMO"]},"contract":{"type":"object","properties":{"basis":{"type":"string","enum":["STANDALONE_AGREEMENT","EXISTING_CONTRACT"]},"reference":{"type":"string","minLength":0,"maxLength":1000},"relevantTerms":{"type":"string","minLength":0,"maxLength":4000}},"additionalProperties":false},"sharing":{"type":"object","properties":{"rule":{"type":"string","enum":["PARTY_AUTHORIZED","PARTIES_ONLY","NAMED_REVIEWERS"]},"recipients":{"type":"array","maxItems":10,"uniqueItems":true,"items":{"type":"string","minLength":0,"maxLength":254,"format":"email"}}},"additionalProperties":false},"documents":{"type":"object","description":"Reference snapshot only. The human review uses the current operation documents and fresh confirmation."}},"additionalProperties":false},"subjectRequirements":{"type":"object","properties":{"schema":{"const":"prooftask.subject-requirements/v1"},"buyer":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"string","enum":["REGISTRATION","PERSON_IDENTITY","DOMAIN_CONTROL","REPRESENTATION"]},"maxItems":4,"uniqueItems":true},"humanRequired":{"type":"boolean"}},"required":["checks","humanRequired"],"additionalProperties":false},"provider":{"type":"object","properties":{"checks":{"type":"array","items":{"type":"string","enum":["REGISTRATION","PERSON_IDENTITY","DOMAIN_CONTROL","REPRESENTATION"]},"maxItems":4,"uniqueItems":true},"humanRequired":{"type":"boolean"}},"required":["checks","humanRequired"],"additionalProperties":false}},"additionalProperties":false,"required":["schema","buyer","provider"]},"externalSigning":{"type":"object","description":"A validated proposed signing policy. No signature, verified evidence or consent is imported."},"signing":{"type":"object","properties":{"enabled":{"type":"boolean"},"method":{"type":"string","enum":["EXTERNAL","NATIVE"]},"counterparty":{"type":"string","minLength":0,"maxLength":254},"contact":{"type":"string","minLength":0,"maxLength":4096},"principal":{"type":"string","minLength":0,"maxLength":200},"agreementSignBy":{"type":"string","minLength":0,"maxLength":24,"description":"An explicit UTC timestamp with milliseconds, or empty for an unfinished draft.","pattern":"^(?:$|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)$"},"acceptanceSignBy":{"type":"string","minLength":0,"maxLength":24,"description":"An explicit UTC timestamp with milliseconds, or empty for an unfinished draft.","pattern":"^(?:$|\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z)$"}},"additionalProperties":false},"recipientActorId":{"type":"string","minLength":0,"maxLength":200},"recipientReference":{"type":"string","minLength":0,"maxLength":68,"pattern":"^(?:$|ptc_[a-f0-9]{64})$"},"templateBinding":{"type":"object","description":"Exact template snapshot, values and matching draft work. Current template access is checked again on creation."},"specification":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":200},"version":{"type":"integer","minimum":1}},"required":["id","version"],"additionalProperties":false},"references":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2048},"minItems":0,"maxItems":20},"deadlineInstant":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},{"const":""}]},"reviewDeadlineInstant":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},{"const":""}]},"retainUntilInstant":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},{"const":""}]},"originalCustodian":{"type":"string","minLength":0,"maxLength":4000},"originalLocation":{"type":"string","minLength":0,"maxLength":4000},"originalAccess":{"type":"string","minLength":0,"maxLength":4000},"recordPurpose":{"type":"string","enum":["","BUSINESS","TEST","DEMO"]},"contractBasis":{"type":"string","enum":["","STANDALONE_AGREEMENT","EXISTING_CONTRACT"]},"contractClauses":{"type":"string","minLength":0,"maxLength":4000},"agreementSharing":{"type":"string","enum":["","PARTIES_ONLY","PARTY_AUTHORIZED","NAMED_REVIEWERS"]},"sharingRecipients":{"type":"string","minLength":0,"maxLength":4000},"signingEnabled":{"type":"boolean"},"signingMethod":{"type":"string","enum":["EXTERNAL","NATIVE"]},"signingAgreementInstant":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},{"const":""}]},"signingAcceptanceInstant":{"anyOf":[{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},{"const":""}]},"templateSelection":{"type":"object","description":"Unsent editor selection; current access and exact binding are checked by human review."}},"required":["requestId"],"additionalProperties":false},"PreparedDraft":{"type":"object","properties":{"draftId":{"type":"string","pattern":"^intake_[a-f0-9-]{36}$"},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"state":{"const":"DRAFT"}},"required":["draftId","humanUrl","state"],"additionalProperties":false},"ProposalTerms":{"type":"object","properties":{"subjectRequirements":{"$ref":"#/components/schemas/SubjectRequirements"},"title":{"type":"string","minLength":3,"maxLength":200},"scope":{"type":"string","minLength":10,"maxLength":4000},"buyerName":{"type":"string","minLength":1,"maxLength":200},"providerName":{"type":"string","minLength":1,"maxLength":200},"deadline":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"baselineStatement":{"type":"string","minLength":10,"maxLength":4000},"criteria":{"type":"array","items":{"$ref":"#/components/schemas/Criterion"},"minItems":1,"maxItems":20},"commercialReference":{"type":"string","minLength":1,"maxLength":500},"materialPolicy":{"const":"FILE_DIGESTS"},"termsPolicy":{"$ref":"#/components/schemas/TermsPolicy"},"legalContext":{"$ref":"#/components/schemas/LegalContext"},"historyReference":{"type":"object","properties":{"schema":{"const":"prooftask.agreement-history-reference/v1"},"digest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"adoptedArrangement":{"type":"string","minLength":1,"maxLength":240},"meaning":{"const":"HISTORICAL_CONTEXT_ONLY"}},"required":["schema","digest","adoptedArrangement","meaning"],"additionalProperties":false},"templateBinding":{"type":"object","description":"Optional validated result-template binding from the workspace; never invent template IDs or digests."}},"required":["title","scope","buyerName","providerName","deadline","baselineStatement","criteria","materialPolicy","termsPolicy","legalContext"],"additionalProperties":false},"CreateProposal":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"expectedVersion":{"const":0},"recipientActorId":{"type":"string","minLength":3,"maxLength":200},"recipientReference":{"type":"string","pattern":"^ptc_[a-f0-9]{64}$"},"terms":{"$ref":"#/components/schemas/ProposalTerms"}},"required":["requestId","expectedVersion","recipientActorId","recipientReference","terms"],"additionalProperties":false},"UpdateProposal":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"expectedVersion":{"type":"integer","minimum":1},"recipientActorId":{"type":"string","minLength":3,"maxLength":200},"recipientReference":{"type":"string","pattern":"^ptc_[a-f0-9]{64}$"},"terms":{"$ref":"#/components/schemas/ProposalTerms"}},"required":["requestId","expectedVersion","recipientActorId","recipientReference","terms"],"additionalProperties":false},"ProposalVersion":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"expectedVersion":{"type":"integer","minimum":1}},"required":["requestId","expectedVersion"],"additionalProperties":false},"ProposalResponse":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"proposalDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"action":{"type":"string","enum":["ACCEPT","REQUEST_CHANGES","DECLINE"]},"reason":{"type":"string","minLength":10,"maxLength":4000},"confirmationDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["requestId","proposalDigest","action","reason"],"additionalProperties":false},"ProposalView":{"type":"object","properties":{"proposal":{"type":"object","properties":{"id":{"type":"string","pattern":"^proposal_[a-f0-9-]{36}$"},"version":{"type":"integer","minimum":1},"state":{"type":"string","enum":["DRAFT","AWAITING_BUYER","CHANGES_REQUESTED","DECLINED","ACCEPTED","WITHDRAWN"]},"terms":{"type":"object"}},"required":["id","version","state","terms"],"additionalProperties":true},"role":{"type":"string","enum":["BUYER","SUPPLIER"]},"proposalHead":{"type":"string","pattern":"^[a-f0-9]{64}$"},"automation":{"type":"object","properties":{"mode":{"type":"string","enum":["AGENT","HUMAN"]},"revision":{"type":"integer","minimum":0}},"required":["mode","revision"],"additionalProperties":true},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"recipientUrl":{"type":"string","minLength":1,"maxLength":4000},"availableActions":{"type":"array","items":{"type":"string","enum":["CREATE_DRAFT","CREATE_PROJECT","CREATE_PROPOSAL","UPDATE_PROPOSAL","PUBLISH_PROPOSAL","RESPOND_PROPOSAL","WITHDRAW_PROPOSAL","RESPOND_TERMS","SUBMIT_MATERIALS","REVIEW_DELIVERY","CONFIRM_COMPLETION","REQUEST_DATE_CHANGE","RAISE_CONCERN","ISSUE_RESULT_RECORD"]},"minItems":0,"maxItems":14},"decisionActions":{"type":"array","items":{"type":"object"}},"blockedActions":{"type":"array","items":{"type":"object"}},"note":{"type":"string","minLength":1,"maxLength":4000},"projectId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"projectScoped":{"type":"boolean"},"replayed":{"type":"boolean"},"confirmation":{"type":"object"},"emailUpdate":{"type":"object"}},"required":["proposal","role","proposalHead","automation","humanUrl","recipientUrl","availableActions","decisionActions","blockedActions","note"],"additionalProperties":false},"ProposalList":{"type":"array","items":{"$ref":"#/components/schemas/ProposalView"},"minItems":0,"maxItems":50},"ProposalUpdateCommand":{"type":"object","properties":{"expectedProposalHead":{"type":"string","pattern":"^[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/UpdateProposal"}},"required":["expectedProposalHead","automationRevision","input"],"additionalProperties":false},"ProposalPublishCommand":{"type":"object","properties":{"expectedProposalHead":{"type":"string","pattern":"^[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/ProposalVersion"}},"required":["expectedProposalHead","automationRevision","input"],"additionalProperties":false},"ProposalWithdrawCommand":{"type":"object","properties":{"expectedProposalHead":{"type":"string","pattern":"^[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/ProposalVersion"}},"required":["expectedProposalHead","automationRevision","input"],"additionalProperties":false},"ProposalResponseCommand":{"type":"object","properties":{"expectedProposalHead":{"type":"string","pattern":"^[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/ProposalResponse"}},"required":["expectedProposalHead","automationRevision","input"],"additionalProperties":false},"ProposalHandoffCommand":{"type":"object","properties":{"expectedProposalHead":{"type":"string","pattern":"^[a-f0-9]{64}$"},"automationRevision":{"type":"integer","minimum":0},"input":{"$ref":"#/components/schemas/Handoff"}},"required":["expectedProposalHead","automationRevision","input"],"additionalProperties":false},"ProjectEvent":{"type":"object","properties":{"schema":{"const":"prooftask.project-event/v1"},"id":{"type":"string","pattern":"^evt_[a-f0-9]{64}$"},"type":{"type":"string","enum":["agreement.confirmed","delivery.submitted","changes.requested","acceptance.decided","record.changed"]},"projectId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"sequence":{"type":"integer","minimum":1},"occurredAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"agreementVersion":{"type":"integer","minimum":1},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"headEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"submissionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},{"type":"null"}]},"reviewId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},{"type":"null"}]},"state":{"$ref":"#/components/schemas/ProjectState"}},"required":["schema","id","type","projectId","sequence","occurredAt","agreementVersion","agreementDigest","headEventHash","submissionId","reviewId","state"],"additionalProperties":false},"WebhookSubscription":{"type":"object","properties":{"id":{"type":"string","pattern":"^wh_[a-f0-9-]{36}$"},"target":{"type":"string","format":"uri"},"projectIds":{"type":"array","items":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"minItems":1,"maxItems":50},"eventTypes":{"type":"array","items":{"type":"string","enum":["agreement.confirmed","delivery.submitted","changes.requested","acceptance.decided","record.changed"]},"minItems":1,"maxItems":5},"createdAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"expiresAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"state":{"type":"string","enum":["ACTIVE","PAUSED","REVOKED"]}},"required":["id","target","projectIds","eventTypes","createdAt","expiresAt","state"],"additionalProperties":false},"WebhookResult":{"type":"object","properties":{"subscription":{"$ref":"#/components/schemas/WebhookSubscription"},"secret":{"type":"string","minLength":1,"maxLength":100},"secretShown":{"type":"boolean"}},"required":["subscription"],"additionalProperties":false,"description":"Signing secret is shown once on create or rotation. Bounded retries can produce duplicates, delays and reordered events."},"WebhookList":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"},"minItems":0,"maxItems":50},"WebhookDelivery":{"type":"object","properties":{"payload":{"type":"string","minLength":1,"maxLength":8192},"id":{"type":"string","pattern":"^whd_[a-f0-9]{64}$"},"subscriptionId":{"type":"string","pattern":"^wh_[a-f0-9-]{36}$"},"eventId":{"type":"string","pattern":"^evt_[a-f0-9]{64}$"},"state":{"type":"string","enum":["PENDING","SENDING","DELIVERED","FAILED","CANCELLED"]},"attempts":{"type":"integer","minimum":0,"maximum":80},"retryUntilAttempt":{"type":"integer","minimum":8,"maximum":80},"nextAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"log":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"outcome":{"type":"string","minLength":1,"maxLength":4000},"status":{"type":"integer","minimum":0,"maximum":599},"payloadDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["at","outcome"],"additionalProperties":false},"minItems":0,"maxItems":80},"event":{"$ref":"#/components/schemas/ProjectEvent"}},"required":["id","subscriptionId","eventId","state","attempts","nextAt","log","event"],"additionalProperties":false},"WebhookDeliveries":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDelivery"},"minItems":0,"maxItems":100},"next":{"anyOf":[{"type":"string","pattern":"^whc1_whd_[a-f0-9]{64}$","description":"Opaque insertion-order checkpoint bound to this subscription. Do not construct or compare cursors."},{"type":"null"}]},"checkpoint":{"anyOf":[{"type":"string","pattern":"^whc1_whd_[a-f0-9]{64}$","description":"Opaque insertion-order checkpoint bound to this subscription. Do not construct or compare cursors."},{"type":"null"}]}},"required":["rows","next","checkpoint"],"additionalProperties":false,"description":"next is non-null for a full page. Persist checkpoint only after durably processing every returned row; retain it when next is null and poll with after=checkpoint. Empty reads preserve the checkpoint. Updates to existing attempts do not create new arrivals; reread history to reconcile attempts. Legacy hash cursors return WEBHOOK_CURSOR_RESET_REQUIRED; restart without after and deduplicate existing event IDs."},"WebhookReplay":{"type":"object","properties":{"id":{"type":"string","pattern":"^whd_[a-f0-9]{64}$"},"eventId":{"type":"string","pattern":"^evt_[a-f0-9]{64}$"},"state":{"const":"PENDING"}},"required":["id","eventId","state"],"additionalProperties":false},"WebhookVerify":{"type":"object","properties":{"rawBody":{"type":"string","minLength":1,"maxLength":8192},"timestamp":{"type":"string","pattern":"^[0-9]{10}$"},"signature":{"type":"string","pattern":"^v1=[a-f0-9]{64}$"}},"required":["rawBody","timestamp","signature"],"additionalProperties":false},"VerifiedProjectEvent":{"type":"object","properties":{"verified":{"const":true},"event":{"$ref":"#/components/schemas/ProjectEvent"},"currentNextAction":{"$ref":"#/components/schemas/NextAction"}},"required":["verified","event"],"additionalProperties":false},"AutomationJobInput":{"type":"object","properties":{"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"projectId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"workflowReference":{"type":"string","pattern":"^[a-zA-Z0-9:_-]{1,200}$"},"summary":{"type":"string","minLength":10,"maxLength":4000},"materials":{"type":"array","items":{"$ref":"#/components/schemas/SubmissionItem"},"minItems":1,"maxItems":20}},"required":["requestId","projectId","workflowReference","summary","materials"],"additionalProperties":false},"SubmissionItem":{"type":"object","properties":{"criterionId":{"type":"string","minLength":1,"maxLength":64},"summary":{"type":"string","minLength":3,"maxLength":4000},"references":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2048,"pattern":"^(https:|urn:)"},"minItems":1,"maxItems":5},"files":{"type":"array","items":{"$ref":"#/components/schemas/File"},"minItems":1,"maxItems":5}},"required":["criterionId","summary","references","files"],"additionalProperties":false},"AutomationJob":{"type":"object","properties":{"id":{"type":"string","pattern":"^job_[a-f0-9]{64}$"},"workflowReference":{"type":"string","minLength":1,"maxLength":200},"prepared":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"envelope":{"$ref":"#/components/schemas/SubmitCommand"}},"required":["projectId","envelope"],"additionalProperties":false},"submitted":{"type":"boolean"}},"required":["id","workflowReference","prepared","submitted"],"additionalProperties":false},"AutomationDecision":{"type":"object","properties":{"projectId":{"type":"string","pattern":"^delivery_[a-f0-9-]{36}$"},"agreementDigest":{"type":"string","pattern":"^[a-f0-9]{64}$"},"state":{"$ref":"#/components/schemas/ProjectState"},"headEventHash":{"type":"string","pattern":"^sha256:[a-f0-9]{64}$"},"submissionId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},{"type":"null"}]},"reviewId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},{"type":"null"}]},"recordedReviewAction":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]},"automationMode":{"type":"string","enum":["AGENT","HUMAN","UNKNOWN"]},"availableActions":{"type":"array","items":{"type":"string","enum":["CREATE_DRAFT","CREATE_PROJECT","CREATE_PROPOSAL","UPDATE_PROPOSAL","PUBLISH_PROPOSAL","RESPOND_PROPOSAL","WITHDRAW_PROPOSAL","RESPOND_TERMS","SUBMIT_MATERIALS","REVIEW_DELIVERY","CONFIRM_COMPLETION","REQUEST_DATE_CHANGE","RAISE_CONCERN","ISSUE_RESULT_RECORD"]},"minItems":0,"maxItems":14},"observedAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"humanUrl":{"type":"string","minLength":1,"maxLength":4000},"note":{"type":"string","minLength":1,"maxLength":4000}},"required":["projectId","agreementDigest","state","headEventHash","submissionId","reviewId","recordedReviewAction","automationMode","availableActions","observedAt","humanUrl","note"],"additionalProperties":false},"AutomationJobStatus":{"type":"object","properties":{"id":{"type":"string","pattern":"^job_[a-f0-9]{64}$"},"workflowReference":{"type":"string","minLength":1,"maxLength":200},"requestId":{"type":"string","format":"uuid","pattern":"^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[89aAbB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$"},"submitted":{"type":"boolean"},"createdAt":{"type":"string","format":"date-time","pattern":"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$","description":"Canonical UTC timestamp with millisecond precision; webhook signature timestamps use Unix seconds instead."},"current":{"$ref":"#/components/schemas/AutomationDecision"},"appliesToSavedSubmission":{"type":"boolean"},"decisionForSavedSubmission":{"anyOf":[{"type":"string","minLength":1,"maxLength":4000},{"type":"null"}]},"note":{"type":"string","minLength":1,"maxLength":4000}},"required":["id","workflowReference","requestId","submitted","createdAt","current","appliesToSavedSubmission","decisionForSavedSubmission","note"],"additionalProperties":false,"description":"submitted means the saved material command committed, not buyer acceptance. appliesToSavedSubmission=false means the current submission is not this saved request. decisionForSavedSubmission is null until a review matches this saved submission; null is neither acceptance nor rejection. Read current state separately for later concerns, withdrawal or supersession. Jobs remain owned by their original grant."},"AutomationJobList":{"type":"array","items":{"$ref":"#/components/schemas/AutomationJobStatus"},"minItems":0,"maxItems":500},"ExplicitJobSubmit":{"type":"object","properties":{"confirmed":{"const":true}},"required":["confirmed"],"additionalProperties":false},"EmptyRequest":{"type":"object","properties":{},"required":[],"additionalProperties":false}}},"x-retry-policy":{"networkFailure":"With the same active grant, retry the exact saved command envelope and requestId. A timeout or unreadable response means unknown, not failed. Do not reprepare after an uncertain send.","credentialReplacement":"Renew an existing authorization in /agents to retain the same grant, jobs, subscriptions and replay history while invalidating old tokens. A separately created authorization has a different grant. After such reauthorization, check /me tenantId and organizationId, read the exact project, and reconcile the saved requestId/kind/agreement/actor.execution.grantId before replanning. A 404 for an old job is not proof it never submitted. See /developers/agent-workflows.md#credential-replacement-and-unknown-results.","successfulReplay":"replayed:true; returns the current project without another business event.","conflict":"Read the project and replan deliberately; use a new requestId for changed content.","export":"Read-only, can be repeated with a new nonce. Each export has its own issuance time; do not assume byte-identical responses."}}