Skip to content

Update import and export to target remote repos instead of relative local file paths #155

Closed

Description

@diberry

Allowing import and export to remote repos removes the dependency from the local computer.

Activity

  1. bradygaster commented on Feb 27, 2026

    @bradygaster
    Collaborator

    i love this and it's coming. thank you for validating the feature we've already started building. :)

  2. bradygaster commented on Mar 5, 2026

    @bradygaster
    Collaborator

    Hey — Fenster here. I investigated this one and good news: the underlying request is already covered by features that shipped after this issue was filed. Here's how:

    What's already working

    1. squad upstream — remote repo inheritance (the big one)

    # Add a remote GitHub repo as an upstream source
    squad upstream add https://github.com/acme/platform-squad.git --name platform --ref main
    
    # Sync it (pulls latest)
    squad upstream sync platform
    
    # List all configured upstreams
    squad upstream list

    This clones the remote repo into .squad/_upstream_repos/ and the coordinator reads its skills, decisions, wisdom, casting policy, and routing live at session start. No local file dependency. Supports local, git, and �xport source types.

    Docs: upstream-inheritance.md

    2. �gent-repo.ts — GitHub API-based agent pull/push

    The sharing SDK (packages/squad-sdk/src/sharing/agent-repo.ts) has pullAgent() and pushAgent() functions that work directly against GitHub repos via the API (no local clone needed):

    • listRepoAgents(config, ops) — list agents in a remote repo
    • pullAgent(config, agentId, ops) — pull a single agent definition from github:owner/repo
    • pushAgent(config, agent, ops) — push an agent definition to a remote repo

    These use the GitHubFetcher interface and AgentRepoConfig with owner/repo/branch/path targeting.

    3. GitHubAgentSource — pluggable remote agent discovery

    packages/squad-sdk/src/config/agent-source.ts implements GitHubAgentSource which reads agents directly from any GitHub repo:

    new GitHubAgentSource('acme/platform-squad', { ref: 'main' })

    Supports listing, fetching charters, and loading full agent definitions from remote repos.

    4. squad consult — personal squad portability

    Consult mode copies your personal squad into any project temporarily (hidden via .git/info/exclude), with squad extract to merge learnings back. This solves the "use my trained team anywhere" use case without needing file paths.

    5. Agent caching for remote sources

    packages/squad-sdk/src/sharing/cache.ts provides AgentCache with TTL-based caching (1hr for agents, 5min for skills), so remote fetches don't hammer the API.

    6. Version pinning

    packages/squad-sdk/src/sharing/versioning.ts pins agents to commit SHAs with source: 'github' support, so you can lock a remote agent to a specific version.

    What's left (minor)

    The CLI squad import and squad export commands still only target local files — but the need for remote import/export is effectively replaced by:

    • squad upstream add for pulling team context from remote repos
    • �gent-repo.ts for programmatic push/pull of individual agents
    • squad consult for portable personal squads

    The original squad import ./squad-export.json / squad export flow was designed for manual file-sharing. The upstream system, GitHub agent source, and consult mode are all superior solutions for the remote use case.

    Closing this out

    The spirit of #155 — "remove the dependency from the local computer" — is fully addressed by the upstream inheritance system and GitHub agent source. Closing as completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions