config

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package config is the public SDK facade over Harbor's internal/config package — the operator configuration schema, loader, defaults, and validation surface (RFC §3.6, §10). Alias-based re-exports only: no behavior lives here. What this package omits from the internal surface (deprecation plumbing, policy projection internals) is deliberately private.

Example

Example shows the hand-built configuration path: Defaults returns the canonical baseline (the same one Load applies to a harbor.yaml), the embedder points the LLM seam at a concrete driver, and ValidateCore runs the headless validation profile — every section EXCEPT the Protocol-server JWT ceremony a headless library never serves. A config that passes ValidateCore is ready to hand to assemble.Assemble.

package main

import (
	"fmt"
	"log"

	"github.com/hurtener/Harbor/sdk/config"
)

func main() {
	cfg := config.Defaults()

	// Point the LLM seam at a driver and declare its context window.
	cfg.LLM.Driver = "mock"
	cfg.LLM.Model = "mock/echo"
	cfg.LLM.ModelProfiles = map[string]config.LLMModelProfileConfig{
		"mock/echo": {ContextWindowTokens: 100000, TokenEstimator: "chars_div_4"},
	}

	if err := cfg.ValidateCore(); err != nil {
		log.Fatalf("validate: %v", err)
	}

	// The baseline ships in-memory drivers across the persistence triad,
	// so a headless embedder boots with zero external dependencies.
	fmt.Println(cfg.State.Driver)
}
Output:
inmem

Index

Examples

Constants

This section is empty.

Variables

View Source
var (
	// ErrConfigInvalid — the configuration failed validation.
	ErrConfigInvalid = internal.ErrConfigInvalid
	// ErrConfigNotFound — the configuration file does not exist.
	ErrConfigNotFound = internal.ErrConfigNotFound
)

Re-exported sentinel errors callers compare via errors.Is.

View Source
var Defaults = internal.Defaults

Defaults returns the canonical baseline configuration — the same baseline Load applies to a harbor.yaml, so a hand-built config behaves exactly like a loaded one.

View Source
var IsValidationError = internal.IsValidationError

IsValidationError reports whether err is a config validation error.

Load reads, defaults, and validates a harbor.yaml from disk.

View Source
var LoadFromBytes = internal.LoadFromBytes

LoadFromBytes reads, defaults, and validates a config from memory.

View Source
var WithLogger = internal.WithLogger

WithLogger threads a logger into Load / LoadFromBytes.

View Source
var WithOverrides = internal.WithOverrides

WithOverrides applies dotted-key overrides onto a Config.

Functions

This section is empty.

Types

type A2APeerConfig

type A2APeerConfig = internal.A2APeerConfig

A2APeerConfig declares one A2A remote peer.

type ArtifactsConfig

type ArtifactsConfig = internal.ArtifactsConfig

ArtifactsConfig configures the artifact store.

type AuditConfig

type AuditConfig = internal.AuditConfig

AuditConfig configures audit redaction.

type CLIConfig

type CLIConfig = internal.CLIConfig

CLIConfig configures CLI-side behaviour.

type Config

type Config = internal.Config

Config is the root operator configuration. Methods (ValidateCore, Validate, ...) come with the alias; see internal/config.

type CustomToolConfig

type CustomToolConfig = internal.CustomToolConfig

CustomToolConfig declares one operator-defined tool entry body.

type DevHotReloadConfig

type DevHotReloadConfig = internal.DevHotReloadConfig

DevHotReloadConfig configures the dev-loop hot-reload policy.

type DistributedConfig

type DistributedConfig = internal.DistributedConfig

DistributedConfig configures the MessageBus / RemoteTransport.

type EventsConfig

type EventsConfig = internal.EventsConfig

EventsConfig configures the typed event bus.

type GovernanceConfig

type GovernanceConfig = internal.GovernanceConfig

GovernanceConfig configures cost ceilings / rate limits / MaxTokens.

type GovernanceRateLimitConfig

type GovernanceRateLimitConfig = internal.GovernanceRateLimitConfig

GovernanceRateLimitConfig is one tier's rate-limit block.

type GovernanceTierConfig

type GovernanceTierConfig = internal.GovernanceTierConfig

GovernanceTierConfig is one identity tier's enforcement block.

type IdentityConfig

type IdentityConfig = internal.IdentityConfig

IdentityConfig configures identity handling.

type LLMConfig

type LLMConfig = internal.LLMConfig

LLMConfig configures the LLM client.

type LLMCorrectionsConfig

type LLMCorrectionsConfig = internal.LLMCorrectionsConfig

LLMCorrectionsConfig configures the provider-correction layer.

type LLMCorrectionsProfileConfig

type LLMCorrectionsProfileConfig = internal.LLMCorrectionsProfileConfig

LLMCorrectionsProfileConfig is a per-model corrections override.

type LLMCostOverridesConfig

type LLMCostOverridesConfig = internal.LLMCostOverridesConfig

LLMCostOverridesConfig overrides per-1M token cost rates.

type LLMCustomProviderConfig

type LLMCustomProviderConfig = internal.LLMCustomProviderConfig

LLMCustomProviderConfig declares one OpenAI-compatible endpoint.

type LLMModelProfileConfig

type LLMModelProfileConfig = internal.LLMModelProfileConfig

LLMModelProfileConfig declares one model's context window / knobs.

type LLMNetworkDefaults

type LLMNetworkDefaults = internal.LLMNetworkDefaults

LLMNetworkDefaults carries provider network fallback knobs.

type LoadOption

type LoadOption = internal.LoadOption

LoadOption customises Load / LoadFromBytes.

type MCPServerConfig

type MCPServerConfig = internal.MCPServerConfig

MCPServerConfig declares one southbound MCP server attachment.

type MemoryConfig

type MemoryConfig = internal.MemoryConfig

MemoryConfig configures the memory subsystem.

type PauseResumeConfig

type PauseResumeConfig = internal.PauseResumeConfig

PauseResumeConfig configures the unified pause/resume primitive.

type PlannerConfig

type PlannerConfig = internal.PlannerConfig

PlannerConfig configures the planner concrete + caps.

type PlannerPlanningHintsCfg

type PlannerPlanningHintsCfg = internal.PlannerPlanningHintsCfg

PlannerPlanningHintsCfg configures operator planning hints.

type ProjectedToolPolicy

type ProjectedToolPolicy = internal.ProjectedToolPolicy

ProjectedToolPolicy is the config→runtime tool-policy projection.

type ProtocolConfig

type ProtocolConfig = internal.ProtocolConfig

ProtocolConfig configures the Harbor Protocol surface.

type RuntimeConfig

type RuntimeConfig = internal.RuntimeConfig

RuntimeConfig configures the orchestration kernel.

type ServerConfig

type ServerConfig = internal.ServerConfig

ServerConfig configures the Protocol server's listener.

type SessionsConfig

type SessionsConfig = internal.SessionsConfig

SessionsConfig configures the session manager.

type SkillsConfig

type SkillsConfig = internal.SkillsConfig

SkillsConfig configures the skills subsystem.

type SkillsDirectoryConfig

type SkillsDirectoryConfig = internal.SkillsDirectoryConfig

SkillsDirectoryConfig configures the skills Directory view.

type StateConfig

type StateConfig = internal.StateConfig

StateConfig configures the StateStore.

type TasksConfig

type TasksConfig = internal.TasksConfig

TasksConfig configures the TaskService.

type TelemetryConfig

type TelemetryConfig = internal.TelemetryConfig

TelemetryConfig configures logging / traces / metrics.

type ToolApprovalConfig

type ToolApprovalConfig = internal.ToolApprovalConfig

ToolApprovalConfig configures HITL tool-approval gates.

type ToolEntryConfig

type ToolEntryConfig = internal.ToolEntryConfig

ToolEntryConfig declares one operator tool entry.

type ToolOAuthConfig

type ToolOAuthConfig = internal.ToolOAuthConfig

ToolOAuthConfig configures tool-side OAuth.

type ToolOAuthProviderConfig

type ToolOAuthProviderConfig = internal.ToolOAuthProviderConfig

ToolOAuthProviderConfig declares one OAuth provider.

type ToolPolicyConfig

type ToolPolicyConfig = internal.ToolPolicyConfig

ToolPolicyConfig declares one tool's timeout/retry/validation policy.

type ToolsConfig

type ToolsConfig = internal.ToolsConfig

ToolsConfig configures the tool catalog.

Jump to

Keyboard shortcuts

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