Skip to content

feat(chat): complete runtime decoupling — compositions back to @cacheplane/chat#136

Merged
blove merged 12 commits into
mainfrom
feat/chat-runtime-decoupling-phase-2
Apr 22, 2026
Merged

feat(chat): complete runtime decoupling — compositions back to @cacheplane/chat#136
blove merged 12 commits into
mainfrom
feat/chat-runtime-decoupling-phase-2

Conversation

@blove
Copy link
Copy Markdown
Contributor

@blove blove commented Apr 22, 2026

Summary

  • Adds ChatAgentWithHistory sub-contract and ChatCheckpoint neutral shape to @cacheplane/chat.
  • Moves chat-timeline, chat-timeline-slider, and chat-debug back into @cacheplane/chat, retargeted from AgentRef to the sub-contract.
  • Widens toChatAgent to return ChatAgentWithHistory; translates ThreadState[]ChatCheckpoint[].
  • mockChatAgent grows an optional history option; new runChatAgentWithHistoryConformance helper.
  • Cockpit debug/timeline demos rebind via one-line template edit.

Test Plan

  • nx run-many -t lint,test,build -p chat,langgraph passes
  • nx graph shows langgraph → chat only (no reverse edge)
  • No residual AgentRef or ThreadState references in libs/chat/src
  • No residual TODO(phase-2) / TODO(phase-3) markers
  • Cockpit chat-debug demo renders checkpoints; replay/fork handlers still work
  • Cockpit chat-timeline demo renders checkpoints

Design docs

  • Spec: docs/superpowers/specs/2026-04-21-chat-decoupling-phase-2-design.md
  • Plan: docs/superpowers/plans/2026-04-21-chat-decoupling-phase-2.md

🤖 Generated with Claude Code

blove and others added 11 commits April 21, 2026 20:30
Defines the ChatAgentWithHistory sub-contract, ChatCheckpoint neutral
shape, file-movement plan (three compositions back to @cacheplane/chat),
and public-API delta. Replay/fork stay as composition outputs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
9 tasks: add sub-contract types, extend mock/conformance, widen
toChatAgent, move three compositions back to @cacheplane/chat,
rebind cockpit consumers, verify dep graph.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… history

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…get to ChatAgentWithHistory

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
… to ChatAgentWithHistory

Moves ChatTimelineSliderComponent from @cacheplane/langgraph to @cacheplane/chat,
replacing the LangGraph-specific AgentRef/ThreadState types with the runtime-neutral
ChatAgentWithHistory/ChatCheckpoint contract. Updates both public-api.ts files accordingly.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…etarget to ChatCheckpoint

Moves all 11 files from libs/langgraph/src/lib/compositions/chat-debug/ to
libs/chat/src/lib/compositions/chat-debug/. Rewires chat-debug.component.ts
to use ChatAgentWithHistory (replacing AgentRef + toChatAgent adapter) and
debug-utils.ts to consume ChatCheckpoint (replacing ThreadState). Updates
public APIs: ChatDebugComponent exported from @cacheplane/chat; all debug-*
re-exports removed from @cacheplane/langgraph.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…eplane/chat

Move ChatDebugComponent and ChatTimelineSliderComponent imports from @cacheplane/langgraph to @cacheplane/chat, and update consumer bindings to use [agent] instead of [ref] for consistency with Phase-2 primitives.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Conformance helpers (chat-agent-conformance, chat-agent-with-history-
conformance) legitimately import from vitest. Adding to ignoredDependencies
matches how vite/@nx/vite are already excluded.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cacheplane Ready Ready Preview, Comment Apr 22, 2026 3:18pm
cacheplane-minting-service Ready Ready Preview, Comment Apr 22, 2026 3:18pm

Request Review

…ser peer-deps

After the chat-debug tree moved to @cacheplane/chat in Phase-2,
@cacheplane/langgraph no longer consumes NgTemplateOutlet or
DomSanitizer. @nx/dependency-checks correctly flagged both as unused.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@blove blove merged commit 4f3259e into main Apr 22, 2026
15 checks passed
@blove blove deleted the feat/chat-runtime-decoupling-phase-2 branch May 7, 2026 16:30
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