Commit Graph

388 Commits

Author SHA1 Message Date
Levi Neely 0c30ec71d2 server: reduce statewait timeout from 5s to 500ms
When reading statewait with the same state value, the server now waits
500ms instead of 5 seconds before returning. This makes state polling
much more responsive.
2026-10-06 11:32:31 +02:00
Levi Neely c9c26d3a3d fix bypass+background hang: signal started immediately
Background procs with bypass were hanging because the caller blocked on
<-startedCh waiting for the process to start, but bypass.Submit blocks
until approval. Now we signal started immediately when entering bypass
path (with Process: nil), so the agent sees the proc ID right away.

Also handle term/kill when proc.proc is nil — cancel the context to stop
the operation (e.g., abort a pending bypass request).
2026-10-06 11:00:23 +02:00
Levi Neely 7ac1b6faf5 fix bypass+background: wire streamOut through bypass path
executeBypassDirect was missing the streamOut parameter, so background
processes running via bypass never had their output written to the proc
buffer. Now both bypass and sandboxed paths receive the streaming writer.
2026-10-06 10:53:06 +02:00
Levi Neely cd76864f19 fix agent profile selection from GUI
Two bugs:
1. GUI sends 'agent=<profile>' but server only recognized 'profile='
   - Added 'agent' as alias for 'profile' in parseAgentNewRequest

2. Model dropdown showed cost columns appended to model names
   - /models format: backend<tab>model[<tab>in<tab>out...]
   - Parser took everything after first tab as model name
   - Now stops at second tab to extract just the model name
2026-10-06 10:42:35 +02:00
Levi Neely f85612a4da session: pause all sessions on shutdown, fix agent config loading
Shutdown changes:
- Shutdown() now calls PauseAll() before closing sessions
- PauseAll() interrupts agents then pauses each session
- Sessions persist their state, allowing resume on next startup

Agent loading fix:
- LoadConfig returns (*AgentConfig, error) instead of *AgentConfig
- Parse errors are no longer silently discarded
- Callers handle nil config gracefully (no nil pointer dereferences)
2026-10-01 13:34:33 +02:00
Levi Neely c1888d31fe agent: increase tool result hard limit from 32KB to 128KB 2026-10-01 09:23:38 +02:00
Ollie Agent 3f9f4753ef session: make session/new get-or-create
CreateEmpty now returns (session, created, error): if a session with the
given name already exists it is returned untouched instead of erroring,
and only a freshly created session receives the provided cwd/workflow/
variant. The o script no longer suppresses errors from session/new, so
real failures surface while re-creating an existing session stays a
no-op success.
2026-09-29 23:01:44 +02:00
Levi Neely 50b02b7a1e sandbox: skip sockets and FIFOs in Landlock rules
Landlock cannot add rules for sockets (S_IFSOCK) or FIFOs (S_IFIFO).
Previously, attempting to add a path like /run/user/1000/wayland-0
would fail with EINVAL.

Now these special file types are detected and skipped gracefully.
2026-09-25 16:33:39 +02:00
Levi Neely f88b5fcc32 kiro: only set additionalModelRequestFields for supported models
The field is rejected by models that don't support thinking/reasoning
configuration. Check model name before setting the field; 'auto' and
unknown models skip it to avoid ValidationException errors.
2026-09-21 14:40:30 +02:00
Ollie Agent 42cae9ee2e human-friendliness: self-describing ctl, structured errors, status, overview
Make the namespace explain itself instead of requiring prior knowledge.

- ctl is self-describing: reading it (empty write) or writing 'help'
  returns the valid verbs with one-line descriptions; an unknown verb
  errors with the valid list. Refactor dispatch to an ordered []ctlCmd
  carrying descriptions; drop the undocumented '.' alias and the
  drift-prone hardcoded help verb. Keep 'i' (drop 'inject') for fast
  injects. o's ctl usage now reads the live listing.
- Errors carry severity + remediation. backend.ClassifyError maps the
  typed errors to transient/config/fatal with a one-line fix; the error
  event renders [[[error:<severity>]]] and a 'remediation:' line so a
  human knows whether to wait or intervene.
- Add a human status file: 'thinking · 12s', 'calling shell · 3s',
  'idle' — distinct from the machine-facing raw state. Wire the TUI bar
  to it.
- Bare 'o' shows an overview of running sessions/agents with status, so
  you don't need to know any names to get oriented.

Tests: dispatch help/unknown/routing, ClassifyError severity table.
2026-09-07 13:55:45 +02:00
Ollie Agent f3933e21e7 backend: make reasoningEffort the primary knob with documented thresholds
reasoningEffort (low|medium|high) is now the single human-facing control
for model deliberation. Backends that speak a discrete level (OpenAI,
OpenRouter, Copilot, Gemini, Kiro) send it verbatim; Anthropic, which
needs a numeric budget, translates via documented thresholds
(low=4096, medium=8192, high=16384). thinkingBudget remains an advanced
explicit override that wins when set.

- Add EffortLow/Medium/High, threshold consts, ValidReasoningEffort,
  EffortThinkingBudget, and GenerationParams.ResolvedThinkingBudget.
- Anthropic: derive budget from effort, grow max_tokens above the budget
  (Anthropic requires budget < max_tokens), and force temperature=1 when
  thinking is enabled (both are Anthropic requirements).
- Validate reasoningEffort at config load so typos fail loudly instead
  of silently no-opping.
- theo: drop explicit thinkingBudget/inflated maxTokens; reasoningEffort
  high now implies the 16384 budget.
- Document thresholds and per-backend behavior in data/agents/README.md;
  fix stale autoLoad/maxSteps references.
- Add unit tests for the mapping and Anthropic thinking behavior.
2026-09-07 13:34:58 +02:00
Ollie Agent 6c7e5864c4 agents: set reasoningEffort per profile; rename thinkingBudget tag
Reasoning effort is part of an agent's behavior definition, so set it
on all 14 profiles keyed to role (planning/review high, general medium,
lightweight assist low). Also rename the ThinkingBudget json tag from
the confusing bare "reasoning" to "thinkingBudget", distinct from the
reasoningEffort string knob. No config migration needed — no profile or
backends.conf used the old "reasoning" key.
2026-09-07 13:27:33 +02:00
Ollie Agent 9395a0e07b config: rename agent autoLoad field to tools
The autoLoad name implied an automatic tool-loading path that no longer
exists; tools now come only from agent config plus the /tool_load ctl
command. Rename the AgentConfig.AutoLoad field (json autoLoad) to Tools
(json tools), rename LoadAutoLoadTools to LoadTools, and update all 14
agent JSON profiles and the tool-not-loaded error message.
2026-09-07 13:23:17 +02:00
Ollie Agent eff0880737 backend: test that no tools loaded omits tools field
Regression guard for tool-free model compatibility: an agent with an
empty tool set must produce requests with no "tools"/"tool_choice"
field. Covers OpenAI, OpenRouter, Ollama, and Anthropic.
2026-09-07 13:19:35 +02:00
Ollie Agent 2e30b0ddab fs: show OpenRouter cache pricing for selected models 2026-09-05 11:56:04 +02:00
Ollie Agent 3ca84487c5 toolsrv: neutralize repo-controlled core.fsmonitor in tool env
GitSpawn class (Sep 2026): a repo's .git/config can set core.fsmonitor to
a command that executes on any git index refresh, silently and as the
user. Ollie never spawns git in its own plumbing (repo detection is
os.Stat), but model-run git inside a malicious repo would fire it.

- exec: force core.fsmonitor=false via GIT_CONFIG_* in sandboxed tool env
- turn: wrap repo AGENTS.md in <context> markers (untrusted data,
  filtered by KDE chat rendering)
- AGENTS.md: document the no-git-in-plumbing invariant (lesson 16)
2026-09-05 11:42:38 +02:00
Levi Neely 065e399444 models: add pricing info with cache rates and static estimates
Add per-model pricing to /models output. Format:
  backend<tab>model[<tab>in<tab>out<tab>cache_read<tab>cache_write]

