provider

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 22 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package provider contains adapters from the shared runtime provider registry to Knowl's structured maintainer boundary.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmbeddingClient added in v0.6.0

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

EmbeddingClient speaks bounded OpenAI-compatible float embedding requests.

func NewEmbeddingClient added in v0.6.0

func NewEmbeddingClient(options EmbeddingClientOptions) (*EmbeddingClient, error)

NewEmbeddingClient validates one operator-owned API/model configuration.

func (*EmbeddingClient) Embed added in v0.6.0

func (client *EmbeddingClient) Embed(ctx context.Context, inputs []string) (output [][]float32, resultErr error)

Embed returns complete indexed normalized vectors or a safe classified error. Caller cancellation takes precedence over provider-local degradation reasons.

type EmbeddingClientOptions added in v0.6.0

type EmbeddingClientOptions struct {
	Endpoint string
	Space    app.EmbeddingSpace
	APIKey   string
}

EmbeddingClientOptions configures one immutable API contract. APIKey is supplied explicitly at construction and is never serialized or reported.

type Fixture

type Fixture struct {
	Result          knowl.ModelEditPlan
	Error           error
	HierarchyResult knowl.HierarchyModelPlan
	HierarchyError  error
}

Fixture is a deterministic local Maintainer used by supported contract tests.

func (Fixture) Plan

func (fixture Fixture) Plan(ctx context.Context, input knowl.MaintenanceInput) (knowl.ModelEditPlan, error)

Plan returns the configured plan and never performs network I/O.

func (Fixture) PlanHierarchy added in v0.4.0

func (fixture Fixture) PlanHierarchy(ctx context.Context, _ knowl.HierarchyInput) (knowl.HierarchyModelPlan, error)

PlanHierarchy returns the configured semantic graph and never performs network I/O. A hierarchy fixture must be explicit to avoid inventing a test taxonomy from source identities or paths.

type RuntimeFactory

type RuntimeFactory interface {
	Build(ctx context.Context, request agentfactory.BuildRequest) (adkagent.Agent, error)
}

RuntimeFactory is the narrow shared-runtime seam used by RuntimeMaintainer. The concrete implementation is runtime/v2/agentfactory.Factory; keeping the consumer-side interface here makes deterministic tests independent of ACP or hosted provider processes.

type RuntimeFactoryValidator

type RuntimeFactoryValidator interface{ ValidateAgent(providerID string) error }

RuntimeFactoryValidator is implemented by the shared runtime factory when it can validate a provider schema without starting the provider.

type RuntimeMaintainer

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

RuntimeMaintainer adapts one Balda-compatible runtime provider to Knowl's structured app.Maintainer boundary.

func NewRuntimeMaintainer

func NewRuntimeMaintainer(factory RuntimeFactory, providerID, workspace string) (*RuntimeMaintainer, error)

NewRuntimeMaintainer creates a lazy, structured maintainer for one runtime provider ID. The provider process is not built until Plan is called.

func (*RuntimeMaintainer) Close

func (maintainer *RuntimeMaintainer) Close() error

Close releases the provider agent. It is safe to call more than once.

func (*RuntimeMaintainer) Plan

Plan preserves the base API's single-generation behavior.

func (*RuntimeMaintainer) PlanHierarchy added in v0.4.0

func (maintainer *RuntimeMaintainer) PlanHierarchy(ctx context.Context, input knowl.HierarchyInput) (knowl.HierarchyModelPlan, error)

PlanHierarchy preserves single-generation and generic hierarchy validation.

func (*RuntimeMaintainer) PlanHierarchyValidated added in v0.6.0

func (*RuntimeMaintainer) PlanRetirement added in v0.7.0

func (maintainer *RuntimeMaintainer) PlanRetirement(ctx context.Context, input knowl.RetirementInput) (knowl.RetirementModelPlan, error)

PlanRetirement produces one complete page replacement or an explicit delete from the application's active-only, page-scoped evidence envelope.

func (*RuntimeMaintainer) PlanValidated added in v0.6.0

func (*RuntimeMaintainer) RequestBudget added in v0.6.0

RequestBudget returns immutable local capacity without starting a runtime.

func (*RuntimeMaintainer) RequestBytes added in v0.6.0

func (m *RuntimeMaintainer) RequestBytes(ctx context.Context, input knowl.MaintenanceInput) (int, error)

RequestBytes measures the exact source envelope plus the pinned wrapper. It does not perform inference or build a runtime/session.

func (*RuntimeMaintainer) RetirementRequestBudget added in v0.7.0

func (m *RuntimeMaintainer) RetirementRequestBudget() knowl.MaintenanceRequestBudget

RetirementRequestBudget returns the finite capacity of the retirement wrapper.

func (*RuntimeMaintainer) RetirementRequestBytes added in v0.7.0

func (m *RuntimeMaintainer) RetirementRequestBytes(ctx context.Context, input knowl.RetirementInput) (int, error)

RetirementRequestBytes measures the exact retirement envelope plus wrapper without initializing the provider runtime.

Jump to

Keyboard shortcuts

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