feat(headless): expose negotiated native log observation
This commit is contained in:
@@ -99,5 +99,84 @@
|
||||
"params": {
|
||||
"anything": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-0",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"limit": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-1",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": null
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-2",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": null,
|
||||
"limit": 0
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-3",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": null,
|
||||
"limit": 1025
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-4",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": null,
|
||||
"limit": 1.5
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-5",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": -1,
|
||||
"limit": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-6",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": 18446744073709551616,
|
||||
"limit": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-7",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": "0",
|
||||
"limit": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-8",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": 0.5,
|
||||
"limit": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "bad-logs-9",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": null,
|
||||
"limit": 1,
|
||||
"filter": "app"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://prometeu.dev/headless/v1/request.schema.json",
|
||||
"title": "Prometeu Headless v1.1 Request",
|
||||
"title": "Prometeu Headless v1.2 Request",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
@@ -319,6 +319,36 @@
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"command": {
|
||||
"const": "get_logs"
|
||||
},
|
||||
"params": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"required": [
|
||||
"afterSequence",
|
||||
"limit"
|
||||
],
|
||||
"properties": {
|
||||
"afterSequence": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"minimum": 1,
|
||||
"maximum": 1024
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"$defs": {
|
||||
|
||||
@@ -148,5 +148,42 @@
|
||||
"params": {
|
||||
"pendingWrites": "wait"
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "logs-init",
|
||||
"command": "initialize",
|
||||
"params": {
|
||||
"protocolVersion": {
|
||||
"major": 1,
|
||||
"minor": 2
|
||||
},
|
||||
"requiredCapabilities": [
|
||||
"log_read"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "logs-first",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": null,
|
||||
"limit": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "logs-next",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": 0,
|
||||
"limit": 1024
|
||||
}
|
||||
},
|
||||
{
|
||||
"requestId": "logs-u64",
|
||||
"command": "get_logs",
|
||||
"params": {
|
||||
"afterSequence": 18446744073709551615,
|
||||
"limit": 128
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Prometeu headless server messages v1.1",
|
||||
"$comment": "Producer schema for supported 1.0/1.1 shapes. Consumers permit compatible minor additions; 64-bit identities require lossless decoding.",
|
||||
"title": "Prometeu Headless v1.2 Response",
|
||||
"$comment": "Producer schema for supported 1.0/1.1/1.2 shapes. Consumers permit compatible minor additions; 64-bit identities require lossless decoding.",
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "object",
|
||||
@@ -179,6 +179,9 @@
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/memcard"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/logPage"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1761,6 +1764,158 @@
|
||||
"recovery"
|
||||
],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"logEvent": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sequence": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"frame": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"timestampMs": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"level": {
|
||||
"enum": [
|
||||
"trace",
|
||||
"debug",
|
||||
"info",
|
||||
"warn",
|
||||
"error"
|
||||
]
|
||||
},
|
||||
"source": {
|
||||
"enum": [
|
||||
"pos",
|
||||
"hub",
|
||||
"vm",
|
||||
"fs",
|
||||
"app"
|
||||
]
|
||||
},
|
||||
"appId": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0,
|
||||
"maximum": 4294967295
|
||||
},
|
||||
"tag": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 65535
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sequence",
|
||||
"frame",
|
||||
"timestampMs",
|
||||
"level",
|
||||
"source",
|
||||
"appId",
|
||||
"tag",
|
||||
"message"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"allOf": [
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"source": {
|
||||
"const": "app"
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"else": {
|
||||
"properties": {
|
||||
"appId": {
|
||||
"type": "null"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"logPage": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"sessionId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"logEpoch": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"events": {
|
||||
"type": "array",
|
||||
"maxItems": 1024,
|
||||
"items": {
|
||||
"$ref": "#/$defs/logEvent"
|
||||
}
|
||||
},
|
||||
"oldestSequence": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"newestSequence": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"nextAfterSequence": {
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
],
|
||||
"minimum": 0,
|
||||
"maximum": 18446744073709551615
|
||||
},
|
||||
"gap": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"overflow": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"sessionId",
|
||||
"logEpoch",
|
||||
"events",
|
||||
"oldestSequence",
|
||||
"newestSequence",
|
||||
"nextAfterSequence",
|
||||
"gap",
|
||||
"overflow"
|
||||
],
|
||||
"additionalProperties": false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user