Pricing sources:
- Anthropic: hardcoded from official pricing, includes cache rates
- OpenRouter: parsed from API response pricing field
- Other backends: static lookup table fallback, marked with (e)

Changes:
- backend: Add ModelPricing/ModelInfo types, ModelLister interface,
  static price table (Claude, GPT, Gemini, DeepSeek), LookupStaticPricing()
- openai: Parse pricing from API, implement ModelsInfo()
- anthropic: Implement ModelsInfo() with hardcoded cache rates
- fs/cache: Use ModelsInfo when available, fall back to static lookup,
  format prices per 1M tokens with (e) suffix for estimates
- agent/cost: Use shared LookupStaticPricing instead of duplicate table
2026-09-04 13:26:48 +02:00
Levi Neely 765e8b9d05 add file-level doc comments and improve AGENTS.md navigation
Agent package files now have descriptive header comments explaining
their purpose:
- dispatch.go: tool execution, batching, conflict detection
- turn.go: turn orchestration and Submit entry point
- state.go: agent state machine and notifications
- history.go: message history and token tracking
- compact.go: context compaction and cold summarization
- cache.go: tool result caching with staleness detection
- retry.go: error tracking and transient retry logic
- runtime.go: preamble assembly and tool schema management
- text_parse.go: text-based tool call parsing
- chatlog.go: chat output formatting
- chat.go: chat log storage and streaming
- workflow.go: workflow classification for discovery
- skill_match.go: semantic skill discovery
- tool_match.go: semantic tool discovery
- commands.go: slash command interception
- feed.go: feed value storage with dedup
- fifo.go: buffered prompt queue
- peer.go: peer agent management
- subagent.go: sub-agent depth and child tracking
- cost.go: cost calculation and audit logging
- prompt_resolver.go: prompt file resolution
- local_summary.go: non-LLM text summarization
- agent_config.go: configuration types

AGENTS.md improvements:
- Add 'Where to Start' section with entry points by concern
- Expand Key Files table with cache, retry, text_parse, tool_match,
  skill_match, chatlog, local_summary, workflow, and proc files
2026-08-27 10:23:26 +02:00
Levi Neely c8ccc2c450 add CONTRIBUTING.md; document Agent struct fields
- CONTRIBUTING.md: development workflow, code style, testing, conventions
- agent.go: add comments to warnedContext, resultCache, chatLog, chatStart,
  chatVers, chatCond, chatSignalCh, plan
2026-08-27 10:13:24 +02:00
Levi Neely 785c27c450 extract compaction logic from history.go
compact.go (379 lines): compact(), buildCompactedHistory(), summarizeMessage(),
  flattenToolMessages(), cacheSummary(), pendingColdSummaryStats(), stripCold(),
  resolveCompactionModel()

history.go (636 → 279 lines): core History struct, message operations,
  usage tracking
2026-08-27 10:11:54 +02:00
Levi Neely 2ae41bdd29 decompose loop.go by concern
Extract from loop.go (902 → 308 lines):
- cache.go (109 lines): resultCache, cachedResult, file staleness detection
- dispatch.go (376 lines): execToolCalls, execBatch, execOne, conflict detection, background helpers
- retry.go (126 lines): errorState, trackErrors, transientWait, retryCountdown

loop.go now contains only the core loop: run(), autoCompact(), streamResponse()
2026-08-27 10:09:05 +02:00
Levi Neely 9b7de31a07 add doc.go files; decompose agent package
doc.go:
- agent, backend, session, fs, bypass, toolclient (olliesrv)
- server, sandbox, registry (toolsrv)
- protocol, metadata (toolsrv shared)
- log, util, skills

agent package decomposition:
- chat.go: chat log, streaming, plan methods
- state.go: State, Reply, WaitChange, SignalCh, emit
- peer.go: AddPeer, RemovePeer, Peers
- subagent.go: Depth, IncChildren, DecChildren, ActiveChildren
- agent.go: 881 → 638 lines (core struct, identity, backend, runtime)
2026-08-27 10:03:58 +02:00
Levi Neely fa219e06aa quirks: only reject shell calls with tools in command position
The old word-boundary check falsely triggered when tool names appeared
in arguments (e.g., git commit messages mentioning native tools).

