eject

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package eject writes what Agentpack stages into the project itself, where each agent's own front ends (IDE extensions, desktop apps, the agents' CLIs started without Agentpack) read project configuration. The staged tree is copied to <workspace>/.agentpack/eject, its paths are rewritten to the copy, and each agent is pointed at it through its project-scope settings. Every file and key written outside that directory is recorded in a manifest so that Remove takes out exactly what Eject added.

Index

Constants

View Source
const Dir = ".agentpack/eject"

Dir is the project-relative directory that holds the ejected copy.

Variables

This section is empty.

Functions

func Supported

func Supported() []base.Target

Supported lists the agents eject writes for. OpenCode and Grok are used from the terminal, where the launcher is the way in.

Types

type Manifest

type Manifest struct {
	Version     int         `json:"version"`
	Mode        string      `json:"mode"`
	Targets     []string    `json:"targets"`
	Files       []string    `json:"files"`
	JSONKeys    []jsonKey   `json:"json_keys,omitempty"`
	JSONEntries []jsonEntry `json:"json_entries,omitempty"`
	TOMLKeys    []tomlKey   `json:"toml_keys,omitempty"`
	Blocks      []string    `json:"blocks,omitempty"`
	Created     []string    `json:"created,omitempty"`
}

Manifest records everything written outside Dir.

type Options

type Options struct {
	ProjectRoot   string
	WorkspaceRoot string
	Mode          string
	Targets       []base.Target
}

Options selects the staged tree to eject and the agents to write it for.

type Result

type Result struct {
	Dir     string
	Written []string
	Removed []string
	Notes   []string
}

Result reports what an Eject or Remove did, in project-relative paths.

func Eject

func Eject(opts Options) (Result, error)

Eject copies the staged tree of opts.Mode into the project and registers it with each target. A previous eject is removed first, so running it again after a sync replaces the content.

func Remove

func Remove(workspace string) (Result, error)

Remove takes out everything the last Eject recorded, then the ejected copy.

Jump to

Keyboard shortcuts

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