[{"data":1,"prerenderedAt":405},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fscripting":180,"\u002Fdocs\u002Fscripting-surround":400},[4,8,20,24,59,65,69,73,77,100,104,108,112,116,120,124,128,160,164,168,172,176],{"title":5,"path":6,"stem":7},"","\u002Fdocs","1.docs\u002Findex",{"title":9,"path":10,"stem":11,"children":12,"icon":19},"Getting Started","\u002Fdocs\u002Fgetting-started","1.docs\u002F01.getting-started\u002F1.index",[13,15],{"title":14,"path":10,"stem":11},"Bosca",{"title":16,"path":17,"stem":18},"Quickstart","\u002Fdocs\u002Fgetting-started\u002Fquickstart","1.docs\u002F01.getting-started\u002F2.quickstart",false,{"title":21,"path":22,"stem":23},"Kit","\u002Fdocs\u002Fkit","1.docs\u002F01.kit",{"title":25,"path":26,"stem":27,"children":28},"Content","\u002Fdocs\u002Fcontent","1.docs\u002F02.content\u002F1.index",[29,31,53],{"title":30,"path":26,"stem":27},"Content Strategy",{"title":32,"path":33,"stem":34,"children":35},"Metadata","\u002Fdocs\u002Fcontent\u002Fmetadata","1.docs\u002F02.content\u002F1.metadata\u002F1.index",[36,37,41,45,49],{"title":32,"path":33,"stem":34},{"title":38,"path":39,"stem":40},"Supplementary","\u002Fdocs\u002Fcontent\u002Fmetadata\u002Fsupplementary","1.docs\u002F02.content\u002F1.metadata\u002F2.supplementary",{"title":42,"path":43,"stem":44},"Documents","\u002Fdocs\u002Fcontent\u002Fmetadata\u002Fdocuments","1.docs\u002F02.content\u002F1.metadata\u002F3.documents",{"title":46,"path":47,"stem":48},"Guides","\u002Fdocs\u002Fcontent\u002Fmetadata\u002Fguides","1.docs\u002F02.content\u002F1.metadata\u002F4.guides",{"title":50,"path":51,"stem":52},"Bible","\u002Fdocs\u002Fcontent\u002Fmetadata\u002Fbible","1.docs\u002F02.content\u002F1.metadata\u002F5.bible",{"title":54,"path":55,"stem":56,"children":57},"Collections","\u002Fdocs\u002Fcontent\u002Fcollections","1.docs\u002F02.content\u002F2.collections\u002F1.index",[58],{"title":54,"path":55,"stem":56},{"title":60,"path":61,"stem":62,"children":63},"Workflows","\u002Fdocs\u002Fworkflows","1.docs\u002F03.workflows\u002F1.index",[64],{"title":60,"path":61,"stem":62},{"title":66,"path":67,"stem":68},"Search","\u002Fdocs\u002Fsearch","1.docs\u002F04.search",{"title":70,"path":71,"stem":72},"Profiles","\u002Fdocs\u002Fprofiles","1.docs\u002F05.profiles",{"title":74,"path":75,"stem":76},"Organizations","\u002Fdocs\u002Forganizations","1.docs\u002F06.organizations",{"title":78,"path":79,"stem":80,"children":81,"icon":99},"Engineering","\u002Fdocs\u002Fengineering","1.docs\u002F07.engineering\u002F1.index",[82,83,87,91,95],{"title":78,"path":79,"stem":80},{"title":84,"path":85,"stem":86},"Infrastructure","\u002Fdocs\u002Fengineering\u002Finfrastructure","1.docs\u002F07.engineering\u002F2.infrastructure",{"title":88,"path":89,"stem":90},"Backend Services","\u002Fdocs\u002Fengineering\u002Fservices","1.docs\u002F07.engineering\u002F3.services",{"title":92,"path":93,"stem":94},"Deployment","\u002Fdocs\u002Fengineering\u002Fdeployment","1.docs\u002F07.engineering\u002F4.deployment",{"title":96,"path":97,"stem":98},"Framework Modules","\u002Fdocs\u002Fengineering\u002Fframework","1.docs\u002F07.engineering\u002F5.framework","i-heroicons-wrench-screwdriver",{"title":101,"path":102,"stem":103},"Identity Management","\u002Fdocs\u002Fidentity","1.docs\u002F07.identity",{"title":105,"path":106,"stem":107},"Localization","\u002Fdocs\u002Flocalization","1.docs\u002F08.localization",{"title":109,"path":110,"stem":111},"Analytics","\u002Fdocs\u002Fanalytics","1.docs\u002F09.analytics",{"title":113,"path":114,"stem":115},"AI & Agents","\u002Fdocs\u002Fai","1.docs\u002F10.ai",{"title":117,"path":118,"stem":119},"Messaging & Email","\u002Fdocs\u002Fmessages","1.docs\u002F11.messages",{"title":121,"path":122,"stem":123},"Scheduler","\u002Fdocs\u002Fscheduler","1.docs\u002F12.scheduler",{"title":125,"path":126,"stem":127},"Backup & Restore","\u002Fdocs\u002Fbackup","1.docs\u002F13.backup",{"title":129,"path":130,"stem":131,"children":132},"Architecture","\u002Fdocs\u002Farchitecture","1.docs\u002F14.architecture\u002F1.index",[133,134,137,141,145,149,153,157],{"title":129,"path":130,"stem":131},{"title":92,"path":135,"stem":136},"\u002Fdocs\u002Farchitecture\u002Fdeployment","1.docs\u002F14.architecture\u002F2.deployment",{"title":138,"path":139,"stem":140},"Security","\u002Fdocs\u002Farchitecture\u002Fsecurity","1.docs\u002F14.architecture\u002F3.security",{"title":142,"path":143,"stem":144},"Telemetry","\u002Fdocs\u002Farchitecture\u002Ftelemetry","1.docs\u002F14.architecture\u002F4.telemetry",{"title":146,"path":147,"stem":148},"Administration","\u002Fdocs\u002Farchitecture\u002Fadministration","1.docs\u002F14.architecture\u002F5.administration",{"title":150,"path":151,"stem":152},"GraphQL Schema","\u002Fdocs\u002Farchitecture\u002Fgraphql","1.docs\u002F14.architecture\u002F6.graphql",{"title":154,"path":155,"stem":156},"Storage","\u002Fdocs\u002Farchitecture\u002Fstorage","1.docs\u002F14.architecture\u002F7.storage",{"title":105,"path":158,"stem":159},"\u002Fdocs\u002Farchitecture\u002Flocalization","1.docs\u002F14.architecture\u002F8.localization",{"title":161,"path":162,"stem":163},"Scripting","\u002Fdocs\u002Fscripting","1.docs\u002F15.scripting",{"title":165,"path":166,"stem":167},"Configuration","\u002Fdocs\u002Fconfiguration","1.docs\u002F16.configuration",{"title":169,"path":170,"stem":171},"Forms","\u002Fdocs\u002Fforms","1.docs\u002F17.forms",{"title":173,"path":174,"stem":175},"Segmentation & Campaigns","\u002Fdocs\u002Fsegmentation","1.docs\u002F18.segmentation",{"title":177,"path":178,"stem":179},"Devices & Push","\u002Fdocs\u002Fdevices","1.docs\u002F19.devices",{"id":181,"title":161,"body":182,"description":394,"extension":395,"meta":396,"navigation":397,"path":162,"seo":398,"stem":163,"__hash__":399},"docs\u002F1.docs\u002F15.scripting.md",{"type":183,"value":184,"toc":383},"minimark",[185,189,194,229,233,236,256,260,263,266,270,273,277,280,283,286,289,292,295,312,316,319,340,343,360,363],[186,187,188],"p",{},"Bosca includes a built-in scripting engine that lets you write, manage, and execute Kotlin Script (KTS) files directly on the server. Scripts can automate tasks, respond to platform events, and extend AI agent capabilities.",[190,191,193],"h2",{"id":192},"what-you-get","What you get",[195,196,197,205,211,217,223],"ul",{},[198,199,200,204],"li",{},[201,202,203],"strong",{},"Server-Side Scripts:"," Write Kotlin scripts that run on the Bosca server with access to platform services.",[198,206,207,210],{},[201,208,209],{},"Event Triggers:"," Bind scripts to platform events so they execute automatically when things happen.",[198,212,213,216],{},[201,214,215],{},"Workflow Integration:"," Scripts can trigger workflow transitions, giving automations control over the content lifecycle.",[198,218,219,222],{},[201,220,221],{},"AI Agent Tools:"," Scripts can serve as tool implementations for AI agents, extending what agents can do.",[198,224,225,228],{},[201,226,227],{},"Administration UI:"," Create, edit, and manage scripts from the admin panel with Monaco editor support.",[190,230,232],{"id":231},"script-types","Script Types",[186,234,235],{},"Bosca supports several script categories:",[195,237,238,244,250],{},[198,239,240,243],{},[201,241,242],{},"General:"," Standalone scripts for ad-hoc tasks or scheduled execution.",[198,245,246,249],{},[201,247,248],{},"Trigger:"," Scripts bound to platform events that fire automatically.",[198,251,252,255],{},[201,253,254],{},"Tool:"," Scripts that provide tool implementations for AI agents.",[190,257,259],{"id":258},"how-triggers-work","How Triggers Work",[186,261,262],{},"Trigger bindings connect scripts to platform events. When a matching event occurs, Bosca executes the bound script with a context object that includes event details and access to platform services.",[186,264,265],{},"This lets you build reactive automations—for example, a script that generates a summary whenever new content is published, or one that notifies a team when a workflow transition fails.",[190,267,269],{"id":268},"script-agent","Script Agent",[186,271,272],{},"The Script Agent allows you to manage scripts using natural language through the chat interface. You can create, edit, delete, enable, disable, execute, and validate scripts conversationally.",[190,274,276],{"id":275},"multi-instance-cache-invalidation","Multi-Instance Cache Invalidation",[186,278,279],{},"In multi-instance deployments, Bosca uses PubSub messaging to keep script caches synchronized across servers. When a script is created, edited, enabled, disabled, or deleted on any instance, an invalidation message is broadcast so all other instances clear their local KTS engine caches immediately.",[186,281,282],{},"This means script changes take effect cluster-wide without restarting services. The system supports both NATS and Redis as PubSub backends, with automatic reconnection and retry on failure.",[190,284,138],{"id":285},"security",[186,287,288],{},"Scripts run in a controlled environment with restrictions to prevent unsafe operations. The scripting engine enforces boundaries on what scripts can access and modify.",[190,290,146],{"id":291},"administration",[186,293,294],{},"The Administration UI provides:",[195,296,297,300,303,306,309],{},[198,298,299],{},"A script editor with Monaco (VS Code) editor support",[198,301,302],{},"Script listing with enable\u002Fdisable controls",[198,304,305],{},"Trigger binding management",[198,307,308],{},"Manual script execution",[198,310,311],{},"Script validation before saving",[190,313,315],{"id":314},"for-developers","For developers",[186,317,318],{},"Related modules:",[195,320,321,328,334],{},[198,322,323,324],{},"Core interfaces: ",[325,326,327],"code",{},"backend\u002Fframework\u002Fcore-scripting",[198,329,330,331],{},"Implementation: ",[325,332,333],{},"backend\u002Fframework\u002Fscripting",[198,335,336,337],{},"GraphQL schema: ",[325,338,339],{},"backend\u002Fframework\u002Fscripting\u002Fsrc\u002Fmain\u002Fresources\u002Fgraphql\u002Fscripts.graphqls",[186,341,342],{},"Script execution contexts provide access to:",[195,344,345,348,351,354,357],{},[198,346,347],{},"Database connections and services",[198,349,350],{},"Content and metadata operations",[198,352,353],{},"Workflow state management",[198,355,356],{},"Tool context for agent integrations",[198,358,359],{},"Trigger context for event-driven execution",[186,361,362],{},"Related:",[195,364,365,371,377],{},[198,366,367,368],{},"AI agents: ",[369,370,113],"a",{"href":114},[198,372,373,374],{},"Workflows: ",[369,375,376],{"href":61},"Workflow automation",[198,378,379,380],{},"Scheduler: ",[369,381,382],{"href":122},"Scheduled execution",{"title":5,"searchDepth":384,"depth":384,"links":385},2,[386,387,388,389,390,391,392,393],{"id":192,"depth":384,"text":193},{"id":231,"depth":384,"text":232},{"id":258,"depth":384,"text":259},{"id":268,"depth":384,"text":269},{"id":275,"depth":384,"text":276},{"id":285,"depth":384,"text":138},{"id":291,"depth":384,"text":146},{"id":314,"depth":384,"text":315},"Create and run Kotlin scripts directly on the server with event-driven triggers and AI agent integration.","md",{},true,{"title":161,"description":394},"rlB-EHvrCf0h-EdqkJNaC6dBCsGPHN4-o0_VXYN5y2E",[401,403],{"title":105,"path":158,"stem":159,"description":402,"children":-1},"Manage supported languages and localized content across the platform.",{"title":165,"path":166,"stem":167,"description":404,"children":-1},"Manage platform settings with a centralized key-value configuration store.",1775372112846]