Files
clawmates/deploy/e2e/scenarios.toml
T
Omar SobhandClaude Fable 5 000b9b3a4b P4 core: broker-held app connections + gated, broker-executed Slack posting
- app_connections repo; POST /api/apps/connect (keys/basic): the credential
  goes to the secret broker over its socket and only the encrypted ref lands
  in the row; disconnect endpoint; /api/apps directory merged with live
  connection status; audit rows for connect/disconnect
- Broker protocol: InvokeHttp carries a JSON body
- slack.post tool (SendsExternally -> gated): marked broker_executed — the
  runtime skips its own grant consumption and the BROKER independently
  verifies + consumes the single-use grant, then calls Slack with the bot
  token injected; the runtime never sees the credential
- Config: [broker] socket_path + [slack] base_url; e2e harness spawns the
  real teamclaw-broker daemon and the server hosts an e2e-only /__slack sink
- SlackApp: Connection tab stores the token via the broker; connected state
- Integration test: blocked while pending -> approved -> sink received
  exactly one post with 'Bearer xoxb-test-token' -> grant replay refused
- E2E journey: connect Slack in the panel -> gated post card with preview ->
  sink empty while pending -> approve -> exactly one post, queue clear

133 Rust + 63 frontend tests + 21 Playwright journeys.

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

80 lines
2.0 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." },
]