diff --git a/README.md b/README.md index 1550b4a..e4b227b 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Each 9P directory endpoint is backed by a named store implementing one of the st | `/sk` | `SkillStore` | `Store` | | `/t` | `ToolStore` | `Store` | | `/u` | `UtilStore` | `Store` | -| `/x` | `PluginStore` | `Store` | +| `/x` | `ExecStore` | `Store` | | `/s` | `SessionStore` | `Store` | To swap a backing store (e.g. replace `/pl` with a vector database or `/m` with an object store), implement the appropriate interface and wire it in `New()`. The store interface requires only `Stat`, `List`, `Get`, `Put`, `Delete`, `Create`, and `Rename` — authentication, connection management, and credential rotation are internal concerns of the implementation. diff --git a/internal/p9/pluginstore.go b/internal/p9/pluginstore.go index afe96fe..44a6ca4 100644 --- a/internal/p9/pluginstore.go +++ b/internal/p9/pluginstore.go @@ -6,25 +6,25 @@ import ( "ollie/pkg/tools/execute" ) -// PluginStore is a read-only FlatDirStore backed by the scripts/x/ directory. +// ExecStore is a read-only FlatDirStore backed by the scripts/x/ directory. // Plugins are executables invoked by the server (e.g. elevation backends), not // by the agent or user directly. -type PluginStore struct { +type ExecStore struct { *FlatDirStore } -func NewPluginStore() *PluginStore { - return &PluginStore{FlatDirStore: NewFlatDirStore(execute.PluginsPath(), 0555)} +func NewExecStore() *ExecStore { + return &ExecStore{FlatDirStore: NewFlatDirStore(execute.PluginsPath(), 0555)} } -func (s *PluginStore) Stat(name string) (os.FileInfo, error) { +func (s *ExecStore) Stat(name string) (os.FileInfo, error) { return s.FlatDirStore.Stat(name) } -func (s *PluginStore) List() ([]os.DirEntry, error) { +func (s *ExecStore) List() ([]os.DirEntry, error) { return s.FlatDirStore.List() } -func (s *PluginStore) Get(name string) ([]byte, error) { +func (s *ExecStore) Get(name string) ([]byte, error) { return s.FlatDirStore.Get(name) } diff --git a/internal/p9/server.go b/internal/p9/server.go index 2ddb4dc..433c78b 100644 --- a/internal/p9/server.go +++ b/internal/p9/server.go @@ -140,7 +140,7 @@ func New() *Server { memStore: NewFlatDirStore(memDir, 0644), toolStore: NewToolStore(), utilStore: NewUtilStore(), - pluginStore: NewPluginStore(), + pluginStore: NewExecStore(), skillStore: NewSkillStore(), transcriptStore: NewFlatDirStore(transcriptDir, 0444), tmpStore: NewFlatDirStore(tmpDir, 0600),