From 763dd8efe2a58f22b9e19dcbccc3f10e7aa32076 Mon Sep 17 00:00:00 2001 From: "m2 (AI Agent)" Date: Thu, 2 Jul 2026 02:22:31 +0200 Subject: [PATCH] T005: freeze listing.schema.json v1 --- schemas/listing.schema.json | 129 ++++++++++++++++++++++++++++++++++++ 1 file changed, 129 insertions(+) create mode 100644 schemas/listing.schema.json diff --git a/schemas/listing.schema.json b/schemas/listing.schema.json new file mode 100644 index 0000000..78db109 --- /dev/null +++ b/schemas/listing.schema.json @@ -0,0 +1,129 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.machinemachine.ai/m2/market-registry/schemas/listing.schema.json", + "title": "Listing", + "description": "Catalog-facing record for a marketplace listing. Truth lives in m2/market-registry; derived copy indexed into market:catalog.", + "type": "object", + "properties": { + "schema_version": { + "const": "m2.listing.v1" + }, + "listing_id": { + "type": "string", + "pattern": "^lst_[a-z0-9-]+$" + }, + "solution_id": { + "type": "string", + "pattern": "^sol_[a-z0-9-]+$" + }, + "solution_version": { + "type": "string" + }, + "inventory_type": { + "type": "string", + "enum": ["solution", "capability", "resource", "service"] + }, + "name": { + "type": "string" + }, + "summary": { + "type": "string" + }, + "category": { + "type": "string" + }, + "keywords": { + "type": "array", + "items": { + "type": "string" + } + }, + "icon": { + "type": "string" + }, + "price": { + "type": "object", + "description": "Denormalized from solution at listing time.", + "properties": { + "amount": { + "type": "integer", + "minimum": 1 + }, + "currency": { + "const": "m2cr" + }, + "model": { + "type": "string" + } + }, + "required": ["amount", "currency", "model"], + "additionalProperties": false + }, + "seller": { + "type": "string", + "description": "operator_id" + }, + "evidence_summary": { + "type": "string" + }, + "tenant_visibility": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 1 + }, + "stats": { + "type": "object", + "description": "Conversion signals (FR-012), updated by telemetry, start zeroed.", + "properties": { + "installs": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "rating": { + "type": "number", + "minimum": 0, + "maximum": 5 + }, + "proposals_shown": { + "type": "integer", + "minimum": 0, + "default": 0 + }, + "proposals_accepted": { + "type": "integer", + "minimum": 0, + "default": 0 + } + }, + "required": ["installs", "proposals_shown", "proposals_accepted"], + "additionalProperties": false + }, + "status": { + "type": "string", + "enum": ["draft", "in_review", "published", "delisted"] + }, + "install_ref": { + "type": "string", + "pattern": "^lst_[a-z0-9-]+-v\\d+\\.\\d+\\.\\d+$" + } + }, + "required": [ + "schema_version", + "listing_id", + "solution_id", + "solution_version", + "inventory_type", + "name", + "summary", + "category", + "price", + "seller", + "tenant_visibility", + "status", + "install_ref" + ], + "additionalProperties": false +}