OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

Slack Messaging

ContractSpec supports signed Slack event ingestion and outbox-backed outbound replies through the channel runtime.

Required secrets and config

// secret payload
{
  "botToken": "xoxb-...",
  "signingSecret": "..."
}

// optional connection config
{
  "defaultChannelId": "C0123456789",
  "apiBaseUrl": "https://slack.com/api"
}

Webhook ingress

  • Inbound events are accepted on /webhooks/slack/events.
  • Requests are validated with Slack signatures (x-slack-signature + timestamp tolerance).
  • Normalized events are deduplicated and persisted before any outbound side effects.

Workspace routing and dispatch

# Workspace mapping (recommended)
CHANNEL_WORKSPACE_MAP_SLACK={"T123":"workspace-acme"}

# Dispatch protection
CHANNEL_DISPATCH_TOKEN=...

# Optional scheduler
CHANNEL_DISPATCH_INTERVAL_MS=120000
CHANNEL_DISPATCH_RUN_ON_START=1

Best practices

  • Keep bot tokens and signing secrets in a managed secret provider.
  • Use workspace mapping to prevent cross-tenant event leakage.
  • Keep dispatch asynchronous so webhook handlers stay fast and reliable.
  • Monitor telemetry for ingest, decision, outbox, and dispatch stages.