Finalize inbox artifacts and error protocol

This commit is contained in:
2026-03-19 03:25:06 +08:00
parent c3314cd9cf
commit f315d2330d
22 changed files with 659 additions and 86 deletions
+3 -4
View File
@@ -45,6 +45,9 @@ func newWaitReplyCmd(root *rootOptions) *cobra.Command {
if err != nil {
return err
}
if !result.Woke {
return protocol.NoMatchingWork("no matching reply before timeout")
}
data := map[string]any{
"woke": result.Woke,
@@ -63,10 +66,6 @@ func newWaitReplyCmd(root *rootOptions) *cobra.Command {
if root.json {
return protocol.WriteJSON(cmd.OutOrStdout(), resp)
}
if !result.Woke {
_, err = fmt.Fprintln(cmd.OutOrStdout(), "wait-reply timed out")
return err
}
_, err = fmt.Fprintf(cmd.OutOrStdout(), "reply received on thread %s at event %d\n", result.Message.ThreadID, result.NextEventID)
return err