mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-10-03 12:42:43 +00:00
ee8a24e14a
Manifest-backed MCP tools, prompts, and resources with surface affordance contracts; agent capability manifest and governance projection; API contract tests and capability route projection; operations-loop and intelligence-funnel telemetry; release-control subsystem documentation, registry, and tooling; licensing and configuration.
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
package agentcapabilities
|
|
|
|
import (
|
|
"reflect"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestAgentActionableEventKindsReturnsDetachedKnownKinds(t *testing.T) {
|
|
got := AgentActionableEventKinds()
|
|
want := []string{
|
|
string(EventKindFindingCreated),
|
|
string(EventKindApprovalPending),
|
|
string(EventKindActionCompleted),
|
|
}
|
|
if !reflect.DeepEqual(got, want) {
|
|
t.Fatalf("AgentActionableEventKinds() = %v, want %v", got, want)
|
|
}
|
|
|
|
got[0] = "mutated"
|
|
second := AgentActionableEventKinds()
|
|
if second[0] != string(EventKindFindingCreated) {
|
|
t.Fatalf("AgentActionableEventKinds returned aliased slice: %v", second)
|
|
}
|
|
}
|
|
|
|
func TestIsTransportEventKindPinsStreamPlumbing(t *testing.T) {
|
|
for _, kind := range []EventKind{EventKindStreamConnected, EventKindHeartbeat} {
|
|
if !IsTransportEventKind(string(kind)) {
|
|
t.Fatalf("%s must be transport plumbing", kind)
|
|
}
|
|
}
|
|
for _, kind := range AgentActionableEventKinds() {
|
|
if IsTransportEventKind(kind) {
|
|
t.Fatalf("%s must remain agent-actionable", kind)
|
|
}
|
|
}
|
|
}
|
|
|
|
func TestSubscribeEventsDescriptionUsesSharedEventKinds(t *testing.T) {
|
|
description := SubscribeEventsDescription()
|
|
for _, kind := range append(AgentActionableEventKinds(), string(EventKindHeartbeat)) {
|
|
if !strings.Contains(description, kind) {
|
|
t.Fatalf("subscribe_events description missing %q: %s", kind, description)
|
|
}
|
|
}
|
|
}
|