Repository navigation
Commit 468d7ad
ben
feat(workbot): Your agent reads sources, not categories, in a new voice (#6629)
* feat(types): sources and the admin's source policy for Your agent
What agents read becomes sources, not categories: calendar, email and team
chat (whichever of Google, Microsoft or Slack the member has connected),
and every other connection as a source of its own. Admins set each to on
for everyone, members choose, or not allowed (defaults: calendar, email and
chat on for everyone; other connections up to members). Members see each
source with its policy, whether it is on, their instruction and last read,
and change it by id or name. Check records name the sources they were
about.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* feat(automations): sources, not categories, and a new voice for Your agent
Items are source + id (a Slack message, a Gmail thread, a calendar event,
an issue), still delivered once each through the ledger; the four
responsibilities become presets plus anything else worth catching, and a
member's mutes still apply to them. The wake prompt lists each source it
may read with the member's instruction and last read time, and what is on
but can't be read.
The instructions are rewritten: one finding per message (the morning brief
up to three points), open with why it matters now, connect the sources
before writing, say what wasn't checked, end with one concrete next step,
link the source with a short label, follow up when something changes, and
never sort things under labels like Today or FYI or offer to draft replies.
Silence, caps and quiet hours are unchanged. Links may point at the
services behind the sources it read, never elsewhere.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* feat(den-db): record which sources a check was about (0167)
agent_member_check gets a nullable sources JSON column: what a message drew
on, or what couldn't be read and the connection to fix. Generated with
db:generate as the next free number.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* feat(connect): let Your agent's token read only its member's sources
A member's background agent runs with a read-scoped token. Den now adds its
sources to that token as scopes only Den mints: the core sources that are
on and the connections behind them. With them, Connect lets the token call
a connection's own tools for the first time, but only on those connections
and only tools that read: a reviewed list for Slack, Linear, Notion, GitHub
and Granola, otherwise a tool its provider marks read-only whose name reads,
and never one whose name writes. Native Google and Microsoft reads are
limited to the calendar, mail and Teams chats of sources that are on.
Search shows the agent only what it may call. Plain read tokens and writing
tokens keep their rules.
A resumed turn's token comes from its grant without these scopes, so it
falls back to a plain read token (no connection tools).
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* feat(den-api): Your agent reads calendar, email, team chat and chosen connections
The wake resolves the member's sources (the admin's policy, their own
choices with My agent on, and whether their account on each connection is
ready), gives the turn a token that may read only those, lists them in the
prompt with the member's instruction and last read, and drops items from
anywhere else. The calendar event source is skipped when the calendar is
off. A source that is on but can't be read gets one DM with the action that
fixes it ("Reconnect Google Workspace"), is paused, and is told again only
after it worked; with nothing readable no turn runs. Check records name
the sources.
Manage › Workbot's settings take a policy per source and return the
organization's connections behind each. /v1/me/agent lists the member's
sources and takes on/off and an instruction by id or name, with undo; the
server refuses anything the admin didn't allow or turning off a source that
is on for everyone, and the chat reply adds one "Connect <name>" line per
source it can't read yet.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* feat(den-web): What agents read, and a switch per source in My bot
Manage › Workbot gets "What agents read": Calendar, Email and Team chat
with the connections behind them, then "Other connections (n)" behind a
disclosure, each On for everyone, Members choose or Not allowed, and
"Read only. Agents never send, edit or delete through these."
My bot's Uses becomes one switch per source: when it was last read, a
Connect or Reconnect action when the member's account isn't ready, the
admin's decision locked with the reason, and the member's instruction in
their own words with where it was saved and Edit. A failed check links to
the connection to reconnect.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* test(evals): prove what agents read and a member's sources
A proof world with Google Workspace (not yet connected by the member) and
three shared connections. The spec drives the admin's "What agents read"
(not allowing one connection), the member's Uses switches, a chat change
("Granola on, for …; Linear off") that the page shows, and the admin's
refusal holding for chat. The chat helper moves out of the My agent world
so both use it.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* test(evals): replay recorded timelines against Your agent
Five timelines (calendar, Gmail and Slack as Connect returns them, with
fictional people): a customer's Slack ask for pricing before their call, a
quiet afternoon, a proposed time that collides with the calendar, an ask
already answered, and a meeting it flagged that was then cancelled. Each
runs with the agent's real instructions, wake prompt and reply parser, and
is scored on whether it messages, the sources it names, what it connects,
and how it writes. The harness's tests use a scripted model;
pnpm --dir evals agent:replay runs a real one.
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
* docs(workbot): sources, how Your agent writes, and its read allowlist
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
---------
Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>1 parent 59eed87 commit 468d7ad
51 files changed
Lines changed: 24714 additions & 336 deletions
File tree
- docs/features
- workbot-agent-library
- workbot-proactive
- ee
- apps
- den-api
- src
- headless-runner
- mcp
- routes
- me
- org
- workbot-proactive
- test
- api
- den-web/app/(den)/dashboard/_components
- packages
- den-db
- drizzle
- meta
- src/schema
- headless-protocol/src
- evals
- proofs
- scripts
- agent-replay
- worlds
- packages
- automations/src
- types/src/den
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
Large diffs are not rendered by default.
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
| 570 | + | |
570 | 571 | | |
571 | 572 | | |
572 | 573 | | |
| |||
608 | 609 | | |
609 | 610 | | |
610 | 611 | | |
| 612 | + | |
611 | 613 | | |
612 | 614 | | |
613 | 615 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
760 | 761 | | |
761 | 762 | | |
762 | 763 | | |
| 764 | + | |
| 765 | + | |
763 | 766 | | |
764 | 767 | | |
765 | 768 | | |
| |||
874 | 877 | | |
875 | 878 | | |
876 | 879 | | |
| 880 | + | |
877 | 881 | | |
878 | 882 | | |
879 | 883 | | |
| |||
913 | 917 | | |
914 | 918 | | |
915 | 919 | | |
| 920 | + | |
| 921 | + | |
916 | 922 | | |
917 | 923 | | |
| 924 | + | |
918 | 925 | | |
919 | 926 | | |
920 | 927 | | |
| |||
925 | 932 | | |
926 | 933 | | |
927 | 934 | | |
928 | | - | |
| 935 | + | |
929 | 936 | | |
930 | 937 | | |
931 | 938 | | |
932 | 939 | | |
| 940 | + | |
933 | 941 | | |
934 | 942 | | |
935 | 943 | | |
| |||
951 | 959 | | |
952 | 960 | | |
953 | 961 | | |
| 962 | + | |
954 | 963 | | |
955 | 964 | | |
956 | 965 | | |
| |||
1439 | 1448 | | |
1440 | 1449 | | |
1441 | 1450 | | |
1442 | | - | |
| 1451 | + | |
| 1452 | + | |
1443 | 1453 | | |
1444 | | - | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
1445 | 1460 | | |
1446 | 1461 | | |
1447 | 1462 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
0 commit comments