New logic: split on shell separators and only flag when a tool is the
first token of a sub-command or a path ending with /toolname.
2026-08-26 14:00:21 +02:00
Levi Neely 89dd021a93 session: prevent duplicate sessions and agents
- CreateEmpty: atomic check-and-insert under write lock prevents TOCTOU race
- AddAgent: reject duplicate agent names, return error
- CreateAgentWithParams: propagate AddAgent error, close orphan on conflict
- persist: handle AddAgent errors during restore (log and skip)
2026-08-26 13:57:14 +02:00
Levi Neely aae861adae Fix acme-ollie-ensure: use existing namespace paths
session/$S/id and agent/$A/id don't exist in the 9P namespace.
Use env and cfg which do exist, fixing OllieHere and all acme scripts.
2026-08-24 15:14:51 +02:00
Levi Neely c6c4651446 sandbox: allow rw access to memory dir 2026-08-24 13:59:21 +02:00
Levi Neely 39ccfe8aa3 Add detach ctl command for agent
Allows user to background the current foreground tool process
by writing 'detach' to the agent ctl file. The agent can then
continue working without waiting for the tool to complete.
2026-08-24 13:56:15 +02:00
Levi Neely 67edfdf58b Code quality fixes from review
toolsrv:
- Remove dead 'var _ = os.Args' in sandbox/native_linux.go
- Fix stale comment in server.go (said 'spec.go')
- Fix misleading test comment in proc_test.go
- Add outputLimit constant in exec.go (was magic number)
- Handle error from registry.New() in main.go
- Change startup log from Warn to Info

olliesrv:
- Remove duplicate normalizeWorkflow() call in tool_match.go
- Consolidate duplicate nil checks in runtime.go
- Remove reimplemented stdlib functions in toolclient/toolsrv.go
- Simplify cacheSummary() - remove unused variable capture

-27 lines
2026-08-21 19:16:44 +02:00
Levi Neely 9b9c1a9539 Remove redundant code and obsolete streaming mechanism
- Extract inject helper for inject/i ctl handlers (dedup)
- Remove duplicate metrics file nodes at session/agent level
- Remove obsolete StreamFunc/streamWriter from toolsrv exec
- Remove stream field from limitedWriter

-68 lines
2026-08-21 17:46:11 +02:00
Levi Neely 2b59409845 refactor: remove dead code across packages (-220 lines)
Dead code removal based on code review:

fs/spec.go:
- Remove unused Perm* constant aliases

fs/support.go:
- Remove unused agentCwd() function

session/registry.go:
- Remove unused CreateAgent() (callers use CreateAgentWithParams directly)

session/session.go:
- Remove unused sweepStaleTmpDirs() and sweepTmpOnce
- Remove unused Session.LoadTool() (callers use LoadToolOnConn directly)
- Simplify Resume() by removing dead else branch (Pause() always nils Keeper)

toolsrv/server/proc.go:
- Remove unused globalProcCounter
- Remove unused ListProcsWithState()

toolsrv/server/server.go:
- Remove unused Mode* constants

toolsrv/bypass/bypass.go:
- Remove unused PendingCount()

toolsrv/sandbox/config.go:
- Remove unused checkPath() and pathUnder()

backend/new.go:
- Remove unused newBackend() (callers use NewWithName)

agent/loop.go:
- Remove unused contextBudget()

agent/agent.go + turn.go + runtime.go:
- Remove unused startupMessages, StartupMsgs, Runtime.Messages

agent/agent_config.go:
- Remove unused Tools *bool field and ToolsEnabled() (tools always enabled)
2026-08-21 16:41:42 +02:00
Levi Neely 8960fb73fd feat: refresh autoLoad tools on agent profile switch
When the 'agent <profile>' ctl command switches profiles, the tool
registry now clears old tools and loads the new profile's autoLoad
list. Previously, switching profiles left the old tools loaded.

