Help us shape the future of Go! Take the 2026 Go Developer Survey

bootstrap

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewShell

func NewShell(cfg ShellConfig, deps ShellDeps) (agentkit.AppInitializer, error)

NewShell registers bootstrap/shell: Run shell commands in the workspace at app start.

Best practices:

  • Keep commands idempotent (test -d, cp -n, git init only when missing).
  • Use local:. for startup init (works with workspace/tenant; no tenant context yet).
  • Use local:.. when local root is .agentkit and commands target the project tree (workspace/default only).

Types

type ShellConfig

type ShellConfig struct {
	// WorkDir is the workspace-relative working directory. Default local:..
	WorkDir string `json:"workDir"`
	// Commands run sequentially via bash -lc at app start.
	Commands []string `json:"commands"`
	// TimeoutSeconds bounds each command; 0 uses 60s.
	TimeoutSeconds int `json:"timeoutSeconds"`
}

func (*ShellConfig) SetDefaults added in v0.3.48

func (c *ShellConfig) SetDefaults()

SetDefaults implements pluginkit.Defaulter.

func (*ShellConfig) Validate added in v0.3.48

func (c *ShellConfig) Validate() error

Validate implements pluginkit.Validator.

type ShellDeps

type ShellDeps struct {
	Workspace workspace.Service `json:"workspace"`
}

Jump to

Keyboard shortcuts

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