State storage for dcode plugin marketplaces, installs, and enablement.
Directory name for plugin storage under the profile root.
Not an agent profile. The /agent picker reserves this name in addition to
requiring an AGENTS.md marker, so it is never listed as a selectable agent.
Defined here rather than in plugins.store because _reserved_names reads it
on the CLI startup path, and importing plugins.store pulls in the plugins
package __init__, which loads pydantic through plugins.models (see AGENTS.md
"Startup performance"). plugins.store re-exports it for its own callers.
Split a plugin id in {plugin}@{marketplace} form.
Return the plugin storage root directory.
Serialize plugin mutations across threads and dcode processes.
The lock is reentrant within one thread so compound operations such as marketplace removal can call the normal uninstall path while holding it.
Return the data directory path for a plugin id without creating it.
Return the lazily-created data directory for a plugin id.
Return a bounded, collision-resistant filesystem key.
Return a cache key that cannot disclose source credentials.
Return the marketplace cache directory.
Return the versioned plugin install cache root.
Return the versioned cache path for a plugin id.
Load persisted marketplace records.
Persist a marketplace record.
Remove a marketplace record.
Load enabled plugin ids.
Persist a plugin enablement value.
Load installed plugin records.
Add or replace the record for plugin_id in installed_plugins.json.
Return the install entry for a plugin id.
Remove the install record for a plugin.
Copy a plugin into the versioned cache and register the install.
Disable a plugin, remove install records, and delete orphaned cache dirs.
Install record for a plugin.
version is the value declared by the plugin manifest, if any.
Persisted marketplace source record.
Raised when existing plugin state cannot be safely modified.