Changes:
- registry: add ClearAgent(agentID) to remove all tools for an agent
- server/proc: add ClearAgent wrapper and 'clear <agentID>' ctl command
- toolclient: add ClearTools() method to ToolsrvConn
- agent: SwitchProfile now returns *AgentConfig for tool reload
- fs/spec: agent ctl handler clears and reloads tools after switch
2026-08-21 10:57:59 +02:00
Levi Neely fef6cdc307 tool loading: require explicit autoLoad, clean package structure
Remove lazy tool loading (load-on-call). Tools must now be explicitly
listed in the agent's autoLoad config. Calling an unloaded tool fails
with a clear error message.

Package structure improvements:
- embedding/index.go: generic Index type for semantic matching
- skills/skills.go: uses embedding.Index internally, keeps Skill type
- agent/skill_match.go: matchSkills() for skill discovery
- agent/tool_match.go: matchTools() for tool hints (new file)

Tool hints now match only loaded tools, not all tools on disk.
This makes agent capabilities explicit and auditable.
2026-08-21 10:11:51 +02:00
Ollie Agent 3f8c8df38a Improve workflow-aware tool ranking 2026-08-20 19:01:21 +02:00
Ollie Agent 4bf46ae85d Load hinted tools through the agent namespace 2026-08-20 18:29:10 +02:00
Levi Neely 07dcd60d19 skills: add embedding-based skill matching
Add semantic skill matching using all-MiniLM-L6-v2 sentence embeddings.
Skills are automatically injected into user turns based on relevance.

New packages:
- embedding: ONNX-based text embedding with MiniLM model
- skills: skill discovery, embedding cache, and semantic matching

Integration:
- InitSkillIndex called at startup in fs.NewRoot
- matchSkills called per-turn in executeTurn
- Matched skills injected in <context> block alongside user prompts

Makefile:
- install-models target downloads model and ONNX runtime
- Model files stored in ~/.local/share/ollie/models/

Config:
- Threshold: 0.2 cosine similarity
- Limit: 3 skills per turn
- Skill dirs: ~/.kiro/skills (user), ~/.config/ollie/skills (installed)
2026-08-20 15:54:43 +02:00
Levi Neely cd9da5ed27 quirks: reject shell calls to native tools
- Add quirks package for stupid model behavior workarounds
- ShellInvokesNativeTool blocks shell(cmd="tool_name") patterns
- Add client_9p tool: native wrapper for ollie-9p operations
- Block ollie-9p in shell — use client_9p instead
- Update all prompts to use client_9p, not shell+ollie-9p
- Clarify 9P namespace is complete (tools are NOT in 9P)
- Registry.All() lists all available tools for validation
2026-08-20 14:08:53 +02:00
Levi Neely ec6db39722 toolclient: add tools/ dir to toolsrv search path 2026-08-20 13:23:50 +02:00
Levi Neely a23ff15d5c prompt: require exhausting tools/skills before giving up
Add explicit guidance to Autonomous Operation section:
- New unacceptable behaviors: giving up before checking skill_list or trying to load tools
- New checklist: must check skills, try loading tools, attempt even uncertain options before reporting failure
2026-08-20 12:19:23 +02:00
Levi Neely 4750966048 toolsrv: auto-load tools on first use
When an agent calls a tool that exists but isn't loaded, toolsrv now
automatically loads it instead of returning an error. This eliminates
the round-trip of a separate load call.

- Remove Registry.Exists() (superseded by auto-load logic)
- Fire OnToolsChanged callback after auto-load so olliesrv can update
  tool definitions for subsequent turns
2026-08-20 12:16:01 +02:00
Levi Neely 7f9ff18132 chat: strip <context>...</context> blocks in filtered output
chat.raw includes everything; chat strips:
- [[[...]]] markers
- fence delimiters
- <context>...</context> blocks (user prompts)

