Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitRestClient ¶
type GitRestClient interface {
// Get retrieves the current content of the file at relPath.
Get(ctx context.Context, relPath string) ([]byte, error)
// List returns relative paths matching the single-level glob pattern (e.g. "tasks/*.md").
List(ctx context.Context, glob string) ([]string, error)
// IsReady reports whether git-rest's /readiness returns 200.
// Returns (false, nil) when git-rest returns 503 — that is a valid not-ready state, not an error.
// Returns (false, err) only on network failure or unexpected response.
IsReady(ctx context.Context) (bool, error)
}
GitRestClient is the HTTP client for git-rest's /api/v1/files REST API. All paths are relative to the repo root (e.g. "tasks/foo.md"). The executor uses only the read surface (List/Get/IsReady) — it never writes vault files through git-rest (spec 005 Security).
func NewGitRestClient ¶
func NewGitRestClient(baseURL, gatewaySecret, gatewayInitiator string) GitRestClient
NewGitRestClient creates a GitRestClient targeting the git-rest instance at baseURL. gatewaySecret is the shared secret enforced by git-rest's gateway-secret auth; when empty, no auth headers are sent (backward-compat with auth-disabled git-rest). gatewayInitiator is the caller identity logged by git-rest on auth failure (pass a stable value, e.g. "agent-task-executor").