HarborHarbor
DocumentationGuidesPlugins

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

PackagePublic entrypointsBoundary
@hrbr/client., ./client, ./promise, ./effect, ./auth, ./generated/harborPublic TypeScript application client.
@hrbr/sdk., ./agents, ./core, ./core/*, ./orbit, ./orbit/*, ./platform, ./platform/*, ./plugins, ./plugins/*, ./protocol, ./protocol/*, ./registry, ./runtime, ./runtime/*Composite system facade for Harbor-owned building blocks.
harbor-sdkPython import harbor_sdk, generated layer harbor_sdk_generatedPublic Python application client plus generated protocol layer.

The default npm publish surface is exactly @hrbr/client and @hrbr/sdk. 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:

client.ts
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:

GroupPurpose
apiGenerated route-level Harbor API client.
workspaces and workspace(id)Workspace discovery and workspace-bound clients.
runtime and triggersExecution and trigger helpers.
sources, registry, tools, credentials, oauthPlugin/source administration and discovery.
runs, policies, auditAudit, trace, policy, and run lookup.
jobs, apps, workflowsFunction, 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:

system.ts
import { Core, 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(Protocol.harborOpenApiDocument.info.title)
console.log(project.workspaceId)

Use it for local platform infrastructure, generated protocol artifacts, registry catalogs, runtime contracts, Orbit contracts, and Harbor-owned system tests.

Python harbor-sdk

The Python package exposes sync and async clients over the same generated Harbor protocol:

python.py
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.