oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package provider
2
3import (
4 "encoding/json"
5 "slices"
6 "testing"
7)
8
9func TestAssistProfile(t *testing.T) {
10 p, err := Profile("assist")
11 if err != nil {
12 t.Fatal(err)
13 }
14 if p.Specialist != "Coordinator" || !p.ReadOnly {
15 t.Fatalf("profile %+v", p)
16 }
17 want := []string{"mcp__equipo__look", "mcp__equipo__describe", "mcp__equipo__use", "mcp__equipo__ask_person", "mcp__equipo__write_note", "mcp__equipo__read_notes", "mcp__equipo__read_attachment"}
18 if got := p.MCPTools(); !slices.Equal(got, want) {
19 t.Fatalf("tools %v", got)
20 }
21 if !CoordinatorAction("assist") {
22 t.Fatal("assist is not a coordinator action")
23 }
24}
25
26// An assist manifest is a converse-shaped policy: the desk mounts read-only.
27func TestAssistManifestIsConverse(t *testing.T) {
28 raw, _ := json.Marshal(effectiveManifest{Action: "assist"})
29 if !(Policy{Manifest: raw, ManifestHash: digest(raw)}).Converse() {
30 t.Fatal("assist manifest is not Converse")
31 }
32 raw, _ = json.Marshal(effectiveManifest{Action: "implement"})
33 if (Policy{Manifest: raw, ManifestHash: digest(raw)}).Converse() {
34 t.Fatal("implement manifest is Converse")
35 }
36}
37