Introduction¶
Publishing DSH plugins and collaborating across devices typically involves cumbersome manual steps. This plugin provides an automated publishing and collaboration workflow through GitHub. It registers tools for DSH agents to check plugin compliance, publish to repositories, and sync development state across multiple machines.
Plugin Overview¶
- Name: gty2408/dsh-plugin-publisher
- Maintainer: Gty2408
- License: MIT
- Category: Networking Tools
- Core Value: One-click upload of plugins to GitHub and support for collaborative development of the same repository across multiple computers.
Installation¶
Installation command:
dsh plugin --profile desktop add <local-directory-path>
After installation, DSH must be restarted; newly added bundles are only read at startup.
Features & Commands¶
The plugin registers the following seven tools for various development stages:
- check_plugin: Checks whether the plugin directory meets the requirements (read-only, no network access).
- publish_plugin: Creates a GitHub repository, uploads code, and sets topics.
- share_project: Turns the local directory into a collaborative project (commits to
main, creates a local branch). - join_project: Joins an existing project from another computer (creates a local branch, installs SSH key).
- sync_project: Routine sync workflow (pull
main→ merge → push local branch). - merge_project: Merges branches from other machines (local three-way merge).
- project_status: Reports the local machine’s status in the project (read-only).
Notes¶
Be mindful of the following limitations and characteristics:
- Transfer Limitation: In API transfer mode, each file is limited to 40 MB. Larger files trigger an error recommending the use of release assets.
- File Modes: API transfers lose file modes, such as symlinks and specific permission bits (e.g., 100755).
- Permission Limits:
reposcope cannot delete repositories or manage account-level SSH keys (only repository-level deploy keys are supported). - Conflict Handling: Binary file conflicts cannot be resolved automatically; you must manually choose which version to keep.
- Visibility: Public repositories are visible immediately upon push; draft status cannot be hidden.
- Default Behavior: Publishing defaults to
replace_existing: false, so existing code is not overwritten. If the repository already has commits, publishing will be rejected.
Conclusion¶
By employing a dual transfer fallback mechanism between Git and the REST API, this tool mitigates upload failures caused by unstable networks. It offers foundational support for version management and multi-machine collaboration of DSH plugins.