artifacts

package
v0.6.49 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: AGPL-3.0, Apache-2.0, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionTarName  = "agent-session.tar.gz"
	SessionJSONName = "agent-session.json"
	PatchFileName   = "changes.patch"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactBuilder

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

func NewAgentRunArtifactBuilder

func NewAgentRunArtifactBuilder(config Config, sessionWriter SessionArchiveWriter, patchGenerator PatchGenerator) *ArtifactBuilder

func (*ArtifactBuilder) Build

type BuildArtifactsOptions

type BuildArtifactsOptions struct {
	Provider string
	Source   SessionSource
	// SessionID is the provider-native session identifier captured during the
	// run. The same value must be passed to provider resume flags on follow-up.
	SessionID string
}

type Config

type Config struct {
	WorkDir       string
	RepositoryDir string
	Run           *agentrunv1.AgentRun
}

func (Config) UploadsDir

func (in Config) UploadsDir() string

type GitPatchGenerator

type GitPatchGenerator struct {
	RepositoryDir string
	BaseCommit    string
}

func NewGitPatchGenerator

func NewGitPatchGenerator(repositoryDir string) *GitPatchGenerator

func (*GitPatchGenerator) BuildPatch

func (in *GitPatchGenerator) BuildPatch() (string, error)

func (*GitPatchGenerator) Write

func (in *GitPatchGenerator) Write(path string) (bool, error)

type PatchGenerator

type PatchGenerator interface {
	Write(path string) (bool, error)
}

type SessionArchiveWriter

type SessionArchiveWriter interface {
	Write(path string, manifest *SessionManifest, source *SessionSource) error
}

type SessionManifest

type SessionManifest struct {
	Version    int             `json:"version"`
	AgentRunID string          `json:"agentRunId"`
	Provider   string          `json:"provider"`
	Repository string          `json:"repository"`
	Branch     string          `json:"branch,omitempty"`
	Session    SessionMetadata `json:"session"`
}

type SessionMetadata

type SessionMetadata struct {
	ID          string `json:"id,omitempty"`
	Path        string `json:"path,omitempty"`
	ArchivePath string `json:"archivePath,omitempty"`
}

type SessionSource

type SessionSource struct {
	Path         string
	ArchivePath  string
	ExcludeNames []string
}

type TarSessionArchiveWriter

type TarSessionArchiveWriter struct{}

func (*TarSessionArchiveWriter) Write

func (in *TarSessionArchiveWriter) Write(path string, manifest *SessionManifest, source *SessionSource) error

type UploadArtifactBuilder

type UploadArtifactBuilder interface {
	Build(ctx context.Context, opts BuildArtifactsOptions) (*UploadArtifacts, error)
}

func NewUploadArtifactBuilder

func NewUploadArtifactBuilder(config Config) UploadArtifactBuilder

type UploadArtifacts

type UploadArtifacts struct {
	SessionPath string
	PatchPath   string
}

Jump to

Keyboard shortcuts

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