package provider import "encoding/json" const ( MaxFrameBytes = 64 << 10 MaxEventBytes = 16 << 10 ) type ReadPolicy struct { DeniedPaths []string `json:"denied_paths"` ConfigHash string `json:"config_hash"` } type Workspace struct { ServerID string `json:"server_id"` ProjectID string `json:"project_id"` WorkspaceID string `json:"workspace_id"` Path string `json:"path"` } type Agent struct { ServerID string `json:"server_id"` AgentID string `json:"agent_id"` ProviderSessionID string `json:"provider_session_id"` WorkspaceID string `json:"workspace_id"` AccountID string `json:"account_id"` Provider string `json:"provider"` Model string `json:"model"` Family string `json:"family"` } type WorkspaceRequest struct { ResourceID string `json:"resource_id,omitempty"` Isolation string `json:"isolation"` ProjectID string `json:"project_id"` Path string `json:"path"` BaseCommit string `json:"base_commit"` Branch string `json:"branch"` IdempotencyKey string `json:"idempotency_key"` Selection Selection `json:"selection"` ReadPolicy ReadPolicy `json:"read_policy"` } type MCPServer struct { Type string `json:"type"` Command string `json:"command"` Args []string `json:"args"` Env map[string]string `json:"env"` } type Cursor struct { Epoch string `json:"epoch"` Sequence int64 `json:"sequence"` } type RecordedEvent struct { Kind string `json:"kind"` ServerID string `json:"server_id"` AgentID string `json:"agent_id"` ProviderSessionID string `json:"provider_session_id"` TurnID string `json:"turn_id"` PermissionID string `json:"permission_id"` Epoch string `json:"epoch"` Sequence *int64 `json:"sequence"` Payload json.RawMessage `json:"payload"` } type PermissionResponse struct { RequestID string `json:"request_id"` Behavior string `json:"behavior"` UpdatedInput json.RawMessage `json:"updated_input,omitempty"` } type Intent struct { Kind string Key string RequestHash string Request json.RawMessage } const ( ErrContract Error = "provider_contract" ErrClosed Error = "provider_closed" ErrUncertain Error = "provider_uncertain" ErrNotReady Error = "subscription_not_ready" ErrCapability Error = "unsupported_capability" ErrIsolation Error = "read_isolation_required" ErrCreationAbsent Error = "creation_absent" ErrAccountMismatch Error = "account_mismatch" )