Commit Graph

13 Commits

Author SHA1 Message Date
Levi Neely 4aa815b50c server: add cost to readable session files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 18:14:34 +02:00
Levi Neely fee59a2f7c 9p: add 10s read timeout to all store read operations 2026-04-27 13:23:54 +02:00
Levi Neely b44ce18d54 server: dispatch handleWrite on empty writes from writable fids
Fids opened OWRITE or ORDWR with zero bytes written were silently
dropped on clunk — the old writeBuf-length guard prevented handleWrite
from being called, leaving the previous file content intact.

Track writable by open mode instead, and remove the blanket empty-input
early return in handleWrite. /s/new retains its own empty guard since
a zero-byte write there is meaningless.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-26 12:49:58 +02:00
Levi Neely fb4d76a3aa server, docs: remove batch jobs; rename spec -> cfg
BatchStore removed from server. s/new always creates an interactive
session. Filesystem layout updated: batch dirspec gone, cfg replaces
spec in session dirspec, s/job -> s/b, s/q -> s/bfg, s/sched -> s/bbg.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:41:46 +02:00
Levi Neely b432ba987c server: update mode mappings for spec; drop removed session files
spec is 0666; offset/statewait/systemprompt/models/ctxsz/usage are
0444 explicitly. Remove mode cases for state, backend, model, agent,
cwd, params, cwdwait, usagewait, ctxszwait. Update README.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:42:58 +02:00
Levi Neely 8d5be7212f 9p: remove /b/ namespace, batch jobs served via /s/
All /b/ routing removed from pathType, read, remove, handleWrite,
readDir, and makeStat. The batchStore field is gone from Server;
SessionStore now handles both session and batch job lifecycle.

-154 lines from server.go.
2026-04-23 18:49:45 +02:00
Levi Neely 9f5286c8b2 feat: add tail file mode to session makeStat 2026-04-22 12:29:35 +02:00
Levi Neely 2df001a5eb server: report content length for session files in stat
makeStat was missing a case for /s/{id}/{file} paths, so stat
reported Length=0 and clients (cat via 9pfuse) read zero bytes.
2026-04-22 09:38:33 +02:00
Levi Neely f411589519 server: adapt to Store+StoreEntry model
- Replace Get/Put calls with storeRead/storeWrite helpers
- Replace Wait calls with storeBlockingRead helper
- Wrapper types override Open instead of Get
- Use OpenStore for session/batch child stores
- All store fields typed as Store
2026-04-21 20:07:37 +02:00
Levi Neely ee1710b2cb server: use Open instead of JobStore/SessionFileStore
- FlatDirStore alias points to BlobStore
- Server fields use BlobStore for flat stores
- Replace JobStore/SessionFileStore with Open
- Type-assert for Wait/LogInfo where needed
- Rename store variable to sfs to avoid package shadowing
2026-04-21 19:03:19 +02:00
Levi Neely d5bc214bd0 server: delegate SessionFileStore construction to SessionStore
- Wire SaveTranscript into SessionStoreConfig
- sessionFileStore now calls sessionStore.SessionFileStore
2026-04-21 18:29:00 +02:00
Levi Neely d6bf477531 server: adapt to store storeConfig architecture
- FlatDirStore alias points to store.Store interface
- UtilStore/ExecStore/ToolStore embed interface not pointer
- NewFlatDirStore/NewSkillStore return interfaces
- Rename ChatInfo->LogInfo
2026-04-21 18:23:28 +02:00
Levi Neely 6936c1c959 flatten: merge internal/p9 into package main
Removes internal/p9/ directory. store.go and server.go merged into
root server.go alongside main.go. No logic changes.
2026-04-21 16:44:02 +02:00