package protocol // Dismissing operator shell commands. Dismissal is per chat, for every client: // a dismissed run leaves every chat_shell_runs readback and every watcher // receives a chat_shell_run_event with Dismissed set. A running command cannot // be dismissed. For ChatShellRunUndoWindow after a dismissal the run can be // restored (chat_shell_restore); after that the server purges its command, // output and error, keeping only a tombstone whose id chat_shell_runs reports // in ChatShellDismissed so a client that missed the event drops the card. const ( // ChatShellDismiss dismisses the finished runs named in // ChatShellRunRequest.RunIDs; the reply lists those it dismissed in // ChatShellDismissed (running, unknown and already dismissed runs are // skipped). ChatShellDismiss = "chat_shell_dismiss" // ChatShellRestore undoes a dismissal still inside its undo window; the // reply carries the restored runs (with their list output tail) in // ChatShellRuns, and every watcher receives their lifecycle frames. ChatShellRestore = "chat_shell_restore" // ChatShellRunUndoWindow is how long, in milliseconds, a dismissed run is // kept restorable before its output is purged. It is longer than the // clients' Undo notice so a late Undo still succeeds. ChatShellRunUndoWindow = 30_000 // ChatShellDismissLimit bounds the run ids of one request. ChatShellDismissLimit = 200 )