Documentation
¶
Overview ¶
Package vaultmap resolves the vault slug a CreateTaskCommand must target from the GitHub repo the PR touches.
The watcher watches one GitHub scope whose repos belong to different vaults, so a single global target vault cannot be correct: a command carrying no vault is claimed by the controller whose vault matches the hard-coded legacy default, and every other controller skips it as a cross-vault mismatch. A per-repo mapping lets one watcher serve all of them.
Index ¶
Constants ¶
const DefaultVault = "openclaw"
DefaultVault is the vault an unmapped repo falls back to. It mirrors the task controller's legacy default (agent-task-controller pkg/routing LegacyDefaultVault), so a map that omits a repo routes exactly as it did before the mapping existed.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Resolver ¶
Resolver returns the vault slug for a host-qualified repo key such as "github.com/bborbe/trading".
func Parse ¶
Parse parses a REPO_VAULT_MAP value into a Resolver.
The value is a comma-separated list of repo-glob=vault entries. repo-glob accepts the same wildcard syntax as REPO_ALLOWLIST (e.g. "github.com/bborbe/*") and is validated by the same shape check, so a typo such as a missing host prefix fails at startup instead of parsing cleanly, never matching, and silently routing that repo to the default vault. Entries are evaluated in order and the first match wins, so a specific repo must be listed before a wildcard that also covers it. Negation entries ("!repo") are rejected: a vault map has no sensible meaning for "not this repo", and accepting one would make it match everything.
An empty value returns (nil, nil): the command keeps its field empty and the controller's legacy default applies, which is byte-identical to the behaviour before this mapping existed.