Agent state persistence — survive restarts with db backed#362
Open
clintjeff2 wants to merge 7 commits into
Hidden character warning
The head ref may contain hidden characters: "Agent-state-persistence-\u2014-survive-restarts-with-DB-backed"
Open
Agent state persistence — survive restarts with db backed#362clintjeff2 wants to merge 7 commits into
clintjeff2 wants to merge 7 commits into
Conversation
…h-database Persist agent state across restarts
- Fix TypeScript error in task drain route by providing correct event result - Fix async/await issue in task drain unit tests - Increase MAX_PENDING_PER_AGENT to 500 to support existing test cases - Remove accidentally generated tsconfig.tsbuildinfo artifact Co-authored-by: clintjeff2 <119521983+clintjeff2@users.noreply.github.com>
…6952249712895268 Fix CI failures in task drain API and tests
- Update task-drain test expectations to match MAX_DRAIN_ITEMS=200 - Escape single quotes in app/offline/page.tsx to fix ESLint error - Suppress unsafe declaration merging in Soroban validator client - Add missing @base-org/account and @metamask/connect-evm dependencies - Fix ESLint/TSC conflict for window.Buffer assignment in validator client - Remove build artifacts and temporary log files Co-authored-by: clintjeff2 <119521983+clintjeff2@users.noreply.github.com>
Fix CI checks: Typecheck, tests, build, and guards
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Motivation
Description
lib/agent-runtime/state.ts.lib/agent-runtime/position-sync.tsand a new API endpointGET/POST /api/agents/positionsatapp/api/agents/positions/route.tsfor reading and writing live coordinates.GET /api/agents(app/api/agents/route.ts) to return persisted state when requested via?state=1while preserving the existing capability registry response.components/open-stellar/open-stellar-hub.tsx, and batch-write canvas positions every 5s.lib/agent-runtime/state.test.tsto verify seeding/hydration and independent live-position persistence.Testing
npm test -- lib/agent-runtime/state.test.tsand the test file passed.npm test -- __tests__/api/agents/registry.test.ts lib/agent-runtime/state.test.tsand both tests passed after adjustingGET /api/agentsto expose persisted state for hydration.npx eslintagainst the changed files (app/api/agents/route.ts,app/api/agents/positions/route.ts,lib/agent-runtime/state.ts,lib/agent-runtime/position-sync.ts,lib/agent-runtime/state.test.ts,components/open-stellar/open-stellar-hub.tsx) and the lint check for those files completed (the repo still contains unrelated pre-existing lint warnings elsewhere).npx tsc --noEmitandnpm testrevealed pre-existing unrelated TypeScript and task-drain test failures outside the scope of this change, and this package does not include atypecheckscript.Closes #47