Commit Graph

403 Commits

Author SHA1 Message Date
Ollie Agent 4e1961200a docs: update chat log docs for chat.raw stream and tool/bypass visibility
Add Phase 41 (live chat.raw stream vs log.raw snapshot) and Phase 42
(tool call / output / bypass rendering in log and chat) to evolution.md,
with the phase chart. Clarify the log/chat row descriptions in
architecture-9p.md and the chat.go role in architecture-core.md.
2026-10-10 16:08:39 +02:00
Ollie Agent a4972cd456 Separate chat persistence from live delivery via chat.raw
Streaming partials were appended to log.raw per chunk, each carrying the
full cumulative content, so one response left dozens of partial lines
persisted. GUI clients parsing the snapshot re-rendered the growing block
once per partial (O(N^2)) and replayed all historical partials on every
reconnect, causing intermittent rendering loops.

Partials are no longer persisted: AppendBlock writes only finalized
blocks to log.raw; SetPartial broadcasts the in-flight block without
storing it. New chat.raw StreamRaw file is the authoritative live JSONL
source (finalized history replay, then live deltas); log.raw is a
finalized-only one-shot snapshot. GUI streams chat.raw, never polls
log.raw.
2026-10-10 15:57:48 +02:00
Levi Neely 6cf283044e docs: add chat file to namespace documentation
- AGENTS.md: four views (log.raw, log, chat, block)
- system_prompt.md: add chat to agent file table
- architecture-9p.md: add chat to namespace table
- evolution.md: correct Phase 40 (chat not deleted)
2026-10-09 19:16:20 +02:00
Levi Neely c44c44dae3 doc: add Phase 40 (JSONL chat log format) to evolution.md 2026-10-09 18:53:59 +02:00
Levi Neely 57c40d541e Migrate chat log to JSONL format
Server changes:
- format/block.go: Block struct with JSONL marshaling, RenderBlock for text
- Deleted format/event.go, format.go, format_test.go (old delimiter format)
- agent/chat.go: Dual logs (rawLog JSONL + textLog rendered text)
- agent/chatlog.go: Streaming via flushPartial/closeBlock, skip internal events
- fs/spec.go: New files log.raw (JSONL), log (text), block (ID lookup)
- Removed chat/chat.raw/chat.search from namespace

GUI changes:
- chatblockmodel: JSONL parsing via QJsonDocument, removed regex state machine
- ollie9pclient: Read from log.raw for replay, removed old streaming code
- Added Context type to block enum, filter context/state/usage from display

Docs updated: AGENTS.md, system_prompt.md, architecture-*.md, scripts/o
2026-10-09 18:52:40 +02:00
Levi Neely e5759e43d2 doc: add Plan 9 plumber integration documentation 2026-10-09 14:07:40 +02:00
Levi Neely c8897b8251 doc: update usage.md and architecture-kde.md
- Document colon separator for session:agent
- Document agent-level bypass/approve/deny filtering
- Document !a !d !b shortcuts in prompt REPL
- Update tmux session naming to include agent
- Add Procs and Peers buttons to KDE GUI features
2026-10-09 13:09:13 +02:00
Levi Neely 1c02b50add proc events, bypass shortcuts, Kate session fix
Backend:
- Add proc.start/proc.exit events for background process lifecycle
- Add proc idx ctl command for machine-readable process listing (TSV)
- Add event.pub file for external event publishing
- Add ListProcsIdx to toolclient and toolsrv
- Fix bypass commands to use Setpgid for process group isolation

GUI:
- Add configurable bypass approval shortcuts (Ctrl+Y/Ctrl+N default)
- Add Keyboard Shortcuts section to Settings dialog
- Store shortcuts in theme.conf

Kate:
- Fix 'Start Session Here' - use rdwr for session/new endpoint
2026-10-07 14:22:44 +02:00
Levi Neely d65c06f27b implement namespace-bounded capability model
Per-agent file ownership with Unix permission enforcement:
- Agent directories owned by agent ID (UID), group 'agent' (GID)
- Private files (plan, ctl, fifo): mode 0600 - owner only
- Group-readable (chat, log): mode 0440 - owner + agent group
- World-readable (state, id): mode 0444 - observable by all
- Prompt: mode 0220 - CLI and owner can write

