An unofficial terminal client for Tangled, optimized for humans and agents. tgcli.wisp.place

feat(repo): support private repositories #101

targeting master from feat/private-repos
Merged opened by aly.selfhosted.social
targeting master from feat/private-repos

Tangled private repositories keep owner declarations and social attestations in Pocket instead of the public PDS, require viewer tokens on Bobbin reads, and authenticate Knot and Spindle reads per repository. Until now, tg assumed every repository was public, so creating, viewing, cloning, or working in private repositories failed or risked writing private metadata to the public PDS.

This change adds private repository support across tg and tgmcp:

  • tg repo create --private checks that the target Knot advertises knot-private-repos, provisions a private repository, writes the owner declaration to Pocket, refreshes the indexer lease, and waits for Bobbin to index the repository.
  • tg repo edit --visibility public publishes a private repository permanently (defaulting contributionPolicy to anyone unless --contribution-policy is set), migrates the declaration from Pocket to the public PDS, and supports resuming if interrupted after the manifest update. Setting --spindle on a private repository registers it on the Spindle with org.tangled.ci.declareRepo.
  • tg repo fork adds --private, always forks private repositories privately, and uses org.tangled.repo.mintLink (knot-link) for cross-Knot private forks.
  • tg repo delete removes private repositories from the Knot before removing the Pocket declaration, with recovery if a previous delete left a dangling Pocket declaration.
  • Bobbin GET reads attach a cached x-tangled-viewer token scoped to the active account (refusing cross-origin redirects and avoiding destructive OAuth scope resets on older sessions). Private Knot reads, pr watch history, pr checkout, HTTPS clones, and Spindle reads authenticate with the corresponding repository-scoped tokens, and private social attestations write and retry in Pocket only.
  • Updates indigo to c6fa5eee6ba5, syncs internal/tangledlex to tangled.org/core 9692f4b, adds matching MCP flags and models in tgmcp, and updates the configuration, authentication, and PR watch cookbook docs.

Existing OAuth sessions need tg auth login again to grant the new private repository, Pocket, viewer token, and HTTPS clone scopes.

Commits 1

app: add private repository support
Sign up or Sign in to add to the discussion.