Files
clawmates/deploy/e2e/scenarios.toml
T
Omar SobhandClaude Fable 5 6dbdd20ee0 P4: Slack inbound @mention — broker-verified signatures drive real runs
- Broker op VerifySlackSignature: v0 HMAC-SHA256 computed INSIDE the broker
  (constant-time compare); the signing secret never crosses the socket.
  Slack secrets are one JSON credential {bot_token, signing_secret}; the
  broker extracts the right field per operation
- Public POST /api/slack/events: signature verified against connected slack
  connections via the broker; forged signatures 401; url_verification
  handshake echoed only when signed; app_mention starts a real run in the
  agent's dedicated '💬 Slack' session — and the agent's reply is itself a
  gated outbound post
- SlackApp Connection tab captures bot token + signing secret
- Integration test: forged 401, signed challenge, signed mention -> run ->
  slack.post pending in the approval queue
- E2E: full loop — connect, gated outbound (sink empty -> exactly one post),
  then a node-crypto-signed mention -> approval card -> approve -> 'On it!'
  lands in the sink

134 Rust + 63 frontend tests + 21 Playwright journeys.

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-06-10 06:40:04 -05:00

93 lines
2.3 KiB
TOML

# Scenario script for the deterministic `scripted` LLM provider.
# A prompt containing a `marker` plays that scenario's turns; each tool
# round-trip advances to the next turn. Unmatched prompts get an echo.
[[scenario]]
marker = "[[scenario:hello]]"
[[scenario.turns]]
events = [
{ type = "text", text = "Hello! I'm Scout, your research analyst." },
]
[[scenario]]
marker = "[[scenario:tool-time]]"
[[scenario.turns]]
events = [
{ type = "text", text = "Let me check the clock." },
{ type = "tool_use", name = "clock.now", input = {} },
]
[[scenario.turns]]
events = [
{ type = "text", text = "Done — I checked the current time for you." },
]
[[scenario]]
marker = "[[scenario:gated-email]]"
[[scenario.turns]]
events = [
{ type = "text", text = "I'll send that email once you approve it." },
{ type = "tool_use", name = "email.send", input = { to = "[email protected]", subject = "Q2 numbers", body = "Revenue is up 14% quarter over quarter." } },
]
[[scenario.turns]]
events = [
{ type = "text", text = " The email step is finished." },
]
[[scenario]]
marker = "[[scenario:save-report]]"
[[scenario.turns]]
events = [
{ type = "tool_use", name = "files.write", input = { path = "reports/q2.md", content = "Q2 revenue is up 14%." } },
]
[[scenario.turns]]
events = [
{ type = "text", text = "Saved the report to your documents drive." },
]
[[scenario]]
marker = "[[scenario:schedule-digest]]"
[[scenario.turns]]
events = [
{ type = "tool_use", name = "routine.schedule", input = { name = "Morning digest", cron = "0 9 * * *", message = "Compile the morning digest." } },
]
[[scenario.turns]]
events = [
{ type = "text", text = "Scheduled the morning digest for 9am daily." },
]
[[scenario]]
marker = "[[scenario:slack-post]]"
[[scenario.turns]]
events = [
{ type = "text", text = "I'll post that once you approve." },
{ type = "tool_use", name = "slack.post", input = { channel = "#general", text = "Q2 revenue is up 14%." } },
]
[[scenario.turns]]
events = [
{ type = "text", text = " Posted to #general." },
]
[[scenario]]
marker = "[[scenario:mention]]"
[[scenario.turns]]
events = [
{ type = "tool_use", name = "slack.post", input = { channel = "#general", text = "On it!" } },
]
[[scenario.turns]]
events = [
{ type = "text", text = " Replied in Slack." },
]