Skip to main content

taskfast_cli/cmd/events/
ack.rs

1// SPDX-License-Identifier: MIT
2//! `taskfast events ack <id>` — retired; points callers at
3//! `events stream --ack-stdin`.
4//!
5//! The server has no HTTP ack route: acks are accepted only as an `ack`
6//! message on the stream's own WebSocket, and a second socket would
7//! disconnect the stream (one socket per agent). See [`super::stream`].
8
9use clap::Parser;
10
11use super::super::{CmdError, CmdResult};
12
13#[derive(Debug, Parser)]
14pub struct AckArgs {
15    /// Event id from the live stream (UUID).
16    pub event_id: String,
17}
18
19pub fn run(args: AckArgs) -> CmdResult {
20    Err(CmdError::Usage(format!(
21        "`events ack` is not supported: the server only accepts acks on the \
22         event stream's own socket. Run `taskfast events stream --ack-stdin` \
23         and write `{}` to its stdin after handling the event.",
24        args.event_id
25    )))
26}