wyrd/tools
esc

    ↑↓ Move ↵ Open t3c results first Search by Pagefind
    Releases

    Version control API

    Version control API

    Classes

    VcsApi

    Repository references, worktrees and status. A failed Git command rejects with a T3RpcError whose GitCommandError record can carry optional reason: a growing set of Git failure tags such as branch_already_exists or ref_not_found. Omission means the server did not recognise the cause; an unknown reason string is preserved.

    VcsApi

    Repository references, worktrees and status. A failed Git command rejects with a T3RpcError whose GitCommandError record can carry optional reason: a growing set of Git failure tags such as branch_already_exists or ref_not_found. Omission means the server did not recognise the cause; an unknown reason string is preserved.

    Kind: global class

    vcsApi.listRefs()

    List repository references. The optional boolean isAtRepositoryRoot reports whether cwd is the repository root. Omission does not mean false. Each reference can include upstreamRef, an optional trimmed nonempty string containing the full Git ref (for example refs/remotes/origin/main). The field can be omitted; callers must handle omission.

    listRefs(
        input: RpcPayload<RpcMethods, "vcs.listRefs">,
        signal?: AbortSignal,
      ): Promise<RpcSuccess<RpcMethods, "vcs.listRefs">>;

    Kind: instance method of VcsApi

    vcsApi.status()

    Refresh repository status. workingTree.rootPath is an optional nonempty string containing the absolute worktree root on the server environment. Each workingTree.files[].path is relative to that root. Paths preserve whitespace; the root is omitted when the server cannot resolve it. localOnly refreshes only the local state and does not contact the remote.

    status(
        input: RpcPayload<RpcMethods, "vcs.refreshStatus">,
        signal?: AbortSignal,
      ): Promise<RpcSuccess<RpcMethods, "vcs.refreshStatus">>;

    Kind: instance method of VcsApi

    vcsApi.createWorktree()

    Create a worktree in the server’s managed folder. Supply path: null.

    createWorktree(
        input: RpcPayload<RpcMethods, "vcs.createWorktree">,
        signal?: AbortSignal,
      ): Promise<RpcSuccess<RpcMethods, "vcs.createWorktree">>;

    Kind: instance method of VcsApi

    vcsApi.removeWorktree()

    Remove a worktree through the server.

    removeWorktree(
        input: RpcPayload<RpcMethods, "vcs.removeWorktree">,
        signal?: AbortSignal,
      ): Promise<RpcSuccess<RpcMethods, "vcs.removeWorktree">>;

    Kind: instance method of VcsApi

    vcsApi.createRef()

    Create a repository reference.

    createRef(
        input: RpcPayload<RpcMethods, "vcs.createRef">,
        signal?: AbortSignal,
      ): Promise<RpcSuccess<RpcMethods, "vcs.createRef">>;

    Kind: instance method of VcsApi

    vcsApi.switchRef()

    Switch the selected repository reference.

    switchRef(
        input: RpcPayload<RpcMethods, "vcs.switchRef">,
        signal?: AbortSignal,
      ): Promise<RpcSuccess<RpcMethods, "vcs.switchRef">>;

    Kind: instance method of VcsApi

    vcsApi.watchStatus()

    Subscribe to repository status changes. Local status in snapshots and updates carries the same optional workingTree.rootPath contract as status: the absolute server-side root for relative file paths, omitted if unresolved.

    watchStatus(
        input: RpcPayload<RpcMethods, "subscribeVcsStatus">,
        options?: { readonly signal?: AbortSignal },
      ): AsyncIterable<DecodedStreamItem<RpcSuccess<RpcMethods, "subscribeVcsStatus">>>;

    Kind: instance method of VcsApi