Documentation
¶
Index ¶
- Constants
- func LifecycleFingerprint(config Config) string
- func RuleMatches(rule Rule, eventType string, message map[string]any) bool
- type CheckoutMode
- type Config
- type Engine
- type ExecutionPolicy
- type Hook
- type PrepareHook
- type Rule
- type Schedule
- type Severity
- type SharingEnv
- type SharingSkills
- type ValidationIssue
- type ValidationResult
- type WorktreeAdoption
- type WorktreeBase
- type WorktreeCheckout
- type WorktreeConfig
- type WorktreeEnvironment
- type WorktreeHelpers
- type WorktreeSharing
Constants ¶
const StopAction = "__stop__"
Variables ¶
This section is empty.
Functions ¶
func LifecycleFingerprint ¶ added in v0.13.0
LifecycleFingerprint identifies restart-only policy: the lifecycle block and complete exact command rules. Ordinary fuzzy rules and schedules are omitted so they can retain validated reload support.
Types ¶
type CheckoutMode ¶ added in v0.13.0
type CheckoutMode string
const ( CheckoutFull CheckoutMode = "full" CheckoutDelegated CheckoutMode = "delegated" )
type Config ¶
type Config struct {
BoardID string
AgentName string
APIURL string
Executor string
// Worktree is nil unless the configuration explicitly opts into the
// portable lifecycle. Nil deliberately preserves the legacy manager.
Worktree *WorktreeConfig
Rules []Rule
Schedules []Schedule
}
func LoadBytes ¶ added in v0.13.0
LoadBytes preserves LoadFile's legacy direct-loading behavior for callers which intentionally handle ordinary-rule validation themselves. Lifecycle, command-rule, and cleanup-command strict decoding still applies here.
func LoadValidatedBytes ¶ added in v0.13.0
func LoadValidatedFile ¶ added in v0.13.0
LoadValidatedFile reads a candidate once, validates every ordinary rule and schedule semantically from those bytes, and only then normalizes it. It is intentionally separate from LoadFile for legacy callers that historically load partially specified ordinary rules.
type Engine ¶
type Engine struct {
Rules []Rule
}
type ExecutionPolicy ¶ added in v0.13.0
type ExecutionPolicy string
const ( ExecutionPrepare ExecutionPolicy = "prepare" ExecutionExistingOrBase ExecutionPolicy = "existing_or_base" )
type PrepareHook ¶ added in v0.13.0
type Rule ¶
type Rule struct {
Name string
Events []string
Action string
Model string
List string
Title string
Label string
ContentContains string
ExcludeLabel string
RequireLabel string
Emoji string
RequireUser string
Assignee []string
CommentAuthor string
// CleanupCommand is a direct argv command run when a card enters Done. It
// deliberately bypasses the executor and worktree lifecycle.
CleanupCommand []string
// CommentCommand is an exact normal-card command such as /up. It is a
// command policy rather than fuzzy content matching.
CommentCommand string
Execution ExecutionPolicy
}
type Schedule ¶
type Schedule struct {
CardID string
Name string
Cron string
Action string
Model string
Assignee string
List string
PublishResult *bool
}
func (Schedule) PublishesResult ¶ added in v0.11.0
PublishesResult reports whether the daemon should publish a schedule result. A missing value preserves the legacy behavior of publishing the result.
type SharingEnv ¶ added in v0.13.0
type SharingEnv string
const ( SharingEnvDisabled SharingEnv = "disabled" SharingEnvLink SharingEnv = "link" )
type SharingSkills ¶ added in v0.13.0
type SharingSkills string
const ( SharingSkillsFallback SharingSkills = "fallback" SharingSkillsDisabled SharingSkills = "disabled" )
type ValidationIssue ¶
type ValidationResult ¶
type ValidationResult struct {
Errors []ValidationIssue
Warnings []ValidationIssue
}
func ValidateBytes ¶ added in v0.13.0
func ValidateBytes(data []byte) ValidationResult
ValidateBytes performs the complete schema and semantic validation against one immutable candidate. Reload uses this companion to LoadBytes so it can never validate one file revision and install another.
func ValidateFile ¶
func ValidateFile(path string) ValidationResult
func (ValidationResult) IsValid ¶
func (r ValidationResult) IsValid() bool
type WorktreeAdoption ¶ added in v0.13.0
type WorktreeBase ¶ added in v0.13.0
type WorktreeCheckout ¶ added in v0.13.0
type WorktreeCheckout struct {
Mode CheckoutMode
Bootstrap *Hook
}
type WorktreeConfig ¶ added in v0.13.0
type WorktreeConfig struct {
Base WorktreeBase
Helpers WorktreeHelpers
Checkout WorktreeCheckout
Prepare *PrepareHook
Sharing WorktreeSharing
Environment WorktreeEnvironment
Adoptions []WorktreeAdoption
}
WorktreeConfig is intentionally repository-generic. Project setup behavior lives in administrator-installed direct argv helpers, never in this binary.
type WorktreeEnvironment ¶ added in v0.13.0
type WorktreeEnvironment struct {
Passthrough []string
}
type WorktreeHelpers ¶ added in v0.13.0
type WorktreeHelpers struct {
StableRoot string
}
type WorktreeSharing ¶ added in v0.13.0
type WorktreeSharing struct {
Env SharingEnv
Skills SharingSkills
}