bldr/plugin/plugin.pb.ts
Rama master · réplica de lectura del repositorio original.
// @generated by protoc-gen-es-lite unknown with parameter "target=ts,ts_nocheck=false"
// @generated from file github.com/s4wave/spacewave/bldr/plugin/plugin.proto (package bldr.plugin, syntax proto3)
/* eslint-disable */
import { createEnumType } from '@aptre/protobuf-es-lite/enum'
import type { MessageType } from '@aptre/protobuf-es-lite/message'
import { createMessageType } from '@aptre/protobuf-es-lite/message'
import { Timestamp } from '@aptre/protobuf-es-lite/google/protobuf/timestamp'
import { ManifestRef } from '../manifest/manifest.pb.js'
import { VolumeInfo } from '@go/github.com/s4wave/spacewave/db/volume/volume.pb.js'
/**
* PluginState is the scheduler state for a plugin instance.
*
* @generated from enum bldr.plugin.PluginState
*/
export enum PluginState {
/**
* PluginState_UNKNOWN indicates the scheduler has no state yet.
*/
PluginState_UNKNOWN = 0,
/**
* PluginState_REQUESTED indicates the plugin has an active reference but no RPC client yet.
*/
PluginState_REQUESTED = 1,
/**
* PluginState_RUNNING indicates the plugin RPC client is ready.
*/
PluginState_RUNNING = 2,
}
export const PluginState_Enum = /* @__PURE__ */ createEnumType(
'bldr.plugin.PluginState',
[
[0, 'PluginState_UNKNOWN'],
[1, 'PluginState_REQUESTED'],
[2, 'PluginState_RUNNING'],
],
)
/**
* PluginStatus holds basic status for a plugin.
*
* @generated from message bldr.plugin.PluginStatus
*/
export interface PluginStatus {
/**
* PluginId is the plugin identifier.
*/
pluginId?: string
/**
* Running indicates the plugin is running.
*/
running?: boolean
/**
* InstanceKey is the optional instance key for instanced plugins.
*/
instanceKey?: string
/**
* State is the scheduler state for this plugin instance.
*/
state?: PluginState
/**
* LastErrorMessage is the most recent plugin execution error summary.
*/
lastErrorMessage?: string
/**
* LastErrorAt is when LastErrorMessage was recorded.
*/
lastErrorAt?: Date
}
export const PluginStatus: MessageType<PluginStatus> =
/* @__PURE__ */ createMessageType<PluginStatus>(
'bldr.plugin.PluginStatus',
() => [
[1, 'plugin_id', 9],
[2, 'running', 8],
[3, 'instance_key', 9],
[4, 'state', 14, 0, PluginState_Enum],
[5, 'last_error_message', 9],
[6, 'last_error_at', 11, 0, Timestamp.codec],
],
)
/**
* PluginManifestRecoveryStatus describes the retained Manifest selection and
* eligibility facts for one plugin instance.
*
* @generated from message bldr.plugin.PluginManifestRecoveryStatus
*/
export interface PluginManifestRecoveryStatus {
/**
* PluginId is the plugin identifier.
*/
pluginId?: string
/**
* InstanceKey is the optional instance key for instanced plugins.
*/
instanceKey?: string
/**
* ExecuteManifestRef is the ref of the manifest selected for execution.
*/
executeManifestRef?: string
/**
* DownloadManifestRef is the ref of the manifest selected for download.
*/
downloadManifestRef?: string
/**
* SkippedCandidateCount is how many candidates were skipped.
*/
skippedCandidateCount?: number
/**
* SkippedCandidateSummary summarizes the skipped candidates.
*/
skippedCandidateSummary?: string
/**
* IgnoredCandidateCount is how many candidates were ignored.
*/
ignoredCandidateCount?: number
/**
* IgnoredCandidateSummary summarizes the ignored candidates.
*/
ignoredCandidateSummary?: string
/**
* QuarantinedCandidateCount is how many candidates were quarantined.
*/
quarantinedCandidateCount?: number
/**
* QuarantinedCandidateSummary summarizes the quarantined candidates.
*/
quarantinedCandidateSummary?: string
}
export const PluginManifestRecoveryStatus: MessageType<PluginManifestRecoveryStatus> =
/* @__PURE__ */ createMessageType<PluginManifestRecoveryStatus>(
'bldr.plugin.PluginManifestRecoveryStatus',
() => [
[1, 'plugin_id', 9],
[2, 'instance_key', 9],
[3, 'execute_manifest_ref', 9],
[4, 'download_manifest_ref', 9],
[5, 'skipped_candidate_count', 13],
[6, 'skipped_candidate_summary', 9],
[7, 'ignored_candidate_count', 13],
[8, 'ignored_candidate_summary', 9],
[9, 'quarantined_candidate_count', 13],
[10, 'quarantined_candidate_summary', 9],
],
)
/**
* PluginStatusSnapshot describes a plugin host scheduler's plugin instances.
*
* @generated from message bldr.plugin.PluginStatusSnapshot
*/
export interface PluginStatusSnapshot {
/**
* Plugins lists the per-instance statuses sorted by plugin id and instance key.
*/
plugins?: PluginStatus[]
/**
* ManifestRecovery lists the per-instance manifest selection facts sorted by
* plugin id and instance key.
*/
manifestRecovery?: PluginManifestRecoveryStatus[]
}
export const PluginStatusSnapshot: MessageType<PluginStatusSnapshot> =
/* @__PURE__ */ createMessageType<PluginStatusSnapshot>(
'bldr.plugin.PluginStatusSnapshot',
() => [
[1, 'plugins', 11, 1, PluginStatus.codec],
[2, 'manifest_recovery', 11, 1, PluginManifestRecoveryStatus.codec],
],
)
/**
* CheckActivationRequest queries the running generation's replacement contract.
*
* @generated from message bldr.plugin.CheckActivationRequest
*/
export interface CheckActivationRequest {}
export const CheckActivationRequest: MessageType<CheckActivationRequest> =
/* @__PURE__ */ createMessageType<CheckActivationRequest>(
'bldr.plugin.CheckActivationRequest',
() => [],
)
/**
* CheckActivationResponse confirms support for staged replacement.
*
* @generated from message bldr.plugin.CheckActivationResponse
*/
export interface CheckActivationResponse {}
export const CheckActivationResponse: MessageType<CheckActivationResponse> =
/* @__PURE__ */ createMessageType<CheckActivationResponse>(
'bldr.plugin.CheckActivationResponse',
() => [],
)
/**
* ActivatePluginRequest asks a ready candidate to become the current generation.
*
* @generated from message bldr.plugin.ActivatePluginRequest
*/
export interface ActivatePluginRequest {}
export const ActivatePluginRequest: MessageType<ActivatePluginRequest> =
/* @__PURE__ */ createMessageType<ActivatePluginRequest>(
'bldr.plugin.ActivatePluginRequest',
() => [],
)
/**
* ActivatePluginResponse confirms admission of the complete registration set.
*
* @generated from message bldr.plugin.ActivatePluginResponse
*/
export interface ActivatePluginResponse {}
export const ActivatePluginResponse: MessageType<ActivatePluginResponse> =
/* @__PURE__ */ createMessageType<ActivatePluginResponse>(
'bldr.plugin.ActivatePluginResponse',
() => [],
)
/**
* PrepareUpdateRequest asks the current generation to relinquish its work.
*
* @generated from message bldr.plugin.PrepareUpdateRequest
*/
export interface PrepareUpdateRequest {}
export const PrepareUpdateRequest: MessageType<PrepareUpdateRequest> =
/* @__PURE__ */ createMessageType<PrepareUpdateRequest>(
'bldr.plugin.PrepareUpdateRequest',
() => [],
)
/**
* PrepareUpdateResponse confirms the generation is ready for replacement.
*
* @generated from message bldr.plugin.PrepareUpdateResponse
*/
export interface PrepareUpdateResponse {}
export const PrepareUpdateResponse: MessageType<PrepareUpdateResponse> =
/* @__PURE__ */ createMessageType<PrepareUpdateResponse>(
'bldr.plugin.PrepareUpdateResponse',
() => [],
)
/**
* WatchPluginStatusRequest is the request for WatchPluginStatus.
*
* @generated from message bldr.plugin.WatchPluginStatusRequest
*/
export interface WatchPluginStatusRequest {}
export const WatchPluginStatusRequest: MessageType<WatchPluginStatusRequest> =
/* @__PURE__ */ createMessageType<WatchPluginStatusRequest>(
'bldr.plugin.WatchPluginStatusRequest',
() => [],
)
/**
* WatchPluginStatusResponse is one plugin status update from the host.
*
* @generated from message bldr.plugin.WatchPluginStatusResponse
*/
export interface WatchPluginStatusResponse {
/**
* InstanceKey is the instance key the host scheduler was configured with.
*/
instanceKey?: string
/**
* Status is the scheduler's current plugin status snapshot.
*/
status?: PluginStatusSnapshot
}
export const WatchPluginStatusResponse: MessageType<WatchPluginStatusResponse> =
/* @__PURE__ */ createMessageType<WatchPluginStatusResponse>(
'bldr.plugin.WatchPluginStatusResponse',
() => [
[1, 'instance_key', 9],
[2, 'status', 11, 0, PluginStatusSnapshot.codec],
],
)
/**
* GetPluginInfoRequest is a request to return the information for the current plugin.
*
* @generated from message bldr.plugin.GetPluginInfoRequest
*/
export interface GetPluginInfoRequest {}
export const GetPluginInfoRequest: MessageType<GetPluginInfoRequest> =
/* @__PURE__ */ createMessageType<GetPluginInfoRequest>(
'bldr.plugin.GetPluginInfoRequest',
() => [],
)
/**
* GetPluginInfoResponse is the response to the GetPluginInfo request.
*
* @generated from message bldr.plugin.GetPluginInfoResponse
*/
export interface GetPluginInfoResponse {
/**
* PluginId is the plugin identifier.
*/
pluginId?: string
/**
* ManifestRef is the reference to the Manifest object.
*/
manifestRef?: ManifestRef
/**
* HostVolumeInfo is the optional information for the host Volume.
* The volume is exposed with a ProxyVolume when present.
*/
hostVolumeInfo?: VolumeInfo
/**
* Standalone reports that no PluginHost Resource graph is available.
*/
standalone?: boolean
/**
* HostStorageId is the Storage ID on the plugin host bus that this plugin
* instance allocates named volumes through. Empty selects the host default
* storage.
*/
hostStorageId?: string
/**
* Historical reports an immutable execution used for accepted-operation replay.
* The plugin serves handlers without publishing current UI or type registrations.
*/
historical?: boolean
/**
* Prepared requires private registrations until Activation.Activate is called.
*/
prepared?: boolean
/**
* InstanceKey is the logical installation binding, or empty for shared plugins.
* A Space uses its World engine ID. Physical worker generations do not change it.
*/
instanceKey?: string
}
export const GetPluginInfoResponse: MessageType<GetPluginInfoResponse> =
/* @__PURE__ */ createMessageType<GetPluginInfoResponse>(
'bldr.plugin.GetPluginInfoResponse',
() => [
[1, 'plugin_id', 9],
[2, 'manifest_ref', 11, 0, ManifestRef.codec],
[3, 'host_volume_info', 11, 0, VolumeInfo.codec],
[4, 'standalone', 8],
[5, 'host_storage_id', 9],
[6, 'historical', 8],
[7, 'prepared', 8],
[8, 'instance_key', 9],
],
)
/**
* LoadPluginRequest is a request to load a plugin while the RPC is active.
*
* @generated from message bldr.plugin.LoadPluginRequest
*/
export interface LoadPluginRequest {
/**
* PluginId is the plugin identifier to load.
*/
pluginId?: string
/**
* InstanceKey is an optional key for instanced plugins.
* When non-empty, the plugin host uses (plugin_id, instance_key) as the
* composite deduplication key, allowing multiple independent instances of the
* same plugin to run concurrently in separate workers.
* When empty, behavior is unchanged: a single shared instance per plugin_id.
*/
instanceKey?: string
/**
* Manifests selects the installation and its recovery artifacts, newest first.
*/
manifests?: ManifestRef[]
/**
* ManifestRoot loads an exact historical executable without current registrations.
*/
manifestRoot?: string
}
export const LoadPluginRequest: MessageType<LoadPluginRequest> =
/* @__PURE__ */ createMessageType<LoadPluginRequest>(
'bldr.plugin.LoadPluginRequest',
() => [
[1, 'plugin_id', 9],
[2, 'instance_key', 9],
[3, 'manifests', 11, 1, ManifestRef.codec],
[4, 'manifest_root', 9],
],
)
/**
* LoadPluginResponse is a status response to a LoadPlugin request.
*
* @generated from message bldr.plugin.LoadPluginResponse
*/
export interface LoadPluginResponse {
/**
* PluginStatus contains the current plugin status object.
*/
pluginStatus?: PluginStatus
}
export const LoadPluginResponse: MessageType<LoadPluginResponse> =
/* @__PURE__ */ createMessageType<LoadPluginResponse>(
'bldr.plugin.LoadPluginResponse',
() => [[1, 'plugin_status', 11, 0, PluginStatus.codec]],
)
/**
* PluginMeta is metadata embedded in a plugin entrypoint.
*
* @generated from message bldr.plugin.PluginMeta
*/
export interface PluginMeta {
/**
* ProjectId is the project identifier.
* Must be a valid-dns-label.
*/
projectId?: string
/**
* PluginId is the plugin identifier.
* Must be a valid-dns-label.
*/
pluginId?: string
/**
* PlatformId is the destination platform ID.
*/
platformId?: string
/**
* BuildType is the type of build this is.
*/
buildType?: string
}
export const PluginMeta: MessageType<PluginMeta> =
/* @__PURE__ */ createMessageType<PluginMeta>(
'bldr.plugin.PluginMeta',
() => [
[1, 'project_id', 9],
[2, 'plugin_id', 9],
[3, 'platform_id', 9],
[4, 'build_type', 9],
],
)
/**
* PluginStartInfo are details passed to the plugin by the plugin host in the environment.
*
* @generated from message bldr.plugin.PluginStartInfo
*/
export interface PluginStartInfo {
/**
* InstanceId is the plugin instance id.
*/
instanceId?: string
/**
* PluginId is the plugin identifier.
* Must be a valid-dns-label.
*/
pluginId?: string
/**
* InstanceKey is the instance key from the LoadPlugin request.
* Empty for non-instanced (shared) plugins.
*/
instanceKey?: string
/**
* ManifestRoot identifies the exact executable whose assets this worker imports.
* It is the base58-encoded manifest block hash, independent of the current revision.
*/
manifestRoot?: string
}
export const PluginStartInfo: MessageType<PluginStartInfo> =
/* @__PURE__ */ createMessageType<PluginStartInfo>(
'bldr.plugin.PluginStartInfo',
() => [
[1, 'instance_id', 9],
[2, 'plugin_id', 9],
[3, 'instance_key', 9],
[4, 'manifest_root', 9],
],
)
/**
* PluginContextInfo contains information about the running plugin attached to
* the Context tree for access within controllers running on the plugin bus.
*
* @generated from message bldr.plugin.PluginContextInfo
*/
export interface PluginContextInfo {
/**
* PluginMeta is the plugin metadata.
*/
pluginMeta?: PluginMeta
/**
* InstanceKey identifies the plugin installation the host runs.
* Empty for a singleton plugin; a Space uses its World engine ID.
* State private to one installation is scoped by this key.
*/
instanceKey?: string
/**
* ManifestRoot is the root of the manifest the plugin runs, which names the
* exact build of its files. Empty when the host did not report it.
*/
manifestRoot?: string
}
export const PluginContextInfo: MessageType<PluginContextInfo> =
/* @__PURE__ */ createMessageType<PluginContextInfo>(
'bldr.plugin.PluginContextInfo',
() => [
[1, 'plugin_meta', 11, 0, PluginMeta.codec],
[2, 'instance_key', 9],
[3, 'manifest_root', 9],
],
)