mirror of
https://github.com/bckelley/cgm-remote-monitor.git
synced 2026-08-24 03:14:12 -05:00
Create a new RFC document and associated JSON schemas defining an agentic control plane for automated insulin delivery systems, including event envelopes, capabilities models, delivery tracking, and conflict rules. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 06715f81-f852-4156-8ab0-cf9e0aa3564d Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: 010cdc4a-2c86-4d2e-9768-bf2769a89953 Replit-Helium-Checkpoint-Created: true
58 lines
1.7 KiB
JSON
58 lines
1.7 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://nightscout.github.io/schemas/profile-selection.schema.json",
|
|
"title": "ProfileSelection",
|
|
"description": "Runtime event indicating which profile is intended to be active",
|
|
"type": "object",
|
|
"required": ["selectionId", "selectedProfileId", "effectiveAt", "selectedBy"],
|
|
"properties": {
|
|
"selectionId": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"description": "Unique identifier for this selection event"
|
|
},
|
|
"selectedProfileId": {
|
|
"type": "string",
|
|
"description": "ID of the ProfileDefinition being activated"
|
|
},
|
|
"selectedProfileHash": {
|
|
"type": "string",
|
|
"pattern": "^[a-f0-9]{64}$",
|
|
"description": "Content hash of the selected profile for verification"
|
|
},
|
|
"effectiveAt": {
|
|
"type": "string",
|
|
"format": "date-time",
|
|
"description": "When this profile selection takes effect"
|
|
},
|
|
"selectedBy": {
|
|
"type": "object",
|
|
"required": ["issuerType", "issuerId", "authority"],
|
|
"properties": {
|
|
"issuerType": {
|
|
"type": "string",
|
|
"enum": ["human", "controller", "agent", "caregiver"]
|
|
},
|
|
"issuerId": {
|
|
"type": "string"
|
|
},
|
|
"authority": {
|
|
"type": "string",
|
|
"enum": ["primary", "delegated", "automated"],
|
|
"description": "Authority level of the selector"
|
|
}
|
|
}
|
|
},
|
|
"reason": {
|
|
"type": "string",
|
|
"maxLength": 500,
|
|
"description": "Optional annotation explaining why this profile was selected"
|
|
},
|
|
"previousSelectionId": {
|
|
"type": "string",
|
|
"format": "uuid",
|
|
"description": "ID of the selection this replaces, for audit chain"
|
|
}
|
|
}
|
|
}
|