Skip to content

[Feature] Support negotiated Org/Portable Org output formats #29649

Description

@Cassiel-girl

Problem

Gemini CLI currently exposes text, json, and stream-json output modes, but clients that want native Emacs Org-mode rendering have no negotiated content format. Prompting the model to emit Org syntax is unreliable across streaming chunks, tool results, and replay, while the JSON envelope does not identify the markup language of each text block.

Proposed solution

Add an optional interoperable text/org format with a portable profile, either as a content-format/profile option alongside the existing output modes or through the ACP integration.

  • Preserve the existing text, json, and stream-json behavior.
  • Let clients advertise accepted formats and negotiate text/org when supported.
  • Include the selected format/profile with text messages and preserve it in stream-json events and replay.
  • Fall back to Markdown or plain text when Org is unsupported.
  • Keep the portable profile limited to interoperable headlines, paragraphs, lists, emphasis, links, tables, and safe static blocks.

Please coordinate the wire-level contract with the ACP RFD: agentclientprotocol/agent-client-protocol#2315.

Use case

An ACP client running in Emacs can render Gemini replies as native Org-mode while the response is streaming. The same capability can be used by headless automation that needs a stable Org document instead of post-processing Markdown.

Compatibility

This is an additive feature. Existing scripts using text, json, or stream-json must continue to work unchanged.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/non-interactiveIssues related to GitHub Actions, SDK, 3P Integrations, Shell Scripting, Command line automationeffort/large3+ days: platform-specific, architecture, memory leaksstatus/bot-triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions