mirror of
https://gh-proxy.org/https://github.com/klinsmaya/multica.git
synced 2026-11-09 01:46:46 +08:00
* feat(plugins): add remote MCP runtime Co-authored-by: multica-agent <[email protected]> * chore(plugins): add private Exa example Co-authored-by: multica-agent <[email protected]> * docs(plugins): remove private plugin guide Co-authored-by: multica-agent <[email protected]> * fix(plugins): stabilize remote MCP tool digests Co-authored-by: multica-agent <[email protected]> * fix(plugins): preserve remote MCP notification status Co-authored-by: multica-agent <[email protected]> * fix(plugins): make Exa example runnable end to end Co-authored-by: multica-agent <[email protected]> * fix(codex): record MCP tool calls in agent log Co-authored-by: multica-agent <[email protected]> * chore(plugins): add community skills example Co-authored-by: multica-agent <[email protected]> * feat(plugins): support multi-file skill bundles Co-authored-by: multica-agent <[email protected]> * feat(plugins): add Mobbin MCP example Co-authored-by: multica-agent <[email protected]> * chore(plugins): bundle full Matt Pocock skill set Co-authored-by: multica-agent <[email protected]> * feat(plugins): add remote MCP OAuth connections Co-authored-by: multica-agent <[email protected]> * fix(plugins): gate enable on remote MCP readiness Co-authored-by: multica-agent <[email protected]> * fix(plugin): authenticate remote mcp credential broker Co-authored-by: multica-agent <[email protected]> * fix(plugins): harden remote mcp oauth flow Co-authored-by: multica-agent <[email protected]> * refactor(plugins): use a single feature flag Co-authored-by: multica-agent <[email protected]> * fix(plugins): clean up remote MCP OAuth state Co-authored-by: multica-agent <[email protected]> * chore(plugins): remove Matt Pocock example Co-authored-by: multica-agent <[email protected]> --------- Co-authored-by: Lambda <[email protected]> Co-authored-by: multica-agent <[email protected]>
53 lines
1.7 KiB
Go
53 lines
1.7 KiB
Go
package pluginruntime
|
|
|
|
import "testing"
|
|
|
|
func TestSnapshotDigestCanonicalizesEntryOrder(t *testing.T) {
|
|
left := []CompiledEntry{
|
|
{PluginKey: "z.plugin", ContributionKey: "b", Ordinal: 1, RequiredDaemonFeatures: []string{"b", "a"}},
|
|
{PluginKey: "a.plugin", ContributionKey: "a", Ordinal: 0},
|
|
}
|
|
right := []CompiledEntry{left[1], left[0]}
|
|
first, err := SnapshotDigest(map[string]int64{"b": 2, "a": 1}, left)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
second, err := SnapshotDigest(map[string]int64{"a": 1, "b": 2}, right)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if first != second {
|
|
t.Fatalf("snapshot digest is not canonical: %s != %s", first, second)
|
|
}
|
|
}
|
|
|
|
func TestSnapshotDigestCanonicalizesSkillFileOrder(t *testing.T) {
|
|
left := []CompiledEntry{{
|
|
PluginKey: "example.plugin",
|
|
ContributionKey: "community-skill",
|
|
SkillFiles: []SkillFile{
|
|
{ArtifactFileID: "file-b", Path: "references/b.md", Digest: "sha256:b", SizeBytes: 2},
|
|
{ArtifactFileID: "file-a", Path: "agents/openai.yaml", Digest: "sha256:a", SizeBytes: 1},
|
|
},
|
|
}}
|
|
right := []CompiledEntry{{
|
|
PluginKey: "example.plugin",
|
|
ContributionKey: "community-skill",
|
|
SkillFiles: []SkillFile{
|
|
{ArtifactFileID: "file-a", Path: "agents/openai.yaml", Digest: "sha256:a", SizeBytes: 1},
|
|
{ArtifactFileID: "file-b", Path: "references/b.md", Digest: "sha256:b", SizeBytes: 2},
|
|
},
|
|
}}
|
|
first, err := SnapshotDigest(map[string]int64{"installation": 1}, left)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
second, err := SnapshotDigest(map[string]int64{"installation": 1}, right)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if first != second {
|
|
t.Fatalf("snapshot digest depends on Skill file order: %s != %s", first, second)
|
|
}
|
|
}
|