feat: add reliable trigger and worker message blocks
Some checks failed
tamq-ci / test (push) Failing after 6s
Some checks failed
tamq-ci / test (push) Failing after 6s
Assistant: codex Assistant-Model: gpt-5.6-sol Assistant-Session: 01a03397-4d51-7fd1-8ff2-946eb22ea2bc
This commit is contained in:
parent
72f22a13f7
commit
17b6bd7ae7
25 changed files with 588 additions and 67 deletions
|
|
@ -16,6 +16,10 @@ state_hub_workstream_id: "3b675117-dd26-553f-adea-d0505df3cadd"
|
|||
|
||||
# Readable duplex messaging, runtime commands, and line limits
|
||||
|
||||
> Follow-up: `TAMQ-WP-0015` supersedes this workplan's single-line worker
|
||||
> output contract with blank-line-terminated worker message blocks and repeats
|
||||
> `From:` framing on every delivered physical line.
|
||||
|
||||
Replace the shell-oriented `@`/`#` protocol with a readable `To:`/`From:`
|
||||
protocol that can originate in either operator input or worker output, add an
|
||||
operator-only runtime command lane, separate input placement from submission,
|
||||
|
|
|
|||
106
workplans/TAMQ-WP-0015-reliable-trigger-and-worker-blocks.md
Normal file
106
workplans/TAMQ-WP-0015-reliable-trigger-and-worker-blocks.md
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
---
|
||||
id: TAMQ-WP-0015
|
||||
type: workplan
|
||||
title: "Reliable trigger delivery and worker message blocks"
|
||||
domain: communication
|
||||
repo: tmux-amq
|
||||
status: finished
|
||||
owner: codex
|
||||
topic_slug: reliable-trigger-worker-blocks
|
||||
created: "2026-08-25"
|
||||
updated: "2026-08-25"
|
||||
---
|
||||
|
||||
# Reliable trigger delivery and worker message blocks
|
||||
|
||||
Correct first-delivery and trigger behavior for interactive terminal programs,
|
||||
allow agents to emit practical multi-line message blocks, and give repository
|
||||
workers a concise introduction that matches the implemented protocol.
|
||||
|
||||
## Diagnose first delivery and trigger submission
|
||||
|
||||
```task
|
||||
id: TAMQ-WP-0015-T01
|
||||
status: done
|
||||
priority: high
|
||||
```
|
||||
|
||||
Compare durable live history with the terminal delivery path. Distinguish queue
|
||||
admission, tmux placement, terminal paste detection, and agent acknowledgement.
|
||||
|
||||
### Evidence
|
||||
|
||||
- Live history showed the reported trigger message reached durable state
|
||||
`injected` within roughly 40 ms but did not start an agent turn.
|
||||
- Trigger previously sent literal text and Enter in one immediate tmux command
|
||||
list, matching the receiving TUI's paste/newline behavior.
|
||||
- Endpoint registration occurred as soon as the PTY proxy was ready, without a
|
||||
foreground-program initialization grace.
|
||||
|
||||
## Make trigger distinct and protect first delivery
|
||||
|
||||
```task
|
||||
id: TAMQ-WP-0015-T02
|
||||
status: done
|
||||
priority: high
|
||||
```
|
||||
|
||||
Delay the one trigger Enter beyond terminal paste detection and defer input-mode
|
||||
delivery briefly after endpoint registration. Retain pushy's no-Enter contract.
|
||||
|
||||
### Evidence
|
||||
|
||||
- Trigger now places text, waits 150 ms in the checked tmux command queue, and
|
||||
sends exactly one Enter; pushy still performs literal placement only.
|
||||
- Pushy and trigger wait a configurable one-second endpoint startup grace.
|
||||
- A real tmux paste-sensitive fixture classifies immediate Enter as a newline
|
||||
and the new trigger sequence as one submission.
|
||||
|
||||
## Collect worker output through an empty line
|
||||
|
||||
```task
|
||||
id: TAMQ-WP-0015-T03
|
||||
status: done
|
||||
priority: high
|
||||
```
|
||||
|
||||
Treat a worker `To:repo:` row as the beginning of a block. Append subsequent
|
||||
non-empty worker rows and admit one durable message at an empty row, a new
|
||||
address, or process exit.
|
||||
|
||||
### Evidence
|
||||
|
||||
- PTY normalization emits empty CRLF rows and infers visual empty rows from
|
||||
forward cursor gaps in full-screen interfaces.
|
||||
- Continuation presentation indentation is removed and durable bodies retain
|
||||
newline boundaries.
|
||||
- Delivery repeats the non-routable `From:` envelope on every physical line,
|
||||
preventing a continuation from feeding back into routing.
|
||||
- A real tmux/PTY test routes a cursor-positioned, bullet-framed worker block
|
||||
with a continuation and correct `worker_output` provenance.
|
||||
|
||||
## Align introductory documentation and verification
|
||||
|
||||
```task
|
||||
id: TAMQ-WP-0015-T04
|
||||
status: done
|
||||
priority: medium
|
||||
```
|
||||
|
||||
Review the introduction produced during the audit-core/flex-auth conversation,
|
||||
make a concise canonical copy in this repository, and align README/SCOPE/CLI
|
||||
behavior with the revised protocol.
|
||||
|
||||
### Evidence
|
||||
|
||||
- `TamqMessagingIntroduction.md` now leads with the protocol, blank-line rule,
|
||||
delivery modes, provenance, agent behavior, and state-based troubleshooting.
|
||||
- The reviewed document is mirrored to the original untracked audit-core path.
|
||||
- Direct `tamq send` now shares case-insensitive `To:` parsing with managed
|
||||
terminals.
|
||||
- `make check` passes 166 tests, including real tmux and PTY coverage.
|
||||
|
||||
## Residuals
|
||||
|
||||
Bounded retry and positive acknowledgement semantics remain owned by
|
||||
`TAMQ-WP-0003`; this work does not claim that `injected` means agent-processed.
|
||||
Loading…
Add table
Add a link
Reference in a new issue