refactor: emit --json through contracts; stop flattening status - #113
Merged
Conversation
This was referenced Aug 13, 2026
DLANSAMA
force-pushed
the
refactor/aaa-pr3-mqtt
branch
from
August 13, 2026 03:23
2269474 to
865793b
Compare
`--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.
DLANSAMA
force-pushed
the
refactor/aaa-pr4-contracts
branch
from
August 13, 2026 03:32
448c320 to
0ba9c27
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AAA stack 4/9. Stacked on #112.
Emitters construct typed
Contractobjects.statusno longer flattens MQTT fields onto the top-level envelope — agents must readprinter.gcode_state(and friends) from the nestedprinterobject.Also adds
ErrorEnvelope/JobOk/JobErrorand regenerates schemas.Breaking for agents that still read top-level
gcode_statefromplate --json status.Stack: #110 → #111 → #112 → this → session reuse → Textual 8 / 3.10 → test stubs → sole error path → honesty