// @generated by protoc-gen-es v2.13.0 with parameter "target=ts,import_extension=js"
// @generated from file soulfire/command.proto (package soulfire.v1, syntax proto3)
/* eslint-disable */

import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
import { file_soulfire_api_docs } from "./api_docs_pb.js";
import { file_google_api_annotations } from "../google/api/annotations_pb.js";
import { file_google_api_field_behavior } from "../google/api/field_behavior_pb.js";
import type { Message } from "@bufbuild/protobuf";

/**
 * Describes the file soulfire/command.proto.
 */
export const file_soulfire_command: GenFile = /*@__PURE__*/
  fileDesc("ChZzb3VsZmlyZS9jb21tYW5kLnByb3RvEgtzb3VsZmlyZS52MSIUChJHbG9iYWxDb21tYW5kU2NvcGUiOgoUSW5zdGFuY2VDb21tYW5kU2NvcGUSIgoLaW5zdGFuY2VfaWQYASABKAlCDeBBAtLzGAYKBHV1aWQiVAoPQm90Q29tbWFuZFNjb3BlEiIKC2luc3RhbmNlX2lkGAEgASgJQg3gQQLS8xgGCgR1dWlkEh0KBmJvdF9pZBgCIAEoCUIN4EEC0vMYBgoEdXVpZCKuAQoMQ29tbWFuZFNjb3BlEjEKBmdsb2JhbBgBIAEoCzIfLnNvdWxmaXJlLnYxLkdsb2JhbENvbW1hbmRTY29wZUgAEjUKCGluc3RhbmNlGAIgASgLMiEuc291bGZpcmUudjEuSW5zdGFuY2VDb21tYW5kU2NvcGVIABIrCgNib3QYAyABKAsyHC5zb3VsZmlyZS52MS5Cb3RDb21tYW5kU2NvcGVIAEIHCgVzY29wZSJVCg5Db21tYW5kUmVxdWVzdBItCgVzY29wZRgEIAEoCzIZLnNvdWxmaXJlLnYxLkNvbW1hbmRTY29wZUID4EECEhQKB2NvbW1hbmQYAyABKAlCA+BBAiIkCg9Db21tYW5kUmVzcG9uc2USEQoEY29kZRgBIAEoBUID4EECInQKGENvbW1hbmRDb21wbGV0aW9uUmVxdWVzdBItCgVzY29wZRgFIAEoCzIZLnNvdWxmaXJlLnYxLkNvbW1hbmRTY29wZUID4EECEhQKB2NvbW1hbmQYAyABKAlCA+BBAhITCgZjdXJzb3IYBCABKAVCA+BBAiJOChFDb21tYW5kQ29tcGxldGlvbhIXCgpzdWdnZXN0aW9uGAEgASgJQgPgQQISFAoHdG9vbHRpcBgCIAEoCUgAiAEBQgoKCF90b29sdGlwIlUKGUNvbW1hbmRDb21wbGV0aW9uUmVzcG9uc2USOAoLc3VnZ2VzdGlvbnMYASADKAsyHi5zb3VsZmlyZS52MS5Db21tYW5kQ29tcGxldGlvbkID4EECMoYDCg5Db21tYW5kU2VydmljZRLGAQoORXhlY3V0ZUNvbW1hbmQSGy5zb3VsZmlyZS52MS5Db21tYW5kUmVxdWVzdBocLnNvdWxmaXJlLnYxLkNvbW1hbmRSZXNwb25zZSJ5yvMYVgoPRXhlY3V0ZSBjb21tYW5kIg1jb21tYW5kLnNjb3BlOjRFeGVjdXRlcyBhIEJyaWdhZGllciBjb21tYW5kIGluIHRoZSByZXF1ZXN0ZWQgc2NvcGUugtPkkwIZOgEqIhQvdjEvY29tbWFuZHM6ZXhlY3V0ZRKqAQoSVGFiQ29tcGxldGVDb21tYW5kEiUuc291bGZpcmUudjEuQ29tbWFuZENvbXBsZXRpb25SZXF1ZXN0GiYuc291bGZpcmUudjEuQ29tbWFuZENvbXBsZXRpb25SZXNwb25zZSJFyvMYIQoQQ29tcGxldGUgY29tbWFuZCINY29tbWFuZC5zY29wZYLT5JMCGjoBKiIVL3YxL2NvbW1hbmRzOmNvbXBsZXRlQiEKHWNvbS5zb3VsZmlyZW1jLmdycGMuZ2VuZXJhdGVkUAFiBnByb3RvMw", [file_soulfire_api_docs, file_google_api_annotations, file_google_api_field_behavior]);

/**
 * Represents an unrestricted global command scope.
 * Commands executed in this scope have access to all instances and bots.
 * Requires the GLOBAL_COMMAND_EXECUTION permission.
 *
 * @generated from message soulfire.v1.GlobalCommandScope
 */
export type GlobalCommandScope = Message<"soulfire.v1.GlobalCommandScope"> & {
};

/**
 * Describes the message soulfire.v1.GlobalCommandScope.
 * Use `create(GlobalCommandScopeSchema)` to create a new message.
 */
