Files
cgm-remote-monitor/docs/proposals/schemas/delivery-request.schema.json
T
bewestandBen West 12c90cfc63 Add proposal for agentic collaboration control plane and data plane
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
2026-01-19 13:12:53 -08:00

101 lines
3.0 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://nightscout.github.io/schemas/delivery-request.schema.json",
"title": "DeliveryRequest",
"description": "Intent to deliver insulin - the command sent to the pump",
"type": "object",
"required": ["requestId", "requestType", "requestedBy", "requestedAt"],
"properties": {
"requestId": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for this delivery request"
},
"requestType": {
"type": "string",
"enum": ["tempBasal", "scheduledBasal", "bolus", "microBolus", "suspend", "resume", "cancelTemp"],
"description": "Type of delivery action requested"
},
"parameters": {
"type": "object",
"description": "Request parameters (varies by requestType)",
"properties": {
"rate": {
"type": "number",
"minimum": 0,
"description": "Rate in U/hr for basal requests"
},
"units": {
"type": "number",
"minimum": 0,
"description": "Units for bolus requests"
},
"duration": {
"type": "integer",
"minimum": 0,
"description": "Duration in seconds for temp basal"
},
"bolusType": {
"type": "string",
"enum": ["normal", "square", "dual", "micro"],
"description": "Type of bolus if applicable"
}
}
},
"requestedBy": {
"type": "object",
"required": ["issuerType", "issuerId"],
"properties": {
"issuerType": {
"type": "string",
"enum": ["human", "controller", "agent", "caregiver"]
},
"issuerId": {
"type": "string"
}
}
},
"basedOn": {
"type": "object",
"description": "What informed this request",
"properties": {
"policyCompositionId": {
"type": "string",
"description": "PolicyComposition that was in force"
},
"algorithmSuggestion": {
"type": "object",
"description": "Algorithm output that led to this request",
"properties": {
"suggestedAt": { "type": "string", "format": "date-time" },
"reason": { "type": "string" },
"predictedBG": {
"type": "array",
"items": { "type": "number" }
},
"iob": { "type": "number" },
"cob": { "type": "number" },
"eventualBG": { "type": "number" }
}
}
}
},
"requestedAt": {
"type": "string",
"format": "date-time",
"description": "When this request was created"
},
"expiresAt": {
"type": "string",
"format": "date-time",
"description": "Request is stale/invalid after this time"
},
"priority": {
"type": "string",
"enum": ["normal", "high", "urgent"],
"default": "normal",
"description": "Request priority for queuing"
}
}
}