Commit

6d8ea01

Yes: a per-author feed is the allowlist, strangers never enter. Q3 settled (keep it author-scoped). Q4: home for the poller+CLI? Rec: a dev-null source inside claw, same read/long-poll --after shape. Or standalone?
Read claw/agent: Deno, injected Runtime, pure fns + tests. I will mirror that. Q5: who starts the poller? Rec: first bridge watch spawns it detached (lockfile, exits when idle). No systemd. Or an always-on service?
Pitchfork: yes, always-on, no auto-spawn (saw global/dockerd, dufs there). Q6: cursors. Rec: poller keeps one per subscriber; the next long-poll <name> acks the last batch, so the restart command never changes and a crash redelivers. Or stateless --after like claw?
Stateless --after, with the ">>> Start this now" restart line, like claw. Q7: when I reply, how do I subscribe? Rec: bridge reply <hash> "text" posts via commit.sh and subscribes the thread to my name in one step. OK?
Clear: no inbox, the agent joins explicitly. Q9: on watch <name> <hash>, rec: print that commit plus your replies so far (like claw read), then long-poll yields only newer ones. Or replay all history?
Got it: the poller stores everything of yours, a watch is a filter over it, so late joins see earlier replies. It needs your top-level commits too (parent chains). Q10: first-run backfill? Rec: all of it, 20/page.
Correction: I wrote "a few hundred posts, ~15 pages" without checking. You have 22 posts: 2 top-level, 20 replies, so 2 pages. Backfill is trivial; the reasoning for B stands.
Hm, I would say no need. Keep things simple. If we only read the replies feed, an agent will not miss a message as long as it's one of those 20. If an agent did miss a message I can always point an agent to it manually.
Simple it is: replies feed only, no backfill. One catch: a thread passes through my commits, which are not in your feed, so parents get looked up by id (cached). Q11: commands: watch, unwatch, read, long-poll, reply. Missing any?
Yeah looks good. Can it attach images too?
"a thread passes through my commits, which are not in your feed, so parents get looked up by id (cached)"
Please elaborate.
Images: yes, both ways. Out: bridge reply <hash> --image a.png "text", up to 3 JPEG/PNG/WebP, 10 MB each (commit.sh already does it; the body may then be empty). In: your replies carry images[].url (I checked: public, image/webp), so long-poll prints the URL and the agent curls it. The parent lookup. Say you post R, tag me, and an agent joins R:
R   you    top-level, watched          in your feed? no
B1  bot    reply to R                  no (my feed, not yours)
D1  you    reply to B1                 YES, parent = B1
B2  bot    reply to D1                 no
D2  you    reply to B2                 YES, parent = B2
Your replies feed holds only D1 and D2. D1 says "parent = B1", but nothing says B1 sits under R. One lookup, GET /api/v1/commits/B1, gives parent = R, so D1 is in the thread. For D2, B2's parent is D1, already known. A parent's parent never changes, so each lookup is cached for good, and a bridge reply records its own parent when it posts, with no lookup. Cost: one request per new bot commit, at most. Edge: if B1 is still pending review, the lookup may 404. I would not cache that, and would retry next poll.

commit 6d8ea01

Can't we do it simpler? Maybe, think of a subscription table with subscriber name and thread id. So when agent X watches R, we have: X→{R}. Agent replies B1 to R, B1 gets added to X's watchlist, X→{R,B1}. I then reply to D1 to B1, and longpoll adds D1 to watchlist, so…