Skip to main content

semantic-kernel-mycelium-ref-verify

Semantic Kernel plugin for action_ref and decision_binding_ref — the content-addressed identifiers from the argentum-core spec family. action_ref identifies an agent action instance; decision_binding_ref binds it to the authorization decision that permitted it. Both are SHA-256(JCS(preimage)) — deterministic, independently recomputable by any third party, no trust in the emitting system required.

Same underlying logic as mycelium-ref-verify (Agent Skill) and crewai-decision-binding-ref (CrewAI Tool) — action_ref.py and decision_binding_ref.py here are the same stdlib-only modules, wrapped as @kernel_function-decorated methods instead of a BaseTool.

Specs: action-ref.md · decision-binding-ref-v1.0.md

Install

pip install semantic-kernel-mycelium-ref-verify

Usage

from semantic_kernel import Kernel
from semantic_kernel_mycelium_ref_verify import MyceliumRefPlugin

kernel = Kernel()
kernel.add_plugin(MyceliumRefPlugin(), plugin_name="mycelium_ref")

fn = kernel.get_function("mycelium_ref", "compute_decision_binding_ref")
result = await kernel.invoke(
    fn,
    action_ref="sha256:...",
    decision_id="approval:...",
    decision_at_ms=1748736000000,
)

Four kernel functions are exposed:

Function Purpose
compute_action_ref Derive action_ref from agent_id/action_type/scope/timestamp.
verify_action_ref Recompute and, if presented_ref given, compare.
compute_decision_binding_ref Derive decision_binding_ref from its preimage.
verify_decision_binding_ref Recompute and, if presented_ref given, compare.

The four verify states

Both verify_* functions report one of four states, deliberately kept separate from the trail_status ladder (COMMITTED/PENDING/FAILED) used elsewhere in Mycelium for execution-outcome tracking. That ladder answers a temporal question — did the post-execution receipt arrive? This plugin answers a cryptographic one — does this hash match? verify_* never returns FAILED.

State Meaning
COMMITTED Recompute succeeded and matches the presented ref.
MISMATCH Recompute succeeded but does not match the presented ref. Fail-closed — same pattern as CONTEXT_SET_MISMATCH in the decision_binding_ref spec's context_digest extension. Never silent.
PENDING_NON_NULL Preimage complete, ref computed, no presented ref given yet (compute-only mode).
PENDING_NULL Preimage incomplete — recompute cannot be attempted.

Tests

Conformance tests reuse the byte-verified fixtures already published in argentum-core, no new vectors invented:

pip install -e .
pytest

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semantic_kernel_mycelium_ref_verify-0.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file semantic_kernel_mycelium_ref_verify-0.1.0.tar.gz.

File metadata

File hashes

Hashes for semantic_kernel_mycelium_ref_verify-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2c84f083c2a9539f92209d24d15a19b00998a172af2ff5930264c718aa27392d
MD5 2252ff5a9f8b883a355f9472ca192764
BLAKE2b-256 3eb1317f60de23fb1d880c542cf66bc1f078a5e1d56df163213c6cb352557ad4

See more details on using hashes here.

File details

Details for the file semantic_kernel_mycelium_ref_verify-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for semantic_kernel_mycelium_ref_verify-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9b42e16a1d85233269988dbd3a5346c0d9188f0a17d6c24d928499a58314309
MD5 a54ec15b57d9c4fa660f1c0e7995f7ad
BLAKE2b-256 76a2d7d2599990dc172832c0bd6cec39dc30cab0d5588e4e09d5554bd96e663a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page