feat(run-log): @agentic-kit/run-log — append-only agent run log, pi entries verbatim - #1723
Merged
Conversation
…ith pi entries stored verbatim
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This was referenced Aug 14, 2026
feat(pi-ext-run-log): @agentic-kit/pi-ext-run-log — mirror pi session entries into the run log
#1724
Merged
Merged
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
First package of the agent-kernel plan (planning#1655, #1657): the append-only run log that both placements (local pi, cloud pi job) write to and every surface reads from. Purely additive — no existing package touched, no new transport: the store is two interfaces, and the wire stays the GraphQL API /
agent_eventrows (durable Postgres impl lands later inconstructive-db).The load-bearing decision is no envelope re-encoding. pi entries are stored verbatim under a 4-field wrapper, so pi's own versioning/migrations keep working and a resumable session is just a projection:
Everything else is a fold over
RunEventRecord[]:projectPartsunknownparts)projectUsageusage.cost(observed usage for reconciliation, not billing authority)projectToolStatecustommessage (constructive.approval.request/resolution) so it survives reconnectsprojectSessionRead side is the polling contract the long-running FBP job needs — cursor in, page out, with an optional injected wakeup so LISTEN/NOTIFY can be dropped in later without touching consumers:
Bundling boundary is enforced by a test:
src/index.tsand everything it reaches import no Node built-ins (browser/renderer safe);FileRunLogStorelives insrc/file-store.tsand is imported explicitly.Malformed input throws rather than degrading —
assertRunEventRecord/assertOrderedreject mixed runs, non-increasingseq, mixedpiSessionVersion, and truncated JSONL lines.60 jest tests;
agentic/run-logadded to theagenticCI batch.Link to Devin session: https://app.devin.ai/sessions/450ce6d6659c47759c184ae6ec19a2a8
Requested by: @pyramation