export const GlobalCommandScopeSchema: GenMessage<GlobalCommandScope> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 0);

/**
 * Represents a command scope restricted to a specific instance.
 * Commands executed in this scope can only affect the specified instance and its bots.
 * Requires the INSTANCE_COMMAND_EXECUTION permission for the specified instance.
 *
 * @generated from message soulfire.v1.InstanceCommandScope
 */
export type InstanceCommandScope = Message<"soulfire.v1.InstanceCommandScope"> & {
  /**
   * The unique identifier (UUID) of the instance to scope commands to.
   * Must be a valid UUID string.
   *
   * @generated from field: string instance_id = 1;
   */
  instanceId: string;
};

/**
 * Describes the message soulfire.v1.InstanceCommandScope.
 * Use `create(InstanceCommandScopeSchema)` to create a new message.
 */
export const InstanceCommandScopeSchema: GenMessage<InstanceCommandScope> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 1);

/**
 * Represents a command scope restricted to a specific bot within an instance.
 * Commands executed in this scope can only affect the specified bot.
 * Requires the INSTANCE_COMMAND_EXECUTION permission for the parent instance.
 *
 * @generated from message soulfire.v1.BotCommandScope
 */
export type BotCommandScope = Message<"soulfire.v1.BotCommandScope"> & {
  /**
   * The unique identifier (UUID) of the instance containing the bot.
   * Must be a valid UUID string.
   *
   * @generated from field: string instance_id = 1;
   */
  instanceId: string;

  /**
   * The unique identifier (UUID) of the bot (profile ID) to scope commands to.
   * Must be a valid UUID string matching the bot's account profile ID.
   *
   * @generated from field: string bot_id = 2;
   */
  botId: string;
};

/**
 * Describes the message soulfire.v1.BotCommandScope.
 * Use `create(BotCommandScopeSchema)` to create a new message.
 */
export const BotCommandScopeSchema: GenMessage<BotCommandScope> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 2);

/**
 * Defines the execution context for a command, determining which instances
 * and bots the command can affect. The scope also determines required permissions.
 *
 * @generated from message soulfire.v1.CommandScope
 */
export type CommandScope = Message<"soulfire.v1.CommandScope"> & {
  /**
   * @generated from oneof soulfire.v1.CommandScope.scope
   */
  scope: {
    /**
     * Execute command with global (unrestricted) access to all instances and bots.
     *
     * @generated from field: soulfire.v1.GlobalCommandScope global = 1;
     */
    value: GlobalCommandScope;
    case: "global";
  } | {
    /**
     * Execute command restricted to a specific instance and its bots.
     *
     * @generated from field: soulfire.v1.InstanceCommandScope instance = 2;
     */
    value: InstanceCommandScope;
    case: "instance";
  } | {
    /**
     * Execute command restricted to a specific bot within an instance.
     *
     * @generated from field: soulfire.v1.BotCommandScope bot = 3;
     */
    value: BotCommandScope;
    case: "bot";
  } | { case: undefined; value?: undefined };
};

/**
 * Describes the message soulfire.v1.CommandScope.
 * Use `create(CommandScopeSchema)` to create a new message.
 */
export const CommandScopeSchema: GenMessage<CommandScope> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 3);

/**
 * Request message for executing a server command.
 *
 * @generated from message soulfire.v1.CommandRequest
 */
export type CommandRequest = Message<"soulfire.v1.CommandRequest"> & {
  /**
   * The execution scope that determines which instances/bots the command can affect
   * and what permissions are required. Must be set to one of the scope options.
   *
   * @generated from field: soulfire.v1.CommandScope scope = 4;
   */
  scope?: CommandScope | undefined;

  /**
   * The command string to execute. This follows the Brigadier command format,
   * e.g., "help", "move 100 64 200", "say Hello world".
   * Leading/trailing whitespace will be stripped before execution.
   *
   * @generated from field: string command = 3;
   */
  command: string;
};

/**
 * Describes the message soulfire.v1.CommandRequest.
 * Use `create(CommandRequestSchema)` to create a new message.
 */
export const CommandRequestSchema: GenMessage<CommandRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 4);

/**
 * Response message containing the result of command execution.
 *
 * @generated from message soulfire.v1.CommandResponse
 */
export type CommandResponse = Message<"soulfire.v1.CommandResponse"> & {
  /**
   * The exit code returned by the command.
   * - 0: Command failed or had no effect (e.g., syntax error, no targets found)
   * - 1 (Command.SINGLE_SUCCESS): Command executed successfully
   * - >1: Command succeeded and affected multiple targets (count of affected items)
   * Note: Syntax errors return 0 and error details are sent via the logging system.
   *
   * @generated from field: int32 code = 1;
   */
  code: number;
};

/**
 * Describes the message soulfire.v1.CommandResponse.
 * Use `create(CommandResponseSchema)` to create a new message.
 */
export const CommandResponseSchema: GenMessage<CommandResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 5);

