Commit Graph

29 Commits

Author SHA1 Message Date
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 e3eb782be5 scripts: b/job parallel improvements — streaming results, input/output headers, -failfast
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 13:52:22 +02:00
Levi Neely 9de1baa197 scripts: add b/cleanup; update docs and mkfile
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:39:34 +02:00
Levi Neely ea58313f94 scripts: b/job accepts args as instruction and stdin as content when both present
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:36:05 +02:00
Levi Neely ab0b354132 doc: reorganize scripts README by namespace
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:15:36 +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 c43b9e5213 doc: add missing s/ls and s/kill sections to scripts README
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 12:01:13 +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
Levi Neely 4b630a76a8 doc: document optimize script and AI pipeline composition
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:43:01 +02:00
Levi Neely 1eda21b900 scripts: make optimize executable
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:31:07 +02:00
Levi Neely fc818dd28f scripts: add s/optimize — LLM prompt optimization pipeline
Generates N candidate optimized prompts in parallel, then judges and
returns the best. Accepts -cb/-cm for candidate model and -jb/-jm for
judge model, defaulting to OLLIE_BACKEND/OLLIE_MODEL for both stages.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:28:54 +02:00
Levi Neely a69f1cbc2b scripts: don't pass output= to server; formatting is client-side only
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:20:08 +02:00
Levi Neely e0b9f3ece7 scripts: replace -output with -json flag in oq and wrappers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:17:42 +02:00
Levi Neely 2ac6378c7e scripts: emit JSONL for -output json; plain newline only for text
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:15:18 +02:00
Levi Neely fe23dba7b3 scripts: ensure newline after each oq result
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:11:32 +02:00
Levi Neely c0f13ada3e scripts: add -help to s/q and s/sched wrappers
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:08:38 +02:00
Levi Neely e396ea15d2 scripts: add -help to osh and oq
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:07:06 +02:00
Levi Neely 7a4d5fc4c8 doc: document all s/ scripts (ls, kill, q, sched)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:06:32 +02:00
Levi Neely f984565082 scripts: add s/sh, s/job, s/q, s/sched, s/ls, s/kill to ollie filesystem
Install scripts to ~/.config/ollie/scripts/ (not ~/bin/) so they are
served via the 9p mount without PATH changes. Add thin wrappers oq-q
(s/q, foreground one-shot) and oq-schedule (s/sched, background with
b/ path output). Switch osh and oq from OLLIE_9MOUNT to OLLIE.
Update mkfile, docs, and submodule pointer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-18 11:06:05 +02:00
Levi Neely 57b037d238 oq: add -bg flag and trailing newline on exit
-bg submits the job and exits immediately, printing session id(s) for
later retrieval via b/<id>/result; implicitly enables -keep.
A trailing newline is printed on all exit paths via an EXIT trap.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 22:46:50 +02:00
Levi Neely 7f65ccf383 scripts/osh: fix write_new exit code
Brace group exit code was the last [ -n ] test, which returns 1 when
the variable is empty, triggering || die even on success. Adding true
as the final statement ensures a clean exit.
2026-04-16 19:39:06 +02:00
Levi Neely 59abf0fa7d scripts/osh: fix session creation and /kill
Replace write to defunct /ctl with s/new spec format. Add -name flag
so named sessions skip the post-write poll. Fix /kill to write to
s/{id}/ctl instead of the removed top-level ctl file.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 19:35:02 +02:00
Levi Neely 694a840c21 rename toys/ to scripts/
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-16 19:31:51 +02:00