feat: integrate safer vehicle CAN reasoning
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"spec": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["utterance", "language", "mode", "detected_domains", "requests", "confidence", "requires_confirmation"],
|
||||
"required": ["utterance", "language", "mode", "detected_domains", "requests", "actions", "constraints", "ambiguities", "unresolved_spans", "coverage", "confidence", "requires_confirmation", "execution_eligible"],
|
||||
"properties": {
|
||||
"utterance": {"type": "string", "minLength": 1, "maxLength": 4000},
|
||||
"language": {"type": "string", "pattern": "^[a-z]{2}(?:-[A-Z]{2})?$"},
|
||||
@@ -39,6 +39,45 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"actions": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["id", "domain", "capability", "target", "operation", "parameters", "source_span", "confidence", "provenance", "risk_level", "confirmation_policy"],
|
||||
"properties": {
|
||||
"id": {"type": "string", "pattern": "^[a-z][a-z0-9_-]*$"},
|
||||
"domain": {"type": "string", "pattern": "^[a-z][a-z0-9_]*$"},
|
||||
"capability": {"type": "string", "minLength": 1},
|
||||
"target": {"$ref": "common.schema.json#/$defs/target"},
|
||||
"operation": {"type": "string", "minLength": 1},
|
||||
"parameters": {"type": "object"},
|
||||
"source_span": {"$ref": "#/$defs/sourceSpan"},
|
||||
"confidence": {"type": "object", "additionalProperties": {"type": "number", "minimum": 0, "maximum": 1}},
|
||||
"provenance": {"type": "object", "required": ["parser", "rule_ids"], "properties": {"parser": {"type": "string"}, "rule_ids": {"type": "array", "items": {"type": "string"}}}, "additionalProperties": true},
|
||||
"risk_level": {"type": "string", "enum": ["low", "medium", "high", "critical"]},
|
||||
"confirmation_policy": {"type": "string", "enum": ["never", "on_ambiguity", "always"]},
|
||||
"resolution": {"type": "object"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"constraints": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": true,
|
||||
"required": ["id", "type", "source_span"],
|
||||
"properties": {
|
||||
"id": {"type": "string"},
|
||||
"type": {"type": "string"},
|
||||
"domain": {"type": "string"},
|
||||
"capability": {"type": "string"},
|
||||
"target": {"$ref": "common.schema.json#/$defs/target"},
|
||||
"parameters": {"type": "object"},
|
||||
"source_span": {"$ref": "#/$defs/sourceSpan"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ambiguities": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -48,13 +87,51 @@
|
||||
"properties": {
|
||||
"field": {"type": "string", "minLength": 1},
|
||||
"question": {"type": "string", "minLength": 1},
|
||||
"options": {"type": "array", "items": {"type": ["string", "number", "boolean"]}}
|
||||
"options": {"type": "array", "items": {"type": ["string", "number", "boolean"]}},
|
||||
"reason": {"type": "string"},
|
||||
"risk_level": {"type": "string"}
|
||||
}
|
||||
},
|
||||
"default": []
|
||||
},
|
||||
"unresolved_spans": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["text", "start", "end", "reason"],
|
||||
"properties": {
|
||||
"text": {"type": "string"},
|
||||
"start": {"type": "integer", "minimum": 0},
|
||||
"end": {"type": "integer", "minimum": 0},
|
||||
"reason": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"coverage": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["complete", "covered_spans"],
|
||||
"properties": {
|
||||
"complete": {"type": "boolean"},
|
||||
"covered_spans": {"type": "array", "items": {"$ref": "#/$defs/sourceSpan"}}
|
||||
}
|
||||
},
|
||||
"confidence": {"type": "number", "minimum": 0, "maximum": 1},
|
||||
"requires_confirmation": {"type": "boolean"}
|
||||
"requires_confirmation": {"type": "boolean"},
|
||||
"execution_eligible": {"type": "boolean"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"sourceSpan": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": ["text", "start", "end"],
|
||||
"properties": {
|
||||
"text": {"type": "string"},
|
||||
"start": {"type": "integer", "minimum": 0},
|
||||
"end": {"type": "integer", "minimum": 0}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user