Skip to content

Tutorial 7: Escape Hatches

Duration: 1 hour
Prerequisites: Tutorials 1-6 completed
What you'll learn: External integrations, capability-based security, and escape hatch patterns

Overview

Escape hatches let you integrate with external systems while maintaining security guarantees.

Defining Escape Hatches

escape SendEmail {
  capability Email.Send

  function send(to: Email, subject: String, body: String) -> Result[Void, EmailError]
    nondeterministic: true
    timeout: 5s

  adapter typescript {
    implementation "sendgrid"
    configuration {
      apiKey: env.SENDGRID_API_KEY
    }
  }
}

(Full escape hatch tutorial content...)