runtime: Repo Watch snapshot backend + broker route#209
Merged
Conversation
Adds the broker endpoint the native Repos section polls. Lifts the self-contained repo-watch module forward (the front end shipped without it, so the section had no data source): - packages/runtime/src/repo-watch — computes a worktree-state snapshot by shelling out to git per worktree (branch, churn, last commit, diff, agent/session attribution) - GET /v1/repo-watch/snapshot route on the broker daemon (force / includeTail / includeDiff / includeLastCommit), seeded with hints from the broker snapshot + tail discovery - ./repo-watch package export + index re-export No new dependencies. Runtime typecheck clean; repo-watch tests pass (6/6); verified live (finds the openscout project + its 3 worktrees). Note: lastTouchedAt isn't emitted yet — the native column stays empty until a follow-up computes it.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
The native Repos section (merged in #201) polls the broker at
GET /v1/repo-watch/snapshot, but that route was never onmain— it lived on the 98-behindfeat/repo-watch-web-convergebranch. So the front end shipped with no data source and fell back to empty/sample.This lifts the self-contained backend forward (no web-surface baggage):
packages/runtime/src/repo-watch/— computes a worktree-state snapshot by shelling out togitper worktree (branch, churn, last commit, optional diff, agent/session attribution)GET /v1/repo-watch/snapshoton the broker daemon (force/includeTail/includeDiff/includeLastCommit), seeded with hints from the broker snapshot + tail discovery./repo-watchpackage export +indexre-exportNo new dependencies. The module's only internal coupling is one type import (
DiscoverySnapshotfromtail), verified present.Verification
repo-watch.test.ts: 6/6 passopenscoutproject + its 3 worktreesNote
lastTouchedAtisn't emitted yet (native-only field from the inventory redesign) — the "last-touched" column stays empty until a follow-up computes it.