Files
continuum-schemas/schemas/bambulab/v1/report/print/push_status.schema.json
T
octoturgeandClaude Opus 5 9b348902a7 Add msg to v1 push_status, and say why v2 has no vt_tray
Two things the live captures showed that the schemas did not say.

`msg` was missing from the v1 push_status schema, which is the one version
where it is load-bearing. v1 pushes only the fields that changed, except for
a pushall-triggered push which is the whole object, and `msg` is how a v1
message self-describes which it is (0 forced/full, 1 automatic/partial). A
consumer that replaces its cached object with a partial push silently unsets
every field that push did not mention, and there is no other way to tell:
push_status does not echo `sequence_id`, so there is no correlation back to
the pushall that asked for it. continuum-proxy has read this field since the
cache was written; the schema just never declared it.

v2 had it with no description. It is informational there - v2 sends the whole
object every time - so it now points at the v1 note rather than repeating it.

The other half is an absence, which a schema cannot express by staying
silent: v2 has no `vt_tray` because a real v2 printer omits the key entirely
rather than sending an empty object. That is recorded as a comment so nobody
adds it for symmetry with v1, because the distinction is the thing: absence
means "not reported", not "no external spool", and it is exactly why
`EXTERNAL_SPOOLS` in continuum-proxy is a constant instead of being counted
from a report.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-10-15 21:45:38 +00:00

88 lines
4.9 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/push_status.schema.json",
"title": "PushStatusReport",
"description": "The ongoing print-state push (root key \"print\") - NOT a direct reply to the pushall request (that goes to \"pushing\", see request/pushing/pushall.schema.json). Sending pushall makes the printer start/refresh this stream; it isn't itself request/response, which is also why this is its own category folder rather than sitting under pushing/ - a category here is 'what root key does this arrive under', not 'what triggered it'.",
"allOf": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "push_status" },
"msg": {
"type": "integer",
"description": "Whether this push is the whole object or only what changed: 0 forced/full (what a pushing.pushall triggers), 1 automatic/partial. Confirmed against a real printer. A v1 consumer MUST read this - merging a partial push as if it were full leaves the picture complete, but replacing the cached object with a partial one silently unsets every field the push did not mention. It cannot be inferred any other way, because push_status does not echo sequence_id (see the module description), so there is no correlation back to the pushall that asked for it. v2 sends the whole object every time and this field is informational there."
},
"upgrade_state": { "$ref": "../../common/upgrade_state.schema.json" },
"ipcam": { "$ref": "../../common/ipcam.schema.json" },
"upload": { "$ref": "../../common/upload.schema.json" },
"net": { "$ref": "../../common/net.schema.json" },
"hms": { "$ref": "../../common/hms.schema.json" },
"online": { "$ref": "../../common/online.schema.json" },
"ams": { "$ref": "../../common/ams/ams.schema.json" },
"vt_tray": { "$ref": "../../common/vt_tray.schema.json" },
"lights_report": { "$ref": "../../common/lights_report.schema.json" },
"xcam": { "$ref": "../../common/xcam.schema.json" },
"nozzle_diameter": { "$ref": "../../common/nozzle_diameter.schema.json" },
"nozzle_type": { "$ref": "../../common/nozzle_type.schema.json" },
"nozzle_temper": { "type": "number" },
"nozzle_target_temper": { "type": "number" },
"bed_temper": { "type": "number" },
"bed_target_temper": { "type": "number" },
"chamber_temper": { "type": "number" },
"chamber_target_temper": { "type": "number" },
"fan_gear": { "type": "integer" },
"heatbreak_fan_speed": { "type": "string" },
"cooling_fan_speed": { "type": "string" },
"big_fan1_speed": { "type": "string" },
"big_fan2_speed": { "type": "string" },
"s_obj": { "type": "array", "items": { "type": "number" } },
"filam_bak": { "type": "array", "items": {} },
"stg": { "type": "array", "items": { "type": "number" } },
"mc_print_stage": { "type": "string" },
"mc_percent": { "type": "integer" },
"mc_remaining_time": { "type": "integer" },
"ams_status": { "type": "integer" },
"ams_rfid_status": { "type": "integer" },
"hw_switch_state": { "type": "integer" },
"spd_mag": { "type": "integer", "minimum": 0, "maximum": 100 },
"spd_lvl": { "type": "integer", "minimum": 1, "maximum": 4 },
"print_error": { "type": "integer" },
"lifecycle": { "type": "string", "enum": ["product"] },
"wifi_signal": { "type": "string", "pattern": "^-([0-9]{1,2}|100)dBm$" },
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE", "finish", "FINISH", "running", "RUNNING" ] },
"gcode_file_prepare_percent": { "type": "string" },
"queue_number": { "type": "integer" },
"queue_total": { "type": "integer" },
"queue_est": { "type": "integer" },
"queue_sts": { "type": "integer" },
"project_id": { "type": "string" },
"profile_id": { "type": "string" },
"task_id": { "type": "string" },
"subtask_id": { "type": "string" },
"subtask_name": { "type": "string" },
"gcode_file": { "type": "string" },
"stg_cur": { "type": "integer" },
"print_type": { "type": "string", "enum": [ "", "idle", "IDLE" ] },
"home_flag": { "type": "integer" },
"mc_print_line_number": { "type": "string" },
"mc_print_sub_stage": { "type": "integer" },
"sdcard": { "type": "boolean" },
"force_upgrade": { "type": "boolean" },
"mess_production_state": { "type": "string", "enum": [ "active", "inactive", "ACTIVE", "INACTIVE" ] },
"layer_num": { "type": "integer" },
"total_layer_num": { "type": "integer" },
"cali_version": { "type": "integer" },
"k": { "type": "string" },
"flag3": { "type": "integer" }
}
}
]
}