requirements

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package requirements provides aggregation and derivation of skill requirements.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregateDescriptorRequirements

func AggregateDescriptorRequirements(descs []contract.SkillDescriptor) int

AggregateDescriptorRequirements computes the maximum TimeoutHint across descriptors.

func AggregateRequirements

func AggregateRequirements(entries []contract.SkillEntry) *contract.AggregatedRequirements

AggregateRequirements merges requirements from all entries that have ForgeReqs set.

Promotion rules:

  • var in both required (skill A) and optional (skill B) → required
  • var in one_of (skill A) and required (skill B) → stays in required (group still exists)
  • one_of groups kept separate per skill

func DeriveBrowserConfig added in v0.17.0

func DeriveBrowserConfig(reqs *contract.AggregatedRequirements, entries []contract.SkillEntry) *contract.DerivedBrowserConfig

DeriveBrowserConfig reports whether the aggregated requirements activate the browser capability. Returns nil when no active skill declares requires.capabilities: [browser]; a non-nil config otherwise, naming the declaring skills for logs and startup errors.

Unlike DeriveCLIConfig there are no merge semantics: capability presence is binary, and explicit forge.yaml tool config cannot grant or revoke it.

func DeriveCLIConfig

DeriveCLIConfig produces cli_execute configuration from aggregated requirements. AllowedBinaries = reqs.Bins (minus shell interpreters), EnvPassthrough = union of all env vars.

func EntryAllowsSensitiveFill added in v0.17.0

func EntryAllowsSensitiveFill(e contract.SkillEntry) bool

EntryAllowsSensitiveFill reports whether a single skill entry declares guardrails.browser.allow_sensitive_fill in its forge metadata.

func MergeCLIConfig

func MergeCLIConfig(explicit, derived *contract.DerivedCLIConfig) *contract.DerivedCLIConfig

MergeCLIConfig merges derived config with explicit forge.yaml config. Explicit non-nil slices override derived values entirely. Nil/empty explicit slices allow derived values through.

Types

This section is empty.

Jump to

Keyboard shortcuts

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