MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Init

Method Init

internal/instructions/store.go:75–83  ·  view source on GitHub ↗

Init ensures the schema exists and the managed directory is present.

(ctx context.Context)

Source from the content-addressed store, hash-verified

73
74// Init ensures the schema exists and the managed directory is present.
75func (s *Store) Init(ctx context.Context) error {
76 if err := appstate.New(s.dbPath).Init(ctx); err != nil {
77 return err
78 }
79 if err := os.MkdirAll(managedDir(), 0o755); err != nil {
80 return fmt.Errorf("instructions: mkdir managed dir: %w", err)
81 }
82 return nil
83}
84
85func (s *Store) open() (*sql.DB, error) {
86 db, err := sql.Open("sqlite", s.dbPath)

Callers 8

ListMethod · 0.95
GetMethod · 0.95
CreateMethod · 0.95
UpdateMethod · 0.95
DeleteMethod · 0.95
InstallMethod · 0.95
UninstallMethod · 0.95
newTestStoreFunction · 0.45

Calls 2

NewFunction · 0.92
managedDirFunction · 0.85

Tested by 1

newTestStoreFunction · 0.36