docs: update all references from eventwait to event
This commit is contained in:
parent
25d7fbfc5b
commit
f86c8d3cdc
|
|
@ -100,7 +100,7 @@ Ollie is **experimental and unstable** software. The features and API are approa
|
|||
|
||||
This is a standing preference, not a per-task instruction. Apply it without asking.
|
||||
## Architecture (key concepts)
|
||||
1. **One integration surface**: `olliesrv` exposes sessions and agents through a 9P2000 filesystem. Frontends include `o`, `ollie-9p`, KDE, Kate, Emacs, and scripts. Reads from `chat`, `statewait`, `eventwait`, and `feed` provide blocking/event-driven synchronization.
|
||||
1. **One integration surface**: `olliesrv` exposes sessions and agents through a 9P2000 filesystem. Frontends include `o`, `ollie-9p`, KDE, Kate, Emacs, and scripts. Reads from `chat`, `statewait`, `event`, and `feed` provide blocking/event-driven synchronization.
|
||||
2. **Session and tool processes**: Each session owns an agent runtime in `olliesrv` and a separate `toolsrv` process. They communicate over an authenticated Unix socket using 9P. `toolclient` can respawn local toolsrv processes and can deploy/start toolsrv remotely over SSH with socket forwarding.
|
||||
3. **Agent loop** (`cmd/olliesrv/internal/agent/`): The agent package is organized by concern:
|
||||
- `loop.go`: Main loop — stream LLM, execute tools, update history
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
//
|
||||
// # Blocking Reads
|
||||
//
|
||||
// Files like statewait and eventwait block until their condition is met.
|
||||
// Files like statewait and event block until their condition is met.
|
||||
// This is the primary coordination mechanism — clients read these files
|
||||
// in a loop to react to state changes.
|
||||
//
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ func buildTreeSpec(cfg *Config) virtfs.FsNodeDecl {
|
|||
treeSpecUID = u.Username
|
||||
}
|
||||
|
||||
// Event subscription for eventwait (lives for server lifetime).
|
||||
// Event subscription for event (lives for server lifetime).
|
||||
eventRead, eventSignal := session.EventStream(session.SubscribeEvents(cfg.Ctx, "*"))
|
||||
|
||||
return virtfs.DirNode("/",
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ A 9P filesystem client can mount the namespace when the platform provides a 9P m
|
|||
| `help` | r | Generated filesystem reference. |
|
||||
| `aliases` | r | Stable ID-to-path mappings. |
|
||||
| `ctl` | rdwr | Server controls such as `invalidate` and `kill`. |
|
||||
| `eventwait` | r | Blocking server-event stream. |
|
||||
| `event` | r | Blocking server-event stream. |
|
||||
| `generate` | rdwr | One-shot LLM request. |
|
||||
| `session/` | dir | Session collection. |
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ Control files use request-response semantics: write one command, then read the r
|
|||
## Plan 9 interaction patterns
|
||||
|
||||
- **Control files:** writes express operations such as stop, kill, rename, compact, and reload.
|
||||
- **Blocking reads:** `statewait`, `eventwait`, `feed`, and streaming chat replace event subscriptions with ordinary reads.
|
||||
- **Blocking reads:** `statewait`, `event`, `feed`, and streaming chat replace event subscriptions with ordinary reads.
|
||||
- **Stateless request/response:** `generate`, `ctl`, and `rdwr` files accept a request and return a result.
|
||||
- **Change detection:** `feed` does not wake readers for identical consecutive data.
|
||||
- **Shared namespace:** multiple clients can inspect and modify the same sessions concurrently.
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ The entire namespace is declared in a single `FsNodeDecl` tree in `fs/spec.go`:
|
|||
```go
|
||||
var treeSpec = Dir("/",
|
||||
Leaf("backends", 0444, Read(readBackends), GID("agent")),
|
||||
Leaf("eventwait", 0444, Read(readEventwait), Stream(blockEventwait), GID("agent")),
|
||||
Leaf("event", 0444, Read(readEvent), Stream(blockEvent), GID("agent")),
|
||||
Leaf("complete", 0666, Request(requestComplete), GID("agent")),
|
||||
// ...
|
||||
Dir("session", GID("agent"),
|
||||
|
|
@ -559,18 +559,18 @@ Following the EDSL conversion, the 9P protocol server itself
|
|||
- `main.go` simplified as bypass tree wiring moved to `fs/`
|
||||
- Server is now a thin 9P2000 protocol translator, not a filesystem
|
||||
|
||||
## Phase 17: Eventwait Redesign & Chat Log Format (Aug 2)
|
||||
## Phase 17: Event Redesign & Chat Log Format (Aug 2)
|
||||
|
||||
### Global /eventwait
|
||||
### Global /event
|
||||
Replaced per-session event polling with a global event ring buffer and a
|
||||
single `/eventwait` file. Events carry structured prefixes and delta descriptions:
|
||||
single `/event` file. Events carry structured prefixes and delta descriptions:
|
||||
- `S new session/<name>` — session created
|
||||
- `S kill session/<name>` — session destroyed
|
||||
- `S rename session/<old> session/<new>` — session renamed
|
||||
- `A kill session/<name>/agent/<aid>` — agent killed
|
||||
|
||||
The event ring is a fixed-size circular buffer (100 slots) with a `sync.Cond`
|
||||
for blocking reads. Frontends block on `/eventwait` and receive deltas since
|
||||
for blocking reads. Frontends block on `/event` and receive deltas since
|
||||
their last known offset. No polling, no timer, no D-Bus.
|
||||
|
||||
Fixes along the way:
|
||||
|
|
@ -608,7 +608,7 @@ The KDE frontend received extensive updates across both days:
|
|||
- **Double-click rename** — inline renaming of agent nodes
|
||||
- **Robust session loading** — loads sessions on startup, handles empty state
|
||||
- **Context menu** — kill session, per-session operations
|
||||
- **Eventwait-driven updates** — replaced timer-based polling with blocking `/eventwait`
|
||||
- **Event-driven updates** — replaced timer-based polling with blocking `/event`
|
||||
- **Fence fix** — fixed a bug where code fences could eat surrounding content
|
||||
- Removed D-Bus entirely; all communication via `9p` plan9port binary
|
||||
|
||||
|
|
@ -620,7 +620,7 @@ The KDE frontend received extensive updates across both days:
|
|||
├── models model list (cached)
|
||||
├── agents agent config list
|
||||
├── ctl root control (invalidate, kill)
|
||||
├── eventwait global event stream (blocking read)
|
||||
├── event global event stream (blocking read)
|
||||
├── complete request-response: code completion
|
||||
├── generate request-response: one-shot LLM generation
|
||||
├── route request-response: model routing
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void Lib9pStreamer::Worker::run()
|
|||
return;
|
||||
}
|
||||
if (n == 0) {
|
||||
// EOF — normal for statewait/eventwait after returning data
|
||||
// EOF — normal for statewait/event after returning data
|
||||
emit finished(true, QString());
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
* NativeStreamer - Streaming file reader using ollie-9p subprocess.
|
||||
*
|
||||
* Uses ollie-9p subprocess for streaming reads (blocking wait files like
|
||||
* chat, statewait, eventwait). The native library is used for request/response
|
||||
* chat, statewait, event). The native library is used for request/response
|
||||
* operations, but subprocess is needed for streaming because:
|
||||
* - Blocking reads in Go can't be interrupted by closing the fid
|
||||
* - Subprocess can be killed cleanly
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Ollie9pClient::Ollie9pClient(QObject *parent)
|
|||
}
|
||||
});
|
||||
|
||||
// Event stream — looping, reads server eventwait for session/agent events.
|
||||
// Event stream — looping, reads server event for session/agent events.
|
||||
m_event = new Lib9pStreamer(Lib9pStreamer::Looping, this);
|
||||
connect(m_event, &Lib9pStreamer::dataReady, this, [this](const QByteArray &data) {
|
||||
// Events may come in batches separated by newlines
|
||||
|
|
@ -169,7 +169,7 @@ QString Ollie9pClient::sessionConnectionColor(const QString &sessionId) const
|
|||
return "gray";
|
||||
}
|
||||
|
||||
// handleEvent processes a single event from eventwait.
|
||||
// handleEvent processes a single event from event stream.
|
||||
// Event format: "topic payload" where topic is "session.{sid}.{action}" or
|
||||
// "session.{sid}.agent.{aid}.{action}"
|
||||
// Optimized for the hot path: agent.state changes
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
#include "lib9pstreamer.h"
|
||||
|
||||
// 9P-based client for ollie. Uses native libollie9p for all operations.
|
||||
// Streaming files (chat, statewait, eventwait) use Lib9pStreamer threads.
|
||||
// Streaming files (chat, statewait, event) use Lib9pStreamer threads.
|
||||
class Ollie9pClient : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -150,7 +150,7 @@ private:
|
|||
// Native streaming readers
|
||||
Lib9pStreamer *m_chat = nullptr; // Guarded — reads agent chat log
|
||||
Lib9pStreamer *m_state = nullptr; // Guarded — reads agent statewait
|
||||
Lib9pStreamer *m_event = nullptr; // Looping — reads server eventwait
|
||||
Lib9pStreamer *m_event = nullptr; // Looping — reads server event
|
||||
};
|
||||
|
||||
#endif // OLLIE9PCLIENT_H
|
||||
Loading…
Reference in New Issue