providers

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package providers lists the fixed, trusted provider profiles without invoking them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderHuman

func RenderHuman(result Result) string

RenderHuman deterministically renders only JSON-safe profile fields.

Types

type Diagnoser

type Diagnoser interface {
	DiagnoseEnvironment(context.Context) (doctor.DoctorResult, error)
}

Diagnoser supplies the redacted environment diagnosis consumed by this read-only service.

type Family

type Family string

Family identifies one provider family in canonical runtime order.

const (
	FamilyKimi  Family = "kimi"
	FamilyZCode Family = "zcode"
	FamilyAGY   Family = "agy"
)

type JSONProfile

type JSONProfile struct {
	Family          Family                 `json:"family"`
	ProfileID       string                 `json:"profile_id"`
	PromptTransport PromptTransport        `json:"prompt_transport"`
	ResultTransport ResultTransport        `json:"result_transport"`
	Support         SupportState           `json:"support"`
	EvidenceState   doctor.EvidenceState   `json:"evidence_state"`
	AssignmentState doctor.AssignmentState `json:"assignment_state"`
	EvidenceURI     *string                `json:"evidence_uri,omitempty"`
	EvidenceSHA256  *string                `json:"evidence_sha256,omitempty"`
}

JSONProfile is the JSON-safe projection for one fixed provider profile.

type JSONResult

type JSONResult struct {
	Profiles []JSONProfile `json:"profiles"`
}

JSONResult is the JSON-safe public projection. It excludes executable paths, environment values, credentials, prompt bytes, and arbitrary diagnostic errors.

type Profile

type Profile struct {
	// contains filtered or unexported fields
}

Profile is the immutable application view of a trusted provider profile.

func (Profile) AssignmentState

func (profile Profile) AssignmentState() doctor.AssignmentState

func (Profile) EvidenceSHA256

func (profile Profile) EvidenceSHA256() (string, bool)

EvidenceSHA256 returns the redacted authority evidence digest, when doctor supplied one.

func (Profile) EvidenceState

func (profile Profile) EvidenceState() doctor.EvidenceState

func (Profile) EvidenceURI

func (profile Profile) EvidenceURI() (string, bool)

EvidenceURI returns the redacted authority evidence URI, when doctor supplied one.

func (Profile) Family

func (profile Profile) Family() Family

func (Profile) ID

func (profile Profile) ID() string

func (Profile) PromptTransport

func (profile Profile) PromptTransport() PromptTransport

func (Profile) ResultTransport

func (profile Profile) ResultTransport() ResultTransport

func (Profile) Support

func (profile Profile) Support() SupportState

type PromptTransport

type PromptTransport string

PromptTransport identifies the fixed provider prompt transport.

const (
	PromptTransportArgv PromptTransport = "argv"
)

type Result

type Result struct {
	// contains filtered or unexported fields
}

Result is a caller-safe list of profiles in canonical family order.

func (Result) JSON

func (result Result) JSON() JSONResult

JSON returns a defensive JSON-safe projection of the result.

func (Result) Profiles

func (result Result) Profiles() []Profile

Profiles returns a defensive copy in canonical family order.

func (Result) RenderHuman

func (result Result) RenderHuman() string

RenderHuman deterministically renders only JSON-safe profile fields.

func (Result) String

func (result Result) String() string

String renders the JSON-safe human view.

type ResultTransport

type ResultTransport string

ResultTransport identifies the fixed provider result transport.

const (
	ResultTransportKimiStreamJSONAssistantContent ResultTransport = "kimi_stream_json_assistant_content"
	ResultTransportStrictJSON                     ResultTransport = "strict_json"
)

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service lists fixed provider profiles from doctor evidence. It neither probes providers nor promotes evidence.

func NewService

func NewService(diagnoser Diagnoser) (*Service, error)

NewService constructs a provider-profile listing service.

func (*Service) ListProviderProfiles

func (service *Service) ListProviderProfiles(ctx context.Context, includeUnverified bool) (Result, error)

ListProviderProfiles returns the exact trusted family inventory in canonical order. When includeUnverified is false, only unverified profiles are omitted; failed and inconclusive profiles remain visible as unsupported.

type SupportState

type SupportState string

SupportState is the non-authoritative availability projection of doctor evidence.

const (
	SupportSupported   SupportState = "supported"
	SupportUnsupported SupportState = "unsupported"
	SupportUnverified  SupportState = "unverified"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL