Skip to content

feat(safari): add safari send and safari watch - #238

Merged
ysyneu merged 2 commits into
mainfrom
feat/safari-send-watch
Oct 27, 2026
Merged

ysyneu merged 2 commits into
mainfrom
feat/safari-send-watch

Conversation

@ysyneu

@ysyneu ysyneu commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Adds a terminal conversation surface for AI SRE sessions.

  • flashduty safari send [message]: sends with surface=cli + delivery_mode=reply_only (only reply-tool output comes back). Creates a session when --session-id is omitted. --file (repeatable, 50MB pre-check) uploads attachments and sends the text as the leading part; --message-file <path|->; --team-id, --env-kind cloud|byoc, --env-id for a new session. Prints {session_id, invocation_id, root_invocation_id, delivery_mode}.
  • flashduty safari watch --session-id <id> [--root-invocation-id <id>] [--since <ms> --since-event-id <id>]: one JSON line per event (reply / settled / error, each with created_at and event_id). Reconnects with a resume cursor, de-dupes by event id, keeps waiting while a settle lists standing background tasks, exits 0 when the root settled with none and the session is idle. --since-event-id requires --since.

Requires go-flashduty v0.15.21 (go-flashduty#108). main is merged in; its dedicated integration commands were on a pre-release pseudo-version of the same SDK and now share the tag. Regenerating with cligen and skilldoc produces no further changes.

Tested: go test ./..., make check-cards, plus end-to-end against a local AI SRE with a self-hosted runner — reply-only delivery, attachment byte-exact on the runner, background task → notification round → exit 0, and re-arm resuming strictly after a given event.

…rsations

`safari send` sends a message to an AI SRE session (creating one when no
--session-id is given) with reply-only delivery on the cli surface, so only
the agent's reply-tool output comes back. --file uploads attachments (50MB
pre-check) and sends the text as the leading message part; --message-file
reads the text from a file or stdin; --team-id / --env-kind / --env-id pick
the team and execution environment of a new session.

`safari watch` streams the session as one JSON line per event (reply,
settled, error), each with created_at and event_id. It reconnects with a
resume cursor, de-duplicates by event_id, keeps waiting while a settle
reports standing background tasks, and exits 0 once the root has settled
with none and the session is idle. --since and --since-event-id resume
strictly after a given event.
go-flashduty v0.15.21 is the first tagged release that carries both the
session message/attachment/subscribe surface used by safari send/watch and
the dedicated integration operations already on main, so both pseudo-versions
collapse to the tag.
@ysyneu
ysyneu merged commit 17888a2 into main Oct 27, 2026
12 checks passed
@ysyneu
ysyneu deleted the feat/safari-send-watch branch October 27, 2026 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant