Class ScriptServiceGrpc.ScriptServiceFutureStub
java.lang.Object
io.grpc.stub.AbstractStub<ScriptServiceGrpc.ScriptServiceFutureStub>
io.grpc.stub.AbstractFutureStub<ScriptServiceGrpc.ScriptServiceFutureStub>
com.soulfiremc.grpc.generated.ScriptServiceGrpc.ScriptServiceFutureStub
- Enclosing class:
ScriptServiceGrpc
public static final class ScriptServiceGrpc.ScriptServiceFutureStub
extends io.grpc.stub.AbstractFutureStub<ScriptServiceGrpc.ScriptServiceFutureStub>
A stub to allow clients to do ListenableFuture-style rpc calls to service ScriptService.
ScriptService provides management and execution capabilities for visual node-based automation scripts within SoulFire. The visual scripting system allows users to create automation workflows by connecting nodes in a graph. Each node represents an action, condition, or event trigger. Nodes are connected by edges that define execution flow and data transfer. SCRIPT LIFECYCLE: 1. Create a script using CreateScript with initial nodes/edges or empty graph 2. Edit the script using UpdateScript to modify the node graph 3. Activate the script using ActivateScript to register event listeners 4. Monitor execution via SubscribeScriptEvents or GetScriptStatus 5. Deactivate using DeactivateScript when done 6. Delete unused scripts with DeleteScript Scripts are reactive state machines - they don't "run" but rather listen for trigger events and execute node chains in response. Activation registers the listeners, deactivation removes them and cancels any pending async operations. PERMISSIONS: Script operations require appropriate instance permissions. The specific permissions are TBD but will likely include: - READ_SCRIPT: View script definitions and status - UPDATE_SCRIPT: Create, modify, and delete scripts - EXECUTE_SCRIPT: Activate and deactivate scripts LOGGING: Script execution logs can be streamed via SubscribeScriptLogs or filtered using InstanceScriptLogScope in the LogsService (see logs.proto).
-
Nested Class Summary
Nested classes/interfaces inherited from class io.grpc.stub.AbstractStub
io.grpc.stub.AbstractStub.StubFactory<T> -
Method Summary
Modifier and TypeMethodDescriptionbuild(io.grpc.Channel channel, io.grpc.CallOptions callOptions) com.google.common.util.concurrent.ListenableFuture<CreateScriptResponse> createScript(CreateScriptRequest request) Creates a new script in the specified instance.com.google.common.util.concurrent.ListenableFuture<DeactivateScriptResponse> deactivateScript(DeactivateScriptRequest request) Deactivates an active script.com.google.common.util.concurrent.ListenableFuture<DeleteScriptResponse> deleteScript(DeleteScriptRequest request) Permanently deletes a script.com.google.common.util.concurrent.ListenableFuture<GetNodeTypesResponse> getNodeTypes(GetNodeTypesRequest request) Gets all available node types with their metadata.com.google.common.util.concurrent.ListenableFuture<GetRegistryDataResponse> getRegistryData(GetRegistryDataRequest request) Gets Minecraft registry data for autocomplete and validation.com.google.common.util.concurrent.ListenableFuture<GetScriptResponse> getScript(GetScriptRequest request) Retrieves a specific script by its ID.com.google.common.util.concurrent.ListenableFuture<GetScriptStatusResponse> getScriptStatus(GetScriptStatusRequest request) Gets the current status of a script.com.google.common.util.concurrent.ListenableFuture<ListScriptsResponse> listScripts(ListScriptsRequest request) Lists all scripts in the specified instance.com.google.common.util.concurrent.ListenableFuture<UpdateScriptResponse> updateScript(UpdateScriptRequest request) Updates an existing script's metadata and/or node graph.com.google.common.util.concurrent.ListenableFuture<ValidateScriptResponse> validateScript(ValidateScriptRequest request) Validates a script graph without saving it.Methods inherited from class io.grpc.stub.AbstractFutureStub
newStub, newStubMethods inherited from class io.grpc.stub.AbstractStub
getCallOptions, getChannel, withCallCredentials, withChannel, withCompression, withDeadline, withDeadlineAfter, withDeadlineAfter, withExecutor, withInterceptors, withMaxInboundMessageSize, withMaxOutboundMessageSize, withOnReadyThreshold, withOption, withWaitForReady
-
Method Details
-
build
protected ScriptServiceGrpc.ScriptServiceFutureStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) - Specified by:
buildin classio.grpc.stub.AbstractStub<ScriptServiceGrpc.ScriptServiceFutureStub>
-
createScript
public com.google.common.util.concurrent.ListenableFuture<CreateScriptResponse> createScript(CreateScriptRequest request) Creates a new script in the specified instance. The script can be created with initial nodes and edges, or as a blank script to be edited later. Returns: The complete script data including the generated ID Errors: NOT_FOUND if instance does not exist Errors: PERMISSION_DENIED if user lacks script creation permission Errors: INVALID_ARGUMENT if required fields are missing or invalid
-
getScript
public com.google.common.util.concurrent.ListenableFuture<GetScriptResponse> getScript(GetScriptRequest request) Retrieves a specific script by its ID. Returns the complete script data including all nodes and edges. Errors: NOT_FOUND if instance or script does not exist Errors: PERMISSION_DENIED if user lacks script read permission
-
updateScript
public com.google.common.util.concurrent.ListenableFuture<UpdateScriptResponse> updateScript(UpdateScriptRequest request) Updates an existing script's metadata and/or node graph. Only specified fields are updated; others remain unchanged. Use update_nodes/update_edges flags to explicitly set empty lists. Errors: NOT_FOUND if instance or script does not exist Errors: PERMISSION_DENIED if user lacks script update permission Errors: INVALID_ARGUMENT if update data is invalid
-
deleteScript
public com.google.common.util.concurrent.ListenableFuture<DeleteScriptResponse> deleteScript(DeleteScriptRequest request) Permanently deletes a script. If the script is currently active, it will be deactivated first. This operation cannot be undone. Errors: NOT_FOUND if instance or script does not exist Errors: PERMISSION_DENIED if user lacks script delete permission
-
listScripts
public com.google.common.util.concurrent.ListenableFuture<ListScriptsResponse> listScripts(ListScriptsRequest request) Lists all scripts in the specified instance. Returns summary information (ScriptInfo) without full node/edge data to reduce response size. Errors: NOT_FOUND if instance does not exist Errors: PERMISSION_DENIED if user lacks script read permission
-
deactivateScript
public com.google.common.util.concurrent.ListenableFuture<DeactivateScriptResponse> deactivateScript(DeactivateScriptRequest request) Deactivates an active script. Unregisters all event listeners and cancels any pending async operations. Errors: NOT_FOUND if instance or script does not exist Errors: PERMISSION_DENIED if user lacks script execution permission Errors: FAILED_PRECONDITION if script is not active
-
getScriptStatus
public com.google.common.util.concurrent.ListenableFuture<GetScriptStatusResponse> getScriptStatus(GetScriptStatusRequest request) Gets the current status of a script. Returns whether the script is active, which node is executing, and activation count. Errors: NOT_FOUND if instance or script does not exist Errors: PERMISSION_DENIED if user lacks script read permission
-
getNodeTypes
public com.google.common.util.concurrent.ListenableFuture<GetNodeTypesResponse> getNodeTypes(GetNodeTypesRequest request) Gets all available node types with their metadata. This enables clients to render the node editor without hardcoded knowledge of specific node types. The response includes port definitions, categories, display names, and all other information needed to render and validate nodes. This endpoint is cacheable - node types only change between server versions.
-
getRegistryData
public com.google.common.util.concurrent.ListenableFuture<GetRegistryDataResponse> getRegistryData(GetRegistryDataRequest request) Gets Minecraft registry data for autocomplete and validation. Returns blocks, entities, items, and biomes that can be used in scripts. This endpoint is cacheable - registry data only changes between server versions.
-
validateScript
public com.google.common.util.concurrent.ListenableFuture<ValidateScriptResponse> validateScript(ValidateScriptRequest request) Validates a script graph without saving it. Returns all diagnostics (errors and warnings) for the given nodes and edges. Useful for live validation in the editor without requiring a save.
-