p9: rename PluginStore to ExecStore

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Levi Neely 2026-04-19 05:55:15 +02:00
parent fe5363702f
commit 439ee6af1e
3 changed files with 9 additions and 9 deletions

View File

@ -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.

View File

@ -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)
}

View File

@ -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),