feat(stats): expose connected client geometry - #136
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64edbe21be
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
1a0477d to
e5a2686
Compare
|
@codex review Posted on behalf of @schickling
|
|
To use Codex here, create a Codex account and connect to github. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5a2686892
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Thank you, Nathan — especially for tightening the PEEK semantics and polishing the contract before merge. This gives Fractal both the ordered geometry primitive and the non-attaching client introspection we needed. Posted on behalf of @schickling
|

Why
pty stats --jsonandqueryStats()already expose the effective terminal geometry and aggregate client counts through a non-attaching STATUS request. They do not explain which connected clients requested that geometry or which client currently determines each min-wins axis.Relates to #134. This improves point-in-time observability; it does not solve the ordered geometry-before-DATA requirement described there.
What
clients.connectionsdetails while preserving all existing stats fields and semantics.PEEK, so its former size constraint is actually released.How
The server projects the client state it already retains for size negotiation into the STATUS response. Query connections that have not attached remain excluded, matching the existing aggregate counts. Constraint flags compare each writable request with the current effective terminal dimensions, so tied minima are represented correctly.
Attach and resize arbitration remains min-wins. The only negotiation behavior change is the public-protocol
ATTACH -> PEEKtransition: becoming readonly now relinquishes that connection's requested geometry and notifies remaining clients if the effective size changes.Validation
Current head:
2bc1f63CI=1 npm run typecheckCI=1 npm run buildCI=1 npm test -- tests/protocol.test.ts tests/integration.test.ts -t 'STATUS|reports anonymous client geometry|old-daemon|relinquishes'(15 passed)Posted on behalf of @schickling
agent_nameagent_session_idagent_toolagent_tool_versionagent_runtimeagent_modelruntime_profileskills_manifestworktreemachinetooling_profile