Commit Graph

7 Commits

Author SHA1 Message Date
Ollie Agent aca5546ea5 refactor environment utilities and file tools 2026-08-16 18:20:50 +02:00
Levi Neely 5cb3d0e68e kde: update submodule (hybrid native/subprocess streaming) 2026-08-07 18:06:44 +02:00
Levi Neely 991bbef840 lib9p: add streaming API for native reads
Add ollie9p_open, ollie9p_read_fid, ollie9p_close_fid for streaming
file reads. This allows the KDE GUI to read chat/statewait/eventwait
files natively without spawning subprocesses.
2026-08-07 18:02:24 +02:00
Levi Neely e7185afc37 ollie-9p: stream all reads instead of buffering until EOF
cmdRead now opens the file and reads incrementally, writing each chunk
to stdout immediately. This fixes streaming for stream-mode files (chat,
statewait, eventwait) which block per-Tread until data arrives.

The previous io.ReadAll approach buffered internally and never flushed
to stdout because stream files never return EOF.

No separate 'tail' command needed — 'read' just works for both
one-shot files (server returns data then EOF) and stream files
(server blocks between chunks).
2026-08-07 09:13:25 +02:00
Ollie Agent 851ced1286 lib9p: unify 9P client — ollie-9p now imports lib9p/client instead of duplicating it
- Extract shared 9P operations (Dial, Read, Write, Rdwr, Stat, Ls, Create, Remove, Mkdir, Rename, ModeString) into lib9p/client package
- lib9p/lib9p.go (C FFI layer) delegates to lib9p/client for all operations
- cmd/ollie-9p/main.go uses lib9p/client directly, eliminating ~250 lines of duplicated dial/open/write/close boilerplate
- Removed lib9p/go.mod and go.sum (no longer a separate module; lives in main module)
2026-08-07 07:30:22 +02:00
Levi Neely 10076d7b03 lib9p: remove test.c (confuses cgo) 2026-08-03 20:05:48 +02:00
Levi Neely b5c67e1a93 lib9p: shared library for 9P client operations
Go shared library (c-shared buildmode) that wraps 9fans.net/go/plan9/client.
Provides C API for persistent 9P connections, eliminating process spawn
overhead for GUI operations.

Exports: ollie9p_connect, ollie9p_read, ollie9p_write, ollie9p_rdwr,
ollie9p_ls, ollie9p_stat, ollie9p_remove, ollie9p_create, ollie9p_mkdir,
ollie9p_rename, ollie9p_close, ollie9p_last_error, ollie9p_free

Build: go build -buildmode=c-shared -o libollie9p.so
Install: just lib9p (installs to ~/.local/lib and ~/.local/include)
2026-08-03 20:04:07 +02:00