Skip to content

feat(chat,workflow): document interactive buttons and workflow trigger - #43

Merged
xergioalex merged 3 commits into
mainfrom
feat/interactive-buttons-workflow-trigger
Jul 24, 2026
Merged

feat(chat,workflow): document interactive buttons and workflow trigger#43
xergioalex merged 3 commits into
mainfrom
feat/interactive-buttons-workflow-trigger

Conversation

@xergioalex

@xergioalex xergioalex commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary

  • Document the CLI 3.8.0 interactive-button surface in dailybot-chat: --buttons JSON (callbacks / modals / response / callback_auth object), approval-flow flags, --workflow-button, and the matching button_* error codes — aligned with the published dailybot-cli 3.8.0 contract.
  • Rewrite dailybot-workflow to include workflow trigger, api_trigger requirements, --filter api_trigger, payload → {{trigger.body.*}}, and workflow_* errors (including workflow_execute_not_allowed / workflow_frozen).
  • Raise the skill-pack CLI baseline to dailybot-cli >= 3.8.0 everywhere (single floor).
  • Update the router intents, shared error tables, and README so agents discover trigger / approval / modal flows.

Companion CLI release: https://pypi.org/project/dailybot-cli/3.8.0/ (merged via DailybotHQ/cli#76)

Test plan

  • Skim skills/dailybot/chat/SKILL.md Buttons § — modal_body is {title, blocks}, callback_auth is an object
  • Skim skills/dailybot/workflow/SKILL.md trigger steps + error table
  • Confirm router routes “trigger workflow” / “approval button” / “modal” correctly
  • Confirm pack floor is >= 3.8.0 in router + sub-skill headers
  • Confirm shared/list-query-and-errors.md lists the new codes
  • No hand-edited version: / CHANGELOG release header (auto-release owns those)

Document chat approval/workflow button flags, full --buttons JSON
contract, workflow trigger, and the matching error codes for agents.

Co-authored-by: Cursor <cursoragent@cursor.com>
## Summary
CLI 3.8.0 is published on PyPI. Raise the skill-pack baseline to match and
correct the button contract docs against the shipped CLI help/API.

## Change Log
- Pack baseline: dailybot-cli >= 3.8.0 everywhere (was 3.7.0)
- chat: document real modal_body shape ({title, blocks}), callback_auth
  object form, button_type/value, env-var preference for --callback-bearer
- chat: remove "next release after 3.7.4" hedges; add modal dialogue
- workflow: trigger/filter available at the new floor (no provisional note)
- shared errors: fix modal/auth guidance; add workflow_execute_not_allowed
  and workflow_frozen
- README: chat/workflow rows pin >= 3.8.0

Co-authored-by: Cursor <cursoragent@cursor.com>
@xergioalex xergioalex added the Ready Trigger AI code review label Jul 24, 2026
@github-actions

This comment has been minimized.

