Commit Graph

33 Commits

Author SHA1 Message Date
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 4a037c0bbe refactor: remove dead code from embedding/virtfs/skills (-108 lines)
embedding/embedding.go:
- Remove EmbedBatch() (never called in production, test updated to use Embed)
- Remove padID field (written but never read)

embedding/index.go:
- Remove Index.mu mutex (Index is immutable after construction)

skills/skills.go:
- Remove Index.All() (never called)
- Remove Index.Reload() (never called)

virtfs/decl.go:
- Remove RemoveNode() NodeOption (never used)
- Remove RenameNode() NodeOption (never used)
- Remove Alias() NodeOption (aliases set directly on struct)

virtfs/tree.go:
- Remove Tree.Data field (never used)
- Remove Tree.Mount() (never called in production)
- Remove Tree.Child() (never called in production)
- Remove Tree.Children() (never called in production)
- Replace indexOf() with strings.IndexByte

Tests updated to directly manipulate internal children map where needed.
2026-08-21 17:20:13 +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
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
Ollie Agent 8152dec075 all: delete dead code, tighten API surface
toolsrv:
- Delete WithOnClose, WithOnEnvSet, SetOnExit (dead Options)
- Delete ListDetached, ListDetachedInfo (only ListDetachedRaw used)
- Delete Execute (dead wrapper)
- Delete CWD, ToolRegistry, SessionID, InjectContent (dead accessors)
- Delete ExecuteInSandbox, ExecuteElevated (zero external callers)
- Delete Summaries, RefreshLoaded from Registry (dead)
- Delete DialSSH (alias for RemoteDial)
- Simplify Dial: takes socket string directly, kill Addr/LocalAddr/SSHAddr
- Rename Server receiver e → s
- Unexport context import (no longer needed in tools.go)

session:
- Delete SaveFuncs, AgentAt, AgentCount, NextUncheckedStep
- Delete SetDisallowTools, SaveAllSessions

env:
- Delete Set, Get, All, Format, managed (dead exports)
- Unexport LoadFile → loadFile

fs:
- Delete HandlerCtx.ToolReg, Skills, SaveFn (never read by handlers)
- Delete Config.MkdirAll, Config.SkillsRegistry (dead plumbing)
- Delete AgentLog: Plan, SetPlan, PrevPrompt, Mu, LogInfo, Remote methods
- Delete unused type aliases (NodeOption, FileTree, FileConfig, etc.)

backend:
- Delete ClosePool, PoolStats (dead), New() (dead)
- Delete kiroTokenExpiringSoon standalone func (dead)
- Unexport SharedTransport/SharedClient → sharedTransport/sharedClient

skills:
- Delete entire package (zero importers; feature works via tool scripts)

agent:
- Delete BroadcastChange (dead duplicate of notifyChange)
- Delete HasHistory, ToolCallCount, CompactionModel, SetCompactionModel
- Unexport SetReply, BuildPreamble, DefaultPromptsDir
2026-08-08 15:51:13 +02:00
Ollie Agent 2bd6d6f66a Remove OLLIE_*_PATH env vars: paths follow ~/.config/ollie/ convention
- Stripped OLLIE_TOOLS_PATH, OLLIE_AGENTS_PATH, OLLIE_SKILLS_PATH,
  OLLIE_PROMPTS_PATH, OLLIE_MEMORY_PATH, OLLIE_TMP_PATH from managed
  list and defaults in env.go
- ToolsPath(), SkillsPath(), PromptsDirs(), AgentsDirs(), ollieTmpDir()
  now derive from paths.CfgDir()/paths.DataDir() directly
- Removed shell-exec fallback from resolveExecPrompt() — only file
  resolution remains
- Cleaned up env_test.go to match reduced managed set
- Updated stale comments referencing /home/lkn/.config/ollie/tools
2026-08-05 19:37:13 +02:00
Ollie Agent 9b6ddb7df1 flatten: absorb submodules into single Go module
- Remove submodules: core, 9p, acme, httpgw, remote, el
- Keep submodules: kde, webui (separate build systems)
- Collapse core/ packages into root: agent/, backend/, detach/, elevate/,
  env/, log/, paths/, sandbox/, session/, skills/, tools/, toolsrv/
- Collapse 9p/ packages: fs/session/, mount/, dbus/, cmd/olliesrv/
- Move binaries: acme/ → cmd/Ollie/, httpgw/ → cmd/ollie-httpgw/,
  remote/ → cmd/ollie-remote/, 9p/cmd/ollie-9p/ → cmd/ollie-9p/
- Move data: agents/, prompts/, tools/, scripts/, skills/ → contrib/
- Move services/ → contrib/services/, experiments/ → doc/experiments/
- Delete .beads/, .claude/, .kiro
- Single go.mod at root (module ollie)
- Fix all import paths, merge fs/ + session/ packages
- Extract dbus/ and elevate/notify.go from 9p server package
- Update justfile for new paths and single-module build
2026-07-30 18:57:51 +02:00
Ollie Agent 1ffff02565 move prompts/ and skills/ to repo root
Shared agent/tool prompts and skills now live at the top level rather
than duplicated across frontends. Frontend-specific system prompts
remain in their respective dirs (kde/prompts/, dbus/prompts/).
2026-07-19 12:08:15 +02:00
Ollie Agent d3aa756544 move prompts/skills/tools into 9p/ and kde/ submodules
- prompts/, skills/, tools/ removed from monorepo root
- 9p/: gains prompts/skills/tools with 9P filesystem API (unchanged)
- kde/: gains prompts/skills/tools rewritten for D-Bus API
- mkfile: data target no longer installs prompts/skills/tools
- 9p/mkfile: install target now includes data (prompts/skills/tools)
- kde/Makefile: all target now includes data (prompts/skills/tools)
- SYSTEM_PROMPT_QWEN and SYSTEM_PROMPT_DEVSTRAL updated in both
  submodules to include the operational world model
