Commit Graph

31 Commits

Author SHA1 Message Date
Levi Neely dd4e5a677a sh: Ctrl-C interrupts running turn instead of exiting 2026-05-08 14:45:02 +02:00
Levi Neely fb29487a1f revert chatwait changes in sh and acme frontends 2026-05-08 12:45:05 +02:00
Levi Neely ecbb9e240c use chatwait for responsive streaming in sh and acme frontends 2026-05-08 12:08:54 +02:00
Levi Neely ba8f7948bb s/sh: fix case patterns for argument-taking commands
Quoted '*' in rc switch cases is a literal character, not a wildcard.
Replace '/cmd *' patterns with /cmd?* so rc treats them as globs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-06 08:18:15 +02:00
Levi Neely 3186bb12f2 s/sh: replace readmulti with inline bash readline; fix /model feedback
Replace the Python raw-mode multiline hack (readmulti) with an inline
bash read -e loop using backslash continuation. Add show_new to display
the server response after /model, /agent, /backend cfg writes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-05 22:47:20 +02:00
Levi Neely 2c8e59e7f5 acme: add u/complete for AI ghost-text code completion
Adds a u/complete script that reads prefix/suffix from the current acme
window via dot position, submits a fill-in-the-middle prompt to ollie
via s/bfg, and writes the completion to a new ollie/complete window.

Also adds a minimal copilot agent config (no system prompt, no tools)
for use by u/complete, and wires both into the install target in mkfile.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-03 13:30:26 +02:00
Levi Neely dfabeab4a8 sh: fix is_idle for multi-word state values 2026-04-24 15:39:42 +02:00
Levi Neely a232925745 sh: multi-line input with C-j/C-m via readmulti 2026-04-24 15:38:38 +02:00
Levi Neely 963210ea6e scripts/s/sh: replace line with awk; remove sh.rc 2026-04-24 15:29:42 +02:00
Levi Neely e4b78b705a s/cleanup: kill idle sessions instead of removing done batch jobs
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 09:18:31 +02:00
Levi Neely 9e26eb0375 s/b: poll for session directory after creation
FUSE entry cache may not reflect the new session directory immediately
after the write to s/new returns. Poll until it appears, mirroring the
approach in s/sh.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 09:17:41 +02:00
Levi Neely 00155f28fc s/b: write s/new as single write() to avoid partial-KV parse failure
Bash's printf builtin issues one write() syscall per call; the server
processes each write independently, so the first write (name= only)
would fail the cwd-required check. Build the full KV string first,
then write once.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:48:58 +02:00
Levi Neely b3e0367078 fix s/bfg and s/bbg: reference s/b not s/job
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:44:48 +02:00
Levi Neely 57d164310c remove batch jobs; rename spec -> cfg; s/job -> s/b, s/q -> s/bfg, s/sched -> s/bbg
Batch jobs were a front-end concern. All one-shot query workflows now
compose session primitives via s/b (engine), s/bfg (foreground), and
s/bbg (background). Parallel execution is a shell loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 08:42:38 +02:00
Levi Neely 127e518dae frontends: update to spec file; remove individual session file reads
tui/session: IsIdle reads spec and parses state= key.
scripts/s/sh, sh.rc: add spec_get helper; is_idle, /cwd, /model,
/agent, /backend read via spec_get; writes go to spec as key=value.
el/ellie.el: ellie--state reads spec with string-match on state=.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 07:43:10 +02:00
Levi Neely f4c340c2cb unify s/ and b/ namespaces: batch jobs now live under s/
Option C implementation: single namespace with composable file tables.
Batch jobs are sessions with a reduced file set — the directory
contents declare the capability.

- core: SessionStore absorbs BatchStore; s/new detects batch format
- 9p: /b/ removed entirely; all routing through /s/
- scripts/b/* moved to scripts/s/*; paths updated
- subagent_spawn, optimize: /b/q -> /s/q
- scripts/b/ removed
2026-04-23 18:50:05 +02:00
Levi Neely 5457e3ba43 scripts/s/sh: port from bash to rc shell
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 20:29:30 +02:00
Levi Neely 2a741f50eb Fix s/sh display synchronization issue
Simplify the script to fix the timing/display problem where LLM responses
weren't shown in real-time and user typing wasn't echoed properly.

The fix:
1. Block on statewait file until agent leaves idle state
2. Stream chat output in loop while agent is not idle
3. Use simple tail -c +offset to read new chat content
4. Remove complex buffering logic and background processes

This resolves the issue where assistant responses would appear one prompt
late and user typing wasn't visible during LLM response generation.
2026-04-19 21:55:06 +02:00
Levi Neely 748337571f scripts/s/sh: statewait, stdin pipe, startup tail; bump tui
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 17:20:20 +02:00
Levi Neely e23c79c713 docs,prompts,scripts,tui,el: rename enqueue/dequeue to fifo.in/fifo.out; add *wait docs; bump submodules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-19 16:11:19 +02:00
Levi Neely 4202505704 elevation: add elevate_superpowers tool; remove frontend env injection from s/sh and submodules
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 20:07:10 +02:00
Levi Neely c06fed4503 env: inject session env via s/{id}/env; works on new and resumed sessions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 19:20:03 +02:00
Levi Neely ed2316c2d0 env: session-scoped env via -e flag; remove daemon-global env export
- s/sh: add -e VAR1,VAR2 flag to inject named vars from frontend env
  into session spec as env.NAME=VALUE lines
- s/sh: remove $MOUNT/env export loop (global env file removed)
- Bump core and 9p submodules

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 19:02:35 +02:00
Levi Neely 72eeff473a env: centralize daemon env management; add /mcp slash command to s/sh
- Bump core and 9p submodules for env refactor
- s/sh: export daemon env from $MOUNT/env on startup
- s/sh: add /mcp command

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 15:44:31 +02:00
Levi Neely 179a157c8b scripts/s/sh: implement all supported slash commands
Add explicit handlers for all session ctl commands (/stop, /kill,
/compact, /clear, /rn, /cwd) and session file r/w commands (/agent,
/model, /backend) and read-only queries (/models, /backends, /usage,
/ctxsz). Ctl commands now continue past the drain loop. /rn updates
local $id/$S after rename. Unknown slash commands print an error
instead of writing garbage to ctl.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 14:53:42 +02:00
Levi Neely 9da56b0622 scripts: rename s/job -> b/job; b/q and b/sched wrap b/job
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:14:14 +02:00
Levi Neely 718fabf500 scripts: use $0 for cmd name in q, sched, sh
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:12:00 +02:00
Levi Neely 11ee91cd5a scripts: use $0 for error/usage name in s/job
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:10:24 +02:00
Levi Neely 106bd6410e scripts: move optimize to u/ (utility) namespace
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:00:39 +02:00
Levi Neely 97297a6c76 scripts: move q and sched to b/ namespace
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:58:42 +02:00
Levi Neely a4ba0f9f9f scripts: organize by hosted namespace (scripts/s/)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:56:35 +02:00