refactor: move the plugin SDK to its independent repository (issue #15)
Implements ADR-0072 and the SDK physical migration tracked by issue #15: - remove crates/marqdo-plugin-sdk, tests/sdk-plugin and the CLI-side check_plugin_sdk.py; the public cflmy/marqdo-plugin-sdk repository now owns the SDK workspace, lock, fixture, docs, AGENTS rules and CI definition. - SDK consumes marqdo-plugin-abi at the exact CLI contract rev 2585915e16906dac75f8571bed02e7f6f868c6bc; no path/submodule/copied contract. - CLI does not depend on the SDK and must not re-add it as a workspace member or copy; dependency/architecture gates enforce this. - docs: ADR-0072, CURRENT responsibility map/dependency graph, ADR-0071 amendment, indexes, README, spec/plugin-abi, CI and developer entries. - evidence: clean-clone SDK build/tests and real frozen 3.0.0-rc.4 CLI invocation (Int 42; tampered digest rejected). CLI workspace: 631 passed / 0 failed / 0 ignored; fmt/clippy/docs/architecture/ dependency gates green. Refs #15, #13
This commit is contained in:
1 parent
2585915e16
commit
3ab4aaa861
35 files changed
+272
-1454
No files matched your search
@@ -1,33 +0,0 @@
|
||||
//! Minimal third-party plugin built only against the public Rust SDK.
|
||||
//!
|
||||
//! It exercises the typed wire helpers (`decode_request`, `int_arg`,
|
||||
//! `success`) and a `Value::Int` result. Real negotiation, loading and
|
||||
//! invocation are performed by the frozen CLI in
|
||||
//! `tools/ci/check_plugin_sdk.py`.
|
||||
|
||||
use marqdo_plugin_sdk::wire;
|
||||
use marqdo_plugin_sdk::{mq_plugin_entry, CallContext, PluginError, Value};
|
||||
|
||||
fn add(_ctx: &mut CallContext, args: &[u8]) -> Result<Vec<u8>, PluginError> {
|
||||
let request = wire::decode_request(args)?;
|
||||
let values = request.typed_args()?;
|
||||
let a = wire::int_arg(&values, "a")?;
|
||||
let b = wire::int_arg(&values, "b")?;
|
||||
wire::success(Some(Value::Int((a + b).into())))
|
||||
}
|
||||
|
||||
fn echo_text(_ctx: &mut CallContext, args: &[u8]) -> Result<Vec<u8>, PluginError> {
|
||||
let request = wire::decode_request(args)?;
|
||||
let values = request.typed_args()?;
|
||||
let text = wire::text_arg(&values, "text")?;
|
||||
wire::success(Some(Value::text(text)))
|
||||
}
|
||||
|
||||
mq_plugin_entry! {
|
||||
name: "sdk.demo",
|
||||
version: "0.1.0",
|
||||
exports: {
|
||||
"sdk.add" => "($a: Int, $b: Int) -> Int" => add,
|
||||
"sdk.echo" => "($text: Text) -> Text" => echo_text,
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user