internal/adapters/corebundle
import "github.com/nilstate/scafld/v2/internal/adapters/corebundle"
Package corebundle installs embedded managed scafld core assets into workspaces.
Functions
func CorePrompt(filename string) ([]byte, error)
Source: internal/adapters/corebundle/assets.go:7
CorePrompt returns an embedded managed core prompt by filename, such as "review.md".
func HostPrivateKeyPath() (string, error)
Source: internal/adapters/corebundle/initwire.go:86
HostPrivateKeyPath resolves the on-host receipt signing key path that scafld init generates. The gate signs with this same key, so init and the gate share one source of truth for the key location.
func Init(ctx context.Context, root string) (Result, error)
Source: internal/adapters/corebundle/bundle.go:46
Init installs managed core assets for a newly bootstrapped workspace.
func InitAgentDocs(ctx context.Context, root string) (Result, error)
Source: internal/adapters/corebundle/agent_docs.go:18
InitAgentDocs installs root agent docs, prepending a scafld section when needed.
func InitGitignore(ctx context.Context, root string) (Result, error)
Source: internal/adapters/corebundle/gitignore.go:39
InitGitignore installs the scafld ignore contract into the workspace gitignore.
func InitWire(ctx context.Context, root string, installCI bool) (Result, error)
Source: internal/adapters/corebundle/initwire.go:27
InitWire installs host accountability wiring and maintains the host signing key.
func Install(ctx context.Context, root string, opts Options) (Result, error)
Source: internal/adapters/corebundle/bundle.go:59
Install copies embedded assets into root according to opts.
func MergeClaudeSettings(current []byte, desired []byte) ([]byte, bool, bool, error)
Source: internal/adapters/corebundle/jsonmerge.go:67
MergeClaudeSettings upserts the scafld Stop hook while preserving unrelated settings.
func MergeMCPConfig(current []byte, desired []byte) ([]byte, bool, bool, error)
Source: internal/adapters/corebundle/jsonmerge.go:20
MergeMCPConfig upserts the scafld MCP server while preserving unrelated config.
func RefreshAgentDocs(ctx context.Context, root string) (Result, error)
Source: internal/adapters/corebundle/agent_docs.go:23
RefreshAgentDocs refreshes existing scafld sections in root agent docs.
func Update(ctx context.Context, root string) (Result, error)
Source: internal/adapters/corebundle/bundle.go:54
Update refreshes managed assets and existing manifest-backed prompt copies.
Types
type Options
Source: internal/adapters/corebundle/bundle.go:30
Options controls how embedded core assets are installed.
type Options struct {
OverwriteCore bool
CreateProjectPrompts bool
RefreshProjectPrompts bool
CreateProjectConfig bool
InstallLifecycleTools bool
}Fields
OverwriteCore boolCreateProjectPrompts boolRefreshProjectPrompts boolCreateProjectConfig boolInstallLifecycleTools bool
type Result
Source: internal/adapters/corebundle/bundle.go:39
Result summarizes files created, updated, or skipped during installation.
type Result struct {
Created []string `json:"created"`
Updated []string `json:"updated"`
Skipped []string `json:"skipped"`
}Fields
Created []string`json:"created"`Updated []string`json:"updated"`Skipped []string`json:"skipped"`
