Skip to content

enhancement: add machine-only JSON output mode for non-interactive REPL #56

@rlippmann

Description

@rlippmann

Summary

Add a future enhancement path for non-interactive REPL usage that emits machine-only JSON output suitable for automation and integration workflows.

Problem

Current REPL output is primarily optimized for human readability. For scripts and pipeline integrations, callers may want a stable machine-only output mode instead of mixed human-oriented formatting.

Proposed behavior

  • Add an explicit CLI flag (for example, --json) that forces non-interactive REPL output to machine-only JSON.
  • Keep human-readable output as the default behavior.
  • Ensure the JSON output format is documented and treated as stable for scripting use.

Scope notes

  • This is a future enhancement.
  • Do not change default interactive UX in this issue.
  • Do not introduce new export/state commands in this issue.

Motivation

This gives us a clear path to support automation safely without degrading the default REPL experience for humans.

Follow-up boundary notes (initial state vs checkpoint)

  • Keep this issue focused on output mode (--json) only.
  • For CLI/scripting preload semantics, treat these as separate concerns:
    • Initial authoritative state: load via engine state JSON (import_json / current equivalents).
    • Runtime continuation: load via checkpoint (import_checkpoint) when exact in-flight continuation is needed.
  • Checkpoint should not replace authoritative state transport for normal scripting pipelines.
  • If preload flags are added later, keep them explicit and separate (for example, --initial-state-* vs --initial-checkpoint).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions