Skip to content

feat(protocol): publish effective terminal geometry - #137

Closed
schickling-assistant wants to merge 1 commit into
compoundingtech:mainfrom
schickling-assistant:schickling-assistant/ordered-geometry
Closed

feat(protocol): publish effective terminal geometry#137
schickling-assistant wants to merge 1 commit into
compoundingtech:mainfrom
schickling-assistant:schickling-assistant/ordered-geometry

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Closes #134.

Why

Programmatic clients advertise a requested size but currently cannot observe the daemon effective min-wins geometry before width-sensitive output. This is a longstanding embedding capability gap, not a regression in resize negotiation.

What

  • add a server-to-client GEOMETRY packet
  • send effective geometry before the initial SCREEN
  • send geometry changes before resize-triggered DATA when peers attach, resize, or detach
  • expose a typed SessionConnection geometry event
  • keep requested and effective geometry separate in Session and attachPty() so effective changes do not feed back as new resize requests

The daemon min-wins policy is unchanged. The human CLI remains unchanged and may ignore the additive packet.

Compatibility

  • old clients ignore the new packet
  • new clients preserve legacy behavior when an old server sends SCREEN without a preceding GEOMETRY

Scope

This establishes the ordered protocol and JavaScript embedding surfaces. Consumers that wrap pty attach through its terminal byte stream still need a separately framed CLI transport before they can consume geometry metadata without corrupting terminal output.

Validation

  • TypeScript typecheck and build
  • focused protocol and integration tests for cross-axis min-wins ordering, quiet-child detach, and initial attach ordering
  • SessionConnection, testing Session, and attachPty() compatibility/no-feedback tests

The PR is intentionally draft while the complete upstream suite and CI are checked.

Posted on behalf of @schickling
field value
agent_name co1-sage
agent_session_id ed878dac-3735-4276-b3e0-ea1b1cd65291
agent_tool Codex CLI
agent_tool_version 0.145.0
agent_runtime Codex CLI 0.145.0
agent_model unknown
runtime_profile /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json
skills_manifest /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json
worktree pty-pr-jX0E70/schickling-assistant/ordered-geometry
machine dev3
tooling_profile dotfiles@0fb7e03

agent-session-id: ed878dac-3735-4276-b3e0-ea1b1cd65291
agent-tool: Codex CLI
agent-tool-version: 0.145.0
agent-model: unknown
agent-runtime-profile: /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json
agent-skills-manifest: /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json
tooling-profile: dotfiles@0fb7e03
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

Closing as a duplicate of #135, which implements the same ordered effective-geometry protocol direction with stronger real-PTY validation. Keeping this branch available for its compatibility and client-state test evidence.

Posted on behalf of @schickling
field value
agent_name co1-sage
agent_session_id ed878dac-3735-4276-b3e0-ea1b1cd65291
agent_tool Codex CLI
agent_tool_version 0.145.0
agent_runtime Codex CLI 0.145.0
agent_model unknown
runtime_profile /nix/store/mnx8agbdq3wiyb6vz63lhgscgazkrn98-coding-agent-runtime-profile/share/coding-agents/profile.json
skills_manifest /nix/store/5r69m9k2llmri3na81518zx0a7y0d3cn-agent-skills-corpus/share/agent-skills/manifest.json
worktree pty-pr-jX0E70/schickling-assistant/ordered-geometry
machine dev3
tooling_profile dotfiles@0fb7e03

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.

Embedded clients cannot observe effective multi-client geometry before width-sensitive output

1 participant