virtfs: fix UID/GID inheritance through nested paths
- Added findChildWithInheritance() to accumulate inherited UID/GID
- Stat now correctly shows agent ID as owner for nested files

server: admin bypass for server owner
- serverAdmin variable captures the Unix user running olliesrv
- Admin bypass includes empty uname, 'admin', or server owner

Documentation updates:
- fs/doc.go: 'The Namespace IS the Security Model'
- registry/doc.go: capability-based tool access
- peer.go: capability-based peer access
- lessons-learned.md: 'Model compliance is not a security boundary'
- architecture-9p.md: per-agent file ownership section

Security evaluation:
- Added experiments/security-eval/ with NERV attack corpus adaptation
- Test scripts for Landlock sandbox validation
- RESULTS.md documenting 0% ASR on hostile operations

This implements the NERV thesis: 'An agent can only access resources
explicitly bound into its namespace.' Enforcement is structural via
file permissions, not behavioral via model compliance.
2026-10-06 17:41:27 +02:00
Levi Neely 0744d9227a doc: update for bypass coordination and state indicators
evolution.md: add Phase 39, update timeline and size snapshot
event-topics.md: bypass events are per-agent, add resolved event
architecture-kde.md: document state dot and bypass indicator
usage.md: add bypass, approve, deny commands
2026-10-06 15:15:16 +02:00
Levi Neely c96ccd51e8 doc: simplify size table - focus on core runtime only
~25K core + ~15.7K KDE = ~40.7K interesting code.
Backends, prompts, skills, docs excluded from headline.
2026-10-06 12:59:53 +02:00
Levi Neely 53efc8945e doc: refine size snapshot to highlight core runtime vs boilerplate
Backend adapters (~8.3K) are mostly mechanical API glue.
Core runtime is ~25K lines (22K Go core + 3K compiled tools).
KDE adds another ~15.7K. The interesting logic is concentrated.
2026-10-06 12:59:20 +02:00
Levi Neely 83f51dffef doc: add Phase 38 (streaming rdwr, event filtering) and size snapshot
- Document streaming rdwr pattern for filtered event subscriptions
- Add current size table (~59,600 SLOC total)
- Record removal of statewait, bypasswait, feed files
- Update timeline with explicit tool loading and event filters
2026-10-06 12:57:46 +02:00
Levi Neely a90ca6b57c remove unused feed file and observer agent support
The feed file was documented but never used by any frontend
or script. The observer agent pattern was never adopted.

- Remove feed.go, FeedWrite, ConsumeFeed
- Remove WatchFeed constant
- Remove feed file from 9P namespace
- Remove ConsumeFeed goroutine spawns from session
- Update docs (architecture-9p, architecture-ide, architecture, usage)

The event stream now covers real-time observation patterns better.
2026-10-06 12:55:39 +02:00
Levi Neely b6d6d9e41e doc: add event topics reference 2026-10-06 12:45:18 +02:00
Levi Neely 86fbc90b43 server: remove statewait file, use event stream instead
The event stream with filtering replaces statewait:
- echo filter | rdwrs event

Removed:
- statewait file from agent namespace
- All non-historical references in docs and code

The state file remains for simple polling reads.
2026-10-06 12:44:02 +02:00
Levi Neely 7e7c29c900 docs: update to reflect event stream pattern over statewait
- AGENTS.md: simplified architecture description
- architecture-9p.md: examples use event stream with filtering
- usage.md: o tui and wiring examples use rdwrs event
2026-10-06 12:40:58 +02:00
Levi Neely 59f162a57e doc: document streaming rdwr pattern for filtered subscriptions 2026-10-06 12:35:10 +02:00
Levi Neely f86c8d3cdc docs: update all references from eventwait to event 2026-10-06 12:08:35 +02:00
Ollie Agent 72239fe3d5 kde: remove KF5/Qt5 support, build KF6/Qt6 only
Drop the OLLIE_KF5 CMake option and the entire Qt5/KF5 build branch;
delete KF5-only assets (99-ollie-kf5.sh, ollie-actions-kf5.desktop);
collapse all QT_VERSION_MAJOR and KTEXTEDITOR_VERSION_MAJOR conditionals
to the KF6 path in the KRunner, Kate, KIO, and GUI sources; update
Makefile, README, and docs. Verified: KF6 configure + full build of
ollie-gui, krunner_ollie, ollie_kate, kio_ollie.
2026-09-29 16:44:12 +02:00
Levi Neely 1159bd700a update AGENTS.md and architecture-core.md for agent package reorganization
AGENTS.md:
- Update Architecture section with detailed agent package file list
- Update Key Files table with new agent package files
- Add lesson 15: split by concern, not size

