Documentation
¶
Overview ¶
Package worksetapi exposes a stable, JSON-friendly API for Workset.
The DTOs in this package are intended to mirror CLI JSON output. External callers should treat these shapes as stable, and internal code should avoid renaming fields or changing JSON tags without a compatibility plan.
Service provides CRUD-style operations for workspaces, repos, aliases, and groups, plus session and exec actions.
Example:
svc := worksetapi.NewService(worksetapi.Options{})
ctx := context.Background()
result, err := svc.ListWorkspaces(ctx)
if err != nil {
// handle error
}
_ = result
Index ¶
- Variables
- func IsAuthRequiredError(err error) bool
- type AgentCLIStatusJSON
- type AuthRequiredError
- type CheckAnnotationJSON
- type CheckAnnotationsResult
- type CommandResult
- type CommandRunner
- type CommitAndPushInput
- type CommitAndPushResult
- type CommitAndPushResultJSON
- type CommitAndPushStage
- type ConfigRecoverInput
- type ConfigRecoverResult
- type ConfigRecoverResultJSON
- type ConfigSetResultJSON
- type ConfigStore
- type ConfigUpdater
- type ConfirmationRequired
- type ConflictError
- type DeleteReviewCommentInput
- type DeleteReviewCommentResult
- type EditReviewCommentInput
- type EnvSnapshotResultJSON
- type ExecInput
- type FileConfigStore
- func (FileConfigStore) Load(_ context.Context, path string) (config.GlobalConfig, config.GlobalConfigLoadInfo, error)
- func (FileConfigStore) Save(_ context.Context, path string, cfg config.GlobalConfig) error
- func (FileConfigStore) Update(_ context.Context, path string, ...) (config.GlobalConfigLoadInfo, error)
- type FileWorkspaceStore
- func (FileWorkspaceStore) Init(_ context.Context, root, name string, defaults config.Defaults) (workspace.Workspace, error)
- func (FileWorkspaceStore) Load(_ context.Context, root string, defaults config.Defaults) (workspace.Workspace, error)
- func (FileWorkspaceStore) LoadConfig(_ context.Context, root string) (config.WorkspaceConfig, error)
- func (FileWorkspaceStore) LoadState(_ context.Context, root string) (workspace.State, error)
- func (FileWorkspaceStore) SaveConfig(_ context.Context, root string, cfg config.WorkspaceConfig) error
- func (FileWorkspaceStore) SaveState(_ context.Context, root string, state workspace.State) error
- type GetCheckAnnotationsInput
- type GitHubAuthInfoJSON
- type GitHubAuthModeProvider
- type GitHubAuthStatusJSON
- type GitHubCLIStatusJSON
- type GitHubClient
- type GitHubNewPullRequest
- type GitHubPATImporter
- type GitHubProvider
- type GitHubProviderSelector
- func (p *GitHubProviderSelector) AuthMode(ctx context.Context) string
- func (p *GitHubProviderSelector) AuthStatus(ctx context.Context) (GitHubAuthStatusJSON, error)
- func (p *GitHubProviderSelector) ClearAuth(ctx context.Context) error
- func (p *GitHubProviderSelector) Client(ctx context.Context, host string) (GitHubClient, error)
- func (p *GitHubProviderSelector) ImportPATFromEnv(ctx context.Context) (bool, error)
- func (p *GitHubProviderSelector) SetAuthMode(ctx context.Context, mode string) error
- func (p *GitHubProviderSelector) SetToken(ctx context.Context, token string) (GitHubAuthStatusJSON, error)
- type GitHubPullRequest
- type GitHubRepoSearchInput
- type GitHubRepoSearchItemJSON
- type GitHubRepoSearchResult
- type GitHubRepositorySearchResult
- type GitHubTokenInput
- type GitHubUserInput
- type GitHubUserJSON
- type GitHubUserResult
- type GroupApplyInput
- type GroupApplyResultJSON
- type GroupJSON
- type GroupListResult
- type GroupMemberInput
- type GroupSummaryJSON
- type GroupUpsertInput
- type HookExecutionJSON
- type HookPending
- type HookPendingJSON
- type HookProgress
- type HookProgressObserver
- type HookRunJSON
- type HookRunStatus
- type HooksRunInput
- type HooksRunResult
- type KeyringTokenStore
- type ListRemotesInput
- type ListRemotesResult
- type NotFoundError
- type Options
- type PullRequestCheckJSON
- type PullRequestCreateInput
- type PullRequestCreateResult
- type PullRequestCreatedJSON
- type PullRequestGenerateInput
- type PullRequestGenerateResult
- type PullRequestGeneratedJSON
- type PullRequestReviewCommentJSON
- type PullRequestReviewCommentsResult
- type PullRequestReviewsInput
- type PullRequestStatusInput
- type PullRequestStatusJSON
- type PullRequestStatusResult
- type PullRequestTrackedInput
- type PullRequestTrackedJSON
- type PullRequestTrackedResult
- type RegisteredRepoJSON
- type RegisteredRepoListResult
- type RegisteredRepoMutationResultJSON
- type RemoteInfoJSON
- type ReplyToReviewCommentInput
- type RepoAddInput
- type RepoAddResult
- type RepoAddResultJSON
- type RepoHookPreviewJSON
- type RepoHooksPreviewInput
- type RepoHooksPreviewJSON
- type RepoHooksPreviewResult
- type RepoJSON
- type RepoListResult
- type RepoLocalStatusInput
- type RepoLocalStatusJSON
- type RepoLocalStatusResult
- type RepoRegistryInput
- type RepoRemoveDeletedJSON
- type RepoRemoveInput
- type RepoRemoveResult
- type RepoRemoveResultJSON
- type RepoSelectionInput
- type RepoSnapshotJSON
- type RepoStatusJSON
- type ResolveReviewThreadInput
- type ResolveReviewThreadResult
- type ReviewCommentResult
- type Service
- func (s *Service) AddGroupMember(ctx context.Context, input GroupMemberInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) AddRepo(ctx context.Context, input RepoAddInput) (RepoAddResult, error)
- func (s *Service) ApplyGroup(ctx context.Context, input GroupApplyInput) (GroupApplyResultJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) ArchiveWorkspace(ctx context.Context, selector WorkspaceSelector, reason string) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) AttachSession(ctx context.Context, input SessionAttachInput) (SessionActionResult, error)
- func (s *Service) ClearGitHubAuth(ctx context.Context) error
- func (s *Service) CommitAndPush(ctx context.Context, input CommitAndPushInput) (CommitAndPushResult, error)
- func (s *Service) CreateAlias(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)deprecated
- func (s *Service) CreateGroup(ctx context.Context, input GroupUpsertInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) CreatePullRequest(ctx context.Context, input PullRequestCreateInput) (PullRequestCreateResult, error)
- func (s *Service) CreateWorkspace(ctx context.Context, input WorkspaceCreateInput) (WorkspaceCreateResult, error)
- func (s *Service) DeleteAlias(ctx context.Context, name string) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)deprecated
- func (s *Service) DeleteGroup(ctx context.Context, name string) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) DeleteReviewComment(ctx context.Context, input DeleteReviewCommentInput) (DeleteReviewCommentResult, error)
- func (s *Service) DeleteSkill(_ context.Context, scope, dirName, tool string) error
- func (s *Service) DeleteSkillWithRoot(_ context.Context, scope, dirName, tool, projectRoot string) error
- func (s *Service) DeleteWorkspace(ctx context.Context, input WorkspaceDeleteInput) (WorkspaceDeleteResult, error)
- func (s *Service) EditReviewComment(ctx context.Context, input EditReviewCommentInput) (ReviewCommentResult, error)
- func (s *Service) Exec(ctx context.Context, input ExecInput) error
- func (s *Service) GeneratePullRequestText(ctx context.Context, input PullRequestGenerateInput) (PullRequestGenerateResult, error)
- func (s *Service) GetAgentCLIStatus(ctx context.Context, agent string) (AgentCLIStatusJSON, error)
- func (s *Service) GetAlias(ctx context.Context, name string) (RegisteredRepoJSON, config.GlobalConfigLoadInfo, error)deprecated
- func (s *Service) GetCheckAnnotations(ctx context.Context, input GetCheckAnnotationsInput) (CheckAnnotationsResult, error)
- func (s *Service) GetConfig(ctx context.Context) (config.GlobalConfig, config.GlobalConfigLoadInfo, error)
- func (s *Service) GetCurrentGitHubUser(ctx context.Context, input GitHubUserInput) (GitHubUserResult, error)
- func (s *Service) GetGitHubAuthInfo(ctx context.Context) (GitHubAuthInfoJSON, error)
- func (s *Service) GetGitHubAuthStatus(ctx context.Context) (GitHubAuthStatusJSON, error)
- func (s *Service) GetGitHubCLIStatus(ctx context.Context) (GitHubCLIStatusJSON, error)
- func (s *Service) GetGroup(ctx context.Context, name string) (GroupJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) GetPullRequestStatus(ctx context.Context, input PullRequestStatusInput) (PullRequestStatusResult, error)
- func (s *Service) GetRegisteredRepo(ctx context.Context, name string) (RegisteredRepoJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) GetRepoLocalStatus(ctx context.Context, input RepoLocalStatusInput) (RepoLocalStatusResult, error)
- func (s *Service) GetSkill(_ context.Context, scope, dirName, tool string) (SkillContent, error)
- func (s *Service) GetSkillWithRoot(_ context.Context, scope, dirName, tool, projectRoot string) (SkillContent, error)
- func (s *Service) GetTrackedPullRequest(ctx context.Context, input PullRequestTrackedInput) (PullRequestTrackedResult, error)
- func (s *Service) ListAliases(ctx context.Context) (RegisteredRepoListResult, error)deprecated
- func (s *Service) ListGroups(ctx context.Context) (GroupListResult, error)
- func (s *Service) ListPullRequestReviewComments(ctx context.Context, input PullRequestReviewsInput) (PullRequestReviewCommentsResult, error)
- func (s *Service) ListRegisteredRepos(ctx context.Context) (RegisteredRepoListResult, error)
- func (s *Service) ListRemotes(ctx context.Context, input ListRemotesInput) (ListRemotesResult, error)
- func (s *Service) ListRepos(ctx context.Context, selector WorkspaceSelector) (RepoListResult, error)
- func (s *Service) ListSessions(ctx context.Context, selector WorkspaceSelector) (SessionListResult, error)
- func (s *Service) ListSkills(_ context.Context, projectRoot string) ([]SkillInfo, error)
- func (s *Service) ListWorkspaceSnapshots(ctx context.Context, opts WorkspaceSnapshotOptions) (WorkspaceSnapshotResult, error)
- func (s *Service) ListWorkspaces(ctx context.Context) (WorkspaceListResult, error)
- func (s *Service) ListWorkspacesWithOptions(ctx context.Context, opts WorkspaceListOptions) (WorkspaceListResult, error)
- func (s *Service) PinWorkspace(ctx context.Context, selector WorkspaceSelector, pin bool) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) PreviewRepoHooks(ctx context.Context, input RepoHooksPreviewInput) (RepoHooksPreviewResult, error)
- func (s *Service) RecoverConfig(ctx context.Context, input ConfigRecoverInput) (ConfigRecoverResult, error)
- func (s *Service) RegisterRepo(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) ReloadLoginEnv(ctx context.Context) (EnvSnapshotResultJSON, error)
- func (s *Service) RemoveGroupMember(ctx context.Context, input GroupMemberInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) RemoveRepo(ctx context.Context, input RepoRemoveInput) (RepoRemoveResult, error)
- func (s *Service) RenameWorkspace(ctx context.Context, input WorkspaceRenameInput) (WorkspaceRefJSON, error)
- func (s *Service) ReorderWorkspaces(ctx context.Context, orders map[string]int) ([]WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) ReplyToReviewComment(ctx context.Context, input ReplyToReviewCommentInput) (ReviewCommentResult, error)
- func (s *Service) ResolveReviewThread(ctx context.Context, input ResolveReviewThreadInput) (ResolveReviewThreadResult, error)
- func (s *Service) RunHooks(ctx context.Context, input HooksRunInput) (HooksRunResult, error)
- func (s *Service) SaveSkill(_ context.Context, scope, dirName, tool, content string) error
- func (s *Service) SaveSkillWithRoot(_ context.Context, scope, dirName, tool, content, projectRoot string) error
- func (s *Service) SearchGitHubRepositories(ctx context.Context, input GitHubRepoSearchInput) (GitHubRepoSearchResult, error)
- func (s *Service) SetAgentCLIPath(ctx context.Context, agent, path string) (AgentCLIStatusJSON, error)
- func (s *Service) SetDefault(ctx context.Context, key, value string) (ConfigSetResultJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) SetGitHubAuthMode(ctx context.Context, mode string) (GitHubAuthInfoJSON, error)
- func (s *Service) SetGitHubCLIPath(ctx context.Context, path string) (GitHubAuthInfoJSON, error)
- func (s *Service) SetGitHubToken(ctx context.Context, input GitHubTokenInput) (GitHubAuthStatusJSON, error)
- func (s *Service) SetWorkspaceColor(ctx context.Context, selector WorkspaceSelector, color string) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) SetWorkspaceDescription(ctx context.Context, selector WorkspaceSelector, description string) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) SetWorkspaceExpanded(ctx context.Context, selector WorkspaceSelector, expanded bool) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) ShowSession(ctx context.Context, input SessionShowInput) (SessionRecordJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) StartSession(ctx context.Context, input SessionStartInput) (SessionStartResult, error)
- func (s *Service) StatusWorkspace(ctx context.Context, selector WorkspaceSelector) (WorkspaceStatusResult, error)
- func (s *Service) StopSession(ctx context.Context, input SessionStopInput) (SessionActionResult, error)
- func (s *Service) SyncSkill(_ context.Context, scope, dirName, fromTool string, toTools []string) error
- func (s *Service) SyncSkillWithRoot(_ context.Context, scope, dirName, fromTool string, toTools []string, ...) error
- func (s *Service) TrustRepoHooks(ctx context.Context, repoName string) (config.GlobalConfigLoadInfo, error)
- func (s *Service) UnarchiveWorkspace(ctx context.Context, selector WorkspaceSelector) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) UnregisterRepo(ctx context.Context, name string) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) UpdateAlias(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)deprecated
- func (s *Service) UpdateGroup(ctx context.Context, input GroupUpsertInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) UpdateRegisteredRepo(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
- func (s *Service) UpdateWorkspaceLastUsed(ctx context.Context, selector WorkspaceSelector) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
- type SessionActionResult
- type SessionAttachInput
- type SessionListResult
- type SessionNotice
- type SessionRecordJSON
- type SessionShowInput
- type SessionStartInput
- type SessionStartResult
- type SessionStopInput
- type SkillContent
- type SkillInfo
- type TokenStore
- type TrackedPullRequestSnapshotJSON
- type UnsafeOperation
- type ValidationError
- type WorkspaceCreateInput
- type WorkspaceCreateResult
- type WorkspaceCreatedJSON
- type WorkspaceDeleteInput
- type WorkspaceDeleteResult
- type WorkspaceDeleteResultJSON
- type WorkspaceListOptions
- type WorkspaceListResult
- type WorkspaceRefJSON
- type WorkspaceRenameInput
- type WorkspaceSelector
- type WorkspaceSnapshotJSON
- type WorkspaceSnapshotOptions
- type WorkspaceSnapshotResult
- type WorkspaceStatusResult
- type WorkspaceStore
Constants ¶
This section is empty.
Variables ¶
var ErrTokenNotFound = errors.New("auth token not found")
ErrTokenNotFound indicates no token was stored.
Functions ¶
func IsAuthRequiredError ¶
IsAuthRequiredError reports whether the error indicates missing authentication.
Types ¶
type AgentCLIStatusJSON ¶
type AgentCLIStatusJSON struct {
Installed bool `json:"installed"`
Path string `json:"path,omitempty"`
ConfiguredPath string `json:"configuredPath,omitempty"`
Command string `json:"command"`
Error string `json:"error,omitempty"`
}
AgentCLIStatusJSON describes local availability for an agent command.
type AuthRequiredError ¶
type AuthRequiredError struct{ Message string }
AuthRequiredError indicates a missing or invalid authentication token.
func (AuthRequiredError) Error ¶
func (e AuthRequiredError) Error() string
type CheckAnnotationJSON ¶
type CheckAnnotationJSON struct {
Path string `json:"path"`
StartLine int `json:"start_line"`
EndLine int `json:"end_line"`
Level string `json:"level"`
Message string `json:"message"`
Title string `json:"title,omitempty"`
}
CheckAnnotationJSON describes a single check annotation.
type CheckAnnotationsResult ¶
type CheckAnnotationsResult struct {
Annotations []CheckAnnotationJSON `json:"annotations"`
}
CheckAnnotationsResult wraps check annotations payload.
type CommandResult ¶
CommandResult captures command output for integrations that need stdout/stderr.
type CommandRunner ¶
type CommandRunner func(ctx context.Context, root string, command []string, env []string, stdin string) (CommandResult, error)
CommandRunner executes a command with optional stdin and captures its output.
type CommitAndPushInput ¶
type CommitAndPushInput struct {
Workspace WorkspaceSelector
Repo string
Message string // Empty = auto-generate via agent
OnStage func(stage CommitAndPushStage)
}
CommitAndPushInput describes inputs for committing and pushing changes.
type CommitAndPushResult ¶
type CommitAndPushResult struct {
Payload CommitAndPushResultJSON
Config config.GlobalConfigLoadInfo
}
CommitAndPushResult wraps the commit/push result with config metadata.
type CommitAndPushResultJSON ¶
type CommitAndPushResultJSON struct {
Committed bool `json:"committed"`
Pushed bool `json:"pushed"`
Message string `json:"message"`
SHA string `json:"sha,omitempty"`
}
CommitAndPushResultJSON describes the result of a commit and push operation.
type CommitAndPushStage ¶
type CommitAndPushStage string
CommitAndPushStage describes progress phases for commit/push.
const ( CommitAndPushStageGeneratingMessage CommitAndPushStage = "generating_message" CommitAndPushStageStaging CommitAndPushStage = "staging" CommitAndPushStageCommitting CommitAndPushStage = "committing" CommitAndPushStagePushing CommitAndPushStage = "pushing" )
type ConfigRecoverInput ¶
ConfigRecoverInput controls config recovery behavior.
type ConfigRecoverResult ¶
type ConfigRecoverResult struct {
Payload ConfigRecoverResultJSON
Config config.GlobalConfigLoadInfo
}
ConfigRecoverResult wraps the recovery payload with config metadata.
type ConfigRecoverResultJSON ¶
type ConfigRecoverResultJSON struct {
Status string `json:"status"`
WorkspaceRoot string `json:"workspace_root"`
WorkspacesRecovered []string `json:"workspaces_recovered,omitempty"`
ReposRecovered []string `json:"repos_recovered,omitempty"`
Conflicts []string `json:"conflicts,omitempty"`
Warnings []string `json:"warnings,omitempty"`
DryRun bool `json:"dry_run"`
}
ConfigRecoverResultJSON is the JSON payload for config recovery.
type ConfigSetResultJSON ¶
type ConfigSetResultJSON struct {
Status string `json:"status"`
Key string `json:"key"`
Value string `json:"value"`
}
ConfigSetResultJSON is the JSON payload for config set operations.
type ConfigStore ¶
type ConfigStore interface {
Load(ctx context.Context, path string) (config.GlobalConfig, config.GlobalConfigLoadInfo, error)
Save(ctx context.Context, path string, cfg config.GlobalConfig) error
}
ConfigStore abstracts global config persistence for the Service.
type ConfigUpdater ¶
type ConfigUpdater interface {
Update(ctx context.Context, path string, fn func(cfg *config.GlobalConfig, info config.GlobalConfigLoadInfo) error) (config.GlobalConfigLoadInfo, error)
}
ConfigUpdater optionally provides atomic update support for global config.
type ConfirmationRequired ¶
type ConfirmationRequired struct{ Message string }
ConfirmationRequired indicates an operation needs explicit confirmation.
func (ConfirmationRequired) Error ¶
func (e ConfirmationRequired) Error() string
type ConflictError ¶
type ConflictError struct{ Message string }
ConflictError indicates a conflicting resource already exists.
func (ConflictError) Error ¶
func (e ConflictError) Error() string
type DeleteReviewCommentInput ¶
type DeleteReviewCommentInput struct {
Workspace WorkspaceSelector
Repo string
CommentID int64
}
DeleteReviewCommentInput describes inputs for deleting a review comment.
type DeleteReviewCommentResult ¶
type DeleteReviewCommentResult struct {
Success bool
Config config.GlobalConfigLoadInfo
}
DeleteReviewCommentResult wraps the result of a delete operation.
type EditReviewCommentInput ¶
type EditReviewCommentInput struct {
Workspace WorkspaceSelector
Repo string
CommentID int64
Body string
}
EditReviewCommentInput describes inputs for editing a review comment.
type EnvSnapshotResultJSON ¶
type EnvSnapshotResultJSON struct {
Updated bool `json:"updated"`
AppliedKeys []string `json:"appliedKeys,omitempty"`
}
EnvSnapshotResultJSON reports whether a login-shell env snapshot updated values.
func EnsureLoginEnv ¶
func EnsureLoginEnv(ctx context.Context) (EnvSnapshotResultJSON, error)
EnsureLoginEnv loads the login-shell environment once per process.
type ExecInput ¶
type ExecInput struct {
Workspace WorkspaceSelector
Command []string
}
ExecInput describes inputs for Exec.
type FileConfigStore ¶
type FileConfigStore struct{}
FileConfigStore implements ConfigStore using filesystem-backed config.
func (FileConfigStore) Load ¶
func (FileConfigStore) Load(_ context.Context, path string) (config.GlobalConfig, config.GlobalConfigLoadInfo, error)
func (FileConfigStore) Save ¶
func (FileConfigStore) Save(_ context.Context, path string, cfg config.GlobalConfig) error
func (FileConfigStore) Update ¶
func (FileConfigStore) Update(_ context.Context, path string, fn func(cfg *config.GlobalConfig, info config.GlobalConfigLoadInfo) error) (config.GlobalConfigLoadInfo, error)
type FileWorkspaceStore ¶
type FileWorkspaceStore struct{}
FileWorkspaceStore implements WorkspaceStore using filesystem-backed config/state.
func (FileWorkspaceStore) LoadConfig ¶
func (FileWorkspaceStore) LoadConfig(_ context.Context, root string) (config.WorkspaceConfig, error)
func (FileWorkspaceStore) SaveConfig ¶
func (FileWorkspaceStore) SaveConfig(_ context.Context, root string, cfg config.WorkspaceConfig) error
type GetCheckAnnotationsInput ¶
type GetCheckAnnotationsInput struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
CheckRunID int64 `json:"check_run_id"`
}
GetCheckAnnotationsInput describes inputs for fetching check annotations.
type GitHubAuthInfoJSON ¶
type GitHubAuthInfoJSON struct {
Mode string `json:"mode"`
Status GitHubAuthStatusJSON `json:"status"`
CLI GitHubCLIStatusJSON `json:"cli"`
}
GitHubAuthInfoJSON wraps auth mode, status, and CLI availability.
type GitHubAuthModeProvider ¶
type GitHubAuthModeProvider interface {
AuthMode(ctx context.Context) string
SetAuthMode(ctx context.Context, mode string) error
}
GitHubAuthModeProvider exposes the selected GitHub auth mode.
type GitHubAuthStatusJSON ¶
type GitHubAuthStatusJSON struct {
Authenticated bool `json:"authenticated"`
Login string `json:"login,omitempty"`
Name string `json:"name,omitempty"`
Scopes []string `json:"scopes,omitempty"`
TokenSource string `json:"tokenSource,omitempty"`
}
GitHubAuthStatusJSON describes the current GitHub auth state.
type GitHubCLIStatusJSON ¶
type GitHubCLIStatusJSON struct {
Installed bool `json:"installed"`
Version string `json:"version,omitempty"`
Path string `json:"path,omitempty"`
ConfiguredPath string `json:"configuredPath,omitempty"`
Error string `json:"error,omitempty"`
}
GitHubCLIStatusJSON describes the local GitHub CLI availability.
type GitHubClient ¶
type GitHubClient interface {
CreatePullRequest(ctx context.Context, owner, repo string, pr GitHubNewPullRequest) (GitHubPullRequest, error)
GetPullRequest(ctx context.Context, owner, repo string, number int) (GitHubPullRequest, error)
ListPullRequests(ctx context.Context, owner, repo, head, state string, page, perPage int) ([]GitHubPullRequest, int, error)
SearchRepositories(ctx context.Context, query string, perPage int) ([]GitHubRepositorySearchResult, error)
ListReviewComments(ctx context.Context, owner, repo string, number, page, perPage int) ([]PullRequestReviewCommentJSON, int, error)
CreateReplyComment(ctx context.Context, owner, repo string, number int, commentID int64, body string) (PullRequestReviewCommentJSON, error)
EditReviewComment(ctx context.Context, owner, repo string, commentID int64, body string) (PullRequestReviewCommentJSON, error)
DeleteReviewComment(ctx context.Context, owner, repo string, commentID int64) error
ListCheckRuns(ctx context.Context, owner, repo, ref string, page, perPage int) ([]PullRequestCheckJSON, int, error)
GetCheckRunAnnotations(ctx context.Context, owner, repo string, checkRunID int64) ([]CheckAnnotationJSON, error)
GetRepoDefaultBranch(ctx context.Context, owner, repo string) (string, error)
GetCurrentUser(ctx context.Context) (GitHubUserJSON, []string, error)
ReviewThreadMap(ctx context.Context, owner, repo string, number int) (map[string]threadInfo, error)
GetReviewThreadID(ctx context.Context, commentNodeID string) (string, error)
ResolveReviewThread(ctx context.Context, threadID string, resolve bool) (bool, error)
GetFileContent(ctx context.Context, owner, repo, path, ref string) ([]byte, bool, error)
}
GitHubClient executes GitHub API operations for a given host.
type GitHubNewPullRequest ¶
GitHubNewPullRequest describes an API payload.
type GitHubPATImporter ¶
GitHubPATImporter supports importing PAT tokens from environment variables.
type GitHubProvider ¶
type GitHubProvider interface {
AuthStatus(ctx context.Context) (GitHubAuthStatusJSON, error)
SetToken(ctx context.Context, token string) (GitHubAuthStatusJSON, error)
ClearAuth(ctx context.Context) error
Client(ctx context.Context, host string) (GitHubClient, error)
}
GitHubProvider selects an authenticated GitHub client and auth status.
func NewGitHubCLIProvider ¶
func NewGitHubCLIProvider() GitHubProvider
func NewGitHubPATProvider ¶
func NewGitHubPATProvider(store TokenStore) GitHubProvider
type GitHubProviderSelector ¶
type GitHubProviderSelector struct {
// contains filtered or unexported fields
}
GitHubProviderSelector chooses the auth provider based on stored mode.
func NewGitHubProviderSelector ¶
func NewGitHubProviderSelector(store TokenStore) *GitHubProviderSelector
func (*GitHubProviderSelector) AuthMode ¶
func (p *GitHubProviderSelector) AuthMode(ctx context.Context) string
func (*GitHubProviderSelector) AuthStatus ¶
func (p *GitHubProviderSelector) AuthStatus(ctx context.Context) (GitHubAuthStatusJSON, error)
func (*GitHubProviderSelector) ClearAuth ¶
func (p *GitHubProviderSelector) ClearAuth(ctx context.Context) error
func (*GitHubProviderSelector) Client ¶
func (p *GitHubProviderSelector) Client(ctx context.Context, host string) (GitHubClient, error)
func (*GitHubProviderSelector) ImportPATFromEnv ¶
func (p *GitHubProviderSelector) ImportPATFromEnv(ctx context.Context) (bool, error)
func (*GitHubProviderSelector) SetAuthMode ¶
func (p *GitHubProviderSelector) SetAuthMode(ctx context.Context, mode string) error
func (*GitHubProviderSelector) SetToken ¶
func (p *GitHubProviderSelector) SetToken(ctx context.Context, token string) (GitHubAuthStatusJSON, error)
type GitHubPullRequest ¶
type GitHubPullRequest struct {
Number int
URL string
Title string
Body string
Draft bool
State string
Merged bool
BaseRef string
HeadRef string
HeadSHA string
Mergeable *bool
Author string
CommentsCount int
ReviewCommentsCount int
}
GitHubPullRequest captures the fields used by Workset.
type GitHubRepoSearchInput ¶
GitHubRepoSearchInput describes inputs for remote repository search.
type GitHubRepoSearchItemJSON ¶
type GitHubRepoSearchItemJSON struct {
Name string `json:"name"`
FullName string `json:"full_name"`
Owner string `json:"owner"`
DefaultBranch string `json:"default_branch"`
CloneURL string `json:"clone_url"`
SSHURL string `json:"ssh_url"`
Private bool `json:"private"`
Archived bool `json:"archived"`
Host string `json:"host"`
}
GitHubRepoSearchItemJSON describes a repository candidate for catalog registration.
type GitHubRepoSearchResult ¶
type GitHubRepoSearchResult struct {
Repositories []GitHubRepoSearchItemJSON
}
GitHubRepoSearchResult wraps repository typeahead payload.
type GitHubRepositorySearchResult ¶
type GitHubRepositorySearchResult struct {
Name string
FullName string
Owner string
DefaultBranch string
CloneURL string
SSHURL string
Private bool
Archived bool
Host string
}
GitHubRepositorySearchResult captures fields used for repo catalog typeahead.
type GitHubTokenInput ¶
type GitHubTokenInput struct {
Token string `json:"token"`
Source string `json:"source,omitempty"`
}
GitHubTokenInput stores a GitHub API token.
type GitHubUserInput ¶
type GitHubUserInput struct {
Workspace WorkspaceSelector
Repo string
}
GitHubUserInput describes inputs for getting the current GitHub user.
type GitHubUserJSON ¶
type GitHubUserJSON struct {
ID int64 `json:"id"`
Login string `json:"login"`
Name string `json:"name,omitempty"`
Email string `json:"email,omitempty"`
}
GitHubUserJSON describes a GitHub user.
type GitHubUserResult ¶
type GitHubUserResult struct {
User GitHubUserJSON
Config config.GlobalConfigLoadInfo
}
GitHubUserResult wraps the current user with config metadata.
type GroupApplyInput ¶
type GroupApplyInput struct {
Workspace WorkspaceSelector
Name string
}
GroupApplyInput describes inputs for ApplyGroup.
type GroupApplyResultJSON ¶
type GroupApplyResultJSON struct {
Status string `json:"status"`
Template string `json:"template"`
Workspace string `json:"workspace"`
}
GroupApplyResultJSON is the JSON payload for group apply operations.
type GroupJSON ¶
type GroupJSON struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
Members []config.GroupMember `json:"members"`
}
GroupJSON is the JSON-friendly view of a group with members.
type GroupListResult ¶
type GroupListResult struct {
Groups []GroupSummaryJSON
Config config.GlobalConfigLoadInfo
}
GroupListResult returns group summaries with config metadata.
type GroupMemberInput ¶
GroupMemberInput describes inputs for AddGroupMember and RemoveGroupMember.
type GroupSummaryJSON ¶
type GroupSummaryJSON struct {
Name string `json:"name"`
Description string `json:"description,omitempty"`
RepoCount int `json:"repo_count"`
}
GroupSummaryJSON is the JSON summary view of a group.
type GroupUpsertInput ¶
GroupUpsertInput describes inputs for CreateGroup and UpdateGroup.
type HookExecutionJSON ¶
type HookExecutionJSON struct {
Event string `json:"event"`
Repo string `json:"repo"`
ID string `json:"id"`
Status HookRunStatus `json:"status"`
LogPath string `json:"log_path,omitempty"`
}
HookExecutionJSON reports hook execution results with repo and event context.
type HookPending ¶
type HookPending struct {
Event string
Repo string
Hooks []string
Status HookRunStatus
Reason string
}
HookPending provides structured hook approval details.
type HookPendingJSON ¶
type HookPendingJSON struct {
Event string `json:"event"`
Repo string `json:"repo"`
Hooks []string `json:"hooks"`
Status HookRunStatus `json:"status,omitempty"`
Reason string `json:"reason,omitempty"`
}
HookPendingJSON describes hooks waiting for approval/trust.
type HookProgress ¶
type HookProgress struct {
Phase string `json:"phase"`
Event string `json:"event"`
Repo string `json:"repo"`
Workspace string `json:"workspace,omitempty"`
HookID string `json:"hook_id"`
Reason string `json:"reason,omitempty"`
Status HookRunStatus `json:"status,omitempty"`
LogPath string `json:"log_path,omitempty"`
Error string `json:"error,omitempty"`
}
HookProgress describes lifecycle updates emitted while hooks run.
type HookProgressObserver ¶
type HookProgressObserver interface {
OnHookProgress(progress HookProgress)
}
HookProgressObserver receives live hook lifecycle updates.
type HookRunJSON ¶
type HookRunJSON struct {
ID string `json:"id"`
Status HookRunStatus `json:"status"`
LogPath string `json:"log_path,omitempty"`
}
HookRunJSON reports individual hook execution results.
type HookRunStatus ¶
type HookRunStatus string
const ( HookRunStatusOK HookRunStatus = "ok" HookRunStatusFailed HookRunStatus = "failed" HookRunStatusSkipped HookRunStatus = "skipped" )
type HooksRunInput ¶
type HooksRunInput struct {
Workspace WorkspaceSelector
Repo string
Event string
Reason string
TrustRepo bool
}
HooksRunInput describes inputs for running hooks.
type HooksRunResult ¶
type HooksRunResult struct {
Event string
Repo string
Results []HookRunJSON
Config config.GlobalConfigLoadInfo
}
HooksRunResult describes hook execution results.
type KeyringTokenStore ¶
type KeyringTokenStore struct{}
KeyringTokenStore stores tokens in the OS keychain.
func (KeyringTokenStore) Delete ¶
func (KeyringTokenStore) Delete(_ context.Context, key string) error
type ListRemotesInput ¶
type ListRemotesInput struct {
Workspace WorkspaceSelector
Repo string
}
ListRemotesInput describes inputs for listing repo remotes.
type ListRemotesResult ¶
type ListRemotesResult struct {
Remotes []RemoteInfoJSON
}
ListRemotesResult wraps the remotes list.
type NotFoundError ¶
type NotFoundError struct{ Message string }
NotFoundError indicates a missing resource.
func (NotFoundError) Error ¶
func (e NotFoundError) Error() string
type Options ¶
type Options struct {
ConfigPath string
ConfigStore ConfigStore
WorkspaceStore WorkspaceStore
Git git.Client
SessionRunner session.Runner
CommandRunner CommandRunner
GitHubProvider GitHubProvider
TokenStore TokenStore
// ExecFunc overrides how Exec runs commands (useful for embedding/tests).
ExecFunc func(ctx context.Context, root string, command []string, env []string) error
// HookRunner overrides how hooks run commands (useful for embedding/tests).
HookRunner hooks.Runner
// HookObserver receives per-hook execution lifecycle updates.
HookObserver HookProgressObserver
Clock func() time.Time
Logf func(format string, args ...any)
}
Options configures a Service instance. Zero values select defaults that match the CLI behavior.
type PullRequestCheckJSON ¶
type PullRequestCheckJSON struct {
Name string `json:"name"`
Status string `json:"status"`
Conclusion string `json:"conclusion,omitempty"`
DetailsURL string `json:"details_url,omitempty"`
StartedAt string `json:"started_at,omitempty"`
CompletedAt string `json:"completed_at,omitempty"`
CheckRunID int64 `json:"check_run_id,omitempty"`
}
PullRequestCheckJSON describes a single check run.
type PullRequestCreateInput ¶
type PullRequestCreateInput struct {
Workspace WorkspaceSelector
Repo string
Base string
Head string
BaseRemote string // Optional: override auto-detected base remote
Title string
Body string
Draft bool
AutoCommit bool
AutoPush bool
}
PullRequestCreateInput describes inputs for CreatePullRequest.
type PullRequestCreateResult ¶
type PullRequestCreateResult struct {
Payload PullRequestCreatedJSON
Config config.GlobalConfigLoadInfo
}
PullRequestCreateResult wraps PR creation payload with config metadata.
type PullRequestCreatedJSON ¶
type PullRequestCreatedJSON struct {
Repo string `json:"repo"`
Number int `json:"number"`
URL string `json:"url"`
Title string `json:"title"`
Body string `json:"body,omitempty"`
Draft bool `json:"draft"`
State string `json:"state"`
Merged bool `json:"merged"`
BaseRepo string `json:"base_repo"`
BaseBranch string `json:"base_branch"`
HeadRepo string `json:"head_repo"`
HeadBranch string `json:"head_branch"`
Author string `json:"author,omitempty"`
CommentsCount int `json:"comments_count,omitempty"`
}
PullRequestCreatedJSON describes a created pull request.
type PullRequestGenerateInput ¶
type PullRequestGenerateInput struct {
Workspace WorkspaceSelector
Repo string
Base string
Head string
MaxDiffBytes int
}
PullRequestGenerateInput describes inputs for AI PR generation.
type PullRequestGenerateResult ¶
type PullRequestGenerateResult struct {
Payload PullRequestGeneratedJSON
Config config.GlobalConfigLoadInfo
}
PullRequestGenerateResult wraps generated text with config metadata.
type PullRequestGeneratedJSON ¶
PullRequestGeneratedJSON is the AI-generated title/body.
type PullRequestReviewCommentJSON ¶
type PullRequestReviewCommentJSON struct {
ID int64 `json:"id"`
NodeID string `json:"node_id,omitempty"`
ThreadID string `json:"thread_id,omitempty"`
ReviewID int64 `json:"review_id,omitempty"`
Author string `json:"author,omitempty"`
AuthorID int64 `json:"author_id,omitempty"`
Body string `json:"body"`
Path string `json:"path"`
Line int `json:"line,omitempty"`
Side string `json:"side,omitempty"`
CommitID string `json:"commit_id,omitempty"`
OriginalCommit string `json:"original_commit_id,omitempty"`
OriginalLine int `json:"original_line,omitempty"`
OriginalStart int `json:"original_start_line,omitempty"`
Outdated bool `json:"outdated"`
URL string `json:"url,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
UpdatedAt string `json:"updated_at,omitempty"`
InReplyTo int64 `json:"in_reply_to,omitempty"`
Resolved bool `json:"resolved,omitempty"`
ReplyToComment bool `json:"reply,omitempty"`
}
PullRequestReviewCommentJSON describes a review comment.
type PullRequestReviewCommentsResult ¶
type PullRequestReviewCommentsResult struct {
Comments []PullRequestReviewCommentJSON
Config config.GlobalConfigLoadInfo
}
PullRequestReviewCommentsResult wraps review comments with config metadata.
type PullRequestReviewsInput ¶
type PullRequestReviewsInput struct {
Workspace WorkspaceSelector
Repo string
Number int
Branch string
}
PullRequestReviewsInput describes inputs for listing review comments.
type PullRequestStatusInput ¶
type PullRequestStatusInput struct {
Workspace WorkspaceSelector
Repo string
Number int
Branch string
}
PullRequestStatusInput describes inputs for PR status/checks.
type PullRequestStatusJSON ¶
type PullRequestStatusJSON struct {
Repo string `json:"repo"`
Number int `json:"number"`
URL string `json:"url"`
Title string `json:"title"`
State string `json:"state"`
Draft bool `json:"draft"`
Merged bool `json:"merged"`
BaseRepo string `json:"base_repo"`
BaseBranch string `json:"base_branch"`
HeadRepo string `json:"head_repo"`
HeadBranch string `json:"head_branch"`
Mergeable string `json:"mergeable,omitempty"`
}
PullRequestStatusJSON summarizes a pull request.
type PullRequestStatusResult ¶
type PullRequestStatusResult struct {
PullRequest PullRequestStatusJSON
Checks []PullRequestCheckJSON
Config config.GlobalConfigLoadInfo
}
PullRequestStatusResult wraps status payload with check runs.
type PullRequestTrackedInput ¶
type PullRequestTrackedInput struct {
Workspace WorkspaceSelector
Repo string
}
PullRequestTrackedInput describes inputs for a tracked PR lookup.
type PullRequestTrackedJSON ¶
type PullRequestTrackedJSON struct {
Found bool `json:"found"`
PullRequest PullRequestCreatedJSON `json:"pull_request,omitempty"`
}
PullRequestTrackedJSON describes a locally tracked PR reference.
type PullRequestTrackedResult ¶
type PullRequestTrackedResult struct {
Payload PullRequestTrackedJSON
Config config.GlobalConfigLoadInfo
}
PullRequestTrackedResult wraps a tracked PR lookup.
type RegisteredRepoJSON ¶
type RegisteredRepoJSON struct {
Name string `json:"name"`
URL string `json:"url,omitempty"`
Path string `json:"path,omitempty"`
Remote string `json:"remote,omitempty"`
DefaultBranch string `json:"default_branch,omitempty"`
}
RegisteredRepoJSON is the JSON-friendly view of a registered repo entry.
type RegisteredRepoListResult ¶
type RegisteredRepoListResult struct {
Repos []RegisteredRepoJSON
Config config.GlobalConfigLoadInfo
}
RegisteredRepoListResult returns registered repos with config metadata.
type RegisteredRepoMutationResultJSON ¶
type RegisteredRepoMutationResultJSON struct {
Status string `json:"status"`
Name string `json:"name"`
}
RegisteredRepoMutationResultJSON is the JSON payload for repo registry create/update/delete.
type RemoteInfoJSON ¶
type RemoteInfoJSON struct {
Name string `json:"name"`
Owner string `json:"owner"`
Repo string `json:"repo"`
}
RemoteInfoJSON describes a git remote.
type ReplyToReviewCommentInput ¶
type ReplyToReviewCommentInput struct {
Workspace WorkspaceSelector
Repo string
Number int // PR number (0 = auto-detect)
Branch string // Branch to resolve PR if Number is 0
CommentID int64
Body string
}
ReplyToReviewCommentInput describes inputs for replying to a review comment.
type RepoAddInput ¶
type RepoAddInput struct {
Workspace WorkspaceSelector
Source string
Name string
NameSet bool
RepoDir string
URL string
SourcePath string
}
RepoAddInput describes inputs for AddRepo.
type RepoAddResult ¶
type RepoAddResult struct {
Payload RepoAddResultJSON
WorktreePath string
RepoDir string
Warnings []string
PendingHooks []HookPending
HookRuns []HookExecutionJSON
Config config.GlobalConfigLoadInfo
}
RepoAddResult includes worktree details and config metadata.
type RepoAddResultJSON ¶
type RepoAddResultJSON struct {
Status string `json:"status"`
Workspace string `json:"workspace"`
Repo string `json:"repo"`
LocalPath string `json:"local_path"`
Managed bool `json:"managed"`
PendingHooks []HookPendingJSON `json:"pending_hooks,omitempty"`
}
RepoAddResultJSON is the JSON payload for repo add operations.
type RepoHookPreviewJSON ¶
type RepoHookPreviewJSON struct {
ID string `json:"id"`
On []string `json:"on,omitempty"`
Run []string `json:"run,omitempty"`
Cwd string `json:"cwd,omitempty"`
OnError string `json:"on_error,omitempty"`
}
RepoHookPreviewJSON describes a single hook definition discovered from source.
type RepoHooksPreviewInput ¶
RepoHooksPreviewInput describes inputs for repo hook discovery without cloning.
type RepoHooksPreviewJSON ¶
type RepoHooksPreviewJSON struct {
Source string `json:"source"`
ResolvedSource string `json:"resolved_source,omitempty"`
Host string `json:"host,omitempty"`
Owner string `json:"owner,omitempty"`
Repo string `json:"repo,omitempty"`
Ref string `json:"ref,omitempty"`
Exists bool `json:"exists"`
Hooks []RepoHookPreviewJSON `json:"hooks,omitempty"`
}
RepoHooksPreviewJSON is the JSON payload for pre-clone hook discovery.
type RepoHooksPreviewResult ¶
type RepoHooksPreviewResult struct {
Payload RepoHooksPreviewJSON
Config config.GlobalConfigLoadInfo
}
RepoHooksPreviewResult wraps hook preview payload with config metadata.
type RepoJSON ¶
type RepoJSON struct {
Name string `json:"name"`
LocalPath string `json:"local_path"`
Managed bool `json:"managed"`
RepoDir string `json:"repo_dir"`
Remote string `json:"remote"`
DefaultBranch string `json:"default_branch"`
}
RepoJSON is the JSON-friendly view of a workspace repo entry.
type RepoListResult ¶
type RepoListResult struct {
Repos []RepoJSON
Config config.GlobalConfigLoadInfo
}
RepoListResult returns repos for a workspace with config metadata.
type RepoLocalStatusInput ¶
type RepoLocalStatusInput struct {
Workspace WorkspaceSelector
Repo string
}
RepoLocalStatusInput describes inputs for checking local repo status.
type RepoLocalStatusJSON ¶
type RepoLocalStatusJSON struct {
HasUncommitted bool `json:"hasUncommitted"`
Ahead int `json:"ahead"`
Behind int `json:"behind"`
CurrentBranch string `json:"currentBranch"`
}
RepoLocalStatusJSON describes the local status of a repo.
type RepoLocalStatusResult ¶
type RepoLocalStatusResult struct {
Payload RepoLocalStatusJSON
Config config.GlobalConfigLoadInfo
}
RepoLocalStatusResult wraps local status with config metadata.
type RepoRegistryInput ¶
type RepoRegistryInput struct {
Name string
Source string
DefaultBranch string
Remote string
SourceSet bool
DefaultBranchSet bool
RemoteSet bool
}
RepoRegistryInput describes inputs for RegisterRepo and UpdateRegisteredRepo.
type RepoRemoveDeletedJSON ¶
RepoRemoveDeletedJSON captures what was removed for a repo delete.
type RepoRemoveInput ¶
type RepoRemoveInput struct {
Workspace WorkspaceSelector
Name string
DeleteWorktrees bool
DeleteLocal bool
Force bool
Confirmed bool
FetchRemotes bool
}
RepoRemoveInput describes inputs for RemoveRepo.
type RepoRemoveResult ¶
type RepoRemoveResult struct {
Payload RepoRemoveResultJSON
Warnings []string
Unpushed []string
Safety ops.RepoSafetyReport
Config config.GlobalConfigLoadInfo
}
RepoRemoveResult includes safety details and config metadata.
type RepoRemoveResultJSON ¶
type RepoRemoveResultJSON struct {
Status string `json:"status"`
Workspace string `json:"workspace"`
Repo string `json:"repo"`
Deleted RepoRemoveDeletedJSON `json:"deleted"`
}
RepoRemoveResultJSON is the JSON payload for repo removal operations.
type RepoSelectionInput ¶
type RepoSelectionInput struct {
Workspace WorkspaceSelector
Repo string
}
RepoSelectionInput selects a repo within a workspace.
type RepoSnapshotJSON ¶
type RepoSnapshotJSON struct {
Name string `json:"name"`
LocalPath string `json:"local_path"`
Managed bool `json:"managed"`
RepoDir string `json:"repo_dir"`
Remote string `json:"remote"`
DefaultBranch string `json:"default_branch"`
Dirty bool `json:"dirty"`
Missing bool `json:"missing"`
StatusKnown bool `json:"status_known"`
TrackedPullRequest *TrackedPullRequestSnapshotJSON `json:"tracked_pull_request,omitempty"`
}
RepoSnapshotJSON summarizes a workspace repo and optional status.
type RepoStatusJSON ¶
type RepoStatusJSON struct {
Name string `json:"name"`
Path string `json:"path,omitempty"`
State string `json:"state"`
Dirty bool `json:"dirty,omitempty"`
Missing bool `json:"missing,omitempty"`
Error string `json:"error,omitempty"`
}
RepoStatusJSON is the JSON payload for repo status reporting.
type ResolveReviewThreadInput ¶
type ResolveReviewThreadInput struct {
Workspace WorkspaceSelector
Repo string
ThreadID string // GraphQL node ID
Resolve bool // true = resolve, false = unresolve
}
ResolveReviewThreadInput describes inputs for resolving/unresolving a review thread.
type ResolveReviewThreadResult ¶
type ResolveReviewThreadResult struct {
Resolved bool
Config config.GlobalConfigLoadInfo
}
ResolveReviewThreadResult wraps the result of a resolve/unresolve operation.
type ReviewCommentResult ¶
type ReviewCommentResult struct {
Comment PullRequestReviewCommentJSON
Config config.GlobalConfigLoadInfo
}
ReviewCommentResult wraps a single review comment with config metadata.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides the public API for workspace, repo, alias, group, session, and exec operations.
func NewService ¶
NewService constructs a Service with injected dependencies or defaults.
func (*Service) AddGroupMember ¶
func (s *Service) AddGroupMember(ctx context.Context, input GroupMemberInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
AddGroupMember adds a repo to a group.
func (*Service) AddRepo ¶
func (s *Service) AddRepo(ctx context.Context, input RepoAddInput) (RepoAddResult, error)
AddRepo adds a repo to a workspace (clone or attach).
func (*Service) ApplyGroup ¶
func (s *Service) ApplyGroup(ctx context.Context, input GroupApplyInput) (GroupApplyResultJSON, config.GlobalConfigLoadInfo, error)
ApplyGroup applies a group template to a workspace.
func (*Service) ArchiveWorkspace ¶
func (s *Service) ArchiveWorkspace(ctx context.Context, selector WorkspaceSelector, reason string) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
ArchiveWorkspace marks a workspace as archived in the global config.
func (*Service) AttachSession ¶
func (s *Service) AttachSession(ctx context.Context, input SessionAttachInput) (SessionActionResult, error)
AttachSession attaches to a running session.
func (*Service) ClearGitHubAuth ¶
ClearGitHubAuth removes any stored authentication token.
func (*Service) CommitAndPush ¶
func (s *Service) CommitAndPush(ctx context.Context, input CommitAndPushInput) (CommitAndPushResult, error)
CommitAndPush commits all changes and pushes to the remote.
func (*Service) CreateAlias
deprecated
func (s *Service) CreateAlias(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
CreateAlias is deprecated, use RegisterRepo instead.
Deprecated: Use RegisterRepo instead. This will be removed in a future version.
func (*Service) CreateGroup ¶
func (s *Service) CreateGroup(ctx context.Context, input GroupUpsertInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
CreateGroup creates or updates a group definition.
func (*Service) CreatePullRequest ¶
func (s *Service) CreatePullRequest(ctx context.Context, input PullRequestCreateInput) (PullRequestCreateResult, error)
CreatePullRequest opens a pull request against the resolved upstream repo.
func (*Service) CreateWorkspace ¶
func (s *Service) CreateWorkspace(ctx context.Context, input WorkspaceCreateInput) (WorkspaceCreateResult, error)
CreateWorkspace creates a new workspace and optionally adds repos/groups.
func (*Service) DeleteAlias
deprecated
func (s *Service) DeleteAlias(ctx context.Context, name string) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
DeleteAlias is deprecated, use UnregisterRepo instead.
Deprecated: Use UnregisterRepo instead. This will be removed in a future version.
func (*Service) DeleteGroup ¶
func (s *Service) DeleteGroup(ctx context.Context, name string) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
DeleteGroup removes a group by name.
func (*Service) DeleteReviewComment ¶
func (s *Service) DeleteReviewComment(ctx context.Context, input DeleteReviewCommentInput) (DeleteReviewCommentResult, error)
DeleteReviewComment deletes a review comment.
func (*Service) DeleteSkill ¶
DeleteSkill removes a skill directory for a specific tool.
func (*Service) DeleteSkillWithRoot ¶
func (s *Service) DeleteSkillWithRoot(_ context.Context, scope, dirName, tool, projectRoot string) error
DeleteSkillWithRoot removes a skill directory using an explicit project root.
func (*Service) DeleteWorkspace ¶
func (s *Service) DeleteWorkspace(ctx context.Context, input WorkspaceDeleteInput) (WorkspaceDeleteResult, error)
DeleteWorkspace removes a workspace registration or deletes files when requested.
func (*Service) EditReviewComment ¶
func (s *Service) EditReviewComment(ctx context.Context, input EditReviewCommentInput) (ReviewCommentResult, error)
EditReviewComment updates an existing review comment.
func (*Service) Exec ¶
Exec runs a command inside the workspace root with standard env variables set.
func (*Service) GeneratePullRequestText ¶
func (s *Service) GeneratePullRequestText(ctx context.Context, input PullRequestGenerateInput) (PullRequestGenerateResult, error)
GeneratePullRequestText runs the default agent to propose a title/body.
func (*Service) GetAgentCLIStatus ¶
GetAgentCLIStatus reports whether the configured agent command is available.
func (*Service) GetAlias
deprecated
func (s *Service) GetAlias(ctx context.Context, name string) (RegisteredRepoJSON, config.GlobalConfigLoadInfo, error)
GetAlias is deprecated, use GetRegisteredRepo instead.
Deprecated: Use GetRegisteredRepo instead. This will be removed in a future version.
func (*Service) GetCheckAnnotations ¶
func (s *Service) GetCheckAnnotations(ctx context.Context, input GetCheckAnnotationsInput) (CheckAnnotationsResult, error)
GetCheckAnnotations returns annotations for a specific check run.
func (*Service) GetConfig ¶
func (s *Service) GetConfig(ctx context.Context) (config.GlobalConfig, config.GlobalConfigLoadInfo, error)
GetConfig loads the global config and its load metadata.
func (*Service) GetCurrentGitHubUser ¶
func (s *Service) GetCurrentGitHubUser(ctx context.Context, input GitHubUserInput) (GitHubUserResult, error)
GetCurrentGitHubUser returns the authenticated GitHub user.
func (*Service) GetGitHubAuthInfo ¶
func (s *Service) GetGitHubAuthInfo(ctx context.Context) (GitHubAuthInfoJSON, error)
GetGitHubAuthInfo reports auth mode, status, and local CLI availability.
func (*Service) GetGitHubAuthStatus ¶
func (s *Service) GetGitHubAuthStatus(ctx context.Context) (GitHubAuthStatusJSON, error)
GetGitHubAuthStatus reports the current authentication state.
func (*Service) GetGitHubCLIStatus ¶
func (s *Service) GetGitHubCLIStatus(ctx context.Context) (GitHubCLIStatusJSON, error)
GetGitHubCLIStatus reports whether the GitHub CLI is available on PATH.
func (*Service) GetGroup ¶
func (s *Service) GetGroup(ctx context.Context, name string) (GroupJSON, config.GlobalConfigLoadInfo, error)
GetGroup returns a single group by name.
func (*Service) GetPullRequestStatus ¶
func (s *Service) GetPullRequestStatus(ctx context.Context, input PullRequestStatusInput) (PullRequestStatusResult, error)
GetPullRequestStatus returns the PR summary and checks.
func (*Service) GetRegisteredRepo ¶
func (s *Service) GetRegisteredRepo(ctx context.Context, name string) (RegisteredRepoJSON, config.GlobalConfigLoadInfo, error)
GetRegisteredRepo returns a single registered repo by name.
func (*Service) GetRepoLocalStatus ¶
func (s *Service) GetRepoLocalStatus(ctx context.Context, input RepoLocalStatusInput) (RepoLocalStatusResult, error)
GetRepoLocalStatus returns the local uncommitted/ahead/behind status for a repo.
func (*Service) GetSkillWithRoot ¶
func (s *Service) GetSkillWithRoot(_ context.Context, scope, dirName, tool, projectRoot string) (SkillContent, error)
GetSkillWithRoot reads the SKILL.md content using an explicit project root.
func (*Service) GetTrackedPullRequest ¶
func (s *Service) GetTrackedPullRequest(ctx context.Context, input PullRequestTrackedInput) (PullRequestTrackedResult, error)
GetTrackedPullRequest returns the last recorded PR for a repo.
func (*Service) ListAliases
deprecated
func (s *Service) ListAliases(ctx context.Context) (RegisteredRepoListResult, error)
ListAliases is deprecated, use ListRegisteredRepos instead.
Deprecated: Use ListRegisteredRepos instead. This will be removed in a future version.
func (*Service) ListGroups ¶
func (s *Service) ListGroups(ctx context.Context) (GroupListResult, error)
ListGroups returns group summaries from global config.
func (*Service) ListPullRequestReviewComments ¶
func (s *Service) ListPullRequestReviewComments(ctx context.Context, input PullRequestReviewsInput) (PullRequestReviewCommentsResult, error)
ListPullRequestReviewComments returns review comments for a PR.
func (*Service) ListRegisteredRepos ¶
func (s *Service) ListRegisteredRepos(ctx context.Context) (RegisteredRepoListResult, error)
ListRegisteredRepos returns all registered repos from config.
func (*Service) ListRemotes ¶
func (s *Service) ListRemotes(ctx context.Context, input ListRemotesInput) (ListRemotesResult, error)
ListRemotes returns the list of git remotes for a repo with owner/repo info.
func (*Service) ListRepos ¶
func (s *Service) ListRepos(ctx context.Context, selector WorkspaceSelector) (RepoListResult, error)
ListRepos lists repos configured for a workspace.
func (*Service) ListSessions ¶
func (s *Service) ListSessions(ctx context.Context, selector WorkspaceSelector) (SessionListResult, error)
ListSessions lists known sessions for a workspace.
func (*Service) ListSkills ¶
ListSkills scans all tool directories for SKILL.md files and returns a deduplicated list grouped by skill directory name and scope.
func (*Service) ListWorkspaceSnapshots ¶
func (s *Service) ListWorkspaceSnapshots(ctx context.Context, opts WorkspaceSnapshotOptions) (WorkspaceSnapshotResult, error)
ListWorkspaceSnapshots returns workspace snapshots with optional repo status.
func (*Service) ListWorkspaces ¶
func (s *Service) ListWorkspaces(ctx context.Context) (WorkspaceListResult, error)
ListWorkspaces returns registered workspaces from global config.
func (*Service) ListWorkspacesWithOptions ¶
func (s *Service) ListWorkspacesWithOptions(ctx context.Context, opts WorkspaceListOptions) (WorkspaceListResult, error)
ListWorkspacesWithOptions returns registered workspaces with optional filters.
func (*Service) PinWorkspace ¶
func (s *Service) PinWorkspace(ctx context.Context, selector WorkspaceSelector, pin bool) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
PinWorkspace pins or unpins a workspace.
func (*Service) PreviewRepoHooks ¶
func (s *Service) PreviewRepoHooks(ctx context.Context, input RepoHooksPreviewInput) (RepoHooksPreviewResult, error)
PreviewRepoHooks discovers repository hook definitions from local paths or GitHub remotes.
func (*Service) RecoverConfig ¶
func (s *Service) RecoverConfig(ctx context.Context, input ConfigRecoverInput) (ConfigRecoverResult, error)
RecoverConfig rebuilds workspace registrations (and optionally repo aliases) from workset.yaml files.
func (*Service) RegisterRepo ¶
func (s *Service) RegisterRepo(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
RegisterRepo adds a new repo to the registry.
func (*Service) ReloadLoginEnv ¶
func (s *Service) ReloadLoginEnv(ctx context.Context) (EnvSnapshotResultJSON, error)
ReloadLoginEnv re-reads the login shell environment and applies changes.
func (*Service) RemoveGroupMember ¶
func (s *Service) RemoveGroupMember(ctx context.Context, input GroupMemberInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
RemoveGroupMember removes a repo from a group.
func (*Service) RemoveRepo ¶
func (s *Service) RemoveRepo(ctx context.Context, input RepoRemoveInput) (RepoRemoveResult, error)
RemoveRepo removes a repo from a workspace and optionally deletes files.
func (*Service) RenameWorkspace ¶
func (s *Service) RenameWorkspace(ctx context.Context, input WorkspaceRenameInput) (WorkspaceRefJSON, error)
RenameWorkspace updates the workspace name in global config and workset.yaml.
func (*Service) ReorderWorkspaces ¶
func (s *Service) ReorderWorkspaces(ctx context.Context, orders map[string]int) ([]WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
ReorderWorkspaces updates the pin order for multiple workspaces. orders is a map of workspace name to pin order.
func (*Service) ReplyToReviewComment ¶
func (s *Service) ReplyToReviewComment(ctx context.Context, input ReplyToReviewCommentInput) (ReviewCommentResult, error)
ReplyToReviewComment creates a reply to an existing review comment.
func (*Service) ResolveReviewThread ¶
func (s *Service) ResolveReviewThread(ctx context.Context, input ResolveReviewThreadInput) (ResolveReviewThreadResult, error)
ResolveReviewThread resolves or unresolves a review thread using GraphQL.
func (*Service) RunHooks ¶
func (s *Service) RunHooks(ctx context.Context, input HooksRunInput) (HooksRunResult, error)
func (*Service) SaveSkill ¶
SaveSkill writes SKILL.md content for a specific skill, creating the directory if needed.
func (*Service) SaveSkillWithRoot ¶
func (s *Service) SaveSkillWithRoot(_ context.Context, scope, dirName, tool, content, projectRoot string) error
SaveSkillWithRoot writes SKILL.md using an explicit project root.
func (*Service) SearchGitHubRepositories ¶
func (s *Service) SearchGitHubRepositories(ctx context.Context, input GitHubRepoSearchInput) (GitHubRepoSearchResult, error)
SearchGitHubRepositories returns remote repositories for catalog typeahead.
func (*Service) SetAgentCLIPath ¶
func (s *Service) SetAgentCLIPath(ctx context.Context, agent, path string) (AgentCLIStatusJSON, error)
SetAgentCLIPath stores an explicit path to the agent CLI binary.
func (*Service) SetDefault ¶
func (s *Service) SetDefault(ctx context.Context, key, value string) (ConfigSetResultJSON, config.GlobalConfigLoadInfo, error)
SetDefault updates a defaults.* key in the global config.
func (*Service) SetGitHubAuthMode ¶
SetGitHubAuthMode switches the active GitHub auth provider.
func (*Service) SetGitHubCLIPath ¶
SetGitHubCLIPath stores an explicit path to the GitHub CLI binary.
func (*Service) SetGitHubToken ¶
func (s *Service) SetGitHubToken(ctx context.Context, input GitHubTokenInput) (GitHubAuthStatusJSON, error)
SetGitHubToken stores a personal access token for GitHub API usage.
func (*Service) SetWorkspaceColor ¶
func (s *Service) SetWorkspaceColor(ctx context.Context, selector WorkspaceSelector, color string) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
SetWorkspaceColor sets the color for a workspace.
func (*Service) SetWorkspaceDescription ¶
func (s *Service) SetWorkspaceDescription(ctx context.Context, selector WorkspaceSelector, description string) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
SetWorkspaceDescription sets the description for a workspace.
func (*Service) SetWorkspaceExpanded ¶
func (s *Service) SetWorkspaceExpanded(ctx context.Context, selector WorkspaceSelector, expanded bool) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
SetWorkspaceExpanded sets the expanded state for a workspace.
func (*Service) ShowSession ¶
func (s *Service) ShowSession(ctx context.Context, input SessionShowInput) (SessionRecordJSON, config.GlobalConfigLoadInfo, error)
ShowSession returns a single session record.
func (*Service) StartSession ¶
func (s *Service) StartSession(ctx context.Context, input SessionStartInput) (SessionStartResult, error)
StartSession starts a new session for a workspace.
func (*Service) StatusWorkspace ¶
func (s *Service) StatusWorkspace(ctx context.Context, selector WorkspaceSelector) (WorkspaceStatusResult, error)
StatusWorkspace reports per-repo status for a workspace.
func (*Service) StopSession ¶
func (s *Service) StopSession(ctx context.Context, input SessionStopInput) (SessionActionResult, error)
StopSession stops a running session.
func (*Service) SyncSkill ¶
func (s *Service) SyncSkill(_ context.Context, scope, dirName, fromTool string, toTools []string) error
SyncSkill copies a skill directory from one tool to others.
func (*Service) SyncSkillWithRoot ¶
func (s *Service) SyncSkillWithRoot(_ context.Context, scope, dirName, fromTool string, toTools []string, projectRoot string) error
SyncSkillWithRoot copies a skill directory using an explicit project root.
func (*Service) TrustRepoHooks ¶
func (*Service) UnarchiveWorkspace ¶
func (s *Service) UnarchiveWorkspace(ctx context.Context, selector WorkspaceSelector) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
UnarchiveWorkspace removes archived flags for a workspace.
func (*Service) UnregisterRepo ¶
func (s *Service) UnregisterRepo(ctx context.Context, name string) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
UnregisterRepo removes a repo from the registry by name.
func (*Service) UpdateAlias
deprecated
func (s *Service) UpdateAlias(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
UpdateAlias is deprecated, use UpdateRegisteredRepo instead.
Deprecated: Use UpdateRegisteredRepo instead. This will be removed in a future version.
func (*Service) UpdateGroup ¶
func (s *Service) UpdateGroup(ctx context.Context, input GroupUpsertInput) (GroupJSON, config.GlobalConfigLoadInfo, error)
UpdateGroup updates an existing group definition.
func (*Service) UpdateRegisteredRepo ¶
func (s *Service) UpdateRegisteredRepo(ctx context.Context, input RepoRegistryInput) (RegisteredRepoMutationResultJSON, config.GlobalConfigLoadInfo, error)
UpdateRegisteredRepo updates an existing registered repo.
func (*Service) UpdateWorkspaceLastUsed ¶
func (s *Service) UpdateWorkspaceLastUsed(ctx context.Context, selector WorkspaceSelector) (WorkspaceRefJSON, config.GlobalConfigLoadInfo, error)
UpdateWorkspaceLastUsed updates the last used timestamp for a workspace.
type SessionActionResult ¶
type SessionActionResult struct {
Notice SessionNotice
Config config.GlobalConfigLoadInfo
}
SessionActionResult captures notices for attach/stop actions.
type SessionAttachInput ¶
type SessionAttachInput struct {
Workspace WorkspaceSelector
Backend string
Name string
Confirmed bool
}
SessionAttachInput describes inputs for AttachSession.
type SessionListResult ¶
type SessionListResult struct {
Sessions []SessionRecordJSON
Config config.GlobalConfigLoadInfo
}
SessionListResult returns sessions with config metadata.
type SessionNotice ¶
type SessionNotice struct {
Title string
Workspace string
Session string
Backend string
ThemeLabel string
ThemeHint string
AttachCommand string
AttachNote string
DetachHint string
NameNotice string
}
SessionNotice provides user-facing guidance for session operations.
type SessionRecordJSON ¶
type SessionRecordJSON struct {
Name string `json:"name"`
Backend string `json:"backend"`
Command []string `json:"command,omitempty"`
StartedAt string `json:"started_at,omitempty"`
LastAttached string `json:"last_attached,omitempty"`
Running bool `json:"running"`
}
SessionRecordJSON describes a session entry for list/show calls.
type SessionShowInput ¶
type SessionShowInput struct {
Workspace WorkspaceSelector
Backend string
Name string
}
SessionShowInput describes inputs for ShowSession.
type SessionStartInput ¶
type SessionStartInput struct {
Workspace WorkspaceSelector
Backend string
Attach bool
Interactive bool
Name string
Command []string
Confirmed bool
}
SessionStartInput describes inputs for StartSession.
type SessionStartResult ¶
type SessionStartResult struct {
Notice SessionNotice
Attached bool
Config config.GlobalConfigLoadInfo
}
SessionStartResult captures notices and attachment state for StartSession.
type SessionStopInput ¶
type SessionStopInput struct {
Workspace WorkspaceSelector
Backend string
Name string
Confirmed bool
}
SessionStopInput describes inputs for StopSession.
type SkillContent ¶
SkillContent is a SkillInfo plus the raw SKILL.md content.
type SkillInfo ¶
type SkillInfo struct {
Name string `json:"name"`
Description string `json:"description"`
DirName string `json:"dirName"`
Scope string `json:"scope"` // "global" or "project"
Tools []string `json:"tools"` // e.g. ["agents","claude","codex","copilot","cursor","opencode"]
Path string `json:"path"` // primary SKILL.md path (first found)
}
SkillInfo describes a discovered SKILL.md file.
type TokenStore ¶
type TokenStore interface {
Get(ctx context.Context, key string) (string, error)
Set(ctx context.Context, key, value string) error
Delete(ctx context.Context, key string) error
}
TokenStore persists authentication tokens.
type TrackedPullRequestSnapshotJSON ¶
type TrackedPullRequestSnapshotJSON struct {
Repo string `json:"repo"`
Number int `json:"number"`
URL string `json:"url"`
Title string `json:"title"`
Body string `json:"body,omitempty"`
State string `json:"state"`
Draft bool `json:"draft"`
Merged bool `json:"merged"`
BaseRepo string `json:"base_repo"`
BaseBranch string `json:"base_branch"`
HeadRepo string `json:"head_repo"`
HeadBranch string `json:"head_branch"`
UpdatedAt string `json:"updated_at,omitempty"`
Author string `json:"author,omitempty"`
CommentsCount int `json:"comments_count,omitempty"`
}
TrackedPullRequestSnapshotJSON summarizes tracked PR metadata stored in workspace state.
type UnsafeOperation ¶
type UnsafeOperation struct {
Message string
Dirty []string
Unmerged []string
Unpushed []string
Warnings []string
}
UnsafeOperation describes safety concerns for potentially destructive actions.
func (UnsafeOperation) Error ¶
func (e UnsafeOperation) Error() string
type ValidationError ¶
type ValidationError struct{ Message string }
ValidationError indicates invalid input or state.
func (ValidationError) Error ¶
func (e ValidationError) Error() string
type WorkspaceCreateInput ¶
type WorkspaceCreateInput struct {
Name string
Path string
Template string
Groups []string
Repos []string
}
WorkspaceCreateInput describes inputs for CreateWorkspace.
type WorkspaceCreateResult ¶
type WorkspaceCreateResult struct {
Workspace WorkspaceCreatedJSON
Warnings []string
PendingHooks []HookPending
HookRuns []HookExecutionJSON
Config config.GlobalConfigLoadInfo
}
WorkspaceCreateResult wraps the create payload with warnings and config metadata.
type WorkspaceCreatedJSON ¶
type WorkspaceCreatedJSON struct {
Name string `json:"name"`
Path string `json:"path"`
Workset string `json:"workset"`
Branch string `json:"branch"`
Next string `json:"next"`
}
WorkspaceCreatedJSON describes the JSON payload for a created workspace.
type WorkspaceDeleteInput ¶
type WorkspaceDeleteInput struct {
Selector WorkspaceSelector
DeleteFiles bool
Force bool
Confirmed bool
FetchRemotes bool
}
WorkspaceDeleteInput describes inputs for DeleteWorkspace.
type WorkspaceDeleteResult ¶
type WorkspaceDeleteResult struct {
Payload WorkspaceDeleteResultJSON
Warnings []string
Unpushed []string
Safety ops.WorkspaceSafetyReport
Config config.GlobalConfigLoadInfo
}
WorkspaceDeleteResult includes safety details and config metadata.
type WorkspaceDeleteResultJSON ¶
type WorkspaceDeleteResultJSON struct {
Status string `json:"status"`
Name string `json:"name,omitempty"`
Path string `json:"path"`
DeletedFiles bool `json:"deleted_files"`
}
WorkspaceDeleteResultJSON is the JSON payload for workspace deletion.
type WorkspaceListOptions ¶
type WorkspaceListOptions struct {
IncludeArchived bool
}
WorkspaceListOptions controls workspace listing behavior.
type WorkspaceListResult ¶
type WorkspaceListResult struct {
Workspaces []WorkspaceRefJSON
Config config.GlobalConfigLoadInfo
}
WorkspaceListResult returns registered workspaces with config load metadata.
type WorkspaceRefJSON ¶
type WorkspaceRefJSON struct {
Name string `json:"name"`
Path string `json:"path"`
Workset string `json:"workset,omitempty"`
Template string `json:"template,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
LastUsed string `json:"last_used,omitempty"`
ArchivedAt string `json:"archived_at,omitempty"`
ArchivedReason string `json:"archived_reason,omitempty"`
Archived bool `json:"archived"`
Pinned bool `json:"pinned"`
PinOrder int `json:"pin_order"`
Color string `json:"color,omitempty"`
Description string `json:"description,omitempty"`
Expanded bool `json:"expanded"`
}
WorkspaceRefJSON is the JSON-friendly representation of a registered workspace.
type WorkspaceRenameInput ¶
type WorkspaceRenameInput struct {
Selector WorkspaceSelector
NewName string
}
WorkspaceRenameInput describes inputs for RenameWorkspace.
type WorkspaceSelector ¶
WorkspaceSelector identifies a workspace by name or path. Require indicates whether missing selection should be treated as an error.
type WorkspaceSnapshotJSON ¶
type WorkspaceSnapshotJSON struct {
Name string `json:"name"`
Path string `json:"path"`
Workset string `json:"workset,omitempty"`
Template string `json:"template,omitempty"`
WorksetKey string `json:"workset_key,omitempty"`
WorksetLabel string `json:"workset_label,omitempty"`
CreatedAt string `json:"created_at,omitempty"`
LastUsed string `json:"last_used,omitempty"`
ArchivedAt string `json:"archived_at,omitempty"`
ArchivedReason string `json:"archived_reason,omitempty"`
Archived bool `json:"archived"`
Pinned bool `json:"pinned"`
PinOrder int `json:"pin_order"`
Color string `json:"color,omitempty"`
Description string `json:"description,omitempty"`
Expanded bool `json:"expanded"`
Repos []RepoSnapshotJSON `json:"repos"`
}
WorkspaceSnapshotJSON describes a workspace and its repos.
type WorkspaceSnapshotOptions ¶
type WorkspaceSnapshotOptions struct {
IncludeArchived bool `json:"include_archived"`
IncludeStatus bool `json:"include_status"`
}
WorkspaceSnapshotOptions controls workspace snapshot behavior.
type WorkspaceSnapshotResult ¶
type WorkspaceSnapshotResult struct {
Workspaces []WorkspaceSnapshotJSON
Config config.GlobalConfigLoadInfo
}
WorkspaceSnapshotResult returns workspace snapshots with config metadata.
type WorkspaceStatusResult ¶
type WorkspaceStatusResult struct {
Statuses []RepoStatusJSON
Config config.GlobalConfigLoadInfo
}
WorkspaceStatusResult returns per-repo status with config metadata.
type WorkspaceStore ¶
type WorkspaceStore interface {
Init(ctx context.Context, root, name string, defaults config.Defaults) (workspace.Workspace, error)
Load(ctx context.Context, root string, defaults config.Defaults) (workspace.Workspace, error)
LoadConfig(ctx context.Context, root string) (config.WorkspaceConfig, error)
SaveConfig(ctx context.Context, root string, cfg config.WorkspaceConfig) error
LoadState(ctx context.Context, root string) (workspace.State, error)
SaveState(ctx context.Context, root string, state workspace.State) error
}
WorkspaceStore abstracts workspace config/state persistence for the Service.
Source Files
¶
- agent_exec_settings.go
- agent_status.go
- agent_types.go
- cli_path.go
- command_runner.go
- command_runner_pty_unix.go
- config_recover.go
- config_service.go
- doc.go
- env_bootstrap.go
- env_snapshot.go
- env_snapshot_service.go
- exec.go
- github_auth.go
- github_auth_info.go
- github_cli_path.go
- github_git_helpers.go
- github_helpers.go
- github_provider.go
- github_provider_cli.go
- github_provider_pat.go
- github_service.go
- github_service_read_helpers.go
- github_service_status.go
- github_service_thread_graphql_helpers.go
- github_service_write.go
- github_service_write_helpers.go
- github_types.go
- groups.go
- helpers.go
- hooks.go
- hooks_discovery.go
- inputs.go
- migrations.go
- plans.go
- registry.go
- repo_defaults.go
- repos.go
- safety.go
- service.go
- sessions.go
- sessions_helpers.go
- skills_service.go
- ssh_preflight.go
- stores.go
- token_store.go
- token_store_keychain.go
- types.go
- workspace_cleanup.go
- workspace_snapshots.go
- workspaces.go
- workspaces_archive.go
- workspaces_rename.go
- workspaces_ui.go