Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
43520d7
test(tests): record the device-flow and standalone wire fixtures
xergioalex Nov 13, 2026
7f5cbe5
feat(config): store the device-flow token pair additively in credenti…
xergioalex Nov 13, 2026
f69f7d1
feat(client): add the device-flow and refresh doors to DailyBotClient
xergioalex Nov 13, 2026
2dda267
feat(client): send the X-Dailybot-Client telemetry headers
xergioalex Nov 13, 2026
185c6f6
feat(auth): add browser sign-in with `dailybot login --device`
xergioalex Nov 13, 2026
f903b5f
feat(client): refresh a browser session on 401 access_token_expired
xergioalex Nov 13, 2026
38d8342
feat(auth): revoke the whole browser session on logout
xergioalex Nov 13, 2026
c8c3cbd
test(tests): make the device-login deadline test cheap
xergioalex Nov 13, 2026
58cb937
feat(client): treat 503 auth_backend_unavailable as transient
xergioalex Nov 13, 2026
35439de
feat(auth): mark standalone Dailybot organizations in the login picker
xergioalex Nov 13, 2026
1561879
feat(cli): refresh the cached plan tier from /v1/organization/
xergioalex Nov 13, 2026
7d30fbc
feat(cli): show the organization's chat platforms in `dailybot org`
xergioalex Nov 13, 2026
9379320
test(tests): pin platform_not_connected for chat send on Dailybot orgs
xergioalex Nov 13, 2026
c81ab9d
feat(auth): show the cli_auth_deprecated notice on email-code sign-in
xergioalex Nov 13, 2026
19fe578
feat(cli): add the session, sign-in and chat-platform error codes
xergioalex Nov 13, 2026
cd8c135
feat(cli): accept qualified channel references
xergioalex Nov 13, 2026
a92045b
docs: describe browser sign-in, standalone orgs and qualified channels
xergioalex Nov 13, 2026
f2c0f20
fix(auth): address AI review round 1 on the browser sign-in
xergioalex Nov 13, 2026
2524a69
fix(client): refresh an expired browser session reached as the fallba…
xergioalex Nov 13, 2026
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
16 changes: 14 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

