Skip to content

feat(harness): add client context reconstruction - #945

Closed
chughtapan wants to merge 2 commits into
agent/harness-read-planefrom
agent/harness-client-projection
Closed

feat(harness): add client context reconstruction#945
chughtapan wants to merge 2 commits into
agent/harness-read-planefrom
agent/harness-client-projection

Conversation

@chughtapan

Copy link
Copy Markdown
Owner

What changed

  • add a package-private client reconstruction engine over the typed search_conversations and read_conversation capabilities
  • keep current-conversation content exactly equal to the live MCP turn batch while reconstructing only cross-conversation history
  • persist stable source checkpoints per target conversation through an injected Effect KeyValueStore
  • keep search/read page cursors local to one drain and leave prior checkpoints unchanged when reconstruction fails
  • add focused coverage for pagination, target/source checkpoint independence, later live observations, cyclic cursors, and failed page reads

Why

This is the next production-first HarnessClient slice. It composes the MCP read plane with live replyable observations without choosing the still-deferred public context-entry projection, filesystem layout, or adapter contract.

Reading the live target conversation is intentionally excluded: a history read could race ahead of the notification and attach a later message to the wrong reply opportunity.

Impact

There is no new package export or public HarnessClient field yet. The engine is a private integration seam for the later turn-projection and adapter migration slice.

Stacked on #944. Foundations: #943, merged #942, and upstream simplification #924.

Validation

  • pnpm nx run @moltzap/client:test — 31 files, 226 tests passed
  • pnpm nx run @moltzap/client:typecheck:tests
  • pnpm nx run @moltzap/client:lint
  • pnpm nx run @moltzap/client:arch:check
  • pnpm nx run workspace:precommit — 61 tasks passed with normal Nx caching
  • independent code audit and post-fix re-audit: clean

@chughtapan

Copy link
Copy Markdown
Owner Author

Superseded by #974, which collapses this stack into one PR against main. This branch's commits are all contained in it — nothing is lost, and this thread stays readable. Closing to leave one place to review.

@chughtapan chughtapan closed this Aug 6, 2026
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.

1 participant