Authoring
A script isn't a string of expressions in a box — it's real Kotlin, with a context handed to it and the platform's own services a call away. If you can write it in Kotlin, you can run it here.
The context
When a script runs, it's given a context: the input it was called with, who called it, a scope to launch async work in, and a logger. No global reaching around — what a run needs is right there.
Typed service access
Scripts reach platform services the same way the platform reaches them itself — asked for by type. Content, collections, metadata, and search are there to call directly, fully typed, no HTTP hop in between.
val content = provide<MetadataService>()
val collections = provide<CollectionService>()
val item = content.getById(id)
log.info("loaded ${item.name}")Validated & compiled
Nothing runs unseen. The source is validated for dangerous calls, then compiled to bytecode — any error shows up now, not in production. The compiled result is cached, so the second run doesn't pay the compile cost again.
Keep exploring