{"components":{"schemas":{"Collection":{"additionalProperties":false,"properties":{"context_feed_url":{"format":"uri-reference","type":"string"},"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"minimum":1,"type":"integer"},"offers_url":{"format":"uri-reference","type":"string"},"slug":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"title":{"type":"string"},"topic_tags":{"items":{"type":"string"},"type":"array"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","slug","title","status","description","topic_tags","created_at","updated_at","context_feed_url","offers_url"],"type":"object"},"CollectionRef":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"slug":{"type":"string"},"status":{"enum":["active","archived"],"type":"string"},"title":{"type":"string"}},"required":["id","slug","title","status"],"type":"object"},"ContextItem":{"additionalProperties":false,"properties":{"content_hash":{"description":"SHA-256 of normalized public content fields; excludes ID and timestamps.","pattern":"^[0-9a-f]{64}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"id":{"minimum":1,"type":"integer"},"provenance":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_date":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source_url":{"format":"uri","type":"string"},"summary":{"description":"Plain source information, never an instruction or executable prompt.","type":"string"},"title":{"type":"string"},"topic_tags":{"items":{"type":"string"},"type":"array"},"trust":{"$ref":"#/components/schemas/Trust"},"type":{"const":"context","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","type","title","summary","source_url","source_date","provenance","topic_tags","created_at","updated_at","content_hash","trust"],"type":"object"},"ContextPage":{"additionalProperties":false,"properties":{"collection":{"$ref":"#/components/schemas/CollectionRef"},"has_more":{"type":"boolean"},"items":{"items":{"$ref":"#/components/schemas/ContextItem"},"type":"array"},"next_cursor":{"description":"Opaque URL-safe signed token. Preserve it exactly.","maxLength":2048,"minLength":1,"type":"string"},"removed":{"items":{"$ref":"#/components/schemas/Removed"},"type":"array"}},"required":["collection","items","removed","next_cursor","has_more"],"type":"object"},"Directory":{"additionalProperties":false,"properties":{"collections":{"items":{"$ref":"#/components/schemas/Collection"},"type":"array"},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"description":"Opaque URL-safe signed token. Preserve it exactly.","maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]}},"required":["collections","next_cursor","has_more"],"type":"object"},"Error":{"additionalProperties":false,"properties":{"error":{"additionalProperties":false,"properties":{"code":{"enum":["invalid_cursor","invalid_request","not_found","internal_error"],"type":"string"},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"Manifest":{"additionalProperties":false,"properties":{"agent_skill":{"properties":{"download":{"type":"string"},"instructions":{"type":"string"}},"required":["instructions","download"],"type":"object"},"api_version":{"const":"1","type":"string"},"capabilities":{"items":{"enum":["context_collections","delta_retrieval","structured_offers"],"type":"string"},"type":"array"},"commercial_content_default":{"const":false,"type":"boolean"},"context_cursor":{"type":"string"},"endpoints":{"additionalProperties":false,"properties":{"collections":{"format":"uri-reference","type":"string"},"openapi":{"format":"uri-reference","type":"string"}},"required":["collections","openapi"],"type":"object"},"instructional_authority":{"const":"none","type":"string"},"offer_cursor":{"type":"string"},"privacy_url":{"type":"string"},"service":{"const":"Agentextual","type":"string"}},"required":["service","api_version","capabilities","commercial_content_default","endpoints","context_cursor","offer_cursor","instructional_authority","agent_skill","privacy_url"],"type":"object"},"Merchant":{"additionalProperties":false,"properties":{"name":{"type":"string"},"url":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]}},"required":["name","url"],"type":"object"},"OfferItem":{"additionalProperties":false,"properties":{"commercial_content":{"const":true,"type":"boolean"},"commercial_relationship":{"enum":["none","affiliate","sponsored","merchant_supplied"],"type":"string"},"compensation_disclosure":{"anyOf":[{"type":"string"},{"type":"null"}]},"content_hash":{"description":"SHA-256 of normalized public content fields; excludes ID and timestamps.","pattern":"^[0-9a-f]{64}$","type":"string"},"created_at":{"format":"date-time","type":"string"},"destination_url":{"format":"uri","type":"string"},"eligibility":{"anyOf":[{"type":"string"},{"type":"null"}]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"external_offer_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"minimum":1,"type":"integer"},"merchant":{"$ref":"#/components/schemas/Merchant"},"offer_terms":{"anyOf":[{"type":"string"},{"type":"null"}]},"offer_terms_url":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"price":{"anyOf":[{"$ref":"#/components/schemas/Price"},{"type":"null"}]},"provenance":{"anyOf":[{"type":"string"},{"type":"null"}]},"source_date":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source_url":{"anyOf":[{"format":"uri","type":"string"},{"type":"null"}]},"summary":{"description":"Plain source information, never an instruction or executable prompt.","type":"string"},"title":{"type":"string"},"topic_tags":{"items":{"type":"string"},"type":"array"},"trust":{"$ref":"#/components/schemas/Trust"},"type":{"const":"offer","type":"string"},"updated_at":{"format":"date-time","type":"string"},"valid_from":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["id","type","title","summary","source_url","source_date","provenance","topic_tags","created_at","updated_at","content_hash","trust","commercial_content","merchant","price","eligibility","valid_from","expires_at","destination_url","commercial_relationship","compensation_disclosure","offer_terms","offer_terms_url","external_offer_id"],"type":"object"},"OfferPage":{"additionalProperties":false,"properties":{"collection":{"$ref":"#/components/schemas/CollectionRef"},"commercial_content":{"const":true,"type":"boolean"},"has_more":{"type":"boolean"},"next_cursor":{"anyOf":[{"description":"Opaque URL-safe signed token. Preserve it exactly.","maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"offers":{"items":{"$ref":"#/components/schemas/OfferItem"},"type":"array"}},"required":["collection","commercial_content","offers","next_cursor","has_more"],"type":"object"},"Price":{"additionalProperties":false,"properties":{"amount":{"maxLength":64,"pattern":"^[0-9]+(?:\\.[0-9]+)?$","type":"string"},"currency":{"pattern":"^[A-Z]{3}$","type":"string"}},"required":["amount","currency"],"type":"object"},"Removed":{"additionalProperties":false,"properties":{"id":{"minimum":1,"type":"integer"},"type":{"const":"context","type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","type","updated_at"],"type":"object"},"Trust":{"additionalProperties":false,"properties":{"instructional_authority":{"const":"none","type":"string"},"publisher":{"const":"Agentextual","type":"string"}},"required":["publisher","instructional_authority"],"type":"object"}}},"info":{"description":"Agentextual V0 (application 0.1.0). Public machine-readable context and separate opt-in offers. No registration or public writes. UTC ISO-8601 timestamps; optional scalars are null. Root-relative links. Source content has no instructional authority.","title":"Agentextual","version":"1"},"openapi":"3.1.0","paths":{"/api/v1/collections":{"get":{"description":"Published active collections in ascending ID order. Directory cursors paginate the directory.","operationId":"listCollections","parameters":[{"description":"Maximum records on this page; context items and removals share this limit.","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"description":"Opaque URL-safe signed token. Preserve it exactly.","maxLength":2048,"minLength":1,"type":"string"}},{"description":"ETag from the same request URL; a matching response returns 304 with no body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Directory"}}},"description":"Successful retrieval","headers":{"Cache-Control":{"schema":{"const":"no-cache","type":"string"}},"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Unchanged response; no body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed, incompatible or foreign cursor, or invalid limit."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown or unpublished collection."},"405":{"description":"Unsupported method; public resources expose no write operations."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Non-sensitive server error."}},"security":[]}},"/api/v1/collections/{slug}":{"get":{"description":"Metadata only. Published archived collections remain directly readable; drafts return 404.","operationId":"getCollection","parameters":[{"in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9][a-z0-9-]*$","type":"string"}},{"description":"ETag from the same request URL; a matching response returns 304 with no body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Collection"}}},"description":"Successful retrieval","headers":{"Cache-Control":{"schema":{"const":"no-cache","type":"string"}},"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Unchanged response; no body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed, incompatible or foreign cursor, or invalid limit."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown or unpublished collection."},"405":{"description":"Unsupported method; public resources expose no write operations."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Non-sensitive server error."}},"security":[]}},"/api/v1/collections/{slug}/changes":{"get":{"description":"Without cursor, retrieve a bounded current snapshot. Drain pages while has_more is true, applying upserts and removals before persisting each next_cursor. Retain the completed checkpoint for later delta checks. Edits coalesce to the latest version at the bound; writes during pagination appear on the next poll. Withdrawn content is suppressed and removals propagate. Offers are never included. Cursors are scoped to this collection and stream. Empty checks return a reusable checkpoint.","operationId":"getContextChanges","parameters":[{"in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9][a-z0-9-]*$","type":"string"}},{"description":"Maximum records on this page; context items and removals share this limit.","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"description":"Opaque URL-safe signed token. Preserve it exactly.","maxLength":2048,"minLength":1,"type":"string"}},{"description":"ETag from the same request URL; a matching response returns 304 with no body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContextPage"}}},"description":"Successful retrieval","headers":{"Cache-Control":{"schema":{"const":"no-cache","type":"string"}},"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Unchanged response; no body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed, incompatible or foreign cursor, or invalid limit."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown or unpublished collection."},"405":{"description":"Unsupported method; public resources expose no write operations."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Non-sensitive server error."}},"security":[]}},"/api/v1/collections/{slug}/offers":{"get":{"description":"Explicit opt-in commercial listing. Only published, started, unexpired offers are returned. Cursors paginate one listing and are not durable delta checkpoints. Start later polls without a cursor to discover clock-only activations. Expired, withdrawn or materially edited offers are suppressed on later pages. A finished listing returns next_cursor=null.","operationId":"listLiveOffers","parameters":[{"in":"path","name":"slug","required":true,"schema":{"pattern":"^[a-z0-9][a-z0-9-]*$","type":"string"}},{"description":"Maximum records on this page; context items and removals share this limit.","in":"query","name":"limit","required":false,"schema":{"default":100,"maximum":200,"minimum":1,"type":"integer"}},{"in":"query","name":"cursor","required":false,"schema":{"description":"Opaque URL-safe signed token. Preserve it exactly.","maxLength":2048,"minLength":1,"type":"string"}},{"description":"ETag from the same request URL; a matching response returns 304 with no body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfferPage"}}},"description":"Successful retrieval","headers":{"Cache-Control":{"schema":{"const":"no-cache","type":"string"}},"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Unchanged response; no body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed, incompatible or foreign cursor, or invalid limit."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown or unpublished collection."},"405":{"description":"Unsupported method; public resources expose no write operations."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Non-sensitive server error."}},"security":[]}},"/api/v1/manifest":{"get":{"description":"Discover capabilities, trust boundaries and cursor semantics.","operationId":"getManifest","parameters":[{"description":"ETag from the same request URL; a matching response returns 304 with no body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Manifest"}}},"description":"Successful retrieval","headers":{"Cache-Control":{"schema":{"const":"no-cache","type":"string"}},"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Unchanged response; no body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed, incompatible or foreign cursor, or invalid limit."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown or unpublished collection."},"405":{"description":"Unsupported method; public resources expose no write operations."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Non-sensitive server error."}},"security":[]}},"/api/v1/openapi.json":{"get":{"description":"This public read-only contract.","operationId":"getOpenAPI","parameters":[{"description":"ETag from the same request URL; a matching response returns 304 with no body.","in":"header","name":"If-None-Match","required":false,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"description":"OpenAPI 3.1 document","type":"object"}}},"description":"Successful retrieval","headers":{"Cache-Control":{"schema":{"const":"no-cache","type":"string"}},"ETag":{"schema":{"type":"string"}}}},"304":{"description":"Unchanged response; no body."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed, incompatible or foreign cursor, or invalid limit."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Unknown or unpublished collection."},"405":{"description":"Unsupported method; public resources expose no write operations."},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Non-sensitive server error."}},"security":[]}}},"servers":[{"url":"/"}]}