Text clients get clean output; GUI clients use chat.raw for full control.
2026-08-20 12:01:45 +02:00
Levi Neely c602238835 agent: wrap user prompts in <context> tags for rendering 2026-08-20 11:59:15 +02:00
Levi Neely 468887a9c1 prompts: concrete skill triggers, no vague 'confidence' 2026-08-20 11:14:52 +02:00
Levi Neely 31b9b13286 prompts: load skills BEFORE guessing
Expanded skills section:
- Explicit 'when to load' triggers (unfamiliar API, guess didn't work,
  specific domain, unfamiliar system)
- Bold directive: 'Load skills BEFORE guessing. One skill load beats
  five failed attempts.'
- 'Skills are cheap; failed attempts are expensive.'
2026-08-20 11:14:16 +02:00
Levi Neely da872e51f3 prompts: call tools, don't just mention them
Added explicit unacceptable behaviors:
- Mentioning a tool without calling it
- Acknowledging a tool exists but not using it

Added bold statement: 'Knowing a tool exists is not the same as using it.
Your response should contain tool calls, not descriptions of tools you
could call.'
2026-08-20 11:13:37 +02:00
Levi Neely fe9d39a142 prompts: explicit WRONG/RIGHT examples for tool vs shell
Agents were using shell to invoke tools (cat, grep, ollie-9p) instead of
calling the actual tools. Added unmistakable WRONG/RIGHT code blocks
showing the correct pattern. Shell is ONLY for git, make, npm, etc.
2026-08-20 11:09:50 +02:00
Levi Neely ce8287e3ea prompts: aggressive autonomous operation directives
Rewrote system prompt to enforce immediate tool use:
- New 'Autonomous Operation' section: act first, report results
- Explicit list of unacceptable behaviors (narrating intentions, asking
  permission for routine ops, producing text when tools should be called)
- Tools section: 'Use them without hesitation', concrete examples
- Skills section: 'if the task needs it, load it' — no asking
- Stronger sub-agent prefix: 'Do NOT respond with a plan. Call tools.'
2026-08-20 11:06:24 +02:00
Levi Neely 4ff37741e2 subagent: fix timeout and premature response issues
Timeout fix:
- Add Timeout field to ToolInfo (protocol) and MetaFile (metadata)
- proc.go respects tool-declared timeout before falling back to 30s default
- subagent_spawn.meta declares timeout=0 (no timeout) so the tool is
  never killed prematurely while waiting for the sub-agent to finish
- Tool schema declares timeout with 'do not set' guidance to prevent
  the LLM from adding a short timeout

Premature response fix:
- Inject behavioral prefix into sub-agent prompt: complete all work
  before responding, report results not intentions
- Sub-agent's final text is returned to parent; this instruction ensures
  it contains accomplished work, not a plan
2026-08-20 10:59:23 +02:00
Ollie Agent 19971be343 Support runtime backend switching via ctl 2026-08-19 20:06:20 +02:00
Levi Neely a7b8c4c2ce Add 'none' workflow option as the default (no-op on goal set)
- Workflow() no longer defaults to 'conductor' when empty
- runWorkflow() returns immediately for '' or 'none'
- 'none' listed first in the workflows file output
- QML dropdowns default to 'none' instead of 'conductor'
- C++ fallback uses 'none' when server unreachable
2026-08-19 18:09:09 +02:00
Levi Neely 9f1aec1384 Add session settings dialog (edit mode for NewSessionDialog)
- Add session-level cfg file (read: name/cwd/remote/workflow/variant/yolo;
  write: workflow, variant, cwd)
- Add readSessionConfig() and updateSessionConfig() to C++ client
- NewSessionDialog supports editMode: pre-populates fields from session cfg,
  title becomes 'Session Settings', button becomes 'Save'
- Name and Remote fields disabled in edit mode (non-reconfigurable)
- YOLO checkbox hidden in edit mode
- Only changed values are written back on save
- Add 'Settings...' to session context menu in SessionTree
- Wire sessionSettingsRequested signal through to dialog
2026-08-19 18:07:25 +02:00
Levi Neely 5fdd80c26c Implement workflow variants system
- runWorkflow accepts a variant parameter; sources {workflow}-{variant}.conf
  as env vars before exec'ing the script
