Documentation
¶
Index ¶
- Constants
- Variables
- type EditorAdapter
- type FSEvent
- type FSEventKind
- type Keychain
- type NativeWatcher
- type PollWatcher
- type RuntimeInfo
- type Sandbox
- type SandboxSpec
- type ServiceManager
- type ServiceSpec
- type ServiceStatus
- type Set
- type SystemEditor
- type SystemKeychain
- func (k SystemKeychain) Delete(_ context.Context, service, account string) error
- func (k SystemKeychain) Load(_ context.Context, service, account string) ([]byte, error)
- func (k SystemKeychain) Name() string
- func (k SystemKeychain) Store(_ context.Context, service, account string, secret []byte) error
- type UnsupportedKeychain
- type UnsupportedSandbox
- type UnsupportedServiceManager
- type Watcher
Constants ¶
const NoKeychainEnv = "DEVSTRAP_NO_KEYCHAIN"
NoKeychainEnv, when set to "1", forces the file-backed key store instead of the OS keychain. This is required for headless/CI runs and hermetic end-to-end tests, where an OS keychain call can block on a GUI unlock prompt.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type EditorAdapter ¶
type FSEventKind ¶
type FSEventKind string
const ( FSEventUnknown FSEventKind = "unknown" FSEventScan FSEventKind = "scan" )
type NativeWatcher ¶
func (NativeWatcher) Name ¶
func (w NativeWatcher) Name() string
type PollWatcher ¶
func (PollWatcher) Name ¶
func (w PollWatcher) Name() string
type RuntimeInfo ¶
func Runtime ¶
func Runtime() RuntimeInfo
type Sandbox ¶
type Sandbox interface {
Name() string
// Available reports whether the sandbox can be used on this host; the
// returned error explains why not (wrapped in ErrUnsupported).
Available() error
// Command returns the argv wrapped in the sandbox launcher plus a cleanup
// function (always safe to call) that removes any generated profile file.
Command(ctx context.Context, spec SandboxSpec, argv []string) ([]string, func(), error)
}
Sandbox wraps an agent argv in an OS-enforced confinement (AGEN-03 / P4-GIT-03). Unlike the wrapper-level argv/file policies (which are advisory and interpreter-bypassable), a Sandbox is enforced by the kernel for the child and everything it spawns.
type SandboxSpec ¶
type SandboxSpec struct {
// WorktreeDir is the agent worktree — the only project location the
// child may write.
WorktreeDir string
// TmpDir is the child's temp directory (writable).
TmpDir string
// LogDir is where the generated profile file lives. It is NOT granted to
// the child: the agent log is written by the parent process, so the child
// only ever sees inherited pipes — keeping LogDir read-only for the child
// prevents it from tampering with its own 0600 log or the profile.
LogDir string
// UserHome is the REAL user home. The agent child env repoints HOME to
// the worktree (SECU-02), but the filesystem still contains the user's
// dotfiles — sensitive-read denies are anchored here.
UserHome string
// DevstrapHome is the DevStrap home (~/.devstrap); its keys directory is
// read-denied.
DevstrapHome string
// DenyNetwork blocks all network access for the child.
DenyNetwork bool
// DenySensitiveReads blocks reads of credential-bearing paths under
// UserHome (.ssh, .aws, .gnupg, .config/gh, .kube, .docker) and
// DevstrapHome/keys.
DenySensitiveReads bool
}
SandboxSpec describes the confinement an agent child process should run under. Paths must be absolute; implementations resolve symlinks themselves (macOS Seatbelt matches on real paths, and /tmp, TMPDIR, and cloud-drive roots are routinely symlinks).
type ServiceManager ¶
type ServiceSpec ¶
type ServiceStatus ¶
type Set ¶
type Set struct {
OS string
Watcher Watcher
Service ServiceManager
Keychain Keychain
Editor EditorAdapter
Sandbox Sandbox
}
type SystemEditor ¶
type SystemEditor struct{}
func (SystemEditor) Name ¶
func (SystemEditor) Name() string
type SystemKeychain ¶
func (SystemKeychain) Delete ¶
func (k SystemKeychain) Delete(_ context.Context, service, account string) error
func (SystemKeychain) Name ¶
func (k SystemKeychain) Name() string
type UnsupportedKeychain ¶
func (UnsupportedKeychain) Name ¶
func (k UnsupportedKeychain) Name() string
type UnsupportedSandbox ¶
type UnsupportedSandbox struct {
Platform string
}
UnsupportedSandbox is the explicit no-sandbox placeholder for platforms without an implemented adapter (Linux landlock/bubblewrap is a named follow-up slice; see spec/14). Callers treat Available() != nil as "run unconfined and say so".
func (UnsupportedSandbox) Available ¶
func (s UnsupportedSandbox) Available() error
func (UnsupportedSandbox) Command ¶
func (s UnsupportedSandbox) Command(context.Context, SandboxSpec, []string) ([]string, func(), error)
func (UnsupportedSandbox) Name ¶
func (s UnsupportedSandbox) Name() string
type UnsupportedServiceManager ¶
func (UnsupportedServiceManager) Install ¶
func (m UnsupportedServiceManager) Install(context.Context, ServiceSpec) error
func (UnsupportedServiceManager) Name ¶
func (m UnsupportedServiceManager) Name() string
func (UnsupportedServiceManager) Status ¶
func (m UnsupportedServiceManager) Status(context.Context, string) (ServiceStatus, error)