architecture-core.md:
- Update Package Map diagram with new files
- Add file responsibility table in Agent Loop section
- Reference compact.go in Session & Context section
2026-08-27 10:15:31 +02:00
Levi Neely e0ac54c0fb doc: update architecture docs for explicit tool autoLoad
- architecture-embedding.md: skills.Index → generic embedding.Index[T],
  tool index now per-turn from loaded tools, split source map entries
- architecture-tools.md: explain explicit autoLoad requirement, remove
  lazy loading mention
- evolution.md: add Phase 37 (lazy loading reversal, generic index,
  agent config alignment), add 4 dead-end entries
- lessons-learned.md: add 'Lazy tool loading is a dead end' section
- README.md: update line 88 to reflect explicit autoLoad

Reflects the removal of load-on-call tool loading (Phase 36 reversal)
and the separation of embedding/index.go as a generic type.
2026-08-21 10:43:58 +02:00
Ollie Agent 3f8c8df38a Improve workflow-aware tool ranking 2026-08-20 19:01:21 +02:00
Ollie Agent d33549eca1 Document one-tool capability bootstrap 2026-08-20 18:31:31 +02:00
Ollie Agent 28c76a76d4 Record architecture over prompting lesson 2026-08-20 17:45:29 +02:00
Ollie Agent a0636b88aa Document lessons from embedding discovery 2026-08-20 17:44:40 +02:00
Ollie Agent f407fa2604 Move embedding discovery to evolution log end 2026-08-20 17:42:54 +02:00
Ollie Agent ba91920a88 Document embedding discovery architecture 2026-08-20 17:41:56 +02:00
Ollie Agent 7bf9b6da9b Document embedding-guided discovery architecture 2026-08-20 17:38:13 +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 42685e1e93 docs: add Phase 34 (peers + consensus) to evolution.md 2026-08-19 17:32:33 +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
Ollie Agent 223a8f1235 remove plumber references 2026-08-18 13:32:43 +02:00
Ollie Agent a5cd5d36ed document compatibility roadmap 2026-08-18 13:28:30 +02:00
Ollie Agent c6257afc90 docs: link AnviLLM repository 2026-08-18 12:59:29 +02:00
Ollie Agent a8342e83fd docs: mark evolution introduction heading 2026-08-18 12:58:38 +02:00
Ollie Agent 0a6fbe7f44 docs: keep AnviLLM history professional 2026-08-18 12:58:16 +02:00
Ollie Agent c8bc9cdbe8 docs: connect Ollie evolution to AnviLLM research 2026-08-18 12:56:30 +02:00
Ollie Agent 2ba9ba036c Document native Landlock and persist session yolo 2026-08-18 12:49:25 +02:00
Ollie Agent 1915cf292d fix evolution phase numbering 2026-08-18 12:42:54 +02:00
Ollie Agent b7511eb089 document native Landlock evolution 2026-08-18 12:41:32 +02:00
Ollie Agent bdafc30022 replace landrun with native Landlock sandbox 2026-08-18 12:36:27 +02:00
Ollie Agent 09729a9149 Place Kate TUI workflow in Kate section 2026-08-18 12:23:32 +02:00
Ollie Agent 50f8919d9d Document Kate terminal TUI workflow 2026-08-18 12:23:11 +02:00
Ollie Agent fc6b9afd47 Clarify Kate chat ownership 2026-08-18 12:22:23 +02:00
Ollie Agent baf75702d1 Document Kate KDE GUI chat workflow 2026-08-18 12:21:22 +02:00
Ollie Agent 3cf98f2607 Demote Kate documentation heading 2026-08-18 12:19:32 +02:00
Ollie Agent 05b3e36767 Add Kate section to editor architecture 2026-08-18 12:19:15 +02:00
Ollie Agent 99c1a85603 Clarify editor architecture documentation 2026-08-18 12:17:26 +02:00
Ollie Agent 5069755aaa Add Ollie image to README 2026-08-18 11:43:35 +02:00