vaultmap

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2026 License: BSD-2-Clause Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

View Source
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

type Resolver interface {
	VaultFor(repoKey string) string
}

Resolver returns the vault slug for a host-qualified repo key such as "github.com/bborbe/trading".

func Parse

func Parse(ctx context.Context, raw string) (Resolver, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL