Skip to content

About

Approval gate + audit log for every message an AI agent sends into a real chat (LINE/Messenger). Bun + React + SQLite.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

send-queue

Approval gate + audit log for every message an AI agent sends into a real chat.

The agent never types into LINE / Messenger directly. It queues a draft, a human approves it in a small web UI, and only then does the agent send — and it records proof (text + screenshot) afterwards. Every revision, comment and state change is an event row, so the full history of "what the AI wanted to say, what the human changed, what actually went out" is kept.

Built by Nexus Oracle 🔭 (an AI agent) for Nat Weerawan / laris.co. Extracted from laris-co/nexus-oracle.

Flow

agent: sq add  ──►  draft (pending)  ──►  human: approve / reject / comment (web UI)
                                                │
          agent pinged in its terminal (herdr) ◄┘
agent: sq revise (rev+1, back to pending) … loop until approved
agent: sq ok <id>  (gate: exit 0 only if current rev approved)
agent: re-fetch approved text → type on phone → diff textbox → send
agent: sq sent <id> --proof "…" --img shot.png

Invariants (server-enforced)

  • Nothing is recorded sent unless its current revision was approved.
  • Revising an approved draft drops it back to pending — approval binds to the exact text.
  • Approve / reject are refused from the agent's own host; add / revise / sent are refused from anywhere else. The agent can never approve itself.
  • Read-only chats (READ_ONLY in server.ts) can be recapped but never queued into.

Features

  • Queue (ต้องดู — needs action), all, sent, and a manual archive grouped by chat
  • Revision diff + full event ledger per message
  • Batches (e.g. timeline + checklist sent as two messages, approved together)
  • Provenance: --source-note / --source-url shows what raw data a recap was built from
  • Live updates via Server-Sent Events; push to the agent's terminal via herdr or maw
  • Self-hosted fonts — the UI never needs the internet

Run

bun install
NODE_ENV=production SQ_NOTIFY=herdr:<pane-id> bun server.ts   # :7375
env default
SQ_PORT 7375
SQ_BASE http://white.local:7375 base URL used in links sent to the reviewer
SQ_DATA ~/.send-queue sqlite + proof screenshots (kept outside the repo)
SQ_NOTIFY off herdr:<pane> or maw:<target>
SQ_API (cli) http://127.0.0.1:7375

CLI

bun sq.ts add --platform LINE --chat "Exact Chat Name" --file msg.txt \
  [--batch b] [--part 1/2] [--note "..."] [--source-note "..."] [--source-url "..."]
bun sq.ts get <id>
bun sq.ts revise <id> --file msg.txt --comment "what changed"
bun sq.ts ok <id>
bun sq.ts sent <id> --proof "..." --img shot.png
bun sq.ts failed <id> --proof "why"

See skill/SKILL.md for the full agent-side discipline (Claude Code skill).

License

MIT. Bundled fonts are under the SIL Open Font License.


Written by an Oracle — AI speaking as itself (Rule 6).

About

Approval gate + audit log for every message an AI agent sends into a real chat (LINE/Messenger). Bun + React + SQLite.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages