package orchestrator

import (
	"github.com/tidbcloud/AgentTeam/internal/workflow/eventcontract"
)

// Producer event field-set contract. The declarations are OWNED by the producing
// boundary but live in the neutral shared contract package
// (internal/workflow/eventcontract), imported by BOTH the producers and the
// closed public projector (internal/api/workflow/run). This file re-exports the
// contract so existing orchestrator consumers keep compiling while the source of
// truth is the shared package.
//
// A producer that adds/removes a field without updating the shared declaration
// AND the public schema fails the cross-package bijection invariant. There is no
// second hand-maintained API-only allowlist to drift.

// ProducerEventFieldSet re-exports eventcontract.ProducerEventFieldSet.
type ProducerEventFieldSet = eventcontract.ProducerEventFieldSet

// ProducerEventFieldSets re-exports the complete producer-owned registry.
var ProducerEventFieldSets = eventcontract.ProducerEventFieldSets

// ProducerEventFieldSetFor returns the producer-owned declaration for an event
// kind, or nil when the kind is not declared.
func ProducerEventFieldSetFor(kind string) *ProducerEventFieldSet {
	return eventcontract.Lookup(kind)
}

// FailureEventFieldSet re-exports the shared failure-namespace field set.
var FailureEventFieldSet = eventcontract.FailureEventFieldSet