/**
 * Request message for getting tab-completion suggestions for a partial command.
 *
 * @generated from message soulfire.v1.CommandCompletionRequest
 */
export type CommandCompletionRequest = Message<"soulfire.v1.CommandCompletionRequest"> & {
  /**
   * The execution scope that determines which instances/bots are visible
   * for completion suggestions. Must be set to one of the scope options.
   *
   * @generated from field: soulfire.v1.CommandScope scope = 5;
   */
  scope?: CommandScope | undefined;

  /**
   * The partial command string to complete. May be an incomplete command
   * that the user is typing, e.g., "mov" or "move 100 ".
   *
   * @generated from field: string command = 3;
   */
  command: string;

  /**
   * The cursor position within the command string (0-indexed).
   * Completions will be generated for the token at this position.
   * Typically this is the length of the command string for end-of-line completion.
   *
   * @generated from field: int32 cursor = 4;
   */
  cursor: number;
};

/**
 * Describes the message soulfire.v1.CommandCompletionRequest.
 * Use `create(CommandCompletionRequestSchema)` to create a new message.
 */
export const CommandCompletionRequestSchema: GenMessage<CommandCompletionRequest> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 6);

/**
 * A single tab-completion suggestion.
 *
 * @generated from message soulfire.v1.CommandCompletion
 */
export type CommandCompletion = Message<"soulfire.v1.CommandCompletion"> & {
  /**
   * The suggested text to insert at the cursor position.
   * This is the actual completion value, not the full command.
   *
   * @generated from field: string suggestion = 1;
   */
  suggestion: string;

  /**
   * Optional tooltip providing additional context about this suggestion.
   * May contain formatted text explaining what the suggestion does.
   * If not present, no tooltip should be displayed.
   *
   * @generated from field: optional string tooltip = 2;
   */
  tooltip?: string | undefined;
};

/**
 * Describes the message soulfire.v1.CommandCompletion.
 * Use `create(CommandCompletionSchema)` to create a new message.
 */
export const CommandCompletionSchema: GenMessage<CommandCompletion> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 7);

/**
 * Response message containing tab-completion suggestions.
 *
 * @generated from message soulfire.v1.CommandCompletionResponse
 */
export type CommandCompletionResponse = Message<"soulfire.v1.CommandCompletionResponse"> & {
  /**
   * List of completion suggestions for the partial command.
   * May be empty if no completions are available.
   * Suggestions are generated based on the command's Brigadier definition
   * and the current execution scope's visibility.
   *
   * @generated from field: repeated soulfire.v1.CommandCompletion suggestions = 1;
   */
  suggestions: CommandCompletion[];
};

/**
 * Describes the message soulfire.v1.CommandCompletionResponse.
 * Use `create(CommandCompletionResponseSchema)` to create a new message.
 */
export const CommandCompletionResponseSchema: GenMessage<CommandCompletionResponse> = /*@__PURE__*/
  messageDesc(file_soulfire_command, 8);

/**
 * Service for executing server commands and retrieving tab-completion suggestions.
 * Commands are executed using the Brigadier command framework and support various
 * operations including bot control, pathfinding, inventory management, and administration.
 * All operations require appropriate permissions based on the specified command scope.
 *
 * @generated from service soulfire.v1.CommandService
 */
export const CommandService: GenService<{
  /**
   * Executes a command string within the specified scope.
   * The command is parsed and executed using the Brigadier command dispatcher.
   *
   * Permission requirements depend on the scope:
   * - Global scope: Requires GLOBAL_COMMAND_EXECUTION permission
   * - Instance scope: Requires INSTANCE_COMMAND_EXECUTION for the instance
   * - Bot scope: Requires INSTANCE_COMMAND_EXECUTION for the parent instance
   *
   * Returns:
   * - CommandResponse with the command's exit code
   *
   * Errors:
   * - INVALID_ARGUMENT: If the scope is not set
   * - PERMISSION_DENIED: If the user lacks required permissions
   * - INTERNAL: If an unexpected error occurs during execution
   *
   * @generated from rpc soulfire.v1.CommandService.ExecuteCommand
   */
  executeCommand: {
    methodKind: "unary";
    input: typeof CommandRequestSchema;
    output: typeof CommandResponseSchema;
  },
  /**
   * Retrieves tab-completion suggestions for a partial command.
   * Uses Brigadier's completion system to generate context-aware suggestions
   * based on the command structure and current cursor position.
   *
   * Permission requirements depend on the scope (same as ExecuteCommand).
   *
   * Returns:
   * - CommandCompletionResponse with a list of possible completions
   *
   * Errors:
   * - INVALID_ARGUMENT: If the scope is not set
   * - PERMISSION_DENIED: If the user lacks required permissions
   * - INTERNAL: If an unexpected error occurs during completion
   *
   * @generated from rpc soulfire.v1.CommandService.TabCompleteCommand
   */
  tabCompleteCommand: {
    methodKind: "unary";
    input: typeof CommandCompletionRequestSchema;
    output: typeof CommandCompletionResponseSchema;
  },
}> = /*@__PURE__*/
  serviceDesc(file_soulfire_command, 0);
