Skip to content

refactor: emit --json through contracts; stop flattening status - #113

Merged
DLANSAMA merged 1 commit into
mainfrom
refactor/aaa-pr4-contracts
Aug 13, 2026
Merged

refactor: emit --json through contracts; stop flattening status#113
DLANSAMA merged 1 commit into
mainfrom
refactor/aaa-pr4-contracts

Conversation

@DLANSAMA

Copy link
Copy Markdown
Owner

AAA stack 4/9. Stacked on #112.

Emitters construct typed Contract objects. status no longer flattens MQTT fields onto the top-level envelope — agents must read printer.gcode_state (and friends) from the nested printer object.

Also adds ErrorEnvelope / JobOk / JobError and regenerates schemas.

Breaking for agents that still read top-level gcode_state from plate --json status.

Stack: #110#111#112this → session reuse → Textual 8 / 3.10 → test stubs → sole error path → honesty

`--json` emitters construct bambu_cli.contracts objects. status --json
no longer copies firmware fields onto the envelope; they stay under
printer. Errors go through ErrorEnvelope; job success/failure through
JobOk / JobError. Nested dataclasses serialize via to_payload.
Base automatically changed from refactor/aaa-pr3-mqtt to main August 13, 2026 03:32
@DLANSAMA
DLANSAMA force-pushed the refactor/aaa-pr4-contracts branch from 448c320 to 0ba9c27 Compare August 13, 2026 03:32
@DLANSAMA
DLANSAMA merged commit c111726 into main Aug 13, 2026
6 of 12 checks passed
@DLANSAMA
DLANSAMA deleted the refactor/aaa-pr4-contracts branch August 13, 2026 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant