Root source workspace for first-party OpenPets plugins. It contains reviewed plugin products before packaging, catalog sync, and R2 upload; current runtime code treats these as SDK v3 plugin packages with manifests, JavaScript entries, assets, tests, and optional locale catalogs.
- Package-Per-Plugin Boundary: Each plugin is an independent folder with
openpets.plugin.json,index.js, optionalassets/, optionallocales/, and a localtest.jsharness. - Manifest-First Contract: Desktop install/dev loading starts from
openpets.plugin.jsonand validates SDK version, permissions, commands, config schema, assets, panels, and entry paths before executing plugin code. - Companion-First SDK v3: Official plugins use host-rendered bubbles/alerts/HUDs, schedules, commands, storage, assets, and localized
$t:keys instead of injecting UI into pet windows. - Reviewed Catalog Source: The folder is the product source consumed by plugin checks/package/publish scripts; generated catalog and ZIP artifacts live outside this source boundary.
- A developer edits an official plugin folder under
plugins/official/{pluginId}/. pnpm dev:desktop:pluginspoints desktop dev mode atplugins/official;plugin-local-loader.tsvalidates folders and snapshots manifests for hot reload.apps/desktop/src/plugin-service.tsloads approved manifests, andplugin-runtime.tsstarts each JavaScript entry through the sandboxed plugin host.- Plugin code calls SDK namespaces (
ctx.ui,ctx.pet,ctx.schedule,ctx.storage,ctx.commands,ctx.assets,ctx.t, etc.); the desktop bridge validates permissions and renders host-owned effects. - Release tooling packages each plugin's manifest, entry, declared assets, panels, and locales into deterministic ZIP/catalog output for reviewed distribution.
- Desktop runtime:
apps/desktop/src/plugin-local-loader.ts,plugin-package.ts,plugin-service.ts,plugin-runtime.ts,plugin-js-host.ts, andplugin-sdk-bridge.tsconsume these packages. - Published SDK:
packages/sdk/defines the plugin-facing API and test harness used by official plugintest.jsfiles. - CLI tooling:
packages/cli/src/plugin-templates.tsandplugin-validate.tsscaffold and validate plugin folders using the same manifest conventions. - Detailed map: official/codemap.md