- Session stores variant; persisted and restored
- session/new accepts variant= parameter
- 'run' ctl command accepts optional variant as second arg
- workflows file now lists variants: name<TAB>default,variant1,...
- review workflow reads AUTHOR_PROFILE/REVIEWER_PROFILE env vars
- Add review-code.conf and review-writing.conf example variants
2026-08-19 17:57:22 +02:00
Levi Neely 86b5039552 peers: clean up peer links when an agent is killed
RemoveAgent now iterates remaining agents and removes any peer link
pointing to the removed agent's name, preventing stale/corrupt state.
2026-08-19 17:23:27 +02:00
Levi Neely 7055444748 agent peers: bidirectional peer links with topology-controlled messaging
Add peer/ directory to each agent's 9P namespace. Agents communicate
by writing to peer/{name}, which delivers to the target's prompt handler.
Only declared peers can be messaged — the directory is the ACL.

Implementation:
- Agent struct: peers map + AddPeer/RemovePeer/Peers methods
- fs/spec.go: peer/ Each node (write-only entries), peeradd/peerdel/peers ctl commands
- Bidirectional: peeradd A on B also adds B on A
- Peers constrained to same session
- Persisted with session state (PersistedAgent.Peers field)
- peeradd/peerdel trigger immediate session save

Docs updated: system_prompt.md, AGENTS.md, README.md, architecture-9p.md,
architecture-core.md, architecture.md, usage.md.
2026-08-19 17:22:30 +02:00
Levi Neely fa99020667 tools: multicall binaries, sandbox fixes
- Multicall pattern for tool families: one binary per family with
  symlinks for each tool name. Reduces tools dir from 156MB to 31MB.
  codeintel (6 tools), filetools (5 tools), lsptools (7 tools).

- Build with -ldflags="-s -w" to strip debug symbols.

- Fix Landlock EINVAL on regular files: filter directory-only access
  rights (READ_DIR, MAKE_*, REMOVE_*) when adding rules for non-
  directory paths.

- Fix toolsrv CWD initialization: pass --cwd flag value to server
  state at startup so {CWD} in sandbox.yaml expands correctly.
2026-08-19 13:51:52 +02:00
Levi Neely b52643314b fix remote toolsrv spawn: use tools/ path and emit ready on stderr 2026-08-19 12:44:03 +02:00
Levi Neely b4baddd826 Memory tools: never expose raw memo commands to agents
- Add MEMO_TOOLS=1 env var to memo script; when set, all printed
  instructions reference native tool names instead of memo paths
