oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

1package claude
2
3import (
4 "amadan.net/oficina/equipo/internal/runner/provider"
5 "slices"
6 "testing"
7)
8
9func TestCoordinatorPartialMessages(t *testing.T) {
10 raw := []byte(`{"type":"stream_event","session_id":"session","event":{"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}}`)
11 events, err := Decode(raw)
12 if err != nil || len(events) != 1 || events[0].Kind != "message.delta" {
13 t.Fatalf("partial text lost: %+v %v", events, err)
14 }
15 profile, _ := provider.Profile("coordinate")
16 in, err := PolicyInputs(provider.Binding{Provider: "claude", CredentialHome: "/private/account", Home: "/private/run", RuntimeRoot: "/private/runtime"}, provider.PolicyInputs{Action: "coordinate", Tools: profile.MCPTools()}, profile.Specialist, "model")
17 if err != nil || !slices.Contains(in.Argv, "--include-partial-messages") {
18 t.Fatalf("partial flag not policy bound: %v %v", in.Argv, err)
19 }
20}
21