SDK Reference
Public Harbor SDK packages, entrypoints, and boundaries.
TypeDoc is deliberately not part of the docs build. This page is the editorial SDK reference for the publish lane.
Public packages
| Package | Public entrypoints | Boundary |
|---|---|---|
@hrbr/client | ., ./client, ./promise, ./effect, ./auth, ./generated/harbor | Public TypeScript application client. |
@hrbr/sdk | ., ./agents, ./core, ./core/*, ./inspect, ./orbit, ./orbit/*, ./platform, ./platform/*, ./plugins, ./plugins/*, ./protocol, ./protocol/*, ./registry, ./runtime, ./runtime/* | Composite system facade for Harbor-owned building blocks. |
harbor-sdk | Python import harbor_sdk, generated layer harbor_sdk_generated | Public Python application client plus generated protocol layer. |
The public TypeScript package identities are exactly @hrbr/client
and @hrbr/sdk. For v0.1.2 they are distributed as GitHub release
tarballs; lower-level protocol, runtime, registry, and platform packages stay
behind the composite SDK unless a new public product is intentionally
introduced.
@hrbr/client
The root package returns ordinary Promises and is the default for apps, servers, browser integrations, CLIs, and test harnesses:
import { createHarborClient } from '@hrbr/client'
const harbor = createHarborClient({
baseUrl: 'https://api.tryharbor.ai',
workspaceId: process.env.HARBOR_WORKSPACE_ID!,
auth: { kind: 'api_key', key: process.env.HARBOR_API_KEY! },
})
await harbor.runtime.execute({ code: 'return { ok: true }' })Important resource groups:
| Group | Purpose |
|---|---|
api | Generated route-level Harbor API client. |
workspaces and workspace(id) | Workspace discovery and workspace-bound clients. |
runtime and triggers | Execution and trigger helpers. |
sources, registry, tools, credentials, oauth | Plugin/source administration and discovery. |
runs, policies, audit | Audit, trace, policy, and run lookup. |
jobs, apps, workflows | Function, App, and workflow control-plane groups. |
Use @hrbr/client/effect only when the host application is already
Effect-native. Use @hrbr/client/auth for device login helpers.
@hrbr/sdk
@hrbr/sdk is not the normal app client. It provides a stable single
import surface for Harbor system code:
import { Core, Inspect, Orbit, Platform, Plugins, Protocol, Registry, Runtime } from '@hrbr/sdk'
import { initLocalProject } from '@hrbr/sdk/platform/local'
const project = initLocalProject({
workspaceId: 'workspace_local',
workspaceName: 'Local SDK Workspace',
authToken: 'local-token',
})
console.log(Core.ROUTES.exec)
console.log(Inspect.INSPECT_RESULT_KIND)
console.log(Protocol.harborOpenApiDocument.info.title)
console.log(project.workspaceId)Use it for local platform infrastructure, generated protocol artifacts,
inspect-source helpers, registry catalogs, runtime contracts, Orbit contracts,
and Harbor-owned system tests. Import @hrbr/sdk/inspect directly
when the host only needs inspect wrapping, worker-source generation, or result
normalization helpers. The v0.1.2 inspect surface includes Harbor context
domains under hrbr.context.entities and
hrbr.context.files, and @hrbr/sdk/core includes the
context subpath facade for system code.
Python harbor-sdk
The Python package exposes sync and async clients over the same generated Harbor protocol:
from harbor_sdk import AsyncHarborClient, HarborClient
client = HarborClient(
api_key="hrbr_...",
workspace_id="workspace_...",
)
run = client.runtime.execute(code='return "hello"')
print(run.result)
async_client = AsyncHarborClient(
api_key="hrbr_...",
workspace_id="workspace_...",
)
async_run = await async_client.runtime.execute(code='return "hello"')Application code should prefer harbor_sdk. The generated protocol
layer is exposed as harbor_sdk_generated for low-level route
coverage and generated types.