Skip to content

switchboard v0.6.0

Choose a tag to compare

@github-actions github-actions released this 05 Oct 09:04
· 57 commits to main since this release
v0.6.0
e7dee61
go install github.com/go-steer/switchboard/cmd/switchboard@v0.6.0
docker pull ghcr.io/go-steer/switchboard:0.6.0

The module version keeps its v and the image tag does not.

The image is multi-arch (amd64 + arm64), distroless
(gcr.io/distroless/static-debian12:nonroot, no shell, no package manager)
and signed with Sigstore keyless:

cosign verify ghcr.io/go-steer/switchboard:0.6.0 \
  --certificate-identity-regexp '^https://github.com/go-steer/switchboard' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com

A release about reading a turn in chat. Everything here came out of watching
real turns go by on a live Google Chat rig: what the agent ran, how long it
took, what it cost, and an answer that looks like its source and not like raw
markdown.

Stream mode shows the turn as it happens. progress stream now has the
turn clock the other modes had. Each tool call is a small block: the verdict,
the command in a code block, and how long it took on its own line.

Answers render properly on Google Chat. Markdown tables arrive as aligned
columns, not pipe source. Inline code renders monospace in the gateway's own
cards. With --show-usage, every answer carries its cost footer, not only
those that happened to need a card.

core-agent 2.10's new event order is handled. 2.10 sends a turn's answer
before the turn's end. That put the cost footer a turn late and made a
placeholder flicker on every answer. Both orders now work.

Approvals on Google Chat match Slack. A Broad answer (allow-session*,
allow-always) takes a confirming second press. A permission prompt's command
renders as code that the agent can't break out of. A press from someone
other than the session's opener is no longer mistaken for an answered
question.

Upgrading needs no flag or config change. Stream-mode notices look different,
so any tooling that scraped their old one-line text needs updating.

