sdk

package
v1.17.2 Latest Latest
Warning

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

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

Documentation

Overview

Package sdk is the root of Harbor's public SDK facade (RFC §3.6) — the curated, alias-based re-export tree that makes the runtime importable by external Go modules.

Go's internal/ visibility rule makes every runtime package import-forbidden outside this module. Each sdk/<area> package re-exports its internal/<area> counterpart's public surface via type aliases (`type Identity = identity.Identity`), re-exported constants/sentinels, and thin function/variable forwards. An alias IS the internal type: values flow freely across the boundary, interface satisfiability is preserved, and the facade adds no mechanism of any kind.

The curation contract: what sdk/ re-exports is the supported external API surface; what it omits is deliberately private. Additions are cheap and additive; removals follow the Protocol-style deprecation posture (RFC §5.3).

The inventory (RFC §3.6 items 3 + 6): sdk/identity, sdk/events, sdk/config, sdk/tools (+ tools/inproc, tools/builtin), sdk/llm, sdk/memory, sdk/state, sdk/artifacts, sdk/skills, sdk/planner (+ planner/react, planner/deterministic), sdk/tasks, sdk/steering, sdk/dispatch, sdk/runctx, sdk/assemble, sdk/server (serve the Protocol from your own binary), and sdk/drivers/prod (the public blank-import driver aggregator).

A minimal headless embedding (docs/recipes/embed-harbor-headless.md expressed through the facade):

