Skip to content

feat: unify JSON response envelopes - #70

Merged
abruption merged 1 commit into
mainfrom
feat/29-json-response-contract
Sep 16, 2026
Merged

abruption merged 1 commit into
mainfrom
feat/29-json-response-contract

Conversation

@abruption

Copy link
Copy Markdown
Owner

Summary

Machine-readable list, send, and update results now share a versioned
{schemaVersion, ok, host, command, ...payload} envelope. Local and single-host
commands return one object, repeated --host returns an ordered array of the
same independently attributable objects, and command-wide validation failures
are reported once per requested destination.

Existing command payloads and cached clientUpdate facts remain available.
README and the session-peer skill document the envelope, host identity, mixed
success/failure handling, and object-versus-array cardinality.

Closes #29

Type

  • feat
  • fix
  • docs
  • chore / refactor / test / perf

Checklist

  • python3 session_peer.py list works locally
  • python3 session_peer.py list --host <a real host> works over SSH
  • --dry-run resolves a target without posting anything (covered by regression tests)
  • Commits follow Conventional Commits
  • Docs updated if behavior changed (README / SKILL.md / CLAUDE.md)
  • No secrets, tokens, or session keys in the diff

Verified against

  • 217 unit and integration tests
  • compileall and git diff --check
  • Local list --json --no-update-notice smoke test

Notes

This intentionally completes the pre-1.0 breaking change described in #29:
single-host remote list and update responses are now flat objects, matching
send; repeated hosts still return an array. Consumers can normalize only on
object versus array and then use the same four envelope fields for every command.

No live message was submitted.

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.

--json output can't say which host it came from, and the shape differs per command

1 participant