Files
0pt/packages/schemas/0pt.signal.schema.json
T

37 lines
2.4 KiB
JSON

{
"$id": "0pt.signal.schema.v1",
"description": "CONTRACT-ONLY -- no service in this repo produces or reads 0pt.signal rows yet. This schema exists so tests/p0/enterprise-data-os-expansion.test.ts's contract assertions (from an earlier 'PROMPT 2' pass) have a real file to check; it is documentation of an intended shape for future ICP/signal-intelligence work, not a built capability. Do not treat it as evidence that signal detection is implemented. NOTE (GitHub<->Gitea unification merge): the two remotes named several fields differently (entity_id/entity_key, observed_at/detected_at, confidence_level/confidence). Both names are retained below as optional properties rather than dropping either draft's vocabulary; a future pass that actually builds signal detection must pick one pair and delete the other.",
"type": "object",
"required": [
"signal_id",
"tenant_id",
"project_id",
"signal_type",
"signal_strength",
"entity_type",
"entity_id",
"observed_at",
"created_at"
],
"properties": {
"signal_id": { "type": "string" },
"tenant_id": { "type": "string" },
"project_id": { "type": "string" },
"signal_type": { "type": "string", "description": "e.g. hiring_growth, funding_round, funding_event, tech_adoption, leadership_change." },
"signal_strength": { "type": "number", "description": "Normalized 0..1 confidence/intensity of the signal.", "minimum": 0, "maximum": 1 },
"entity_type": { "type": "string", "enum": ["company", "person", "contact", "domain", "vehicle"] },
"entity_id": { "type": "string" },
"entity_key": { "type": "string", "description": "Alternative name for entity_id from the other draft; optional." },
"value": { "description": "Signal payload value (type depends on signal_type)." },
"unit": { "type": "string" },
"metadata": { "type": "object" },
"source_id": { "type": "string", "description": "References 0pt.source.schema.v1's source_id." },
"confidence_level": { "type": "string", "enum": ["low", "medium", "high"] },
"confidence": { "type": "number", "minimum": 0, "maximum": 1, "description": "Numeric alternative to confidence_level from the other draft; optional." },
"observed_at": { "type": "string" },
"detected_at": { "type": "string", "description": "Alternative name for observed_at from the other draft; optional." },
"correlation_id": { "type": "string" },
"created_at": { "type": "string" }
}
}