rename OLLIE_9MOUNT → OLLIE; always inject OLLIE into execute env
$OLLIE is the ollie root (FUSE mount). Renaming makes it shorter and cleaner for use in sandboxed code. SetSessionID now resolves and injects OLLIE into the execute server env so it is always available regardless of whether the parent process has it set. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
da6e8d46c4
commit
d8421f2c24
|
|
@ -86,7 +86,7 @@ func DefaultConfig() *Config {
|
|||
},
|
||||
RWX: []string{
|
||||
"{HOME}/.config/ollie",
|
||||
"{OLLIE_9MOUNT}",
|
||||
"{OLLIE}",
|
||||
"{HOME}/mnt/ollie",
|
||||
},
|
||||
},
|
||||
|
|
@ -103,7 +103,7 @@ func DefaultConfig() *Config {
|
|||
"LANG",
|
||||
"TERM",
|
||||
"OLLIE_SESSION_ID",
|
||||
"OLLIE_9MOUNT",
|
||||
"OLLIE",
|
||||
"OLLIE_MEMORY_PATH",
|
||||
},
|
||||
Advanced: AdvancedConfig{
|
||||
|
|
@ -350,7 +350,7 @@ func SystemDefaults() LayeredConfig {
|
|||
"LANG",
|
||||
"TERM",
|
||||
"OLLIE_SESSION_ID",
|
||||
"OLLIE_9MOUNT",
|
||||
"OLLIE",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -359,6 +359,13 @@ func (s *agentCore) SetSessionID(newID string) error {
|
|||
if srv, ok := s.dispatcher.GetServer("execute"); ok {
|
||||
if es, ok := srv.(tools.EnvSetter); ok {
|
||||
es.SetEnv("OLLIE_SESSION_ID", newID)
|
||||
// Ensure OLLIE is always set, resolving the default if unset.
|
||||
ollie := os.Getenv("OLLIE")
|
||||
if ollie == "" {
|
||||
home, _ := os.UserHomeDir()
|
||||
ollie = home + "/mnt/ollie"
|
||||
}
|
||||
es.SetEnv("OLLIE", ollie)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -959,7 +966,7 @@ func (s *agentCore) handleCommand(ctx context.Context, input string, handler Eve
|
|||
if cmd == "/tools" {
|
||||
subdir = "t"
|
||||
}
|
||||
mount := os.Getenv("OLLIE_9MOUNT")
|
||||
mount := os.Getenv("OLLIE")
|
||||
if mount == "" {
|
||||
home, _ := os.UserHomeDir()
|
||||
mount = home + "/mnt/ollie"
|
||||
|
|
|
|||
Reference in New Issue