Source control integration for Lore/Branchive workspaces, wrapping the lore CLI directly (no
BFF dependency for the core VCS loop — see docs/INTEGRATIONS-CONTRACT.md in the monorepo this
extension is split from).
What this build does
Activates automatically in any workspace folder containing a .lore/ directory.
Populates the Source Control view: Staged Changes / Changes / Merge Conflicts, backed by
lore status --scan.
Commit (via the SCM input box), Stage/Unstage (per-file, from the resource context menu).
Click-to-diff and gutter quick-diff against the last committed revision.
Lock badges (L) on files locked via lore lock acquire, with owner tooltip.
Push / Pull commands in the Source Control view title bar.
Branch operations: Create Branch, Switch Branch (QuickPick), Merge Branch Into Current
(QuickPick) — all in the Source Control "..." menu — plus a status-bar current-branch indicator
(click to switch).
Merge-conflict resolution, honest ours/theirs (Lore has no arbitrary hand-merge verb): per-
file "Resolve Using Mine (Ours)" / "Resolve Using Theirs" / "Show Both Sides" (read-only
inspection diff) from the Merge Conflicts group's context menu, plus "Abort Merge" and "Complete
Merge" in the Source Control "..." menu (each gated to when they're actually applicable).
Revision history — see HISTORY.md for the full story and why it's built only on stable VS
Code APIs (never the proposed scmHistoryProvider): a branchive.showHistory QuickPick command
plus an optional "Branchive History" TreeView in the Source Control panel.
Branchive Cloud sign-in (docs/INTEGRATIONS-AUTH-PKCE.md) — Branchive: Sign In / Branchive: Sign Out commands, PKCE S256 + a one-shot loopback listener (127.0.0.1, ports 47400-47499) +
vscode.SecretStorage for the Bearer at rest. A status bar item shows the signed-in @handle
(click to sign out). Once signed in, pushing/pulling against a Branchive Cloud workspace
(lore://vcs.branchive.io[:port], exact-host gated — see src/auth.ts#isCloudRemoteUrl) mints a
scoped Lore JWT and runs lore login automatically before the op, rebinding the workspace's
.lore/config.toml identity pin as needed; self-hosted/local remotes are completely untouched. A
background refresh timer keeps the session alive; on an expired/revoked session it flips to
signed-out and offers re-auth (never auto-opens the browser). Locks you personally hold render as
"Locked by you" once a cloud login has happened — every other lock's owner still renders exactly
as the CLI reports it (no general owner-id → handle directory lookup exists yet).
What this build does NOT do yet
Cherry-pick / revert conflict resolution. Only branch merge's conflicts are wired this pass
(contract §4.18's op-tracking note) — revision cherry-pick/revision revert share the same
resolve/abort argv shape and could be added later without touching the CLI wrapper's
existing methods much.
Configuration
Setting
Default
Purpose
branchive.loreBinPath
(empty)
Path to lore/lore.exe — absolute, or a bare name to search PATH/the default install dir. Falls back to the LORE_BIN env var, then a platform default. Security hardening (F-BIN): always resolved to an absolute, existing file before it's ever spawned — a bare/relative name is never handed to the OS's own image search.
branchive.loreAuthPath
(empty)
Optional LORE_AUTH_PATH override. Leave empty to use the CLI's ambient token store.
branchive.lockPollIntervalSeconds
20
How often to poll lock query for the current branch while the window is focused.
branchive.bffBaseUrl
(empty)
Base URL of the Branchive BFF used for Cloud sign-in (PKCE). Leave empty for the production BFF (https://app.branchive.io) — override only for a private/dev deployment.
branchive.cloudVcsHost
(empty)
The Branchive Cloud VCS host the isCloudRemoteUrl security gate exact-matches against. Leave empty for the compiled-in default (vcs.branchive.io) — override only for a private Branchive Cloud deployment.
Building
npm install
npm run compile # tsc --noEmit-equivalent typecheck via tsc -p ./
npm run bundle # esbuild -> dist/extension.js
npm run package # compile + bundle + vsce package -> a .vsix
npm test # fixture-based parser unit tests (no VS Code host required)