scobleclaw/kubeclaw/internal/judge/client.go
agent-cos 163a3333d3 feat(pkg/floxenv): add Flox environment lifecycle management package
- Activate / Deactivate via flox activate --detach (with graceful SIGTERM→SIGKILL)
- Non-privileged IsAlive process check with Linux /proc fallback
- Dev-mode stub when flox is missing or FLOXENV_DEV_MODE=1
- Unit and integration tests

Closes #16
2026-05-29 23:40:22 -07:00

44 lines
1.3 KiB
Go

package judge
// Client communicates with the judge sidecar to validate workflow invocations.
type Client struct {
Endpoint string
}
// Verdict represents the judge's decision on a workflow invocation.
type Verdict int
const (
VerdictApprove Verdict = iota
VerdictReject
VerdictEscalateHuman
)
// VerificationRequest is sent to the judge sidecar for evaluation.
type VerificationRequest struct {
AgentName string `json:"agentName"`
WorkflowTemplate string `json:"workflowTemplate"`
Params map[string]interface{} `json:"params"`
CompliancePolicies []string `json:"compliancePolicies"`
}
// VerificationResponse is returned by the judge sidecar.
type VerificationResponse struct {
Verdict Verdict `json:"verdict"`
Reason string `json:"reason"`
RuleID string `json:"ruleId,omitempty"`
}
// NewClient creates a new judge client.
func NewClient(endpoint string) *Client {
return &Client{Endpoint: endpoint}
}
// Verify sends a workflow invocation to the judge for evaluation.
func (c *Client) Verify(req VerificationRequest) (*VerificationResponse, error) {
// TODO: Implement HTTP/gRPC call to judge sidecar
return &VerificationResponse{
Verdict: VerdictApprove,
Reason: "judge client stub — always approves",
}, nil
}