Skip to main content

Crate yosh_plugin_api

Crate yosh_plugin_api 

Source
Expand description

Capability declarations and string parsing shared between the host, the SDK, and the plugin manager. The C ABI types from the dlopen era are removed; the public WIT contract lives at wit/yosh-plugin.wit.

Modules§

pattern
Glob-style argv allowlist patterns for the commands:exec capability.

Enums§

Capability

Constants§

CAP_ALL
CAP_COMMANDS_EXEC
CAP_FILESYSTEM
CAP_FILES_READ
CAP_FILES_WRITE
CAP_HOOK_ON_CD
CAP_HOOK_POST_EXEC
CAP_HOOK_PRE_EXEC
CAP_HOOK_PRE_PROMPT
CAP_IO
CAP_VARIABLES_READ
Capability bitflag constants. Used by the host’s linker construction (src/plugin/linker.rs) to decide which host imports get the real implementation vs a deny-stub. Also used by the manager to parse plugins.toml capabilities = [...] allowlists.
CAP_VARIABLES_WRITE

Functions§

capabilities_to_bitflags
Combine a slice of capabilities into a bitfield.
parse_capability
Parse a single capability string. Returns None for unknown strings; callers decide whether to log a warning or fail.