Update public configuration and inventory contracts

This commit is contained in:
2026-11-02 12:50:58 +00:00
parent 682cb84c82
commit 6b8eefd18b
7 changed files with 89 additions and 98 deletions

View File

@@ -268,12 +268,11 @@ func newNamespacedContractEngine(t *testing.T, client promptkit.LLMClient) *prom
for _, namespace := range []string{"alpha", "beta"} {
endpoint := "https://" + namespace + ".example/v1"
input, err := promptkit.CollectionInput(namespace, configkit.Mapping(namespace+" resources", map[string]any{
"backends": map[string]any{"backend": map[string]any{"endpoint": endpoint}},
"profiles": map[string]any{"shared": map[string]any{
"backends": []any{map[string]any{"id": "backend", "endpoint": endpoint}},
"profiles": []any{map[string]any{"id": "shared",
"backend": namespace + "/backend", "model": namespace + "-model",
}},
"prompts": map[string]any{"shared": map[string]any{
"version": "1",
"prompts": []any{map[string]any{"id": "shared",
"default_profile": "root-only",
"messages": []any{map[string]any{"role": "user", "content": "Hello"}},
"output": map[string]any{"format": "text", "validation_mode": "none"},
@@ -286,11 +285,10 @@ func newNamespacedContractEngine(t *testing.T, client promptkit.LLMClient) *prom
inputs = append(inputs, input)
}
inputs = append(inputs, configkit.Input{Source: configkit.Mapping("root resources", map[string]any{
"profiles": map[string]any{"root-only": map[string]any{
"profiles": []any{map[string]any{"id": "root-only",
"endpoint": "https://root.example/v1", "model": "root-model",
}},
"prompts": map[string]any{"root-only": map[string]any{
"version": "1",
"prompts": []any{map[string]any{"id": "root-only",
"messages": []any{map[string]any{"role": "user", "content": "Root prompt"}},
"output": map[string]any{"format": "text", "validation_mode": "none"},
}},