Added

  • progress stream shows the turn's clock and how long each call took.
    Stream was the one mode that showed what the agent runs and the one mode
    with no clock, so a long turn in it gave no sign of how long it had been
    going. It now also posts the "⏳ Working… 45s" placeholder, ticking and
    deleted when the answer lands, as in indicator. Each finished call on a
    notice says how long it took (⏱ 2.3s, on its own line), measured at the
    gateway. Calls under 0.1s, and collapsed ×N calls, show none.
  • Every Google Chat answer carries the --show-usage footer. The footer
    rides a card, and an answer with no headings or rules does not get one, so
    plain answers (most of them) went out as text without the cost the
    operator had asked to see. With --show-usage on, a plain answer is now
    sent as a simple card of markdown paragraphs with the footer under it, as
    long as it fits in one Chat message (a longer plain answer still goes as
    chunked text, without the footer, which keeps restart delivery exact).
    Without --show-usage, nothing changes. Mentions are now defused in every
    answer card, as they already were in text.
  • A Broad answer takes two presses on Google Chat, as on Slack (#92).
    The answers that outlive the request (allow-session*, allow-always)
    applied on one tap on Chat, while Slack asks first. Chat has no native
    confirmation, so the first press now swaps the buttons for a line naming
    the grant, with Yes, allow (the real press) and Back (the
    question's answers restored). It is built from the click alone, because
    the click carries its hosting card. Nothing is remembered between the two
    presses, so a restart in between costs nothing. Approver checks are
    unchanged, because only Yes reaches the router. Pub/Sub deployments render
    no buttons and are unaffected.

Changed

  • Stream-mode tool notices show each command in a code block, with its
    duration on a line of its own.
    In progress stream, a tool notice's
    argument was plain text after the tool name, and a frame of calls was a
    bulleted list. A call now reads as a small block: the tool and its verdict
    (✅ Ran **bash**), the argument in a fenced code block, and ⏱ 12s below
    it. A frame of several calls is a summary header and one block per call. On
    Google Chat the notice is a markdown paragraph so the block renders, since
    the icon-line card can't show one. The argument passes through the same
    fence neutraliser as an approval prompt's command. The tool name is bold and
    keeps only the characters tool names are made of, so a model-supplied name
    can't carry a link or other markup. Status mode's terse line is unchanged.
  • Inline code in the gateway's own Google Chat cards renders as <tt>.
    Before, the backticks showed literally, because the HTML subset those cards
    use has no monospace. <tt> and <font face="monospace"> render monospace
    in a card, while <code> and a markdown paragraph's code span do not,
    measured on a live card.
  • Markdown tables read as tables on Google Chat. Chat renders no tables,
    in text or in a card's MARKDOWN, so an agent's pipe table arrived as raw
    source. Its | :--- | :--- | delimiter line read like a blank first row.
    A table is now laid out as aligned columns in a code block, with a dashed
    rule under the header and right-aligned columns kept. Cell markup is
    flattened, because a code block would show it instead of rendering it:
    paired emphasis loses its markers, a code span keeps its contents verbatim
    (so __init__.py and 2**10 survive), and a link becomes label (url).
    The match is deliberately narrower than GFM, so prose is never rewritten.
    Indented tables, list items, a pipe over a setext underline, and a table
    that padding would grow past three times its size (one very long cell in an
    early column, whose width pads every row) are left as written, with at most
    16 KB added to any one reply. Text with no
    table is unchanged, and a table already inside a code block is left alone.
    The converter is chat.TablesToCode, in the shared package, so Slack can
    adopt it too.

Fixed

  • The usage footer lands on the answer it belongs to with core-agent 2.10.
    That daemon sends a turn's answer before the turn-complete carrying its
    usage, where earlier ones sent it after. The footer stayed banked and was
    attached to whatever text came next, usually the next prompt's answer. Now
    the event after the turn-complete decides. A model text is the answer, the
    older order, and works as before. Anything else, or 1.5s of quiet on the
    stream, means the answer was already posted. It is then edited to add its
    footer, on both platforms (Slack's Update now renders the footer too). An
    answer split across messages goes without a footer rather than giving its
    cost to the next one. A boundary that nothing claims is cleared, and a text
    arriving after its turn has ended is never read as narration. So no
    leftover state can cut the next turn short or strand a stopped clock.
  • No more placeholder that appears and vanishes on every answer. With the
    answer arriving ahead of its turn-complete, the gateway read each answer as
    mid-turn narration for a moment and re-anchored the progress placeholder
    below it, posting a new one that the turn-complete deleted a second later.
    Re-anchoring after possible narration now waits 1.5s, so the boundary lands
    first and nothing is moved. Real narration still pulls the clock below
    itself, just 1.5s later. An answer known to have ended the turn, or one with
    a queued message taken up behind it (#42), moves the clock at once.
  • A Google Chat HTTP-ingress shutdown can no longer misuse its WaitGroup
    (#93). Shutdown drains the turns requests have started, but Shutdown
    gives up on its deadline with handlers still running. A handler that
    started a turn while the drain was waiting could add to the WaitGroup
    concurrently with its Wait, which the runtime may report as a panic.
    New turns are now refused from the moment shutdown begins, under the same
    lock that counts them. Before, a request served during Shutdown's grace got
    200 and a turn that died at once on the cancelled context. A refused
    request is answered 503 with Retry-After, so the person sees Chat's
    error and can resend; nothing was started, so a resend duplicates nothing.
  • A permission prompt's command renders as code on Google Chat. The
    question card used the HTML subset the gateway's own cards use. That subset
    has no monospace, so the fenced command showed up between literal ```
    lines. The question now renders with Chat's MARKDOWN text syntax, the
    same one answer cards use.
  • An agent can no longer break out of the code block on an approval
    prompt
    , on either platform. The command is shown in a fenced block, and
    the tool and subagent names in code spans. A command containing closed the block early, so whatever followed rendered as the gateway's own text: a fake "✅ Allowed", a reassurance, or a link, with the real command partly hidden. A backtick or a blank line in a name did the same to its span. Runs of three or more backticks in the command are now broken with a zero-width space, so the command still reads exactly as given (one cost: a command containing now pastes with invisible characters). In a name, a backtick
    becomes a look-alike (ˋ) and line breaks are flattened.
  • A press from someone other than the session's opener is no longer
    reported as "answered elsewhere"
    when the daemon returns 404 (#106).
    On a daemon that enforces session ACLs, answering a prompt needs write
    access. Of the identities switchboard asserts, only the opener has it, and
    anyone else gets the same 404 an ended question gets. Switchboard took that
    404 as settled: it took the buttons down and logged at INFO, while the turn
    stayed parked with no way left in the thread to answer it. Now such a press, unless a decision has already been
    recorded here, leaves the question up. The presser is told it either ended
    or only the conversation's starter can answer, the log warns and names the
    opener, and the audit record reads refused_or_settled. The opener's own
    press is unchanged. Letting other approvers answer under ACL enforcement
    would need the daemon to grant them write access to the session. The
    trade-off: on a daemon without ACLs, someone else pressing a question that
    really ended now gets the notice, and the buttons stay up until the opener
    presses.

Full diff: v0.5.1...v0.6.0