feat(addons): let a manifest declare the context files the host loads

An add-on that keeps small notes for the person can now name the index
files that the host puts in the prompt of a chat. The declaration is
capabilities.contextFiles: at most one file for each scope (user, agent,
channel), each a path under Memory/ that ends in .md, with an optional
byte cap that can only lower the host's 2 KiB cap.

The field is new, so a manifest that uses it must accept manifest API 2.
The add-on only names paths. The host reads them as the person, so the
declaration gives the add-on no access to files.

Assisted-by: Claude:claude-sonnet-5-5
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto committed 2026-11-03 13:57:28 +00:00
1 parent 1f481b0747
commit ad7e9b3261
6 files changed
+233 -1

No files matched your search

+6
View File
@@ -414,6 +414,12 @@
"needs the egress check among the host operations",
"refuses an unknown kind, a bad title and a bad or repeated preset",
"reads capabilities.network from JSON and refuses an unknown field in it",
"is valid with one file for each scope",
"needs a manifest that accepts API 2 to declare context files",
"refuses a path outside the Memory folder, an unsafe path and a wrong placeholder",
"refuses a cap that is negative or above the host's index cap",
"refuses two files for one scope and more files than scopes",
"reads capabilities.contextFiles from JSON and refuses an unknown field in it",
"is drawn for a declared capability that holds the grant, with no bash tool",
"is not drawn for a declared capability without the grant",
"is drawn for a manifest that declares no network and replaces bash, as before",