alma 0.1.1

A Bevy-native modal text editor with Vim-style navigation.
Documentation
//! Wasm plugin boundary.

mod abi;
mod host;
/// Redacted runtime telemetry.
mod operational;
mod policy;
mod runtime;
mod trace;

pub use abi::{
    CAPABILITY_NAMES, DecodedBufferEdit, DecodedCapabilityRef, DecodedCount, DecodedGuestString,
    DecodedPayload, DecodedTextRange, DecodedWorkspacePath, GuestDecodeError, GuestDecodeField,
    GuestDecodeLimits, WIT_HANDLE_RESOURCES, WIT_HOST_IMPORTS, WIT_HOST_INTERFACE, WIT_PACKAGE,
    WIT_PLUGIN_EXPORTS, WIT_SOURCE, WIT_VERSION, WIT_WORKSPACE_OBSERVE_TASK_IMPORTS, WIT_WORLD,
    WIT_WORLD_ID, WitCapability, WitHostImport, WitWorkspaceObserveTaskImport,
};
pub(crate) use host::PluginWorkspaceIoWorkerQueueAdmission;
pub use host::{
    AuthorizedWorkspaceReadAccess, AuthorizedWorkspaceWriteAccess, DEFAULT_PLUGIN_HANDLE_LIMIT,
    DrainedPluginEffectReport, DrainedPluginEffectRequests, PendingPluginUpdateBatch,
    PendingPluginWorkspaceIoBatch, PluginBufferEditProposal, PluginBufferHandle,
    PluginBufferObservationError, PluginEffectBatchLimit, PluginEffectBatchLimitField,
    PluginEffectCommitError, PluginEffectCommitErrorKind, PluginEffectDiscardReport,
    PluginHandleError, PluginHandleGeneration, PluginHandleKind, PluginHandleLimit,
    PluginHandleShape, PluginHandleStore, PluginHostContext, PluginHostImportBatches,
    PluginHostImportBatchesParts, PluginHostImportDiscardReport, PluginHostImportError,
    PluginHostImportSession, PluginHostOwnerBatches, PluginHostOwnerBatchesParts,
    PluginHostOwnerDiscardReport, PluginHostResourceKind, PluginHostStateMismatch,
    PluginResourceHandleRejectionReason, PluginViewHandle, PluginWorkspaceIoBudget,
    PluginWorkspaceIoBudgetField, PluginWorkspaceIoCancellationReport,
    PluginWorkspaceIoCommitError, PluginWorkspaceIoCommitErrorKind, PluginWorkspaceIoCompletion,
    PluginWorkspaceIoDiscardReport, PluginWorkspaceIoExecutionModel,
    PluginWorkspaceIoIdentityMismatchSource, PluginWorkspaceIoReport,
    PluginWorkspaceIoWorkerEnqueueError, PluginWorkspaceIoWorkerEnqueueErrorParts,
    PluginWorkspaceIoWorkerQueue, PluginWorkspaceIoWorkerQueueError,
    PluginWorkspaceIoWorkerQueueErrorKind, PluginWorkspaceIoWorkerQueueLimit,
    PluginWorkspaceIoWorkerQueueLimitField, PluginWorkspaceObserveBytes,
    PluginWorkspaceObserveOutcome, PluginWorkspaceObserveOutcomeShape,
    PluginWorkspaceObserveProjectionError, PluginWorkspaceObserveTaskCancellationReport,
    PluginWorkspaceObserveTaskCompletion, PluginWorkspaceObserveTaskCompletionShape,
    PluginWorkspaceObserveTaskDiscardReport, PluginWorkspaceObserveTaskEnqueueError,
    PluginWorkspaceObserveTaskEnqueueErrorParts, PluginWorkspaceObserveTaskEnqueueReport,
    PluginWorkspaceObserveTaskHandle, PluginWorkspaceObserveTaskId,
    PluginWorkspaceObserveTaskIdError, PluginWorkspaceObserveTaskPoll,
    PluginWorkspaceObserveTaskQueue, PluginWorkspaceObserveTaskQueueError,
    PluginWorkspaceObserveTaskQueueErrorKind, PluginWorkspaceObserveTaskQueueLimit,
    PluginWorkspaceObserveTaskQueueLimitField, PluginWorkspaceObserveTaskReservationMismatch,
    PluginWorkspaceObserveTaskReserveError, PluginWorkspaceObserveTaskResultShape,
    PluginWorkspaceObserveTaskState, PluginWorkspaceObserveTaskTake, PluginWorkspaceReadByteLimit,
    PluginWorkspaceReadCompletion, PluginWorkspaceReadError, PluginWorkspaceReadSuccess,
    PluginWorkspaceWriteByteLimit, PluginWorkspaceWriteCompletion, PluginWorkspaceWriteError,
    PluginWorkspaceWriteSuccess, ResolvedPluginBuffer, ResolvedPluginView, SealedPluginEffectBatch,
    SealedPluginWorkspaceIoBatch, SealedPluginWorkspaceObserveTaskBatch, WorkspaceAccessKind,
};
pub use operational::{
    PluginOperationalEvent, PluginOperationalEventKind, PluginOperationalExport,
    PluginOperationalImport, PluginOperationalImportRejection, PluginOperationalQueue,
    PluginOperationalRuntimeFailure,
};
pub use policy::PluginComponentPathError;
pub use policy::{
    AuthorizedPluginManifest, CapabilityAtom, CapabilitySet, EffectivePlugin, EnabledPluginConfig,
    MAX_PLUGIN_SCHEDULER_INTENT_BATCHES, PluginAuthorizationError, PluginCapabilities,
    PluginCapabilityRef, PluginCapabilityShape, PluginComponentOpenError, PluginComponentPath,
    PluginConfig, PluginIdentity, PluginIdentityError, PluginLoadError, PluginManifest,
    PluginManifestOpenError, PluginProposalPolicy, PluginProposalReviewMode, PluginRegistryConfig,
    PluginRegistryError, PluginRuntimeLimitError, PluginRuntimeLimitField, PluginSchedulerPolicy,
    PolicyOpenedPluginManifest, ValidatedPluginConfig, ValidatedPluginRegistry,
    WitCapabilityRefError, WorkspacePath, WorkspacePathError, WorkspacePathGrant, WorkspacePathRef,
};
pub use runtime::{
    AuthorizedPluginComponent, MAX_PLUGIN_FUEL_PER_UPDATE, MAX_PLUGIN_INTENT_BATCHES,
    MAX_PLUGIN_MEMORY_BYTES, MAX_PLUGIN_MESSAGE_BYTES, MAX_PLUGIN_TIMEOUT_MS,
    PluginInstanceAccessError, PluginInstanceLifecycle, PluginInstanceState,
    PluginRevocationReason, PluginRevocationReport, PluginRuntimeLimits, PluginRuntimeSpec,
    PluginUnloadPolicy, ValidatedPluginRuntimeLimits,
};
#[cfg(feature = "plugin-runtime")]
pub use runtime::{
    WasmtimePluginInstance, WasmtimePluginRevocationCleanup, WasmtimePluginRuntime,
    WasmtimePluginRuntimeError, WasmtimePluginRuntimeFailure, WasmtimePluginRuntimeFailureKind,
    WasmtimePluginRuntimePhase, WasmtimePluginScheduledUpdate, WasmtimePluginScheduledUpdateParts,
    WasmtimePluginUpdateScheduleError, WasmtimeWorkspaceObserveTaskBatchIdentityMismatchIdentities,
    WasmtimeWorkspaceObserveTaskEnqueueError, WasmtimeWorkspaceObserveTaskEnqueueErrorKind,
    WasmtimeWorkspaceObserveTaskInstanceStateMismatchIdentities,
    WasmtimeWorkspaceObserveTaskScheduleDiscardReport,
    WasmtimeWorkspaceObserveTaskScheduleDiscardReportParts,
    WasmtimeWorkspaceObserveTaskScheduleError, WasmtimeWorkspaceObserveTaskScheduleErrorParts,
};
pub use trace::{
    PluginRuntimeTraceEffect, PluginRuntimeTraceEvent, PluginRuntimeTraceEventClass,
    PluginRuntimeTraceEventKind, PluginRuntimeTraceProposalOutcome,
    PluginRuntimeTraceProposalOwner, PluginRuntimeTraceProposalReceipt,
    PluginRuntimeTraceProposalRejection, PluginRuntimeTraceStatus, PluginRuntimeTraceTarget,
    PluginRuntimeTraceWorkspaceIoCompletion, PluginRuntimeTraceWorkspaceObserveTaskOutcome,
    PluginRuntimeTraceWorkspaceReadOutcome, PluginRuntimeTraceWorkspaceWriteOutcome,
};

#[cfg(feature = "plugin-runtime")]
pub use abi::generated_capabilities;

/// WIT world supported by this crate's current plugin ABI.
pub const CURRENT_WIT_WORLD: &str = "alma:editor/plugin@0.2.0";

/// Maximum bytes accepted for a stable plugin identity.
pub const MAX_PLUGIN_IDENTITY_BYTES: usize = 128;