Add agent metadata column and store update API - #540
Open
bhaveshpatel640 wants to merge 2 commits into
Open
Conversation
bhaveshpatel640
requested review from
chiragjn,
debajyoti-truefoundry,
heerambavi1998,
sr07asthana and
thesujai
as code owners
September 1, 2026 15:29
🦋 Changeset detectedLatest commit: c241f87 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
bhaveshpatel640
force-pushed
the
AGE-2063
branch
from
September 1, 2026 15:36
1da1b2d to
0d214d0
Compare
bhaveshpatel640
marked this pull request as draft
September 1, 2026 15:52
bhaveshpatel640
force-pushed
the
AGE-2063
branch
from
September 1, 2026 17:31
0d214d0 to
c241f87
Compare
bhaveshpatel640
marked this pull request as ready for review
September 1, 2026 17:31
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.
Summary
Adds the AGE-2063 foundation for agent metadata: persist an
agent.metadatajsonb column on agent registry rows and expose store-levelupdateAgentMetadata.Linear: AGE-2063
Changes
agent.metadatajsonb / JSONB blob, default{}AgentMetadataSchema(strict empty whitelist for now) +IAgentStore.updateAgentMetadatametadataon agent records@truefoundry/trueforgeHow was this tested?
agent-storesuite (metadata on create/update round-trip)pnpm exec tsc --noEmit(package) as needed while iteratingChecklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Medium Risk
Adds a required DB migration on
agent(SQLite table rebuild with FK handling); behavior is additive with defaults, but deploy order and migration failure would block upgrades.Overview
Introduces persisted
agent.metadataon agent registry rows (AGE-2063 foundation): a separate JSON document from themanifest, intended for registry-level metadata that can be updated without replacing the fullAgentSpec.Schema & contract: New strict
AgentMetadataSchema(empty whitelist for now) andmetadataonAgentRecord.IAgentStoregainsupdateAgentMetadata; manifest updates viaupdateAgentleave metadata unchanged.Migrations: Postgres adds
metadata jsonb NOT NULL DEFAULT '{}'. SQLite rebuilds theagenttable (STRICT/jsonb constraints) with the same column and backfills{}for existing rows.Stores: Postgres and SQLite agent stores read/write
metadataon list/get/create, seed new agents withEMPTY_AGENT_METADATA, and implementupdateAgentMetadatawithupdated_atbumps. SQLite JSON parsing includes the new column.Contract tests assert default
{}on create, metadata preserved on manifest update, and undefined for missing ids on metadata update. Patch changeset for@truefoundry/trueforge.Reviewed by Cursor Bugbot for commit 46ce123. Bugbot is set up for automated code reviews on this repo. Configure here.