fs/spec.go: move GID("agent") to root node, let children inherit
- Removed 19 redundant GID("agent") calls from leaf nodes and subdirectories
- Root DirNode now sets GID once; all descendants inherit via fsedsl resolver
This commit is contained in:
parent
06b287b8f2
commit
97c8bcbb62
20
fs/spec.go
20
fs/spec.go
|
|
@ -85,70 +85,61 @@ var (
|
|||
var treeSpecUID, treeSpecGID string
|
||||
|
||||
var treeSpec = DirNode("/",
|
||||
FileNode("backends", 0444,
|
||||
Doc("Available backend names, one per line (ollama, openai, anthropic, etc.)"),
|
||||
Read(readBackends),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("backends", 0444,
|
||||
Doc("Available backend names, one per line (ollama, openai, anthropic, etc.)"),
|
||||
Read(readBackends),
|
||||
),
|
||||
|
||||
FileNode("help", 0444,
|
||||
Doc("Filesystem reference (this output). Generated from spec."),
|
||||
Read(readHelp),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("models", 0444,
|
||||
Doc("Available models across all backends. Format: backend<tab>model per line."),
|
||||
Read(readModels),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("agents", 0444,
|
||||
Doc("Available agent profile names (from agents/*.json), one per line"),
|
||||
Read(readAgents),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("tools", 0444,
|
||||
Doc("Available tools and their descriptions. Format: name<spaces>description per line."),
|
||||
Read(readTools),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("ctl", 0666,
|
||||
Doc("Server control. Write: 'invalidate' (refresh caches), 'kill' (shutdown server)"),
|
||||
Write(writeRootCtl),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("eventwait", 0444,
|
||||
Doc("Blocking read for server events. Returns next event as 'topic payload'."),
|
||||
Read(readEventwait),
|
||||
BlockOnce(blockEventwait),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("complete", 0666,
|
||||
Doc("Code completion. Write JSON {file,prefix,suffix,context} or plain prefix. Read returns completion."),
|
||||
Request(requestComplete),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("generate", 0666,
|
||||
Doc("One-shot LLM generation. Write JSON {prompt,...} or plain text. Read returns result."),
|
||||
Request(requestGenerate),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
FileNode("aliases", 0444,
|
||||
Doc("Alias table for ID-based lookups. Format: id<tab>path per line."),
|
||||
Read(readAliases),
|
||||
GID("agent"),
|
||||
),
|
||||
|
||||
DirNode("elevate",
|
||||
Doc("Elevation broker for sandboxed command approval"),
|
||||
GID("agent"),
|
||||
|
||||
FileNode("policy", 0666,
|
||||
Doc("Global elevation policy. Read: current policy. Write: key=value to update."),
|
||||
|
|
@ -166,7 +157,6 @@ FileNode("generate", 0666,
|
|||
|
||||
DirNode("session",
|
||||
Doc("Session management. Contains per-session subdirectories."),
|
||||
GID("agent"),
|
||||
|
||||
FileNode("new", 0666,
|
||||
Doc("Create session. Write key=value args (name=, cwd=, agent=, backend=, model=). Read returns session name."),
|
||||
|
|
|
|||
Loading…
Reference in New Issue