agentleFS
rebornixrebornix/Agmente/AppServerClient/AGENTS.md

Agmente / AppServerClient

AGENTS.md545 starsChanged 9 months agoMITView on GitHub

Maintenance guardrails: - Do not reintroduce unconditional thread/resume during reconnect. - Do not immediately issue another resume after successful listener+read attach. - Keep includeTurns: true on read-based hydration paths. - Remember that persistExtendedHistory is not backfilled for old sessions. See AppServerClient/codex-thread-hydration.md for the expanded maintenance checklist and regression scenarios.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

18 rules. About 0 are common, 12 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .agmente.paths (from repo root) before cross-checking Codex app-server upstream source.

    line 7
  2. Very specific:

    Default wire mode omits "jsonrpc":"2.0" header, with optional inclusion toggle.

    line 16
  3. Distinctive:

    Keep event parser mappings aligned with upstream app-server method names.

    line 18
  4. Distinctive:

    Treat method-name and payload-shape drift as compatibility-sensitive changes.

    line 19
  5. Very specific:

    if loaded: addConversationListener + thread/read(includeTurns: true)

    line 26
  6. Distinctive:

    use when thread is not loaded, or listener attach/read path is unavailable

    line 28
  7. Distinctive:

    avoid duplicate assistant rows via normalized content + tool-call identity checks

    line 32
  8. Very specific:

    Do not reintroduce unconditional thread/resume during reconnect.

    line 37
  9. Distinctive:

    Do not immediately issue another resume after successful listener+read attach.

    line 38
  10. Very specific:

    Keep includeTurns: true on read-based hydration paths.

    line 39
  11. Distinctive:

    When adding app-server method support:

    line 45
  12. Distinctive:

    Add method name constant.

    line 46
  13. Distinctive:

    Add payload model and params encoder.

    line 47
  14. Distinctive:

    Add typed service wrapper.

    line 48
  15. Distinctive:

    Add response parser coverage if result is typed.

    line 49
  16. Distinctive:

    Add or update event parser mapping if notifications/requests are involved.

    line 50
  17. Distinctive:

    Add package tests for request flow, parse flow, and error handling.

    line 51
  18. Very specific:

    Run package tests for AppServerClient.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 41,581 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AppServerClient Package Guide

Scope

Typed Codex app-server transport/service package used by the iOS app.

External Repo Paths

  • Read .agmente.paths (from repo root) before cross-checking Codex app-server upstream source.
  • Codex upstream reference root: AGMENTE_CODEX_REPO/codex-rs.

Architecture Model

  • Transport and request orchestration are separated from protocol payload parsing.
  • Service APIs should remain typed and avoid leaking raw JSON-RPC details to callers.
  • Event parsing should map wire notifications/requests into stable app-facing event types.

Protocol Notes

  • Default wire mode omits "jsonrpc":"2.0" header, with optional inclusion toggle.
  • Handle both notifications and server-initiated requests (for approvals and similar flows).
  • Keep event parser mappings aligned with upstream app-server method names.
  • Treat method-name and payload-shape drift as compatibility-sensitive changes.

Codex Thread Maintenance

Final thread hydration behavior used by Agmente for Codex:

  1. Open/reconnect prefers non-destructive attach:
    • thread/loaded/list
    • if loaded: addConversationListener + thread/read(includeTurns: true)
  2. thread/resume is fallback only:
    • use when thread is not loaded, or listener attach/read path is unavailable
  3. Merge behavior:
    • preserve richer local tool-call rows/outputs
    • append newly resumed items
    • avoid duplicate assistant rows via normalized content + tool-call identity checks
  4. Persistence for cold relaunch:
    • send persistExtendedHistory: true on thread/start and thread/resume

Maintenance guardrails:

  • Do not reintroduce unconditional thread/resume during reconnect.
  • Do not immediately issue another resume after successful listener+read attach.
  • Keep includeTurns: true on read-based hydration paths.
  • Remember that persistExtendedHistory is not backfilled for old sessions.

See AppServerClient/codex-thread-hydration.md for the expanded maintenance checklist and regression scenarios.

Extension Pattern

When adding app-server method support:

  1. Add method name constant.
  2. Add payload model and params encoder.
  3. Add typed service wrapper.
  4. Add response parser coverage if result is typed.
  5. Add or update event parser mapping if notifications/requests are involved.
  6. Add package tests for request flow, parse flow, and error handling.

Tests

  • Run package tests for AppServerClient.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.