一键导入
add-plugin
Add a new plugin binary to thin-edge.io. Use when creating a new extension of built-in operations supported by tedge-agent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a new plugin binary to thin-edge.io. Use when creating a new extension of built-in operations supported by tedge-agent.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert Rust code review focused on correctness, testing, and idiomatic code. Use when reviewing a diff, file, or change for bugs, test gaps, and non-idiomatic Rust.
Create a new actor with builder in the thin-edge.io actor framework. Use when implementing a new concurrent component that processes messages.
Add a new configuration option to tedge_config. Use when adding a new setting to the thin-edge.io configuration in tedge.toml.
Add a new extension of `tedge-mapper` or `tedge-agent` as an actor.
Write a Robot Framework integration test for thin-edge.io. Use when adding end-to-end tests.
| name | add-plugin |
| description | Add a new plugin binary to thin-edge.io. Use when creating a new extension of built-in operations supported by tedge-agent. |
plugins/<name>/ with a src/lib.rs and src/bin.rs (and optionally src/main.rs).
The main.rs file is used only for integration testing.
The real plugin invocation happens via the tedge multi-call binary.Cargo.toml with workspace conventions:
[package]
name = "<name>"
version.workspace = true
edition.workspace = true
license.workspace = true
[lints]
workspace = true
[dependencies]
clap = { workspace = true }
# add other workspace deps as needed
Cargo.toml — plugins are listed explicitly (not globbed):
members = [
# ...existing...
"plugins/<name>",
]
#[derive(clap::Parser)] and a PluginOp subcommand enum:
#[derive(clap::Subcommand)]
pub enum PluginOp {
Subcommand1,
Subcommand2
# ...remaining supported subcommands
}
run() in the bin.rs that handles each subcommand variant and returns an anyhow::Result<()>.crates/core/tedge multi-call binary crate.run() from the multi-call binary definition at crates/core/tedge/src/main.rs.just check and just testRead these for patterns:
plugins/tedge_apt_plugin/src/lib.rs — library-only pattern with clap CLI and run_and_exit()plugins/tedge_file_log_plugin/src/main.rs — bin.rs + lib.rs pattern