From 1dacab250d9ec9d0033cc8d59f3eeccc898aae07 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Sat, 8 Aug 2026 18:16:28 -0700 Subject: [PATCH] feat(policy): add MemoryGetObjectBioAction An object's biography is who authored each version of it, when, from which agent and session, and what that version carries. Reading it is a different question from reading the object, which returns bytes and says nothing about who put them there, so it needs an action of its own. Registered as a read: it names one record in its resource and has no query to constrain, so the enumeration condition keys do not apply. --- policy/memory-action.go | 7 +++++++ policy/memory-action_test.go | 1 + 2 files changed, 8 insertions(+) diff --git a/policy/memory-action.go b/policy/memory-action.go index ac1878c..be47d46 100644 --- a/policy/memory-action.go +++ b/policy/memory-action.go @@ -65,6 +65,12 @@ const ( // MemorySearchAction - search (corpus-grep) the objects in a cortex. MemorySearchAction MemoryAction = "memory:Search" + // MemoryGetObjectBioAction - read an object's biography from a cortex: + // who authored each version of it, when, from which agent and session, + // and what that version carries. Distinct from reading the object, which + // returns the bytes and says nothing about who put them there. + MemoryGetObjectBioAction MemoryAction = "memory:GetObjectBio" + // AllMemoryActions - all AIStor Memory API actions. AllMemoryActions MemoryAction = "memory:*" ) @@ -84,6 +90,7 @@ var SupportedMemoryActions = map[MemoryAction]struct{}{ MemoryDeleteAgentAction: {}, MemoryListAgentsAction: {}, MemorySearchAction: {}, + MemoryGetObjectBioAction: {}, AllMemoryActions: {}, } diff --git a/policy/memory-action_test.go b/policy/memory-action_test.go index 5135219..a41c641 100644 --- a/policy/memory-action_test.go +++ b/policy/memory-action_test.go @@ -39,6 +39,7 @@ func TestMemoryActionIsValid(t *testing.T) { {MemoryDeleteAgentAction, true}, {MemoryListAgentsAction, true}, {MemorySearchAction, true}, + {MemoryGetObjectBioAction, true}, {AllMemoryActions, true}, {MemoryAction("memory:FooBar"), false}, {MemoryAction("s3tables:CreateTable"), false},