- Set MEMO_TOOLS=1 in all memory tool .meta wrappers
- Add memory_nap tool for compressions
- Add memory_zoom tool for tree navigation
- Add part/T pagination args to memory_wake
- Update system prompt to use memory_zoom tool call
- Fix inject ctl: submit as user message when agent is idle
2026-08-19 10:13:02 +02:00
Levi Neely 9bb2e41e33 Add memory section to system prompt, fix icon resolution
- Add OptMem memory section to system_prompt.md with tool-based API
- Fix KRunner plugin icon: resolve via QStandardPaths instead of theme name
- Fix desktop file icon: use absolute path to bypass stale system icon
2026-08-19 10:02:51 +02:00
Levi Neely 04bef4978c fix tests 2026-08-19 08:50:36 +02:00
Ollie Agent af478550a9 Wake OptMem before restored session turns 2026-08-18 14:04:27 +02:00
Ollie Agent 223a8f1235 remove plumber references 2026-08-18 13:32:43 +02:00
Ollie Agent bf262cba16 manage namespace directory lifecycle 2026-08-18 13:31:52 +02:00
Ollie Agent 7acaebdaaa add generic sandbox interface 2026-08-18 13:22:52 +02:00
Ollie Agent 2ba9ba036c Document native Landlock and persist session yolo 2026-08-18 12:49:25 +02:00
Ollie Agent bdafc30022 replace landrun with native Landlock sandbox 2026-08-18 12:36:27 +02:00
Ollie Agent 45ad8c624e Synchronize toolsrv authentication state 2026-08-18 07:49:59 +02:00
Ollie Agent a8a6bb5204 Complete olliesrv fid synchronization 2026-08-18 07:47:46 +02:00
Ollie Agent cad1c6be9b Synchronize olliesrv fid read state 2026-08-18 07:45:02 +02:00
Ollie Agent 6c476f4fb8 Synchronize toolsrv fid state 2026-08-18 07:41:59 +02:00
Ollie Agent c111cbd0ca Stop persistent loop timers 2026-08-18 07:34:56 +02:00
Ollie Agent e24675b8fa Handle random generation errors 2026-08-18 07:31:52 +02:00
Ollie Agent 2ee9251b5a Clean up toolsrv startup socket failures 2026-08-18 07:29:34 +02:00
Ollie Agent 9bbb6b9152 Make toolsrv socket polling cancellable 2026-08-18 07:27:42 +02:00
Ollie Agent a9f4899ed3 Clean up toolsrv startup errors 2026-08-18 07:22:41 +02:00
Ollie Agent 1b934c43f4 Release empty registry agent state 2026-08-18 07:09:21 +02:00
Ollie Agent 6ef1fe52e0 Make process GC startup idempotent 2026-08-18 07:08:38 +02:00
Ollie Agent a1dc5b990e Bound toolsrv process completion notifications 2026-08-18 07:07:46 +02:00
Ollie Agent 4b86ad94ff Make bypass resolution atomic 2026-08-18 07:04:11 +02:00
Ollie Agent 1284a83b52 Discard cancelled bypass requests 2026-08-18 07:01:48 +02:00
Ollie Agent f41a580dad Tie event subscription to server context 2026-08-18 07:00:31 +02:00
Ollie Agent 7ec8583e06 Honor cancellation during compaction streams 2026-08-18 06:59:35 +02:00
Ollie Agent c6d9b4aa23 Bound agent prompt queues 2026-08-18 06:58:38 +02:00
Ollie Agent e01d578303 Bound agent chat and summary caches 2026-08-18 06:57:15 +02:00
Ollie Agent 6c1de81cf9 Bound agent result cache 2026-08-18 06:55:25 +02:00
Ollie Agent 062642dfd3 Bound parallel tool dispatch 2026-08-18 06:54:48 +02:00
Ollie Agent 6a8e897fa5 Bound asynchronous session work 2026-08-18 06:53:51 +02:00
Ollie Agent 6a4f83b5b2 Bound completed toolsrv process retention 2026-08-18 06:51:43 +02:00
Ollie Agent b6009f0f7a Reserve toolsrv process slots atomically 2026-08-18 06:50:02 +02:00
Ollie Agent 93e7f510b7 Prevent dismissing running processes 2026-08-18 06:45:23 +02:00
Ollie Agent d31d0661bd Drain remote toolsrv stderr until exit 2026-08-18 06:43:14 +02:00
Ollie Agent e24ed79355 Avoid keeper lock during process dialing 2026-08-18 06:41:34 +02:00
Ollie Agent 3c777667ff Fix paused session process lifecycle 2026-08-17 18:31:37 +02:00
Ollie Agent 701e9bcaad Prevent backend stream goroutine leaks 2026-08-17 18:27:35 +02:00
Ollie Agent 49e43248b0 Fix paused session resume lifecycle 2026-08-17 18:23:00 +02:00
Ollie Agent e1136fdb82 Cancel session context during close 2026-08-17 17:59:19 +02:00
Ollie Agent 16bf2115fa Cancel active agent work during shutdown 2026-08-17 17:57:14 +02:00
Ollie Agent 2599ccb4ac Clear stale agent actions on turn exit 2026-08-17 17:52:51 +02:00
Ollie Agent c5a8f18884 Close 9P fids during connection teardown 2026-08-17 17:51:08 +02:00
Ollie Agent 3ad431957c Fix background tool startup signaling 2026-08-17 17:48:23 +02:00
Ollie Agent 4ac3b2135a Reap toolsrv processes on shutdown 2026-08-17 17:45:29 +02:00
Ollie Agent 2352f2483a Close feed consumer resources 2026-08-17 17:42:30 +02:00