Skip to content

Fix folder names with ' $ !, form focus trap, 6h/8h stop options - #4

Merged
bmanturner merged 3 commits into
bmanturner:mainfrom
roverdude24:fix/path-quoting-focus-stops-docs
Nov 6, 2026
Merged

bmanturner merged 3 commits into
bmanturner:mainfrom
roverdude24:fix/path-quoting-focus-stops-docs

Conversation

@roverdude24

@roverdude24 roverdude24 commented Nov 5, 2026 •

Copy link
Copy Markdown

Three small commits, one change each, each with a test in test/ (bun run test: 35/35 pass).

  1. Folders with ', $ or ! are accepted. cwd only reaches Tern as the tern new --cwd argv element (no shell), so only control characters are refused now. Verified live with /Volumes/VINH MAC/VINH's WORKS/…/084 MAPPING - TPHCM NOV 22-24: job saved, run's omp session cwd is that folder.
  2. Form focus trap. Tab was swallowed by the Prompt editor, and Tern's overlay editor swallows clicks, so only ctrl+enter left it. Tab/shift+Tab now leave the editor keeping its text (hint line shows ⇥ next); a click on another row ends a single-line edit.
  3. Stop after offers 6 hours and 8 hours (validator already allows 8h).

Built and tested on Tern as installed (0.9.9 per AGENTS.md). No version bump or CHANGELOG entry; happy to add one if you want.

Vinh Lam Phuoc added 3 commits November 5, 2026 21:05
cwd only reaches Tern as the `tern new --cwd` argv element (no shell text),
so only control characters are refused now.
Tab/shift+tab leave the prompt editor keeping its text (it swallowed Tab), and
a click on another row finishes an open text edit instead of being ignored.
@bmanturner

Copy link
Copy Markdown
Owner

Hey @roverdude24 thanks for the PR. Would you mind dropping the Docs commit? I'll flesh it out so that we're not just re-using Carly's message kind and can have a dedicated public surface for registering scripts.

@roverdude24
roverdude24 force-pushed the fix/path-quoting-focus-stops-docs branch from b3f9827 to 59cf5c7 Compare November 5, 2026 23:12
@roverdude24 roverdude24 changed the title Fix folder names with ' $ !, form focus trap, 6h/8h stop options; document headless job drop Fix folder names with ' $ !, form focus trap, 6h/8h stop options Nov 5, 2026
@roverdude24

roverdude24 commented Nov 5, 2026 •

Copy link
Copy Markdown
Author

Sure, dropped it. Here's what I had in case it's still useful for you:

README section

From a script or another agent

Drop one JSON file into the data folder's intents/ directory (see Your data); Agent Scheduler picks it up within a second, creates the job exactly as Carly would (same checks as the manager, default approval, marked by Carly) and deletes the file. Tern must be running.

D="$HOME/Library/Application Support/Tern/plugin-data/tern-agent-scheduler"
REPLY=$(LC_ALL=C tr -dc a-z0-9 </dev/urandom | head -c 12)
F="$D/intents/$(date +%s)000-agent-0001.json"
mkdir -p "$D/intents"
cat >"$F.tmp" <<EOF
{"format": 1, "kind": "carly_create", "reply": "$REPLY",
 "name": "standup-notes", "prompt": "Summarise yesterday's commits.",
 "when": "weekdays 9am", "folder": "$HOME/Dev/app"}
EOF
mv "$F.tmp" "$F"   # write then rename, so a half-written file is never read
sleep 2; cat "$D/replies/$REPLY.json"
  • File name: <digits>-<letters or digits>-<digits>.json; files are applied in name order. Anything else in intents/ is ignored.
  • Fields: format (1), kind ("carly_create"), reply (12 lowercase letters or digits), prompt and when (required), folder (full path or ~/…), and optionally name (else taken from the prompt), role, quiet_ok and only_when (as for Carly). expires (unix seconds) drops the request if it isn't applied by then.
  • Answer: replies/<reply>.json holds {"ok": true, "job_id": …, "name": …, "next": …} or {"ok": false, "error": "…"}, the same message the form would show.

There's a test for it too in b3f9827 on my fork. One thing I noticed while trying it: jobs made this way show up as "by Carly" and run Hands-off, so a script kind might want its own label.

@bmanturner

Copy link
Copy Markdown
Owner

New work documented here

@bmanturner
bmanturner merged commit d45614d into bmanturner:main Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants