Add reference contracts to extractor metadata

This commit is contained in:
2026-07-05 14:13:48 +00:00
parent f9999a73df
commit 1c31f56af1
15 changed files with 347 additions and 12 deletions

View File

@@ -45,6 +45,10 @@ func (e *Extractor) SchemaVersion() string {
return SchemaVersion
}
func (e *Extractor) ReferenceSlots() []contracts.ReferenceSlot {
return nil
}
func (e *Extractor) ManifestMetadata() map[string]any {
promptMetadata := spellsPromptBundle.Metadata()
metadata := map[string]any{

View File

@@ -82,6 +82,15 @@ func TestRegisterStoresModuleSpec(t *testing.T) {
}
}
func TestRuntimeReferenceSlotsMatchModuleSpec(t *testing.T) {
extractor := New()
spec := ModuleSpec()
if !reflect.DeepEqual(extractor.ReferenceSlots(), spec.ReferenceSlots) {
t.Fatalf("ReferenceSlots() = %#v, want spec slots %#v", extractor.ReferenceSlots(), spec.ReferenceSlots)
}
}
func TestRegisterNilRegistryReturnsError(t *testing.T) {
err := Register(nil)
if err == nil {