Skip to content
Merged
18 changes: 17 additions & 1 deletion internal/cmd/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,23 @@ func newAppCommand() *appCommand {
Long: `Talk to the door the HEY app on this computer opens while "Let Agents Use HEY"
is on in its Settings, as a profile whose endpoint is the app does.

The door is a Unix socket at $XDG_RUNTIME_DIR/hey/agent.sock, or HEY_LOCAL_SOCKET.`,
The door is a Unix socket at $XDG_RUNTIME_DIR/hey/agent.sock, or HEY_LOCAL_SOCKET.

A profile whose endpoint is the app ({"endpoint": "app"} in hey profile list --json)
is answered by the app, never by HEY's server, and needs no sign-in. On it:

hey box view imbox|feed|sent|spam rows by kind: topic (read by its topic_id),
bundle (lists its threads), world_post, and in
Sent sending, a message on its way, with no thread
hey screener list|history sender ids, with what each waiting sender sent
hey screener approve|deny <id> screens a sender in or out
hey draft list every draft, with whether HEY would send it now
hey compose|reply ... --draft writes a draft
hey draft send <id> asks HEY to send it: it waits until you press Send

meta.has_more and the notice say when a box holds more than the app has loaded;
meta.senders_words names the fields senders wrote. Exit 6 is the door shut, 3 nobody
signed in to the app, and 9 a send waiting for the person.`,
}
command.cmd.AddCommand(newAppToolsCommand())
command.cmd.AddCommand(newAppCallCommand())
Expand Down
398 changes: 398 additions & 0 deletions internal/cmd/app_boxes_test.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions internal/cmd/app_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,14 @@ func TestAppImboxInEveryFormat(t *testing.T) {
}
}

// The app holds the Imbox alone: another box, and a cursor it never gave, are refused
// before the door is asked.
// The app holds the Imbox, the Feed, Sent and Spam: another box, and a cursor it never
// gave, are refused before the door is asked.
func TestAppRefusesWhatItDoesNotServe(t *testing.T) {
door := appImboxDoor(t)
appTestHome(t, door.Path, true)

for _, args := range [][]string{
{"box", "view", "feed"},
{"box", "view", "papertrail"},
{"box", "view", "1234"},
{"box", "imbox", "--page", "abc"},
{"screener", "list", "--page", "abc"},
Expand Down
Loading
Loading