Skip to content

fix(clmm): align task lifecycle with copilotkit v2#383

Draft
0xTomDaniel wants to merge 8 commits intonextfrom
fix/clmm-task-metrics-sync
Draft

fix(clmm): align task lifecycle with copilotkit v2#383
0xTomDaniel wants to merge 8 commits intonextfrom
fix/clmm-task-metrics-sync

Conversation

@0xTomDaniel
Copy link
Contributor

Summary

Align CLMM task lifecycle with CopilotKit v2 migration and runtime fixes for web-ag-ui.

Changes

  • Keep summarize cycles in working state and complete tasks on fire.
  • Migrate CopilotKit runtime/provider/hooks to v2 APIs and single-endpoint handling.
  • Persist thread IDs per wallet, update interrupt handling, and load state via useAgent.
  • Add CopilotKit langgraph ambient typings and a pnpm patch to avoid root langchain imports.

Testing

  • Unit tests pass (not run; not requested)
  • Integration tests pass (not run; not requested)
  • Manual testing completed (not run; not requested)
  •  ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND  No package.json (or package.yaml, or package.json5) was found in "/Users/tomdaniel/Documents/Ember_Cognition_Inc/Software/worktrees_multi/onchain-actions_vibekit/arbitrum-vibekit".
  •  ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND  No package.json (or package.yaml, or package.json5) was found in "/Users/tomdaniel/Documents/Ember_Cognition_Inc/Software/worktrees_multi/onchain-actions_vibekit/arbitrum-vibekit".

Related Issues

Closes #N/A

Notes

Includes a pnpm patch for @copilotkit/sdk-js to resolve langchain export/runtime issues.

Keep summarize cycles in working state and complete on fire\ncommands so tasks don't terminate after each poll. Migrate\nweb-ag-ui CopilotKit usage to v2 with persisted thread\nIDs and event-based interrupt handling. Patch\n@copilotkit/sdk-js to avoid root langchain imports and add\nambient langgraph typings for NodeNext builds.
revert to 1.50.1 to avoid patched langgraph build
remove the local patch and type shim configuration
retain intercepted tool call metadata in local state
reorder imports to satisfy lint rules
use the LangGraph SDK to create assistants, rewind threads,
and join resumable runs for cron and hire execution. add stable
thread ids derived from wallet addresses and cover behavior in
unit tests.
treat array entries as equivalent when their serialized values
match so snapshot merges keep stable prefixes instead of
replacing the entire array.
introduce a LangGraphAttachAgent to attach to existing
threads, emit snapshots, and retry or fall back when streams
fail. use the connect route with SSE keep-alives and update the
agent hook to attach and queue commands with stable thread ids.
add vitest unit/e2e configs and setup to boot LangGraph
locally for connect coverage. include route, attach, and hook
unit tests plus end-to-end SSE snapshot checks.
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