Migrate NPC registry durable contract
This commit is contained in:
@@ -48,7 +48,7 @@ func referenceSlots() []contracts.ReferenceSlot {
|
||||
Name: NPCRegistryReferenceSlot,
|
||||
Description: "Optional normalized NPC registry used for canonical actor grounding.",
|
||||
AcceptedMediaTypes: []string{"application/json"},
|
||||
AcceptedArtifactKinds: []contracts.ArtifactKind{dnd.NPCListKind},
|
||||
AcceptedArtifactKinds: []contracts.ArtifactKind{dnd.NPCRegistryKind},
|
||||
MaxBytes: NPCRegistryMaxBytes,
|
||||
})
|
||||
slots = append(slots, contracts.ReferenceSlot{
|
||||
|
||||
@@ -519,7 +519,7 @@ func newExtractor(t *testing.T, client contracts.StructuredLLMClient, references
|
||||
|
||||
func npcRegistryJSON(t *testing.T) []byte {
|
||||
t.Helper()
|
||||
value := dnd.NPCList{NPCs: []dnd.NPC{{ID: identity.DeriveID("Mira Thorn"), Name: "Mira Thorn", SourceRefs: []source.SourceRef{{SourceID: "other-session", StartUnitID: 1, EndUnitID: 1}}}}}
|
||||
value := dnd.NPCRegistry{NPCs: []dnd.NPC{{ID: identity.DeriveID("Mira Thorn"), Name: "Mira Thorn", SourceRefs: []source.SourceRef{{SourceID: "other-session", StartUnitID: 1, EndUnitID: 1}}}}}
|
||||
content, err := npccodec.New().Encode(value)
|
||||
if err != nil {
|
||||
t.Fatalf("encode NPC registry: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user