Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Install: `bb plugin install git:https://github.com/brsbl/bb-plugins.git@plugin/d

Delivers private briefings as threads with numbered priorities, review buttons, and collapsed routine details. Add or edit a prompt-based brief under the site it reads in Settings. Connections reuse existing bb Browser sign-ins; Reading remembers summarized newsletters without marking them read. Other threads can publish their own briefs.

![A brief with numbered priorities and review buttons](https://github.com/user-attachments/assets/6d6f4f82-9f51-475a-b5e7-356a1e43459f)
![A sample Morning brief: one reply needs you, with a Review reply button, the counts, and the No action needed table expanded](plugins/digests/docs/brief.png)

[Source](plugins/digests) · [README](plugins/digests/README.md)

Expand Down
64 changes: 48 additions & 16 deletions plugins/digests/PLUGIN_OVERVIEW.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,48 @@
# Briefs

Private briefings that arrive as ordinary bb threads. Each brief opens with a
clear headline, numbered priorities and buttons that open the page where each
task gets done, with its domain shown. Routine detail stays collapsed. Move or archive briefs yourself when done.

Add a digest under a signed-in site in Settings: give it a name, describe what
it should tell you, and choose a schedule. Existing starter definitions for
Unread email, Money and Reading stay disabled until migration is confirmed.
X scorecards can be published by another thread with `bb digest publish`.

Uses existing bb Browser sign-ins; import opens bb’s own Browser settings.
Failures show Retry or Reconnect. Each email appears in one brief only: Money
gets money mail, Reading gets newsletters, and copies in several inboxes
collapse into one row, all without marking Gmail read. Collection is read-only; only an approved Inline
Action Card click authorizes an external write.
## Your scheduled briefing

Choose what you want to know and when. Each run arrives in a Briefs inbox as
an ordinary bb thread with a headline, numbered priorities, buttons that open
the page where each task gets done with its domain shown, and collapsible
routine details. Move or archive it when finished; thread search
keeps earlier briefs findable.

Add a brief under a signed-in site in Settings, describe what it should tell
you, and choose a schedule. Run it immediately to preview the result. Starter
recipes cover unread email, money, and reading; another thread can also publish
a prepared report.

## Gmail read state and recovery

Opening an email can mark it read. **Keep unread**, the default, instructs the
collecting agent to restore each originally unread message immediately and
verify the result before continuing. **Mark as read** leaves opened messages
read. Messages that were already read stay read in both modes.

A saved per-message journal retains the original state across interruptions.
Unverified or failed restoration stays visible in the brief; Retry instructs
the agent to repair those records before collecting more. The journal records
the agent's browser observations; it does not operate Gmail itself.
Each email appears in one brief only: Money gets money mail, Reading gets
newsletters, and copies in several inboxes collapse into one row. Successfully
summarized message IDs are remembered to avoid repeats.

Collection must not send, reply, archive, delete, or change labels or settings.
Restoring unread state is its only permitted explicit Gmail write. Other sites
are read-only. Task buttons open the page where you can finish the task;
Open email returns to the original message. Opening a button performs no write.

## Requirements and privacy

Install **Automations**, **Browser Automation**, and **Thread Organizer** with
additional-inbox support. Browser collection requires **bb 0.45.0 or later**
on the browser desktop and connected server, a connected browser computer,
and a configured agent provider and model. Runs use that provider's account
and usage allowance. Sign in to your chosen sources—Gmail, X, or LinkedIn—in
BB Browser; Briefs reuses those sign-ins in fresh tabs without copying cookies.
Import opens bb’s own Browser settings.

Signed-out connections show Reconnect. Unavailable or interrupted runs show
Retry. Brief content, definitions, read-state journals, and processed message
IDs stay in plugin-owned storage on your bb server. Content read by the agent
is sent to your configured provider. Optional **Inline Decisions** adds
approval cards for proposed actions; without it, proposals remain plain text.
54 changes: 44 additions & 10 deletions plugins/digests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,34 @@ Private briefings delivered as threads: one clear headline, a few numbered
items with buttons that open where each task gets done, each email in one brief only, and a flat “No action needed” email table collapsed. Briefs arrive in a
Briefs inbox. Archive them when done and find old briefs with thread search.

![A brief with numbered priorities and review buttons](https://github.com/user-attachments/assets/6d6f4f82-9f51-475a-b5e7-356a1e43459f)
![A sample Morning brief thread: one reply needs you, with a Review reply button, the counts, and the No action needed table expanded](docs/brief.png)

![Settings → Briefs with a Gmail site on an example account and a disabled weekday Morning brief](docs/settings.png)

![Editing the Morning brief: its prompt, weekday schedule and the After reading: Keep unread selector](docs/settings-edit.png)

## Requirements

- **Automations** schedules and dispatches brief runs.
- **Browser Automation** lets the collecting agent read fresh, brief-owned tabs
using your BB Browser sign-ins.
- **Thread Organizer** must support additional inboxes (`role: "inbox"` and
`catchesPluginId`) to create and route the Briefs inbox.
- **bb 0.45.0 or later** on both the browser desktop and connected server is
required for collection. Keep the browser computer connected and configure
an agent provider/model; runs use that provider's account and usage allowance.
- Sign in to each source you choose (Gmail, X, or LinkedIn) in BB Browser.
Briefs does not supply service accounts or copy cookies.

Install the required plugins before setting up Briefs. The current plugin
manifest contract has no field for declaring dependencies on other plugins;
these requirements are checked through the setup and connection flows.
Inline Decisions is optional for proposals that need your approval.

## Install

```bash
bb plugin install git:https://github.com/brsbl/bb-plugins.git@plugin/digests --yes
```
Install **Briefs** from the Community marketplace once listed, or use its
published Git install ref with `bb plugin install`.

## Use

Expand All @@ -26,13 +47,16 @@ are never adopted or changed.

| Starter brief | Default time |
| --- | --- |
| Unread email | Weekdays, 10am PT |
| Money | Monday, 10am PT |
| Reading | Sunday, 11am PT |
| Unread email | Weekdays, 10am |
| Money | Monday, 10am |
| Reading | Sunday, 11am |
| X scorecard | Published by another thread |

Requires Automations, Browser Automation, and Thread Organizer with support for
additional inboxes. Setup creates a Briefs inbox that catches this plugin’s
Starter setup uses the bb server’s system timezone. New briefs created in
Settings use your browser’s timezone, shown beside the time. Saved prompts and
schedules keep their existing values. Edit starter prompts to add your interests.

Setup creates a Briefs inbox that catches this plugin’s
briefs. Read and unread briefs stay there until you move or archive them.

Browser collection requires **bb 0.45.0 or later** on the browser desktop and
Expand Down Expand Up @@ -68,6 +92,16 @@ bb plugin install "path:$PWD/plugins/digests" --yes
```

