projects

package
v0.1.53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package projects owns project workflows independently of any client connection. Its registry is the same SQLite database used by every workspace API and SDK.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth = gitaccess.Auth

Auth is write-only, held in memory for an attempt. It is never part of a snapshot, operation record, command argument, or the repository's origin URL.

type RemoveRequest

type RemoveRequest struct {
	OperationID      string `json:"operationId"`
	ExpectedRevision int64  `json:"expectedRevision"`
}

RemoveRequest is explicit because ordinary registry deletion retains files. The path comes from the confirmed project record, never an arbitrary request path.

type Request

type Request struct {
	registry.ProjectSpec
	Auth Auth `json:"auth,omitempty"`
}

type RunGuard

type RunGuard interface {
	Busy(chatID string) bool
	BusyPath(path string) bool
}

RunGuard is implemented by the existing supervisor, including legacy chats that have not yet acquired registry membership.

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(store *registry.Store, runs RunGuard, access ...*gitaccess.Service) (*Service, error)

func (*Service) ActiveCount

func (s *Service) ActiveCount() int

Includes final persistence/cleanup, not just an operation's last status label.

func (*Service) Cancel

func (s *Service) Cancel(id string) (registry.ProjectOperation, error)

func (*Service) Changes

func (s *Service) Changes() <-chan struct{}

func (*Service) Close

func (s *Service) Close()

func (*Service) Get

func (*Service) List

func (s *Service) List(activeOnly bool) ([]registry.ProjectOperation, error)

func (*Service) Remove

func (s *Service) Remove(id string, expected *int64) error

func (*Service) RemoveFiles

func (s *Service) RemoveFiles(projectID string, req RemoveRequest) (registry.ProjectOperation, error)

func (*Service) Retry

func (s *Service) Retry(id string, auth Auth) (registry.ProjectOperation, error)

func (*Service) Save

func (s *Service) Save(id string, data []byte, expected *int64) error

Save preserves the existing metadata API while enforcing the same directory rules for every client. Moving a project needs a dedicated filesystem operation; a rename cannot quietly redirect running chats to a different directory.

func (*Service) Start

func (s *Service) Start(req Request) (registry.ProjectOperation, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL