Documentation
¶
Overview ¶
Package provider contains adapters from the shared runtime provider registry to Knowl's structured maintainer boundary.
Index ¶
- type EmbeddingClient
- type EmbeddingClientOptions
- type Fixture
- type RuntimeFactory
- type RuntimeFactoryValidator
- type RuntimeMaintainer
- func (maintainer *RuntimeMaintainer) Close() error
- func (maintainer *RuntimeMaintainer) Plan(ctx context.Context, input knowl.MaintenanceInput) (knowl.ModelEditPlan, error)
- func (maintainer *RuntimeMaintainer) PlanHierarchy(ctx context.Context, input knowl.HierarchyInput) (knowl.HierarchyModelPlan, error)
- func (m *RuntimeMaintainer) PlanHierarchyValidated(ctx context.Context, input knowl.HierarchyInput, ...) (knowl.HierarchyModelPlan, knowl.OperationCorrectionReport, error)
- func (maintainer *RuntimeMaintainer) PlanRetirement(ctx context.Context, input knowl.RetirementInput) (knowl.RetirementModelPlan, error)
- func (m *RuntimeMaintainer) PlanValidated(ctx context.Context, input knowl.MaintenanceInput, ...) (knowl.ModelEditPlan, knowl.OperationCorrectionReport, error)
- func (m *RuntimeMaintainer) RequestBudget() knowl.MaintenanceRequestBudget
- func (m *RuntimeMaintainer) RequestBytes(ctx context.Context, input knowl.MaintenanceInput) (int, error)
- func (m *RuntimeMaintainer) RetirementRequestBudget() knowl.MaintenanceRequestBudget
- func (m *RuntimeMaintainer) RetirementRequestBytes(ctx context.Context, input knowl.RetirementInput) (int, error)
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 ¶
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 ¶
func (maintainer *RuntimeMaintainer) Plan(ctx context.Context, input knowl.MaintenanceInput) (knowl.ModelEditPlan, error)
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 (m *RuntimeMaintainer) PlanHierarchyValidated(ctx context.Context, input knowl.HierarchyInput, limits knowl.OutputCorrectionLimits, validate func(knowl.HierarchyModelPlan) error) (knowl.HierarchyModelPlan, knowl.OperationCorrectionReport, error)
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 (m *RuntimeMaintainer) PlanValidated(ctx context.Context, input knowl.MaintenanceInput, limits knowl.OutputCorrectionLimits, validate func(knowl.ModelEditPlan) error) (knowl.ModelEditPlan, knowl.OperationCorrectionReport, error)
func (*RuntimeMaintainer) RequestBudget ¶ added in v0.6.0
func (m *RuntimeMaintainer) RequestBudget() knowl.MaintenanceRequestBudget
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.