chore: schema reorganization

This commit is contained in:
2026-08-31 11:02:55 +00:00
parent fe735c310b
commit 20ecc1e8bd
20 changed files with 112 additions and 22 deletions
@@ -1,26 +0,0 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/info/_module_info.schema.json",
"title": "ModuleInfo",
"type": "object",
"properties": {
"name": { "type": "string" },
"sw_ver": { "type": "string" },
"hw_ver": { "type": "string" },
"loader_ver": { "type": "string" },
"product_name": { "type": "string" },
"sn": { "type": "string" },
"visible": { "type": "boolean" },
"flag": { "type": "integer" }
},
"required": [
"name",
"sw_ver",
"hw_ver",
"loader_ver",
"sn",
"product_name",
"visible",
"flag"
]
}
@@ -10,7 +10,7 @@
"command": { "const": "get_version" },
"module": {
"type": "array",
"items": { "$ref": "_module_info.schema.json" }
"items": { "$ref": "../../common/module_info.schema.json" }
}
},
"required": ["module"]
@@ -1,25 +0,0 @@
{
"$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/_ams.schema.json",
"title": "AmsState",
"description": "Bambu's own naming has the outer container and the inner array both called `ams` - print.ams.ams, not a typo here, just what the printer actually sends.",
"type": "object",
"properties": {
"ams": {
"type": "array",
"items": { "$ref": "_ams_unit.schema.json" }
},
"ams_exists_bits": { "type": "string" },
"tray_exist_bits": { "type": "string" },
"tray_is_bbl_bits": { "type": "string" },
"tray_tar": { "type": "string" },
"tray_now": { "type": "string" },
"tray_pre": { "type": "string" },
"tray_read_done_bits": { "type": "string" },
"tray_reading_bits": { "type": "string" },
"version": { "type": "integer" },
"insert_flag": { "type": "boolean" },
"power_on_flag": { "type": "boolean" }
},
"required": ["ams"]
}
@@ -1,37 +0,0 @@
{
"$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/_ams_tray.schema.json",
"title": "AmsTray",
"description": "A tray slot is either empty (just `id`) or loaded (the full field set) - two genuinely different shapes for the same slot, not one shape with optional fields. oneOf says the instance must match EXACTLY one of these. Note LoadedTray requires every field it lists, not just `id` - with only `id` required, a bare {\"id\":\"0\"} would validate against BOTH branches at once (it trivially satisfies Loaded's single requirement too) and oneOf would fail, since oneOf demands exactly one match. Verified this the hard way - see git history. The Rust equivalent is an untagged enum with #[serde(deny_unknown_fields)] on the Empty variant, for the same reason in reverse: without it, a loaded tray's extra fields wouldn't be rejected by Empty, and untagged enums try variants in order - see bambu_commands/print.rs. `drying_time` and `drying_temp` fields are only available for AMS 2 and AMS HT - AMS 1 doesn't have the drying option.",
"oneOf": [
{
"title": "EmptyTray",
"type": "object",
"properties": {
"id": { "type": "string" }
},
"required": ["id"],
"additionalProperties": false
},
{
"allOf": [
{ "$ref": "./_vt_tray.schema.json" },
{
"title": "LoadedTray",
"type": "object",
"properties": {
"state": { "type": "integer" },
"total_len": { "type": "number" },
"ctype": { "type": "integer" },
"cols": { "type": "array", "items": { "type": "string" } },
"drying_time": { "type": "string" },
"drying_temp": { "type": "string" }
},
"required": [
"state", "total_len", "ctype", "cols"
]
}
]
}
]
}
@@ -1,23 +0,0 @@
{
"$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/_ams_unit.schema.json",
"title": "AmsUnit",
"description": "One physical AMS unit (Bambu's numbering starts at 0 via `id`).",
"type": "object",
"properties": {
"tray": {
"type": "array",
"items": { "$ref": "_ams_tray.schema.json" }
},
"chip_id": { "type": "string" },
"ams_id": { "type": "string" },
"check": { "type": "integer" },
"id": { "type": "string" },
"humidity": { "type": "string" },
"humidity_raw": { "type": "string" },
"temp": { "type": "string" },
"dry_time": { "type": "integer" },
"info": { "type": "string" }
},
"required": ["humidity", "id", "temp", "tray"]
}
@@ -1,10 +0,0 @@
{
"$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/_online.schema.json",
"title": "Online",
"description": "Printer online/offline status",
"type": "array",
"items": {
"type": "object"
}
}
@@ -1,46 +0,0 @@
{
"$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/_ipcam.schema.json",
"title": "Ipcam",
"description": "Report about the in-built IP camera",
"type": "object",
"properties": {
"ipcam_dev": {
"type": "string"
},
"ipcam_record": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"timelapse": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"resolution": {
"type": "string"
},
"tutk_server": {
"type": "string",
"enum": [
"enable",
"disable",
"ENABLE",
"DISABLE"
]
},
"mode_bits": {
"type": "integer",
"minimum": 0
}
}
}
@@ -1,29 +0,0 @@
{
"$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/_lights_report.schema.json",
"title": "LightsReport",
"description": "Report status of printer lights",
"type": "array",
"items": {
"type": "object",
"properties": {
"mode": {
"type": "string",
"enum": [
"on",
"off",
"ON",
"OFF"
]
},
"node": {
"type": "string",
"enum": [
"chamber_light",
"work_light",
"chamber_light2"
]
}
}
}
}
@@ -1,30 +0,0 @@
{
"$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/_net.schema.json",
"title": "Net",
"description": "Network status",
"type": "object",
"properties": {
"conf": {
"type": "integer"
},
"info": {
"type": "array",
"items": {
"type": "object",
"properties": {
"ip": {
"type": "integer"
},
"mask": {
"type": "integer"
}
},
"required": [
"ip",
"mask"
]
}
}
}
}
@@ -1,18 +0,0 @@
{
"$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/_online.schema.json",
"title": "Online",
"description": "Printer online/offline status",
"type": "object",
"properties": {
"ahb": {
"type": "boolean"
},
"rfid": {
"type": "boolean"
},
"version": {
"type": "integer"
}
}
}
@@ -1,21 +0,0 @@
{
"$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/_upgrade_state.schema.json",
"title": "UpgradeState",
"type": "object",
"properties": {
"sequence": { "type": "string" },
"progress": { "type": "string" },
"status": { "type": "string", "enum": ["IDLE"]},
"consistency_request": { "type": "boolean" },
"dis_state": { "type": "integer" },
"err_code": { "type": "integer" },
"force_upgrade": { "type": "boolean" },
"message": { "type": "string" },
"module": { "type": "string" },
"new_version_state": { "type": "integer" },
"cur_state_code": { "type": "integer" },
"idx2": { "type": "integer" },
"new_ver_list": { "type": "array", "items": { "type": "string" } }
}
}
@@ -1,65 +0,0 @@
{
"$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/_upload.schema.json",
"title": "Upload",
"description": "File upload progress",
"oneOf": [
{
"type": "object",
"properties": {
"status": {
"type": "string",
"enum": [
"idle",
"IDLE"
]
},
"progress": {
"type": "integer"
},
"message": {
"type": "string"
}
}
},
{
"type": "object",
"properties": {
"file_size": {
"type": "integer"
},
"finish_size": {
"type": "integer"
},
"message": {
"type": "string"
},
"oss_url": {
"type": "string"
},
"progress": {
"type": "integer"
},
"speed": {
"type": "integer"
},
"status": {
"type": "string",
"enum": [
"idle",
"IDLE"
]
},
"task_id": {
"type": "string"
},
"time_remaining": {
"type": "integer"
},
"trouble_id": {
"type": "string"
}
}
}
]
}
@@ -1,36 +0,0 @@
{
"$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/_vt_tray.schema.json",
"title": "VtTray",
"description": "This schema is used as Virtual Tray (external spool) or as a base for AmsTray. When empty, all values are zeroed and `tray_color` field is set to \"FFFFFF00\".",
"type": "object",
"properties": {
"id": { "type": "string" },
"tag_uid": { "type": "string" },
"tray_id_name": { "type": "string" },
"tray_info_idx": { "type": "string" },
"tray_type": { "type": "string" },
"tray_sub_brands": { "type": "string" },
"tray_color": { "type": "string" },
"tray_weight": { "type": "string" },
"tray_diameter": { "type": "string" },
"tray_temp": { "type": "string" },
"tray_time": { "type": "string" },
"bed_temp_type": { "type": "string" },
"bed_temp": { "type": "string" },
"nozzle_temp_min": { "type": "string" },
"nozzle_temp_max": { "type": "string" },
"xcam_info": { "type": "string" },
"tray_uuid": { "type": "string" },
"remain": { "type": "integer", "minimum": 0 },
"k": { "type": "number" },
"n": { "type": "number" },
"cali_idx": { "type": "number" }
},
"required": [
"id", "remain", "bed_temp", "bed_temp_type",
"nozzle_temp_max", "nozzle_temp_min", "tag_uid", "tray_color",
"tray_diameter", "tray_id_name", "tray_info_idx", "tray_sub_brands",
"tray_type", "tray_uuid", "tray_weight", "xcam_info", "k", "n"
]
}
@@ -1,20 +0,0 @@
{
"$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/_xcam.schema.json",
"title": "XcamSettings",
"description": "Camera-based AI print monitoring settings (spaghetti detection, first-layer inspection, etc.).",
"type": "object",
"properties": {
"allow_skip_parts": { "type": "boolean" },
"buildplate_marker_detector": { "type": "boolean" },
"first_layer_inspector": { "type": "boolean" },
"halt_print_sensitivity": { "type": "string" },
"print_halt": { "type": "boolean" },
"printing_monitor": { "type": "boolean" },
"spaghetti_detector": { "type": "boolean" }
},
"required": [
"allow_skip_parts", "buildplate_marker_detector", "first_layer_inspector",
"halt_print_sensitivity", "print_halt", "printing_monitor", "spaghetti_detector"
]
}
@@ -10,16 +10,16 @@
"properties": {
"command": { "const": "push_status" },
"upgrade_state": { "$ref": "_upgrade_state.schema.json" },
"ipcam": { "$ref": "_ipcam.schema.json" },
"upload": { "$ref": "_upload.schema.json" },
"net": { "$ref": "_net.schema.json" },
"hms": { "$ref": "_hms.schema.json" },
"online": { "$ref": "_online.schema.json" },
"ams": { "$ref": "_ams.schema.json" },
"vt_tray": { "$ref": "_vt_tray.schema.json" },
"lights_report": { "$ref": "_lights_report.schema.json" },
"xcam": { "$ref": "_xcam.schema.json" },
"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.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" },