no_store: refuse conversations, notes and models outside the cluster under a policy that keeps nothing
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
13e6f19301
commit
ec737cffb5
9 files changed
+106
-2
No files matched your search
@@ -112,6 +112,10 @@ func (r *Router) handlePutNote(w http.ResponseWriter, req *http.Request) {
|
||||
writeMemoryError(w, err)
|
||||
return
|
||||
}
|
||||
if r.noStore(callerSubject(req)) {
|
||||
writeErrorCode(w, http.StatusForbidden, "invalid_request_error", "no_store", errNoStoreMsg)
|
||||
return
|
||||
}
|
||||
var body struct {
|
||||
Text string `json:"text"`
|
||||
Tags []string `json:"tags"`
|
||||
@@ -323,6 +327,9 @@ func (r *Router) callMemoryTool(req *http.Request, params json.RawMessage) map[s
|
||||
|
||||
switch call.Name {
|
||||
case "remember":
|
||||
if r.noStore(callerSubject(req)) {
|
||||
return toolText(errNoStoreMsg, true)
|
||||
}
|
||||
if err := r.threads.PutNote(ctx, project, agent, store.Note{Key: a.Key, Text: a.Text, Tags: a.Tags}); err != nil {
|
||||
return toolText(err.Error(), true)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user