NewAPI creates a context configuration API. The working directory closure is evaluated lazily per request.
(workingDir func() string, cfg Config)
| 127 | // NewAPI creates a context configuration API. The working |
| 128 | // directory closure is evaluated lazily per request. |
| 129 | func NewAPI(workingDir func() string, cfg Config) *API { |
| 130 | if workingDir == nil { |
| 131 | workingDir = func() string { return "" } |
| 132 | } |
| 133 | return &API{workingDir: workingDir, cfg: cfg.applyDefaults()} |
| 134 | } |
| 135 | |
| 136 | // Resolve reads instruction files, discovers skills, and |
| 137 | // resolves MCP config file paths for the given config and |