@standardagents/sc-github-status-plugin
v0.2.2
Published
Repository and worktree status in Standard Code pane footers
Keywords
Readme
Git status
Public npm package: @standardagents/sc-github-status-plugin.
standard plugin install @standardagents/sc-github-status-plugin --accept-capabilities surfaces,eventsThe package uses the published Standard Code plugin SDK. Its plugin ID stays
git-status so upgrades retain configuration and account state.
Git status publishes one full-width footer row. It groups repository identity, branch and worktree state, shaded added/deleted line counts, and paired upstream arrows. The row uses the pane project's color tint. Repository and branch/worktree groups align left. Upstream counts and then change counts align right, with spare width between the two sides. Narrow panes trim the branch from the start, then hide upstream counts, then the organization. GitHub, branch and arrow icons use Nerd Fonts with ASCII fallbacks.
The plugin uses the public SDK's local pane context and slot publishers. Each
machine reads Git for its own panes; remote viewers receive the same surfaces.
The directory is the pane's configured project launch directory. Following
shell cd changes requires a future live-directory event.
Reads run at activation and after native filesystem notifications, with a 120 ms debounce and at most four concurrent collectors. Pane-context events update targets. Panes sharing a configured directory share one observation. Watchers include directories containing tracked or untracked files, their ancestors, linked-worktree metadata, and shared refs. Ignored build trees are excluded. A 4096-directory limit reports degraded health when reached. There is no polling fallback; unavailable notifications report degraded health. Git commands have timeouts and output bounds. No fetch, index refresh, hooks, external diff, textconv, or clean/process filters are requested. Ahead/behind reflects local upstream refs. Tracked line counts compare the working tree with HEAD, including staged and unstaged changes as one net diff. Untracked files are observed for filesystem changes. New repositories compare with an empty tree. Binary changes contribute no line count.
Outside Git repositories, contributions are withdrawn. Failed reads show
Git unavailable; pane removal and generation changes withdraw old surfaces.
Disposal aborts pending reads and clears every publisher.
Run pnpm --filter @standardagents/sc-github-status-plugin test for real temporary-Git
fixtures and lifecycle tests using the public SDK harness. The plugin requires
SDK 1.0.0-alpha.10-rows.0 and its pane-context host support.
The native renderer currently supports stacked rows, text, and non-interactive canvas cells. Persisted slot collapse and pane-slot actions remain planned.
For a manual preview, run node git-status/preview-export.mjs, then
node ~/Shots/out/git-footer-preview.mjs. --width=N sets a maximum width;
the preview remains bounded by the current terminal width. --ascii shows
fallback icons. The preview uses sample data and reads terminal palette colors.