2026-07-07 12:07:50 +02:00
Levi Neely 35518d9e22 update submodules 2026-05-20 16:46:44 +02:00
Levi Neely c19350cc60 update submodules 2026-05-20 10:43:33 +02:00
Ollie Agent 0de0b48bc9 Update core and skills submodules; revise SYSTEM_PROMPT 2026-05-18 22:21:13 +02:00
Levi Neely 81ed99f87a update skills 2026-05-08 13:22:07 +02:00
Levi Neely 2f1db75b02 docs: update documentation for recent refactor
- Package layout: add pkg/store, pkg/log, pkg/env, pkg/paths, pkg/skills
- System prompt: loaded from SYSTEM_PROMPT.md by Go, not agentSpawn hooks
- Tool prompts injected via preTurn hooks, not agentSpawn
- Sandbox config: single named config, not layered global+overlay
- Store interfaces: unified Store, remove ReadableStore/ReadWriteStore/BlobStore
- Fix batch status -> state in USAGE.md polling examples
- Fix enqueue -> fifo.in in session-management skill
- Fix 9p/internal/p9/server.go -> 9p/server.go (flattened)
- Remove stale sys-base, sys-ollie, sys-skills prompt file references
- Remove stale /pl references from 9p backing stores docs
2026-04-22 10:35:46 +02:00
Levi Neely 7b7335d596 bump skills: rc-shell updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 20:32:03 +02:00
Levi Neely 64b10b7226 doc: document offset file semantics
offset points to chat position after the last user prompt;
tail -c +$((offset+1)) yields the model response for that turn.
Replace stale reply references in prompts, help, ideas, and skills.
Document offset usage in concurrent sessions pattern and shell script.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 22:17:33 +02:00
Levi Neely 8aeefe43fa Merge branch 'remove-execute-pipe' 2026-04-16 21:40:09 +02:00
Levi Neely 12e15d4287 execute: unify execute_pipe into execute_code as pipeline primitive
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 21:36:41 +02:00
Levi Neely 846067ceb6 Merge branch 'remove-execute-tool' 2026-04-16 21:28:43 +02:00
Levi Neely 0ee9b79de5 execute: update submodules (execute_tool removal)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 21:18:24 +02:00
Levi Neely 44111ea4d5 skills: update submodule (execute-pipe skill) 2026-04-16 20:07:35 +02:00
Levi Neely 569e2918b9 chore: update skills submodule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 23:11:22 +02:00
Levi Neely 33e0c0d45d chore: update skills submodule
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 23:10:34 +02:00
Levi Neely 8a138f167c prompts: split SYSTEM_PROMPT.md into ordered p/ parts
- prompts/SYSTEM_PROMPT.md → prompts/00_base.md (remove conflicting tool-preferences bullet)
- prompts/01_reasoning.md — reasoning guidance
- prompts/02_memory.md — memory guidance
- prompts/03_task.md — task planning guidance
- prompts/04_edit-text.md — file_* tool guidance

These replace the hardcoded eager-loaded skills in core's systemPrompt().
Update core and skills submodule refs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 19:15:25 +02:00
Levi Neely 831e6f2788 update skills submodule: edit-text tools are mandatory
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 18:24:48 +02:00
Levi Neely 5686be7997 update submodules: edit-text skill, core eager-load
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:58:51 +02:00
Levi Neely de00ac1fcc rename OLLIE_9MOUNT → OLLIE throughout; update submodules
Tools, sandbox configs, docs, and skills all updated. $OLLIE is now
the canonical ollie root — cd $OLLIE goes directly to the FUSE mount.
Core now always injects $OLLIE into the execute env at session start.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:39:48 +02:00
Levi Neely 393ade6cab update submodules: task skill, eager-load task in system prompt
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 17:31:07 +02:00
Levi Neely 53ec22e2a2 update skills submodule: add memory skill
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:43:23 +02:00
Levi Neely 4d9550e9cf tools: add file_* and reasoning_think scripts; rename task tools
Add shell script implementations of file_read, file_write, file_edit,
file_grep, file_glob, reasoning_think. Rename task_plan.sh/task_complete.py
to task_plan/task_complete (shebang detection makes extensions unnecessary).

Update submodules: core, 9p, skills.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 15:26:42 +02:00
Levi Neely 7ebe4dcfb9 update submodule: add ollie-session-management skill
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 14:43:56 +02:00
Levi Neely fadf00b8ba submodules: update agent-skills (add shell-file-editing skill)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 16:17:46 +02:00
Levi Neely ebb0b80791 submodules: add agent-skills
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-11 16:13:47 +02:00