mirror of
https://github.com/profullstack/logicsrc.git
synced 2026-12-03 18:24:53 +00:00
Add AgentAd ad schemas as a LogicSRC primitive (#10)
* Add AgentAd ad schemas as a LogicSRC primitive
AgentAd is a disclosed, agent-readable advertising contract for CLI tools
and AI agents. LogicSRC owns the canonical schemas; cl1s.tech is the
reference network built on them.
- packages/schemas: agentad-{ad,placement,ad-request,ad-response,
impression,click,campaign} schemas (id under schemas.logicsrc.com) +
ad/placement fixtures, exported from @logicsrc/schemas
- packages/validators: register the 7 agentad kinds, wire fixture
validation, add tests (disclosure.sponsored must be true)
- docs/agentad.md: the AgentAd spec
- README: list AgentAd under v1 priorities
Validators build clean; all fixtures validate; vitest 4/4 green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* Prepare @logicsrc/schemas for npm publish
Add license, repository, homepage, keywords, publishConfig (public),
and a package README covering both the logicsrc-* core schemas and the
agentad-* family.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ad9f3a2a29
commit
7cda686059
17 changed files with 483 additions and 5 deletions
31
packages/schemas/schemas/agentad-ad-response.schema.json
Normal file
31
packages/schemas/schemas/agentad-ad-response.schema.json
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://schemas.logicsrc.com/agentad-ad-response.schema.json",
|
||||
"title": "AgentAd Ad Response",
|
||||
"description": "The network's response to an ad request: zero or more filled ads plus signed tracking tokens for impression/click events.",
|
||||
"type": "object",
|
||||
"required": ["type", "version", "request_id", "ads"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"type": { "const": "agentad.ad_response" },
|
||||
"version": { "type": "string", "pattern": "^\\d+\\.\\d+(\\.\\d+)?$" },
|
||||
"request_id": { "type": "string", "minLength": 1 },
|
||||
"ads": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["ad", "impression_token"],
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"ad": { "type": "object", "description": "An agentad.ad document; validate separately against agentad-ad.schema.json." },
|
||||
"impression_token": { "type": "string", "minLength": 1, "description": "Opaque token to confirm the impression and to mint a click token." },
|
||||
"rendered": { "type": "string", "description": "Server-rendered representation in the requested format." }
|
||||
}
|
||||
}
|
||||
},
|
||||
"no_fill_reason": {
|
||||
"type": "string",
|
||||
"enum": ["no_inventory", "frequency_capped", "blocked_category", "invalid_request"]
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue