Globals
Globals provided by the orchestrator, available without loading a module.
Members
- cluster_id
- datacenter_id
- err
- help
- ok
- param
- register_workflow
- result
- sha256
- sleep
- struct
- tenant_id
- tenant_uuid
cluster_id
cluster_id()Get the cluster ID.
idstringThe cluster ID.datacenter_id
datacenter_id()Get the datacenter ID.
idstringThe datacenter ID.err
err(error)Creates an error Result value.
erroranyThe error value.resultResultAn error Result value.help
help(topic?)Shows documentation for modules and functions. Call with no arguments to list all modules, or pass a module/function to see its details.
topic?optionalmodule | function | stringA module, function, or string name to get help fortextstringFormatted help textok
ok(value)Creates a successful Result value.
valueanyThe success value.resultResultA successful Result value.param
param(module, key)Retrieves a parameter value passed to an agent tool. Only available during agent tool execution context.
modulestringThe module name to look up the parameter inkeystringThe parameter key within the modulevalueanyThe parameter value converted to a Starlark typeprint(message)Print a message to the Temporal UI.
messageanyThe message to print.register_workflow
register_workflow(workflow_function, workflow_id?, on_failure?, on_cancel?, query?, max_concurrency?, circuit_breaker?)Register a workflow.
workflow_functionfunctionThe Starlark function to register as a workflow. The function must have a docstring with argument and return types.workflow_id?optionalfunctionThe Starlark function used to generate a logical, tenant-local workflow execution ID. This should accept the same arguments as the workflow function. Tenant prefixes are applied by Remediation Orchestrator and must not be returned by this function.on_failure?optionalfunctionThe Starlark function to call if the workflow fails. This should accept the same arguments as the workflow function. An additional argument, errors of type list[string] or string can be specified for the error history to be passed in.on_cancel?optionalfunctionThe Starlark function to call if the workflow is canceled. This should accept the same arguments as the workflow function.query?optionalfunctionThe Starlark function to call to query the workflow. This should accept the same arguments as the workflow function.max_concurrency?optionalintThe maximum number of concurrent workflow executions. Defaults to infinite. This is best-effort enforced due to Temporal Count queries lack of strong consistency.circuit_breaker?optionaldict[string:any]DEPRECATED: Circuit breakers are now managed through the web UI, not during registrationworkflowworkflows.WorkflowThe workflow object.result
result(value?, error?)Creates a Result value with optional value and error fields.
value?optionalanyThe success value.error?optionalanyThe error value.resultResultA Result value.sha256
sha256(s)Compute SHA256 hash of a string.
sstringThe string to hash.hashstringThe SHA256 hash.sleep
sleep(duration)Sleep for a given duration.
durationstringThe duration to sleep.struct
struct(kwargs?)Creates an immutable struct with the given keyword arguments as fields. Fields are accessible as attributes.
kwargs?optionalanyKeyword arguments that become the struct’s fieldsresultstructAn immutable struct with the given fieldstenant_id
tenant_id()Get the current workflow’s human-readable tenant ID.
idstringThe human-readable tenant ID.tenant_uuid
tenant_uuid()Get the current workflow’s canonical tenant UUID.
uuidstringThe canonical tenant UUID.