{"_id":"@bitclub.ai/opendesk-plugin-sdk","_rev":"4-cd1edcd02b01323db55c36064df22a23","name":"@bitclub.ai/opendesk-plugin-sdk","dist-tags":{"latest":"0.3.7"},"versions":{"0.3.4":{"name":"@bitclub.ai/opendesk-plugin-sdk","version":"0.3.4","license":"MulanPSL-2.0","_id":"@bitclub.ai/opendesk-plugin-sdk@0.3.4","maintainers":[{"name":"uv0xab","email":"liyi.fm@foxmail.com"}],"bin":{"opendesk-plugin-sdk":"dist/cli.js"},"dist":{"shasum":"22d88d431b38bbfc4541c677f9496f1e75d87628","tarball":"https://registry.npmjs.org/@bitclub.ai/opendesk-plugin-sdk/-/opendesk-plugin-sdk-0.3.4.tgz","fileCount":11,"integrity":"sha512-w0k7LjddJns6sHTJsw2dqQrYiKY8mMYDKFtrU7toFXXSE/6eHD5Vze+1kQda64K/MM3XZJvU8mx73ygwHlHYrQ==","signatures":[{"sig":"MEYCIQDlocxjWQvqfp2d9nSyETRetUl3jw2D+AyKal8q1pbXJwIhAJah1/Kuu5KVeY0o8V0jxj9Jvd/9MPvEWI4ojMuFQ5uV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49122},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package":{"types":"./dist/package.d.ts","default":"./dist/package.js"}},"_npmUser":{"name":"uv0xab","email":"liyi.fm@foxmail.com"},"_npmVersion":"11.13.0","description":"Plugin SDK and package validation tools for OpenDesk","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.61.1","typescript":"^5.0.0","@types/node":"^24.0.0","rollup-plugin-dts":"^6.3.0","@rollup/plugin-typescript":"^12.1.4"},"_npmOperationalInternal":{"tmp":"tmp/opendesk-plugin-sdk_0.3.4_1787298610580_0.5701242680925014","host":"s3://npm-registry-packages-npm-production"}},"0.3.5":{"name":"@bitclub.ai/opendesk-plugin-sdk","version":"0.3.5","license":"MulanPSL-2.0","_id":"@bitclub.ai/opendesk-plugin-sdk@0.3.5","maintainers":[{"name":"uv0xab","email":"liyi.fm@foxmail.com"}],"bin":{"opendesk-plugin-sdk":"dist/cli.js"},"dist":{"shasum":"aadf2c31ceced034ee0c1b2a77961be3e712750f","tarball":"https://registry.npmjs.org/@bitclub.ai/opendesk-plugin-sdk/-/opendesk-plugin-sdk-0.3.5.tgz","fileCount":11,"integrity":"sha512-2gRgYnGKOr6AxrOPk7HohgPa6ppLeeChQTU6WZgeWi17jMQw8WDoSz10WDcYuji+7GVOYseAkzo/t6Xt+TDfyw==","signatures":[{"sig":"MEYCIQDDPWhnyDjzZ3q91RDgvUlr8o1sB6oMOHv+gLf5LL2RjwIhAN8GvWQCaADq7o6cdIUSSVS3+K1Ph1OLKriEI3lwUA78","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":61846},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package":{"types":"./dist/package.d.ts","default":"./dist/package.js"}},"_npmUser":{"name":"uv0xab","email":"liyi.fm@foxmail.com"},"_npmVersion":"11.13.0","description":"Plugin SDK and package validation tools for OpenDesk","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.61.1","typescript":"^5.0.0","@types/node":"^24.0.0","rollup-plugin-dts":"^6.3.0","@rollup/plugin-typescript":"^12.1.4"},"_npmOperationalInternal":{"tmp":"tmp/opendesk-plugin-sdk_0.3.5_1787828609966_0.060901456595036985","host":"s3://npm-registry-packages-npm-production"}},"0.3.6":{"name":"@bitclub.ai/opendesk-plugin-sdk","version":"0.3.6","license":"MulanPSL-2.0","_id":"@bitclub.ai/opendesk-plugin-sdk@0.3.6","maintainers":[{"name":"uv0xab","email":"liyi.fm@foxmail.com"}],"bin":{"opendesk-plugin-sdk":"dist/cli.js"},"dist":{"shasum":"b4741ad2357ddad49baf8344568a13e4e7cd16da","tarball":"https://registry.npmjs.org/@bitclub.ai/opendesk-plugin-sdk/-/opendesk-plugin-sdk-0.3.6.tgz","fileCount":11,"integrity":"sha512-yCc/HFaD5yjmViebYWYibAv7AT42h2bdcbk0+8JRVgIidaqZmQCqx0PXD2cAEMtBJ21Qk8uBAWxeOkbkrHK+ZA==","signatures":[{"sig":"MEUCIQCUiTdiiwDaT1HOg8cxaPR8djRv5/Bay3k6TtkXp7gzCwIgK2XhYMGIZSRiN8Z/VLeVVbRHJSaoCLdXzSR9EcSv50o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIHHPTrwpCKPe7eWOeQ6ujqfNGnPh+9CcqkoT9F0X90hCAiEAnpHuf2XZaSN6UtmucLu7MvBX4HyJ4+Lhz6a8Pzwqg7w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76147},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package":{"types":"./dist/package.d.ts","default":"./dist/package.js"}},"_npmUser":{"name":"uv0xab","email":"liyi.fm@foxmail.com"},"_npmVersion":"11.13.0","description":"Plugin SDK and package validation tools for OpenDesk","directories":{},"_nodeVersion":"25.2.1","dependencies":{"zod":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.61.1","typescript":"^5.0.0","@types/node":"^24.0.0","rollup-plugin-dts":"^6.3.0","@rollup/plugin-typescript":"^12.1.4"},"_npmOperationalInternal":{"tmp":"tmp/opendesk-plugin-sdk_0.3.6_1788772025860_0.9424063558893223","host":"s3://npm-registry-packages-npm-production"}},"0.3.7":{"_id":"@bitclub.ai/opendesk-plugin-sdk@0.3.7","bin":{"opendesk-plugin-sdk":"dist/cli.js"},"dist":{"shasum":"52dd158e9cf72c591c4a05c28ae77908e9599852","tarball":"https://registry.npmjs.org/@bitclub.ai/opendesk-plugin-sdk/-/opendesk-plugin-sdk-0.3.7.tgz","fileCount":11,"integrity":"sha512-2C+mNyY7gfkUVA/p59jByVbf0sRSWHNLDoNkxo0GXPBoX3kEJ4igG73kr62zRvypJ3lRIyOb3l06jg+9YHboCA==","signatures":[{"sig":"MEUCIQC3GSWIR/mkMdwqg60YyoSiQWkZrNNifzN8+czLKPKLzwIgBfZmsTSea1vZrYc3E8Z6OVLk3ZNad9SxAA/xvVhrsTA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCQ05RjtJP+iiYqbSDPbZcvm3xZXCO96JpkZgb4mykOMAIhAKBT/1Drvms7cMO3fWp8x0upLyrcNThRuXT06oWJVUzo"}],"unpackedSize":89920},"main":"./dist/index.js","name":"@bitclub.ai/opendesk-plugin-sdk","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"./package":{"types":"./dist/package.d.ts","default":"./dist/package.js"}},"license":"MulanPSL-2.0","version":"0.3.7","_npmUser":{"name":"uv0xab","email":"liyi.fm@foxmail.com"},"_npmVersion":"11.13.0","description":"Plugin SDK and package validation tools for OpenDesk","directories":{},"maintainers":[{"name":"uv0xab","email":"liyi.fm@foxmail.com"}],"_nodeVersion":"25.2.1","dependencies":{"zod":"^4.2.1"},"_hasShrinkwrap":false,"devDependencies":{"tslib":"^2.8.1","rollup":"^4.61.1","typescript":"^5.0.0","@types/node":"^24.0.0","rollup-plugin-dts":"^6.3.0","@rollup/plugin-typescript":"^12.1.4"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opendesk-plugin-sdk_0.3.7_1790152951464_0.49893918036235574"}}},"time":{"created":"2026-08-21T07:50:10.409Z","modified":"2026-09-23T08:42:31.776Z","0.3.4":"2026-08-21T07:50:10.723Z","0.3.5":"2026-08-27T11:03:30.107Z","0.3.6":"2026-09-07T09:07:05.958Z","0.3.7":"2026-09-23T08:42:31.567Z"},"license":"MulanPSL-2.0","description":"Plugin SDK and package validation tools for OpenDesk","maintainers":[{"name":"uv0xab","email":"liyi.fm@foxmail.com"}],"readme":"# OpenDesk Plugin\r\n\r\n`@bitclub.ai/opendesk-plugin-sdk` is the public SDK for native OpenDesk plugins. It exports the plugin definition helpers, hook and contribution contracts, and package validation API.\r\n\r\n```ts\r\nimport { definePlugin, OPENDESK_PLUGIN_HOOK_NAMES, tool } from '@bitclub.ai/opendesk-plugin-sdk';\r\nimport type {\r\n    ChatMessage,\r\n    PermissionRequest,\r\n    PermissionRule,\r\n    ReasoningEffort,\r\n    ToolDefinition\r\n} from '@bitclub.ai/opendesk-plugin-sdk';\r\n```\r\n\r\nThese contracts are the same types used by OpenDesk itself. The package build bundles their declarations, so plugin\r\nprojects do not need to import files from the OpenDesk repository.\r\n\r\n`OPENDESK_PLUGIN_HOOK_NAMES` is the runtime list of hook names accepted by the current API. TypeScript\r\nplugins can use `PluginHookName` for the corresponding string-literal union.\r\n\r\n`ToolDefinition` supports the same host-managed execution capabilities used by native tools: Agent visibility,\r\nserial execution, declared permissions, incremental result updates, cancellation signals, cleanup, and CLI/GUI\r\nrenderers. OpenDesk adapts the public contract to its internal `BaseTool` runtime without exposing `TaskState`.\r\n\r\nValidate a plugin package before publishing it:\r\n\r\n```bash\r\nopendesk-plugin-sdk validate ./my-plugin\r\n```\r\n\r\n## Appearance capability\r\n\r\nDeclare `appearance` in the manifest `capabilities` to customize the application look and feel. The surface is\r\nopening up gradually; currently available:\r\n\r\n```ts\r\nexport default definePlugin({\r\n    id: 'my-brand',\r\n    capabilities: ['appearance'],\r\n    setup(ctx) {\r\n        // A plain string, or a localized map keyed by BCP 47 language tags\r\n        ctx.appearance.setAppTitle({ zh: '我的桌面', en: 'MyDesk' });\r\n        ctx.appearance.setAppDescription({ zh: '一站式工作台', en: 'All-in-one workbench' });\r\n\r\n        // A single path for all themes...\r\n        ctx.appearance.setAppLogo('./assets/logo.png');\r\n        // ...or theme variants; a missing side reuses the other one\r\n        ctx.appearance.setAppLogo({ dark: './assets/logo-dark.png', light: './assets/logo-light.png' });\r\n    }\r\n});\r\n```\r\n\r\n- `setAppTitle(title)` overrides the application title shown in the GUI top-left brand area (replaces \"OpenDesk\").\r\n- `setAppDescription(description)` overrides the description shown below the title (replaces the default tagline).\r\n  Both accept localized maps that resolve against the current UI language and re-resolve when the user switches\r\n  languages.\r\n- `setAppLogo(logoPath)` overrides the logo shown next to the title. Paths must be relative to the plugin root\r\n  directory (where the manifest lives), be one of png/jpg/jpeg/svg/webp/gif/ico, and not exceed 2MB.\r\n\r\nAll calls return a `PluginRegistration`; disposing it (or deactivating the plugin) reverts to the default\r\nappearance. When several plugins set the same field, the most recent activation wins until that registration is\r\ndisposed.\r\n","readmeFilename":"README.md"}