{"openapi":"3.1.0","info":{"title":"明格拉找服务与账户","version":"1.0.0","description":"同一账户与用途授权下，个人 Agent 与网页共用实际服务/版本/委托接口。支付和外部连接器未接通。"},"servers":[{"url":"https://mingoralabs.com"}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"One-time issued personal Agent grant; store privately and revoke via owner session."},"SessionCookie":{"type":"apiKey","in":"cookie","name":"mingora_session"}},"schemas":{"Id":{"type":"string","minLength":1,"maxLength":200},"UtcTimestamp":{"type":"string","format":"date-time"},"ServiceDefinition":{"type":"object","additionalProperties":false,"required":["schemaVersion","id","providerId","version","name","description","promises","audience","deadlineHours","failureHandling","executor","inputSchema","outputSchema","uiSchema","workflow","toolRefs","policyRef","acceptanceRef","pricePolicyRef"],"properties":{"schemaVersion":{"const":"1.0"},"id":{"$ref":"#/components/schemas/Id"},"providerId":{"$ref":"#/components/schemas/Id"},"version":{"type":"string","maxLength":100},"name":{"type":"string","minLength":1,"maxLength":16000},"description":{"type":"string","minLength":1,"maxLength":16000},"promises":{"type":"array","minItems":1,"maxItems":40,"items":{"type":"string","minLength":1,"maxLength":16000}},"audience":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"deadlineHours":{"type":"number","exclusiveMinimum":0,"maximum":720},"failureHandling":{"type":"string","minLength":1,"maxLength":16000},"executor":{"enum":["scholar.material-preflight","material.review","fortune.boundary","work.boundary"]},"materialType":{"type":"string","maxLength":200},"expertRequired":{"type":"boolean"},"developmentOnly":{"type":"boolean","description":"Reserved trusted runtime seed field; public publishers cannot set true."},"inputSchema":{"type":"object"},"outputSchema":{"type":"object"},"uiSchema":{"type":"object"},"workflow":{"type":"array","minItems":1,"maxItems":16,"items":{"$ref":"#/components/schemas/WorkflowStep"}},"toolRefs":{"type":"array","maxItems":12,"items":{"type":"string"}},"policyRef":{"const":"purpose-bound.v1"},"acceptanceRef":{"enum":["scholar.material.v1","artifact.user.v1","external.receipt.v1"]},"pricePolicyRef":{"const":"free.local.v1"}}},"WorkflowStep":{"type":"object","additionalProperties":false,"required":["id","type"],"properties":{"id":{"type":"string"},"type":{"enum":["rules","rule","transform","recheck","artifact","expert","external","wait_external"]},"label":{"type":"string"},"description":{"type":"string"},"required":{"type":"boolean"},"condition":{"const":"expertRequired"},"toolRef":{"type":"string"}}},"Account":{"type":"object","required":["id","name","email","tenantId","publisher","publisherVerification"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"tenantId":{"$ref":"#/components/schemas/Id"},"providerId":{"type":["string","null"]},"publisher":{"type":"boolean"},"publisherVerification":{"enum":["unverified","platform_owned","development_fixture"]},"createdAt":{"$ref":"#/components/schemas/UtcTimestamp"}}},"PurposeAuthorizationRequest":{"type":"object","additionalProperties":false,"required":["purpose","scopes","maxCostCny","consent"],"properties":{"purpose":{"type":"string","minLength":1,"maxLength":500},"scopes":{"type":"array","uniqueItems":true,"items":{"enum":["materials:read","artifacts:write"]}},"maxCostCny":{"const":0},"expiresAt":{"$ref":"#/components/schemas/UtcTimestamp"},"consent":{"oneOf":[{"const":true},{"type":"object","required":["materials"],"properties":{"materials":{"const":true}}}]},"supplierPolicy":{"enum":["service_owner","registered_unverified"],"default":"service_owner","description":"registered_unverified explicitly permits enrolled self-declared suppliers to claim an expert seed task. This does not certify expertise."}}},"PurposeAuthorization":{"allOf":[{"type":"object","required":["id","taskId","tenantId","principalId","purpose","scopes","maxCostCny","expiresAt","revokedAt"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"taskId":{"$ref":"#/components/schemas/Id"},"tenantId":{"$ref":"#/components/schemas/Id"},"principalId":{"$ref":"#/components/schemas/Id"},"purpose":{"type":"string"},"scopes":{"type":"array","items":{"enum":["materials:read","artifacts:write"]}},"maxCostCny":{"const":0},"consent":{"type":"object"},"supplierPolicy":{"enum":["service_owner","registered_unverified"]},"createdAt":{"$ref":"#/components/schemas/UtcTimestamp"},"expiresAt":{"$ref":"#/components/schemas/UtcTimestamp"},"revokedAt":{"type":["string","null"]}}}]},"Task":{"type":"object","required":["schemaVersion","id","tenantId","principalId","serviceId","serviceVersion","authorizationId","status","artifacts","evidence","createdAt","updatedAt"],"properties":{"schemaVersion":{"const":"1.0"},"id":{"$ref":"#/components/schemas/Id"},"tenantId":{"$ref":"#/components/schemas/Id"},"principalId":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"serviceVersion":{"type":"string"},"authorizationId":{"$ref":"#/components/schemas/Id"},"status":{"enum":["waiting_user","waiting_provider","running","waiting_external","waiting_expert","ready_for_acceptance","succeeded","failed","cancelled"]},"input":{"type":"object"},"expertRequired":{"type":"boolean"},"assignedProviderAccountId":{"type":["string","null"]},"assignedProviderId":{"type":["string","null"]},"supplierVerification":{"type":["string","null"]},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/Artifact"}},"evidence":{"type":"array","items":{"$ref":"#/components/schemas/Evidence"}},"issues":{"type":"array","items":{"$ref":"#/components/schemas/Issue"}},"attempts":{"type":"array"},"history":{"type":"array"},"reworkCount":{"type":"integer","minimum":0,"maximum":10},"createdAt":{"$ref":"#/components/schemas/UtcTimestamp"},"updatedAt":{"$ref":"#/components/schemas/UtcTimestamp"},"cost":{"$ref":"#/components/schemas/Cost"},"visibility":{"enum":["owner","provider"]},"permissions":{"$ref":"#/components/schemas/TaskPermissions"}}},"TaskPermissions":{"type":"object","required":["canSupplyMaterials","canRework","canCancel","canRevoke","canClaim","canExecute","canReview","canAccept"],"properties":{"canSupplyMaterials":{"type":"boolean"},"canRework":{"type":"boolean"},"canCancel":{"type":"boolean"},"canRevoke":{"type":"boolean"},"canClaim":{"type":"boolean"},"canExecute":{"type":"boolean"},"canReview":{"type":"boolean"},"canAccept":{"type":"boolean"}}},"Artifact":{"type":"object","required":["id","taskId","attemptId","name","mimeType","size","sha256","createdAt","downloadUrl"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"taskId":{"$ref":"#/components/schemas/Id"},"attemptId":{"$ref":"#/components/schemas/Id"},"name":{"type":"string"},"mimeType":{"type":"string"},"size":{"type":"integer","minimum":0,"maximum":524288},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"},"createdAt":{"$ref":"#/components/schemas/UtcTimestamp"},"downloadUrl":{"type":"string"}}},"Evidence":{"type":"object","required":["id","kind","issuer","sourceRef","observedAt","artifactHash","verificationMethod"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"kind":{"type":"string","description":"system_readback, user_self_report, human_review, user_acceptance. Simulated sandbox evidence cannot satisfy a production task; no current connector can issue a trusted external_receipt."},"issuer":{"type":"string"},"sourceRef":{"type":"string"},"observedAt":{"$ref":"#/components/schemas/UtcTimestamp"},"artifactHash":{"type":["string","null"]},"verificationMethod":{"type":"string"},"note":{"type":"string"}}},"Issue":{"type":"object","required":["severity"],"properties":{"code":{"type":"string"},"severity":{"enum":["blocker","warning","info"]},"message":{"type":"string"},"path":{"type":"string"}}},"Cost":{"type":"object","required":["currency","authorizedMaxCny","actualCostCny","paymentEnabled"],"properties":{"currency":{"const":"CNY"},"authorizedMaxCny":{"const":0},"actualCostCny":{"const":0},"paymentEnabled":{"const":false},"modelCalls":{"const":0},"externalCalls":{"const":0}}},"CandidateRevision":{"type":"object","required":["schemaVersion","id","serviceId","baseVersion","version","changes","evidenceRefs","validationReports","riskClass","status"],"properties":{"schemaVersion":{"const":"1.0"},"id":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"baseVersion":{"type":["string","null"]},"version":{"type":"string"},"changes":{"type":["array","object"]},"evidenceRefs":{"type":"array","maxItems":40,"items":{"type":"string"}},"validationReports":{"type":"array","items":{"type":"string"}},"riskClass":{"enum":["trusted_seed","configuration_low","workflow_medium"]},"status":{"enum":["candidate","validated","validation_failed","active"]},"definitionHash":{"type":"string"},"createdAt":{"$ref":"#/components/schemas/UtcTimestamp"},"createdBy":{"$ref":"#/components/schemas/Id"}}},"ValidationReport":{"type":"object","required":["id","serviceId","version","definitionHash","passed","executedBy","gates","cases"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"version":{"type":"string"},"caseSetRef":{"type":"string"},"definitionHash":{"type":"string"},"status":{"enum":["passed","failed"]},"passed":{"type":"boolean"},"executedBy":{"const":"platform_sandbox"},"requestedBy":{"$ref":"#/components/schemas/Id"},"gates":{"type":"object"},"cases":{"type":"array","maxItems":12},"schemaErrors":{"type":"array"},"simulation":{"const":false,"description":"Report is genuinely executed and persisted; case inputs are explicitly engineering fixtures, not customer or commercial validation."}}},"Activation":{"type":"object","required":["serviceId","version","scope","cohort","activatedAt","rollbackVersion","evidenceRefs"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"version":{"type":"string"},"scope":{"enum":["service","cohort"]},"cohort":{"oneOf":[{"type":"null"},{"type":"object","required":["percentage","version"],"properties":{"percentage":{"type":"integer","minimum":1,"maximum":25},"version":{"type":"string"}}}]},"activatedAt":{"$ref":"#/components/schemas/UtcTimestamp"},"rollbackVersion":{"type":["string","null"]},"evidenceRefs":{"type":"array","items":{"type":"string"}},"activatedBy":{"$ref":"#/components/schemas/Id"},"status":{"enum":["active","rollback"]}}},"FeedbackEvent":{"type":"object","required":["schemaVersion","id","serviceId","serviceVersion","scope","kind","occurredAt","consentScope","payload"],"properties":{"schemaVersion":{"const":"1.0"},"id":{"$ref":"#/components/schemas/Id"},"taskId":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"serviceVersion":{"type":"string"},"scope":{"enum":["personal","organization","service","public_proposal"]},"kind":{"type":"string"},"occurredAt":{"$ref":"#/components/schemas/UtcTimestamp"},"consentScope":{"type":"string"},"payload":{"type":"object"}},"description":"Collected and authorized by the separate evolution service. Platform tenant/principal identity is always derived from authentication, never client trust."},"ErrorResponse":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","retryable"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object"}}}}},"TaskResponse":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["task","permissions"],"properties":{"task":{"anyOf":[{"$ref":"#/components/schemas/Task"},{"$ref":"#/components/schemas/RedactedTask"}]},"definition":{"$ref":"#/components/schemas/ServiceDefinition"},"authorization":{"oneOf":[{"$ref":"#/components/schemas/PurposeAuthorization"},{"type":"null"}]},"permissions":{"$ref":"#/components/schemas/TaskPermissions"}}}}},"RevisionResponse":{"type":"object","required":["data","revision","version","definition"],"properties":{"data":{"type":"object"},"revision":{"$ref":"#/components/schemas/CandidateRevision"},"candidate":{"$ref":"#/components/schemas/CandidateRevision"},"version":{"type":"string"},"definition":{"$ref":"#/components/schemas/ServiceDefinition"}}},"ValidationResponse":{"type":"object","required":["data","report","passed"],"properties":{"data":{"type":"object"},"report":{"$ref":"#/components/schemas/ValidationReport"},"validationReport":{"$ref":"#/components/schemas/ValidationReport"},"reportId":{"type":"string"},"version":{"type":"string"},"passed":{"type":"boolean"}}},"RedactedTask":{"type":"object","required":["id","serviceId","serviceVersion","status","visibility","permissions"],"properties":{"id":{"$ref":"#/components/schemas/Id"},"serviceId":{"$ref":"#/components/schemas/Id"},"serviceVersion":{"type":"string"},"status":{"type":"string"},"visibility":{"const":"provider"},"summary":{"type":"string"},"permissions":{"$ref":"#/components/schemas/TaskPermissions"}},"description":"Eligible supplier sees no tenant/principal identity or materials before authenticated claim."}}},"paths":{"/api/v1/agent/capabilities":{"get":{"summary":"Read all product access surfaces and truthful execution boundaries","security":[],"parameters":[],"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_get_agent_capabilities"}},"/api/v1/agent/connections":{"post":{"summary":"Request an owner-approved scoped agent connection; does not create a user account","security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceSecret":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Client-generated 32 random bytes encoded as lowercase hex. Keep privately; preserve across retries."},"clientName":{"type":"string","maxLength":80},"scopes":{"type":"array","items":{"enum":["services:read","tasks:read","tasks:write","requests:read","requests:write","research:read","research:write"]},"minItems":1},"ttlHours":{"type":"number","minimum":0.05,"maximum":24,"default":1}},"required":["deviceSecret","clientName","scopes"],"additionalProperties":false}}}},"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_post_agent_connections"}},"/api/v1/agent/connections/{code}":{"get":{"summary":"Owner reads a connection to approve; code is not a credential","security":[{"SessionCookie":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_get_agent_connections_code"}},"/api/v1/agent/connections/{code}/decision":{"post":{"summary":"Owner explicitly approves or denies displayed scopes; requires exact Origin and owner cookie","security":[{"SessionCookie":[]}],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string"}},{"name":"Origin","in":"header","required":true,"schema":{"type":"string"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allow":{"type":"boolean"}},"required":["allow"],"additionalProperties":false}}}},"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_post_agent_connections_code_decision"}},"/api/v1/agent/token":{"post":{"summary":"Collect scoped grant once after owner approval; no password or token is stored in plaintext","security":[],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deviceSecret":{"type":"string","pattern":"^[a-f0-9]{64}$","description":"Client-generated 32 random bytes encoded as lowercase hex. Keep privately; preserve across retries."}},"required":["deviceSecret"],"additionalProperties":false}}}},"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_post_agent_token"}},"/api/v1/agent/identity":{"get":{"summary":"Read server-derived account and executor identity; no credentials in response","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"parameters":[],"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_get_agent_identity"}},"/api/v1/agent/requests":{"get":{"summary":"Read own saved requests and replies; optionally query original clientRequestId","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"requests:read","parameters":[{"name":"clientRequestId","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_get_agent_requests"},"post":{"summary":"Save goal in the existing capability-feedback queue; no automatic execution or charge","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"requests:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","maxLength":120},"product":{"type":"string","description":"Product ID from capability directory or all"},"goal":{"type":"string","maxLength":4000},"expectedResult":{"type":"string","maxLength":2000}},"required":["title","product","goal","expectedResult"],"additionalProperties":false}}}},"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_post_agent_requests"}},"/api/v1/agent/requests/{id}":{"get":{"summary":"Read own stable request ID, status and human replies","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"requests:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_get_agent_requests_id"}},"/api/v1/agent/requests/cancel-pending":{"post":{"summary":"Atomically cancel an unreceived original key; reject late writes, or return an already saved record without deleting it","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"requests:write","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"clientRequestId":{"type":"string","maxLength":160}},"required":["clientRequestId"],"additionalProperties":false}}}},"responses":{"200":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"201":{"description":"JSON envelope: data contains result; error contains failure. Secrets are delivered once."},"202":{"description":"Authorization pending; Retry-After: 5. Same original secret and key; no new connection."},"400":{"description":"Invalid or unknown field"},"401":{"description":"Owner login or valid agent grant required"},"403":{"description":"Scope denied or connection denied"},"409":{"description":"Changed request under same key, account changed, or secret already delivered once"},"410":{"description":"Connection expired"},"429":{"description":"Admission capacity or safety rate limit; reads of existing records remain available"},"503":{"description":"Persistence unavailable; result is unconfirmed, query original identifier before retry"}},"operationId":"mingora_post_agent_requests_cancel_pending"}},"/api/v1/health":{"get":{"summary":"Read actual persistence/external/model/payment readiness","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/discovery":{"get":{"summary":"Search public services by q/kind/source; explicit publication is self-reported, not automatic execution","security":[],"parameters":[{"in":"query","name":"q","schema":{"type":"string","maxLength":200}},{"in":"query","name":"kind","schema":{"type":"string","maxLength":200}},{"in":"query","name":"source","schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/autonomous/catalog":{"get":{"summary":"Read currently verified automatic rule tools and public demand evidence","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/autonomous/operations":{"get":{"summary":"Read daily targets, actual counts, source failures and bounded fixed-case stability evidence","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/autonomous/services/{id}/run":{"post":{"summary":"Run a current verified free rule tool on explicitly supplied UTF-8 material; no account, model call, payment or server material retention","security":[],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Origin","required":true,"schema":{"type":"string"},"description":"The exact origin of the requested endpoint, e.g. https://mingoralabs.com. This is not an authentication credential."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"materials":{"type":"string","minLength":1,"maxLength":120000}},"required":["materials"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object"}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-applications":{"get":{"summary":"Read only your own private provider applications","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:read","parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"post":{"summary":"Save private service information; publish only after explicit publicConsent","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":80},"providerName":{"type":"string","maxLength":80},"kind":{"enum":["ai","online","offline"]},"summary":{"type":"string","maxLength":500},"audience":{"type":"string","maxLength":160},"delivery":{"type":"string","maxLength":500},"entryUrl":{"type":"string","maxLength":500},"coverage":{"type":"string","maxLength":160},"pricing":{"type":"string","maxLength":160},"examples":{"type":"string","maxLength":1000},"inputs":{"type":"string","maxLength":500},"responseTime":{"type":"string","maxLength":160},"boundaries":{"type":"string","maxLength":500},"contactEmail":{"type":"string","format":"email","maxLength":200},"consent":{"const":true}},"required":["name","providerName","kind","summary","audience","delivery","contactEmail","consent"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-applications/{id}":{"get":{"summary":"Read your own application","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:read","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"patch":{"summary":"Edit private service draft; public snapshot is unchanged until publish","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":80},"providerName":{"type":"string","maxLength":80},"kind":{"enum":["ai","online","offline"]},"summary":{"type":"string","maxLength":500},"audience":{"type":"string","maxLength":160},"delivery":{"type":"string","maxLength":500},"entryUrl":{"type":"string","maxLength":500},"coverage":{"type":"string","maxLength":160},"pricing":{"type":"string","maxLength":160},"examples":{"type":"string","maxLength":1000},"inputs":{"type":"string","maxLength":500},"responseTime":{"type":"string","maxLength":160},"boundaries":{"type":"string","maxLength":500},"contactEmail":{"type":"string","format":"email","maxLength":200},"consent":{"const":true}},"required":["name","providerName","kind","summary","audience","delivery","contactEmail","consent"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-applications/{id}/withdraw":{"post":{"summary":"Withdraw your own provider application","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-applications/{id}/publish":{"post":{"summary":"Explicitly publish checked public fields; excludes private contact, marks quality unverified","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"publicConsent":{"const":true}},"required":["publicConsent"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-applications/{id}/unpublish":{"post":{"summary":"Remove public listing and stop new enquiries; existing private conversations retained","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-conversations":{"get":{"summary":"Read only your participant conversations; not visible with services:read","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"service-messages:read","parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"post":{"summary":"Send initial text enquiry to a published provider; server derives both participants","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"service-messages:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"serviceId":{"type":"string"},"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["serviceId","message"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-conversations/{id}":{"get":{"summary":"Read private messages only as a current participant","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"service-messages:read","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/service-conversations/{id}/messages":{"post":{"summary":"Send a persisted text message to the other participant; idempotent, rate and capacity limited","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"service-messages:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"message":{"type":"string","minLength":1,"maxLength":2000}},"required":["message"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/catalog":{"get":{"summary":"Read trusted components/tools/policy and publisher templates","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/auth/options":{"get":{"summary":"Read actual configured login methods; unconfigured methods stay disabled","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/auth/email/code":{"post":{"summary":"Send bounded email challenge using operator service; can bind an unused email to current cookie owner","security":[],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email","maxLength":200}},"required":["email"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/auth/email/session":{"post":{"summary":"Verify one-time email challenge; existing unverified accounts require original owner session, no silent merge","security":[],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"email":{"type":"string","format":"email","maxLength":200},"challengeId":{"type":"string"},"code":{"type":"string","pattern":"^[0-9]{6}$"}},"required":["email","challengeId","code"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/auth/phone/code":{"post":{"summary":"Send bounded mainland China phone challenge using operator service","security":[],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"phone":{"type":"string","maxLength":20}},"required":["phone"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/auth/phone/session":{"post":{"summary":"Verify one-time phone challenge; first verification creates normal account","security":[],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"phone":{"type":"string","maxLength":20},"challengeId":{"type":"string"},"code":{"type":"string","pattern":"^[0-9]{6}$"}},"required":["phone","challengeId","code"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/auth/google/start":{"get":{"summary":"Start configured browser OAuth; mode=link requires same-origin owner cookie","security":[],"parameters":[{"in":"query","name":"returnTo","schema":{"type":"string"},"description":"Allowlisted relative product destination"},{"in":"query","name":"mode","schema":{"enum":["link"]}}],"responses":{"303":{"description":"Redirect to configured provider with bound browser state"},"403":{"description":"Linking is not authorized"},"503":{"description":"Provider not configured"}}}},"/api/v1/auth/google/callback":{"get":{"summary":"Consume bound browser OAuth callback once; cannot be used as a bearer login","security":[],"parameters":[],"responses":{"303":{"description":"Verified session redirect, or mapped error recovery page"},"503":{"description":"Provider not configured"}}}},"/api/v1/auth/wechat/start":{"get":{"summary":"Start configured browser OAuth; mode=link requires same-origin owner cookie","security":[],"parameters":[{"in":"query","name":"returnTo","schema":{"type":"string"},"description":"Allowlisted relative product destination"},{"in":"query","name":"mode","schema":{"enum":["link"]}}],"responses":{"303":{"description":"Redirect to configured provider with bound browser state"},"403":{"description":"Linking is not authorized"},"503":{"description":"Provider not configured"}}}},"/api/v1/auth/wechat/callback":{"get":{"summary":"Consume bound browser OAuth callback once; cannot be used as a bearer login","security":[],"parameters":[],"responses":{"303":{"description":"Verified session redirect, or mapped error recovery page"},"503":{"description":"Provider not configured"}}}},"/api/v1/accounts":{"post":{"summary":"Register a real account; publisher identity is assigned by server","security":[],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"name":{"type":"string","maxLength":80},"username":{"type":"string","minLength":2,"maxLength":32,"description":"Chinese letters/numbers or ASCII letters/numbers/underscore/dot/hyphen; NFKC and lowercase canonical identity"},"email":{"type":"string","format":"email","maxLength":200},"password":{"type":"string","minLength":8,"maxLength":256},"publisher":{"type":"boolean"}},"required":["password"],"anyOf":[{"required":["username"]},{"required":["email"]}]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/session":{"get":{"summary":"Read account session","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"post":{"summary":"Login; HttpOnly session cookie returned","security":[],"parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"identifier":{"type":"string","maxLength":200},"email":{"type":"string","format":"email","maxLength":200},"password":{"type":"string","maxLength":256}},"required":["password"],"oneOf":[{"required":["identifier"]},{"required":["email"]}]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/session/logout":{"post":{"summary":"Revoke owner session","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:read","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/grants":{"get":{"summary":"Read own Agent grant metadata","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"grants:manage","parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"post":{"summary":"Issue one-time private Agent token; requires owner Cookie session","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"grants:manage","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"clientName":{"type":"string"},"scopes":{"type":"array","items":{"enum":["service-messages:read","service-messages:write","services:read","services:write","tasks:read","tasks:write","grants:manage","home:read","home:control","home:manage","research:read","research:write","research:work","requests:read","requests:write"]}},"ttlHours":{"type":"number","minimum":0.05,"maximum":720}},"required":["clientName","scopes"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/grants/{id}/revoke":{"post":{"summary":"Revoke own Agent token immediately","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"grants:manage","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/providers/enroll":{"post":{"summary":"Self-declare supplier ability; does not certify expertise","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"services":{"type":"array","items":{"type":"string"},"maxItems":10},"attestation":{"const":true},"description":{"type":"string"}},"required":["services","attestation"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services":{"get":{"summary":"Discover published services and account cohort definition","security":[],"parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"post":{"summary":"Create an owned namespace draft with trusted runtime tools","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"definition":{"$ref":"#/components/schemas/ServiceDefinition"}},"required":["definition"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}":{"get":{"summary":"Read service promise and effective definition","security":[],"parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/versions/{version}":{"get":{"summary":"Read immutable version; unpublished candidates require owner","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:read","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"path","name":"version","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/draft":{"patch":{"summary":"Edit non-executable owned draft","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"definition":{"$ref":"#/components/schemas/ServiceDefinition"}},"required":["definition"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/revisions":{"post":{"summary":"Create immutable owner candidate; feedback is evidence only","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"baseVersion":{"type":"string"},"definition":{"$ref":"#/components/schemas/ServiceDefinition"},"changes":{"type":["object","array"]},"evidenceRefs":{"type":"array","items":{"type":"string"},"maxItems":40}},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/validations":{"post":{"summary":"Independently execute fixed zero-cost sandbox cases","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string"},"caseSetRef":{"type":"string"},"revisionId":{"type":"string"}},"required":["version"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/activations":{"post":{"summary":"Activate exact validated definition; 1–25% cohort fixed policy","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string"},"scope":{"enum":["service","cohort","global"]},"cohort":{"type":"object","additionalProperties":false,"properties":{"percentage":{"type":"integer","minimum":1,"maximum":25},"percent":{"type":"integer","minimum":1,"maximum":25},"principalId":{"type":"string"}},"required":[]},"cohortPercent":{"type":"integer","minimum":1,"maximum":25},"validationId":{"type":"string"},"evidenceRefs":{"type":"array","items":{"type":"string"}}},"required":["version"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/rollbacks":{"post":{"summary":"Restore known published version; existing tasks stay locked","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"version":{"type":"string"},"reason":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/history":{"get":{"summary":"Read persisted revisions, reports, activations","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:read","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/services/{id}/safety":{"post":{"summary":"Immediately disable new and in-flight execution","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"services:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"disabled":{"type":"boolean"},"reason":{"type":"string"}},"required":["disabled"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks":{"get":{"summary":"Read owned tasks and redacted eligible supplier inbox","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:read","parameters":[],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}},"post":{"summary":"Create version-locked, purpose-authorized actual-material task","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"serviceId":{"type":"string"},"input":{"type":"object"},"authorization":{"$ref":"#/components/schemas/PurposeAuthorizationRequest"}},"required":["serviceId","input","authorization"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}":{"get":{"summary":"Read authorized task, version and current permissions","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:read","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskResponse"}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/materials":{"post":{"summary":"Supply actual materials; previous evidence retained","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"input":{"type":"object"}},"required":["input"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/execute":{"post":{"summary":"Run trusted bounded adapter and persist actual file artifacts","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/claim":{"post":{"summary":"Eligible authenticated supplier claims real task","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/review":{"post":{"summary":"Assigned supplier reviews current artifact attempt","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"decision":{"enum":["approve","needs_changes"]},"notes":{"type":"string"}},"required":["decision","notes"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/accept":{"post":{"summary":"Owner accepts files after fixed gates pass","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"notes":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/rework":{"post":{"summary":"Owner requests bounded rework without changing service promise","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reason":{"type":"string"}},"required":["reason"]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/cancel":{"post":{"summary":"Owner cancels and revokes purpose; no external compensation claim","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reason":{"type":"string"}},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/authorization/revoke":{"post":{"summary":"Owner immediately revokes task processing authorization","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:write","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"header","name":"Idempotency-Key","required":true,"schema":{"type":"string","maxLength":160},"description":"Stable per-operation key; replay revalidates current authentication and purpose authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{},"required":[]}}}},"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}},"/api/v1/tasks/{id}/artifacts/{artifactId}":{"get":{"summary":"Download actual protected file and SHA-256 header","security":[{"BearerAuth":[]},{"SessionCookie":[]}],"x-required-scope":"tasks:read","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","maxLength":200}},{"in":"path","name":"artifactId","required":true,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"Success JSON envelope, or protected file for downloads","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},"201":{"description":"Created; immutable operation persisted"},"400":{"description":"Bounded request/schema rejection"},"401":{"description":"Authentication required or credential inactive"},"403":{"description":"Current scope, ownership, purpose authorization or safety denied"},"409":{"description":"Idempotency conflict or state/gate not satisfied"},"422":{"description":"Trusted configuration validation rejected"},"429":{"description":"Rate or early-access capacity exceeded"}}}}}}