CI runs `npm run check --workspace=bb-plugin-digests` remotely. Use an isolated
bb development app with fixture accounts for browser and screenshot verification.
bb development app with synthetic fixtures for browser and screenshot verification.

Digest cards keep the name prominent, with a muted schedule at the bottom-left opposite Run now. Edit your own prompt in place; collection rules and Gmail searches live in the runtime, never in the prompt preview. A small emoji field beside the name controls the prefix on new brief thread titles. Saved definitions fall back to their starter emoji when none is set.

## Verification boundary

`service.test.ts` uses mocked Browser Automation, desktop tabs, and Automations
with a synthetic mailbox to cover both after-reading modes, mixed-state reply
chains, failed restoration, and interrupted runs. The journal stores what the
agent reports; it does not operate Gmail or independently verify a click.
The collecting agent must restore and verify message state through its browser
session. These tests do not prove compatibility with Gmail's current live UI.
Never use a personal mailbox, browser profile, or account for release QA.
13 changes: 9 additions & 4 deletions plugins/digests/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -113,18 +113,23 @@
.digest-later ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg, 8px); overflow: hidden; }
.digest-cards > li + li,
.digest-later li + li { border-top: 1px solid var(--border); }
.digest-card { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; padding: 10px 12px; }
.digest-cards { container-type: inline-size; }
.digest-card { display: grid; grid-template-columns: 8px minmax(12rem, 1fr) minmax(0, 1fr); align-items: center; gap: 8px 12px; padding: 10px 12px; }
.digest-card-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--digest-accent, var(--muted-foreground)); }
.digest-card[data-urgency="later"] .digest-card-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--digest-accent, var(--muted-foreground)); }
.digest-card-content { min-width: 0; }
.digest-card-content h4 { margin: 0; color: var(--foreground); font-size: 14px; font-weight: 500; line-height: 20px; }
.digest-card-content p { margin: 0; overflow: hidden; color: var(--muted-foreground); font-size: 13px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.digest-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.digest-card-meta { display: flex; min-width: 0; align-items: center; gap: 8px; flex-wrap: wrap; }
.digest-chip,
.digest-urgency { padding: 0; background: none; color: var(--muted-foreground); font-size: 12px; font-weight: 400; line-height: 18px; white-space: nowrap; }
.digest-urgency { padding: 0; background: none; color: var(--muted-foreground); font-size: 12px; font-weight: 400; line-height: 18px; white-space: normal; }
/* Mixed toward foreground so deadlines keep 4.5:1 on tinted Ambient surfaces. */
[data-urgency="today"] .digest-urgency { color: color-mix(in oklab, var(--warning-text, var(--warning)) 75%, var(--foreground)); background: none; }
.digest-card-meta .digest-button { height: 26px; min-height: 26px; padding: 0 10px; }
.digest-card-meta .digest-button { max-width: 100%; height: auto; min-height: 26px; padding: 3px 10px; white-space: normal; }
@container (max-width: 28rem) {
.digest-card { grid-template-columns: 8px minmax(0, 1fr); }
.digest-card-meta { grid-column: 2; }
}
.digest-later li { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 6px 6px 6px 12px; color: var(--foreground); font-size: 13px; line-height: 18px; }
.digest-later .digest-button { flex: none; color: var(--muted-foreground); }
.digest-later .digest-button:hover:not(:disabled) { color: var(--foreground); }
Expand Down
Loading
Loading