github-actions[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added the pr-reviewed Passed AI code review label Jul 24, 2026
## Summary
Fix the four live review comments on #43 plus the off-diff floor stragglers.

## Change Log
- Drop duplicate workflow_execute_not_allowed / workflow_frozen rows from the 400 table (keep 403 only)
- channels + env-json: align adjacent 3.7.0 strings with the 3.8.0 floor
- workflow trigger: require confirm of target + payload before firing
- report/README/AGENTS: finish the 3.8.0 floor sweep called out in the review

Co-authored-by: Cursor <cursoragent@cursor.com>
@xergioalex xergioalex added Ready Trigger AI code review and removed Ready Trigger AI code review labels Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown

AI review for 9e6f1bf — ✅ done

View review →

Highest severity: warning

Strictness gate: ✅ highest severity warning ≤ critical threshold

3 inline comment(s) attached.

Iteration-Aware Review: gen 2, round 1, policy=first-pass-exhaustive (new_commits) — 3 surfaced.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict

Solid, well-structured docs-only PR — no blocking issues. The interactive-button surface, workflow trigger, and the 3.8.0 floor bump are documented consistently across the router, sub-skills, shared error table, and README. A few consistency nits and one real doc-mirror gap worth addressing before merge; nothing critical.

ships? All findings touch skills/dailybot/ (installed) except the doc-mirror gap, which is a public-surface completeness issue.

Findings

# Severity File Summary
1 ⚠️ warning README.md:241 New public HTTP surface (/v1/workflows/<uuid>/trigger/, buttons[] on send-message) not mirrored into docs/API_REFERENCE.md
2 ℹ️ info skills/dailybot/chat/SKILL.md:273 Mixed button-flag separators (:: vs =) are an easy footgun for agents
3 ℹ️ info skills/dailybot/chat/SKILL.md:550 Error-description wording drifts from the shared table ("isn't triggerable" vs "isn't API-triggerable")

Cross-cutting notes (off-diff)

  • docs/API_REFERENCE.md is stale relative to this change. It still documents GET /v1/workflows/ only (line 859) and a send-message row (line 853) with no buttons and a 1.13.0/1.16.0 version story — no POST /v1/workflows/<uuid>/trigger/, no buttons[], and none of the new button_* / workflow_* error codes. Per AGENTS.md (DON'T #13), the public API reference must track the same public surface as the runtime SKILL.md files, and this file is served standalone at www.dailybot.com/skill.md. Finding #1 anchors this to the README line that documents the same endpoint.
  • Router capability count. skills/dailybot/SKILL.md still opens with "Thirteen coordinated capabilities" but the table now lists 14 rows (report, ask, messages, email, chat, conversation, health, checkin, kudos, teams, forms, workflows, channels, env). This line is outside the diff, so I can't inline it, but it's worth correcting while you're in this file.

Praise

  • The workflow trigger confirm-before-triggering block (Step 4) correctly treats triggering as side-effecting and preserves the pack's confirm-before-write consent posture — good instinct given a trigger can start a real deploy.
  • The approval-flow example passes the callback token via --callback-bearer "$CI_TOKEN" with an explicit note about avoiding shell history / process lists, and the --buttons JSON uses a <token> placeholder — no secret leakage. Consistent with the repo's privacy-hygiene rules.

Recommendation: approve

Comment thread README.md
| `POST /v1/send-message/` | `dailybot-chat` skill | **Either** `X-API-KEY` (org-wide) **or** Bearer token (login, role-scoped). Targets users/channels/teams, optional `thread_responses[]` for replies, optional `bot_message_id` to edit a previous message (parent or reply) |
| `POST /v1/send-message/` | `dailybot-chat` skill | **Either** `X-API-KEY` (org-wide) **or** Bearer token (login, role-scoped). Targets users/channels/teams, optional `thread_responses[]` for replies, optional `bot_message_id` to edit a previous message (parent or reply), optional `buttons[]` for interactive buttons |
| `GET /v1/workflows/` | `dailybot-workflow` skill (list/get) | `X-API-KEY` **or** Bearer |
| `POST /v1/workflows/<uuid>/trigger/` | `dailybot-workflow` skill (trigger) | `X-API-KEY` **or** Bearer; optional `{payload}` JSON object (≤8 KiB) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ships? public surface. This adds POST /v1/workflows/<uuid>/trigger/ (and, one row up, buttons[] on /v1/send-message/) to the README's outbound-calls table, but docs/API_REFERENCE.md — the canonical public API reference served standalone at www.dailybot.com/skill.md — still documents only GET /v1/workflows/ and a buttons-less send-message. Per AGENTS.md (DON'T #13), the public API ref must track the same surface as the runtime SKILL.md files. An agent working from API_REFERENCE.md alone won't discover workflow trigger or interactive buttons. Mirror the new endpoint, the buttons[] field, and the new button_* / workflow_* error codes into docs/API_REFERENCE.md.

--callback-url "https://ci.example.com/hooks/release" \
--callback-bearer "$CI_TOKEN"
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads-up nit: the button flags use two different separators — --link-button / --button take "Label::value" (double colon), while --approve-button / --reject-button / --workflow-button take "Label=value" (equals). This mirrors the real CLI, but an agent that reads one example and reuses the wrong separator will silently mis-parse the label/value. Consider a one-line callout (e.g. "note: approval/workflow buttons use =, not ::") so the distinction is hard to miss.

| `400` | `button_callback_form_not_found` | `callback_form` UUID doesn't match a form | Verify the form UUID (`dailybot form list`). |
| `400` | `button_callback_command_invalid` | `callback_command` is not a recognized ChatOps command | Check the command string. |
| `400` | `button_callback_prompt_invalid` | `callback_prompt` is empty or too long | Fix the prompt text. |
| `400` | `button_callback_workflow_not_found` | `callback_workflow` UUID doesn't match a workflow, or the workflow isn't triggerable | Verify the UUID (`dailybot workflow list --filter api_trigger`). |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording drift: this row describes button_callback_workflow_not_found as "the workflow isn't triggerable", but the shared table in shared/list-query-and-errors.md:172 says "isn't API-triggerable". Same code, slightly different prose. Align on "API-triggerable" so agents matching on the shared source of truth read the identical meaning.

@xergioalex
xergioalex merged commit 464680d into main Jul 24, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-reviewed Passed AI code review Ready Trigger AI code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant