Commit Graph

12 Commits

Author SHA1 Message Date
ollie 8e7dd60a8b agent: remove $OLLIE mount dependency from core
- Add ListHandlers map to AgentCoreConfig/agent struct; /skills and /tools
  dispatch through it instead of reading local paths directly
- Add ReadPlanStep to AgentCoreConfig; wired by 9p/ directly from sess.plan
- Export NextUncheckedStep([]byte) as pure helper
- Fix prependOlliePath to use OLLIE_CFG_PATH/scripts/x/ instead of $OLLIE/x/
- Add OLLIE_CFG_PATH to EnsureDefaults and managed env var list
2026-06-16 12:30:36 +02:00
Levi Neely 391f633785 env: Format() emits only managed vars, not entire process env 2026-06-15 10:49:30 +02:00
Levi Neely 15d7d3bf50 env: strip quotes from values in LoadFile
LoadFile was setting env vars with literal quotes intact, causing
API keys like OLLIE_GEMINI_KEY to fail auth when loaded from the
env file at olliesrv startup.
2026-05-21 19:23:31 +02:00
Levi Neely d00a15093d expand $VAR references in env file values and sandbox paths 2026-05-20 18:35:09 +02:00
Levi Neely 66d9d0502d expand ~ in env file values and sandbox paths 2026-05-20 18:34:00 +02:00
Levi Neely 10991ec319 env: load ~/.config/ollie/env at server startup
EnsureDefaults now loads the env file before setting path defaults.
This ensures OLLIE_TIER_*, OLLIE_ENABLED_BACKENDS, and all other
user-configured vars are available to tool scripts from the start,
rather than only after the first backend.NewWithName() call.
2026-05-20 09:36:04 +02:00
Levi Neely a2b6adb6cf env: add OLLIE_AGENTS_PATH with colon-separated multi-dir resolution 2026-05-08 13:01:04 +02:00
Levi Neely 0041fc77ec add OLLIE_PROMPTS_PATH env var and PromptsDirs helper 2026-05-08 11:59:16 +02:00
Levi Neely d304014ba3 env: add OLLIE_ELEVATE_SOCKET to managed list and EnsureDefaults
Default to $XDG_RUNTIME_DIR/ollie/elevate.sock (falling back to
/run/user/<uid>/ollie/elevate.sock) so the daemon sets and propagates
the value without requiring explicit configuration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 11:45:46 +02:00
Levi Neely 6b4d401d03 pkg/env: add tests (0% -> 100% coverage) 2026-04-21 13:53:38 +02:00
Levi Neely 800dfa526e agent: remove Go-based systemPrompt composition; priming now via hooks
systemPrompt() loaded and templated files from DefaultPromptsDir() at
startup and on cwd change. This is now handled entirely by the
agentSpawn hook using the prime script, eliminating the parallel
prompt-injection path.

DefaultPromptsDir() is kept for the 9P server's p/ directory exposure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 12:10:07 +02:00
Levi Neely 44bff71a65 env: centralize daemon env in pkg/env; clean up session env propagation
- New pkg/env package owns EnsureDefaults, Set, Get, All, Format
- BuildAgentEnv reverted to 3-arg signature (no initialEnv)
- agentCore.setEnv removed; pushSessionEnv handles OLLIE_SESSION_ID only
- execute.Server.SetEnv no longer calls os.Setenv (session-scoped only)
- !cmd handler sets OLLIE_SESSION_ID explicitly in subprocess env
- mcp/transport: seed cmd.Env from os.Environ() so MCP servers inherit PATH etc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 15:43:01 +02:00