Documentation
¶
Overview ¶
Package routing decides whether a task controller should process a given CreateCommand based on the command's target vault and the controller's configured VAULT_NAME.
Index ¶
Constants ¶
const LegacyDefaultVault = "openclaw"
LegacyDefaultVault is the vault a controller acts on when a command leaves its TargetVault empty. Hard-coded per spec 044; do not make configurable.
Variables ¶
This section is empty.
Functions ¶
func ShouldProcess ¶
func ShouldProcess(cmd task.CreateCommand, vaultName string) bool
ShouldProcess returns true iff the controller's vaultName owns this command. An empty cmd.TargetVault falls back to LegacyDefaultVault (spec 044 AC 12). A non-empty cmd.TargetVault is compared verbatim (no case-folding).
func ShouldProcessResult ¶ added in v0.5.0
ShouldProcessResult returns true iff the controller's vaultName owns this result. The result's frontmatter carries target_vault — stamped at task create (buildCreateTaskContent) and echoed back by the agent when it publishes. A result whose target_vault differs from vaultName is cross-vault traffic (both controllers consume the shared topic) and must be skipped before the write scan so the owning vault alone writes it. An absent target_vault (legacy task created before stamping) falls through to true: the write path's not-found handling covers genuinely-missing tasks.
Types ¶
This section is empty.