Files
splinter/plugins/kids
Konrad 8682f97759 splinter: one ack mechanism, any channel, any process answers
Approval was a prompt on stdin: the terminal could answer, a phone could not, and
in the TUI the whole path was dead code that failed closed.

Now a request is two files:

  ~/.splinter/ack/pending/<id>   the request (tool, args, why, expiry)
  ~/.splinter/ack/<id>.answer    the answer (yes/no plus who)

The blocked process waits on the file and nothing else. Channels are notifiers -
a command per channel pushes the request out - and whoever reads the reply drops
the answer: the gateway, a phone, a script, another terminal. No second poller,
no lost Telegram updates, no special case per channel.

  SPLINTER_ACK_CHANNELS=...   comma separated commands, each gets the request
  SPLINTER_ACK_TTL=120          seconds; a timeout is a no
  splinter --ack <id> yes|no    answer from anywhere
  splinter --ack-list           what is waiting

The terminal is one more channel, not a special case: a thread reads stdin and
drops the answer, while the main path waits on the file like everybody else. Kid
mode uses the same mechanism instead of its own command.

Verified: tests/test_ack.c, 7 checks - request, yes, no, who answered, timeout is
a no, answering a request that does not exist fails, and the pending list shows
the arguments. make check runs it with the other 21.
2026-11-08 16:55:27 +00:00
..