import (
    _ "github.com/hurtener/Harbor/sdk/drivers/prod"

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

cfg := config.Defaults()
// ... populate cfg.LLM, validate with cfg.ValidateCore() ...
stack, err := assemble.Assemble(ctx, cfg, assemble.Options{})

This package itself exports nothing; the surface lives in the per-area subpackages.

Directories

Path Synopsis
Package artifacts is the public SDK facade over Harbor's internal/artifacts package — the content-addressed, identity-scoped artifact store and the by-reference heavy-content contract (RFC §3.6, §6.10).
Package artifacts is the public SDK facade over Harbor's internal/artifacts package — the content-addressed, identity-scoped artifact store and the by-reference heavy-content contract (RFC §3.6, §6.10).
Package assemble is the public SDK facade over Harbor's internal/runtime/assemble package — the ONE composition fan-out that turns a validated config into a running headless stack (RFC §3.6, §6.4).
Package assemble is the public SDK facade over Harbor's internal/runtime/assemble package — the ONE composition fan-out that turns a validated config into a running headless stack (RFC §3.6, §6.4).
Package audit is the public SDK facade over Harbor's internal/audit package — the mandatory redaction seam every payload passes through before leaving the process (RFC §3.6).
Package audit is the public SDK facade over Harbor's internal/audit package — the mandatory redaction seam every payload passes through before leaving the process (RFC §3.6).
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).
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).
Package dispatch is the public SDK facade over Harbor's internal/runtime/dispatch package — the production ToolExecutor that dispatches the planner's CallTool / CallParallel / SpawnTask / AwaitTask decisions against the catalog with the heavy-result→artifact promotion (RFC §3.6, §6.10).
Package dispatch is the public SDK facade over Harbor's internal/runtime/dispatch package — the production ToolExecutor that dispatches the planner's CallTool / CallParallel / SpawnTask / AwaitTask decisions against the catalog with the heavy-result→artifact promotion (RFC §3.6, §6.10).
drivers
prod
Package prod is the public SDK facade over Harbor's internal/drivers/prod package — the production driver aggregator (RFC §3.6).
Package prod is the public SDK facade over Harbor's internal/drivers/prod package — the production driver aggregator (RFC §3.6).
Package embeddings is the public SDK facade over Harbor's internal/embeddings package — the embedding client that turns text into vectors (RFC §3.6, §6.5).
Package embeddings is the public SDK facade over Harbor's internal/embeddings package — the embedding client that turns text into vectors (RFC §3.6, §6.5).
Package events is the public SDK facade over Harbor's internal/events package — the typed event bus every subsystem publishes to and subscribes from (RFC §3.6, §6.13).
Package events is the public SDK facade over Harbor's internal/events package — the typed event bus every subsystem publishes to and subscribes from (RFC §3.6, §6.13).
Package governance is the public SDK facade over Harbor's internal/governance package — per-identity cost ceilings, rate limits, and MaxTokens caps composed as an LLM-client wrapper (RFC §3.6, §6.15).
Package governance is the public SDK facade over Harbor's internal/governance package — per-identity cost ceilings, rate limits, and MaxTokens caps composed as an LLM-client wrapper (RFC §3.6, §6.15).
Package identity is the public SDK facade over Harbor's internal/identity package — the load-bearing (tenant, user, session) isolation triple plus the per-run Quadruple (RFC §3.6, §4).
Package identity is the public SDK facade over Harbor's internal/identity package — the load-bearing (tenant, user, session) isolation triple plus the per-run Quadruple (RFC §3.6, §4).
Package llm is the public SDK facade over Harbor's internal/llm package — the provider-corrected LLM client, the chat message vocabulary, and the artifact-stub content contract (RFC §3.6, §6.5).
Package llm is the public SDK facade over Harbor's internal/llm package — the provider-corrected LLM client, the chat message vocabulary, and the artifact-stub content contract (RFC §3.6, §6.5).
Package memory is the public SDK facade over Harbor's internal/memory package — the session-scoped memory store, its strategies, and the LLM-context patch vocabulary (RFC §3.6, §6.6).
Package memory is the public SDK facade over Harbor's internal/memory package — the session-scoped memory store, its strategies, and the LLM-context patch vocabulary (RFC §3.6, §6.6).
Package planner is the public SDK facade over Harbor's internal/planner package — the swappable Planner interface, the Decision sum, the RunContext view, the Trajectory record, and the driver registry external planner concretes register on (RFC §3.6, §6.2).
Package planner is the public SDK facade over Harbor's internal/planner package — the swappable Planner interface, the Decision sum, the RunContext view, the Trajectory record, and the driver registry external planner concretes register on (RFC §3.6, §6.2).
deterministic
Package deterministic is the public SDK facade over Harbor's internal/planner/deterministic package — the decision-tree planner concrete that drives the same Runtime as the LLM-driven ReAct planner through the identical Planner seam (RFC §3.6, §6.2).
Package deterministic is the public SDK facade over Harbor's internal/planner/deterministic package — the decision-tree planner concrete that drives the same Runtime as the LLM-driven ReAct planner through the identical Planner seam (RFC §3.6, §6.2).
react
Package react is the public SDK facade over Harbor's internal/planner/react package — the reference LLM-driven ReAct planner concrete (RFC §3.6, §6.2).
Package react is the public SDK facade over Harbor's internal/planner/react package — the reference LLM-driven ReAct planner concrete (RFC §3.6, §6.2).
Package protocolclient is the curated public facade for Harbor's authenticated Go Protocol client.
Package protocolclient is the curated public facade for Harbor's authenticated Go Protocol client.
Package runctx is the public SDK facade over Harbor's internal/runtime/runctx package — the RunContext-population projections a run-loop driver applies between "task spawned" and "planner.Next" (RFC §3.6, §6.2).
Package runctx is the public SDK facade over Harbor's internal/runtime/runctx package — the RunContext-population projections a run-loop driver applies between "task spawned" and "planner.Next" (RFC §3.6, §6.2).
Package server is the public SDK facade for serving the Harbor Protocol from your own Go binary — the external-serving on-ramp that makes an agent with compiled in-process tools reachable over the wire at parity with the stock harbor serve.
Package server is the public SDK facade for serving the Harbor Protocol from your own Go binary — the external-serving on-ramp that makes an agent with compiled in-process tools reachable over the wire at parity with the stock harbor serve.
Package skills is the public SDK facade over Harbor's internal/skills package — the token-savvy skill store and the Directory view that projects ranked skills into planner context (RFC §3.6, §6.7).
Package skills is the public SDK facade over Harbor's internal/skills package — the token-savvy skill store and the Directory view that projects ranked skills into planner context (RFC §3.6, §6.7).
generator
Package generator is the public SDK facade over Harbor's internal/skills/generator package — the in-runtime `skill_propose` tool that lets an agent persist a reusable skill from a successful trajectory (RFC §3.6, §6.7).
Package generator is the public SDK facade over Harbor's internal/skills/generator package — the in-runtime `skill_propose` tool that lets an agent persist a reusable skill from a successful trajectory (RFC §3.6, §6.7).
importer
Package importer is the public SDK facade over Harbor's internal/skills/importer package — the Skills.md ingest path (RFC §3.6, §6.7).
Package importer is the public SDK facade over Harbor's internal/skills/importer package — the Skills.md ingest path (RFC §3.6, §6.7).
tools
Package tools is the public SDK facade over Harbor's internal/skills/tools package — the planner-facing skill retrieval handlers (`skill_search` / `skill_get` / `skill_list`) with the capability filter, tool-name redaction, and token budgeter built in (RFC §3.6, §6.7).
Package tools is the public SDK facade over Harbor's internal/skills/tools package — the planner-facing skill retrieval handlers (`skill_search` / `skill_get` / `skill_list`) with the capability filter, tool-name redaction, and token budgeter built in (RFC §3.6, §6.7).
Package state is the public SDK facade over Harbor's internal/state package — the identity-scoped StateStore (RFC §3.6, §9).
Package state is the public SDK facade over Harbor's internal/state package — the identity-scoped StateStore (RFC §3.6, §9).
Package steering is the public SDK facade over Harbor's internal/runtime/steering package — the run loop that drives a planner, the per-run control inbox/registry, and the steering taxonomy (RFC §3.6, §6.3).
Package steering is the public SDK facade over Harbor's internal/runtime/steering package — the run loop that drives a planner, the per-run control inbox/registry, and the steering taxonomy (RFC §3.6, §6.3).
Package tasks is the public SDK facade over Harbor's internal/tasks package — the unified foreground/background TaskRegistry, the spawn vocabulary, and the task-group join surface (RFC §3.6, §6.3).
Package tasks is the public SDK facade over Harbor's internal/tasks package — the unified foreground/background TaskRegistry, the spawn vocabulary, and the task-group join surface (RFC §3.6, §6.3).
Package telemetry is the public SDK facade over Harbor's internal/telemetry package — the redactor-mandatory structured Logger, the bus→metrics bridge, and the bus→tracer bridge that derive Harbor's three signals from the one canonical event stream (RFC §3.6, §6.14).
Package telemetry is the public SDK facade over Harbor's internal/telemetry package — the redactor-mandatory structured Logger, the bus→metrics bridge, and the bus→tracer bridge that derive Harbor's three signals from the one canonical event stream (RFC §3.6, §6.14).
eventbus
Package eventbus is the public SDK facade over Harbor's internal/telemetry/eventbus package — the production BusEmitter adapter that pairs Logger.Error calls with runtime.error events on the canonical bus (RFC §3.6, §6.14).
Package eventbus is the public SDK facade over Harbor's internal/telemetry/eventbus package — the production BusEmitter adapter that pairs Logger.Error calls with runtime.error events on the canonical bus (RFC §3.6, §6.14).
Package tools is the public SDK facade over Harbor's internal/tools package — the transport-agnostic tool catalog, the descriptor/policy vocabulary, and the planner-facing catalog view (RFC §3.6, §6.10).
Package tools is the public SDK facade over Harbor's internal/tools package — the transport-agnostic tool catalog, the descriptor/policy vocabulary, and the planner-facing catalog view (RFC §3.6, §6.10).
auth
Package auth is the public SDK facade over Harbor's internal/tools/auth package — the tool-side OAuth completion leg: a plain http.Handler that exchanges the provider redirect and resumes the parked pause (RFC §3.6, §6.3).
Package auth is the public SDK facade over Harbor's internal/tools/auth package — the tool-side OAuth completion leg: a plain http.Handler that exchanges the provider redirect and resumes the parked pause (RFC §3.6, §6.3).
builtin
Package builtin is the public SDK facade over Harbor's internal/tools/builtin package — the runtime's built-in tool set (clock, text, artifact_fetch, tool/skill discovery, declarative actions) registered by name onto a catalog (RFC §3.6, §6.10).
Package builtin is the public SDK facade over Harbor's internal/tools/builtin package — the runtime's built-in tool set (clock, text, artifact_fetch, tool/skill discovery, declarative actions) registered by name onto a catalog (RFC §3.6, §6.10).
inproc
Package inproc is the public SDK facade over Harbor's internal/tools/drivers/inproc package — the in-process tool driver that registers plain Go functions as Tools with reflection-derived schemas (RFC §3.6, §6.10).
Package inproc is the public SDK facade over Harbor's internal/tools/drivers/inproc package — the in-process tool driver that registers plain Go functions as Tools with reflection-derived schemas (RFC §3.6, §6.10).
Package tui is the public SDK facade for attaching Harbor's native terminal client to a running Runtime.
Package tui is the public SDK facade for attaching Harbor's native terminal client to a running Runtime.

Jump to

Keyboard shortcuts

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