**Dailybot CLI** is a Python command-line tool that bridges **humans** and **agents** with the [Dailybot](https://www.dailybot.com) platform. It provides:

- **For humans** — email-OTP login, **managing Tasks** (`tasks` for the workspace, `task` for one task, plus `board` / `project` / `goal`), viewing pending check-ins, submitting structured/free-text updates, **filling out forms** (one-shot or driven through a workflow state machine: `pre_release → qa → code_review → ready_to_release → released`), **browsing teams** (role-scoped server-side), **giving kudos to users or whole teams**, interactive TUI mode.
- **For humans** — email-OTP or browser (device-flow) login, **managing Tasks** (`tasks` for the workspace, `task` for one task, plus `board` / `project` / `goal`), viewing pending check-ins, submitting structured/free-text updates, **filling out forms** (one-shot or driven through a workflow state machine: `pre_release → qa → code_review → ready_to_release → released`), **browsing teams** (role-scoped server-side), **giving kudos to users or whole teams**, interactive TUI mode.
- **For agents (AI assistants, CI jobs, deploy scripts, bots)** — progress reports, milestone tracking, agent health, webhook registration, agent-to-agent messaging, transactional email, standalone agent registration (creates an org without a human Dailybot account), **and the full forms-response lifecycle** (`get / responses / response get / update / transition / delete`) so an agent can drive any form — including workflow-enabled ones — end-to-end after `dailybot login`.

It talks exclusively to the Dailybot HTTP API under `/v1/cli/*`, `/v1/agent*/*`, `/v1/forms/*`, `/v1/plan/*`, `/v1/teams/*`, `/v1/kudos/`, `/v1/users/`, and `/v1/checkins/*` endpoints. There is no local database; all state is either in `~/.config/dailybot/` (credentials, agent profiles, config) or fetched from the API.
Expand All @@ -55,7 +55,8 @@ dailybot_cli/ # Source package
├── ledger.py # Local report ledger (per-repo work signals) for `hook`
└── commands/
├── __init__.py
├── auth.py # login / logout (email OTP, multi-org)
├── auth.py # login / logout (email OTP, multi-org; --device browser sign-in)
├── _device_login.py # RFC 8628 browser sign-in: start, poll, save the token pair
├── status.py # pending check-ins + --auth status
├── update.py # submit human check-in update
├── config.py # get/set/remove stored settings (api_key)
Expand Down Expand Up @@ -158,6 +159,17 @@ tests/ # pytest suite (file naming: *_test.py)
├── tasks_agent_attribution_test.py # --agent-name stamp: body vs header, encoding, refusal, rendering
├── task_brief_test.py # task brief: embeds, dedicated-door fallback, safe downloads
├── token_host_binding_test.py # a login token only travels to the host that issued it
├── wire_fixtures_test.py # recorded device-flow / standalone wire fixtures (tests/fixtures/device_flow/)
├── device_login_test.py # `login --device`: poll, slow_down, denial, expiry, 404/405 fallback
├── credentials_refresh_test.py # refresh only on 401 access_token_expired; two-process re-read
├── logout_pair_test.py # logout revokes the pair (Bearer or refresh-body form)
├── auth_backend_unavailable_test.py # 503 auth_backend_unavailable: bounded retry, never a logout
├── standalone_org_login_test.py # standalone Dailybot orgs in the login picker
├── effective_tier_test.py # cached plan tier refreshed from /v1/organization/
├── org_channels_test.py # `dailybot org` chat platforms (ChatPlatformSummary)
├── cli_auth_deprecation_test.py # the cli_auth_deprecated notice on email-code sign-in
├── standalone_error_codes_test.py # session, sign-in and chat-platform error codes
├── qualified_channels_test.py # slack:<id> / <platform-id>:<id> channel references
├── tasks_server_refusal_rendering_test.py # server refusals of agent keys / guests: exit + envelope
├── milestones_updates_test.py # milestone attachments/restore; project update get/edit/delete/attachments
├── tasks_reactions_test.py # reactions: who reacted, project-update react/unreact, full reactor lists
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ Authenticate once with your Dailybot email, then submit updates, complete check-
# Log in (interactive, email OTP)
dailybot login

# Or sign in through the browser: approve a short code at a Dailybot link
dailybot login --device

# See what check-ins are waiting for you
dailybot status

Expand Down Expand Up @@ -622,6 +625,10 @@ dailybot config key=your-key
dailybot login
```

### Browser sign-in (`--device`)

`dailybot login --device` prints a Dailybot link and a short code such as `BCDF-GHJK`. Open the link in any browser where you use Dailybot (it does not have to be on the same machine, so it works over SSH), check that the page shows the same code, and approve it. The CLI waits at the interval the server asks for and saves the session as soon as you approve. The session renews itself while you use the CLI, so you do not have to log in again every few hours. Denying the request in the browser, or letting the code expire (10 minutes), stops the command without changing your stored session. On a Dailybot server that does not offer browser sign-in yet, the command continues with the email code.

### Non-interactive login

AI agents (e.g. Claude Code) and scripts can log in without interactive prompts using a two-step flow:
Expand Down Expand Up @@ -838,11 +845,11 @@ Replies to agent emails land as messages retrievable via `dailybot agent message

| Command | Description |
|---------|-------------|
| `dailybot login` | Authenticate with email OTP |
| `dailybot logout` | Log out and revoke token |
| `dailybot login` | Authenticate with email OTP, or in the browser with `--device` |
| `dailybot logout` | Log out and revoke the session (both tokens of a browser sign-in) |
| `dailybot status` | Show pending check-ins and auth status |
| `dailybot me` | Show the authenticated user and org context (`--include-email`, `--json`) |
| `dailybot org` | Show the organization the credential is scoped to (`--json`) |
| `dailybot org` | Show the organization the credential is scoped to, and its chat platforms when the server provides them (`--json`) |
| `dailybot update` | Submit a free-text or structured check-in update |
| `dailybot config` | Get, set, or remove a stored setting (e.g. API key) |
| `dailybot version` | Show version info and optionally check for updates |
Expand Down Expand Up @@ -945,7 +952,7 @@ humans who own them.
| `dailybot plan <group> ...` | The one root of **Dailybot Plan** (API root `/v1/plan/`): the `tasks`, `task`, `board`, `project` and `goal` groups all live under it, e.g. `dailybot plan tasks status` |
| `dailybot plan tasks timeline` | Dated work in a window: the goals that overlap it, the tasks with start or due dates, the milestones in the window and the projects overlapping it (`--since` / `--until` / `--date` / `--today` / `--last-week`, `--include-unscheduled`, repeatable `--project` and `--milestone`). One document, not a paged list |
| `dailybot plan tasks notifications catalog` · `get` · `set` | Personal notification preferences: the kinds (`catalog`), your kind × chat × email matrix and destination (`get`), and a partial `set` (`--kind` repeatable with `--chat/--no-chat`, `--email/--no-email`, and `--dm` or `--channel <name\|external id>`, public channels only). **Needs a person: `dailybot login` or a personal API key** |
| `dailybot plan tasks channels search [-q <text>] [--type public]` | The chat-platform channels you can pick (admins also see the private ones the bot is in); the external id it shows is what routes, reports and `chat send --channel` take. Not `channels list` (report channels) |
| `dailybot plan tasks channels search [-q <text>] [--type public]` | The chat-platform channels you can pick (admins also see the private ones the bot is in); the external id it shows is what routes, reports and `chat send --channel` take (optionally qualified as `slack:<id>` or `<platform-id>:<id>` on organizations with several chat platforms). Not `channels list` (report channels) |
| `dailybot plan tasks routes list` · `get` · `create` · `update` · `delete` · `send-test` · `deliveries` | Post organization events (card created/completed/blocked, project health or lead changed, milestone reached, ...) to a channel: `create --name --channel --kind ...` with optional `--board` / `--project` scope. **Admins write, members read.** `send-test` always previews with a dry run first and posts only after confirmation or `--yes`; `delete` states its consequence |
| `dailybot plan tasks reports list` · `get` · `create` · `update` · `delete` · `preview` · `send-test` · `runs` | Scheduled Tasks digests (`daily`, `week_start`, `week_end`) to a channel and/or by email: `--weekdays mon,fri` (weekly kinds take exactly one), `--time 09:00`, `--timezone` (yours by default), `--email-to <name\|uuid>`. `preview` is the exact document; `send-test` is dry-run first. Admins write, members read |
| `dailybot plan tasks briefing get` · `set` · `preview` · `send-test` | Your personal daily briefing (overdue, due today, in progress, blocked, mentions, projects you lead), by DM and/or email, on chosen weekdays and time. Person doors; `send-test` is dry-run first |
Expand Down Expand Up @@ -1083,7 +1090,7 @@ Works headless for agents (`--json` prints the `bot_message_id`).

| Command | Description |
|---------|-------------|
| `dailybot chat send` | Send a bot message to users (`-u`), channels (`-c`), and/or teams (`-t`) |
| `dailybot chat send` | Send a bot message to users (`-u`), channels (`-c`, a channel id or a qualified `slack:<id>` / `<platform-id>:<id>`), and/or teams (`-t`) |
| `dailybot chat update <bot_message_id>` | Edit a previously sent message (parent **or** a thread reply) |
| `dailybot conversation open` | Open (or reuse) a Slack group DM with the bot; optionally post a message (`-m`) |

Expand Down
Loading
Loading