Installing the Honua JavaScript SDK

The Honua JavaScript SDK ships as a single npm package — @honua/sdk-js — with multiple subpath entrypoints. The core client, the Esri compatibility layer, the migration helpers, and the protocol-neutral contract are all reachable from this one install.

Generated support status

The versioned source of truth is config/support-manifest.v1.json. It projects 22 supported (documented below as stable), 26 experimental, and 18 deprecated package entrypoints. Protocol status is independent of package lifecycle: raw endpoint support, facade requirements, execution mode, and evidence are listed in the generated backend-agnostic capability matrix. The generic support projection carries explicit contracts for both honua.io and the canonical samples/catalog.v2.json inventory.

The reviewed package-root ceilings are 46 runtime exports and 172 declaration exports. The exact inventory and generated migration table come from config/root-surface.json. This guide tracks the current development branch; its package baseline can match the latest release while the branch contains unreleased work. Use the tagged release documentation for the published artifact.

Stable subpath entrypoints

Subpaths covered by the SDK's semver contract. Symbols reachable from these entrypoints are stable across minor versions.

Subpath What it gives you
@honua/sdk-js Reviewed common connect → query → explain → mount surface (exact inventory)
@honua/sdk-js/browser Prebuilt browser ESM build of the default barrel (same API as @honua/sdk-js)
@honua/sdk-js/honua HonuaClient (the raw GeoServices/OGC client)
@honua/sdk-js/auth OAuth2/PKCE, client credentials, static providers, and credential stores
@honua/sdk-js/contract Protocol-neutral Dataset / Source / Query / Result + createDataset
@honua/sdk-js/esri-compat Esri ArcGIS JS-API compatibility layer for migration
@honua/sdk-js/migration Programmatic migration helpers (codemod runner, scan reports)
@honua/sdk-js/runtime MapLibre MapPackage runtime (loadMapPackage, HonuaMapRuntime)
@honua/sdk-js/expr Honua expression builder
@honua/sdk-js/webmap WebMap JSON load/save helpers
@honua/sdk-js/geocoding Geocoding adapters
@honua/sdk-js/exploration Linked-view exploration state + presets
@honua/sdk-js/interactions Hit-test + pointer normalization + chart/map bindings
@honua/sdk-js/filter-registry Shared filter clause registry + projections
@honua/sdk-js/style Honua style spec + source parsers/validators
@honua/sdk-js/map HonuaMap programmatic map container
@honua/sdk-js/realtime Realtime transport adapters (SSE) — a client-transport primitive
@honua/sdk-js/react React provider, hooks, and map components (optional react / react-dom peers; published standalone as @honua/react)
@honua/sdk-js/geometry Curated turf/proj4 client-side geometry ops (buffer/area/simplify/reproject)
@honua/sdk-js/cli Programmatic run() entrypoint for the honua command-line client
@honua/sdk-js/agent-tools Agent-facing JSON Schema tool definitions and the bounded tool executor (MCP/OpenAI compatible); the in-repo @honua/mcp-server consumes it. See the agent-safety threat model.
@honua/sdk-js/agent-safety Bounded runtime validation, effect budgets, signed approval envelopes, authenticated single-use consumption, context revalidation, and deterministic execution-receipt verification for JSON-compatible plans (threat model).

Experimental subpath entrypoints

Subpaths marked @experimental in JSDoc. Useful today; the shape may change in any minor release prior to 1.0.0. The stable root promotes a reviewed query-planner subset: explainQuery, executeQueryPlan, hashQueryPlan, the plan errors/version constants, and the types required to name the common explain/mount workflow. The complete @honua/sdk-js/query-planner subpath remains experimental. Every other experimental subpath is subpath-only and is not re-exported from @honua/sdk-js or @honua/sdk-js/honua.

Subpath What it gives you
@honua/sdk-js/cog Evidence-bound static-STAC COG inspection, bounded overview/window reads, and an opt-in viewport-driven MapLibre image source through caller-injected decoder/renderer peers; neither peer enters the root graph (guide).
@honua/sdk-js/pmtiles Authenticated bounded archive inspection plus experimental Honua archive/publish jobs, status/cancellation, strict public/signed/range-proxy descriptors, and truthful cleanup dispositions (guide).
@honua/sdk-js/stac Experimental dynamic STAC search, bounded pagination, signed asset refresh, and typed handoffs to the canonical COG, PMTiles, columnar, and runtime entrypoints (walkthrough).
@honua/sdk-js/raster Experimental bounded raster sessions across dynamic-STAC/direct COG, ImageServer, OGC API Coverages, and WCS, with explicit band/range semantics and MapLibre/deck.gl presentation handoffs (capability matrix).
@honua/sdk-js/coverages Bounded OGC API Coverages and WCS 2.0.1 discovery, domain/range metadata, subset downloads, typed OWS errors, and an opt-in MapLibre image projection (guide).
@honua/sdk-js/zarr Experimental Honua Server /api/v1 Zarr registration and metadata inspection plus a byte-bounded datacube PNG tile handoff; direct object-store chunk decoding remains unavailable (guide).
@honua/sdk-js/geoparquet GeoParquet / DuckDB-WASM–backed protocol-neutral Source; the optional DuckDB peer loads lazily.
@honua/sdk-js/columnar-workflow Bounded GeoParquet inspection and query planning plus Honua Arrow and Parquet feature-query workflows, with explicit decoder, memory, transfer, and handoff limits (guide).
@honua/sdk-js/query-planner Deterministic query IR, side-effect-free explain plans, GeoServices compilation, and explicitly bounded local execution.
@honua/sdk-js/source-schema Focused experimental SourceSchemaV2 validation, GeoServices/OData/GeoParquet/WMS/WMTS normalization, and one-pass opt-in connectWithSourceSchemaV2() discovery.
@honua/sdk-js/source-capabilities SourceSchemaV2-bound static evidence/CRS validation plus lightweight claimed/observed/effective evaluation, current-source cache checks, bounded strict transport, and dynamic policy/peer/authorization gates; serialized caller data remains potentially sensitive (guide).
@honua/sdk-js/source-capability-discovery Focused GeoServices/OData/WMS/WMTS connectWithSourceCapabilities() integration with canonical descriptor replay binding and fresh policy/environment/peer/authorization evaluation.
@honua/sdk-js/cloud-native-discovery Normalized, bounded capability discovery for COG, STAC, PMTiles, GeoParquet, Zarr, and NetCDF sources, with explicit client/server/end-to-end maturity and no executable claims for metadata-only formats.
@honua/sdk-js/plugin Versioned, data-only plugin manifests plus deterministic compatibility and authority-boundary certification reports.
@honua/sdk-js/pmtiles-protocol-plugin.js The first-party PMTiles ProtocolModule packaged as a certifiable HonuaPluginFactory<"protocol"> — the manifest-advertised plugin entrypoint, resolvable as a package export.
@honua/sdk-js/deckgl Bounded, zero-copy typed-array projection into an optional deck.gl peer, with stable picking identity and deterministic disposal.
@honua/sdk-js/kepler Optional Kepler.gl workspace bridge: explicit ingestion mappings that avoid a GeoJSON round trip for tabular/point/columnar results, preserved provenance and CRS decisions, a declared linked-state channel table, bounded delta reconciliation, and credential redaction on export.
@honua/sdk-js/analytics Versioned linked-analytics and chart presentation contract: accepted category/histogram/aggregate/time-series artifacts with units, null policy, ordering, and pushdown provenance; deterministic mark/brush sync with shared exploration state; and a small accessible default presentation (guide). Carries no chart adapters, so unused chart peers cost nothing.
@honua/sdk-js/analytics/uplot Reference third-party chart adapter over the optional µPlot peer, loaded only through a dynamic import at mount time. Proves the analytics contract against a real library (guide).
@honua/sdk-js/offline Versioned downloadable-region manifests plus storage-neutral quota, integrity, cancellation, and atomic commit contracts.
@honua/sdk-js/diagnostics Dependency-free diagnostic-bundle validation, sanitization, integrity pinning, and bounded read-only replay used by honua doctor.
@honua/sdk-js/nl-map-control Natural-language map control (safety model + walkthrough): compiles NL instructions into serializable, inspectable plans (query-planner IR + agent-tool invocations) via a caller-provided LLM callback; execution accepts plans only, gates mutations behind agent-safety envelopes, and emits receipts.
@honua/sdk-js/routing Provider-pluggable routing: typed RoutingProvider contract, OSRM and Valhalla adapters, the Honua facade bridge, and per-provider attribution/usage-policy metadata (provider cookbook).
@honua/sdk-js/interactions/declarative Compiles a standard interactions[] block (geospatial-mcp ADR-0030) onto the imperative binding primitives in /interactions: closed event/verb sets, $event.*-only argument substitution, a per-(ref, event) fan-out cap, actions that never emit events, and typed unsupported results naming any pair this runtime cannot honor.
@honua/sdk-js/studio-agent The agent session behind a prompt-to-map Studio: streams honua-server's provider-neutral AI proxy over SSE, dispatches the model's tool calls across two planes (local /agent-tools verbs through an AI map kit, honua_studio_* composition tools through a dependency-free MCP client) on one serialized queue with a single generation-conflict reload+retry, and never throws mid-stream.
@honua/sdk-js/local-install Node-only, manifest-pinned local Docker installer shared by honua admin install local and the bootstrap MCP tool; fails closed when the release image does not match the generated Admin API contract.

Deprecated compatibility entrypoints

These temporary @honua/sdk-js shims were introduced in 0.1.0-beta.0 when the application platform moved. They remain available throughout 0.1.x and are removed in 0.2.0; new code must import the replacement directly. A replacement's own support status is independent of the shim: promoting @honua/app-platform/scene-workspace to beta did not move the @honua/sdk-js/scene-workspace removal window.

Deprecated subpath Replacement Remove in
@honua/sdk-js/app @honua/app-platform/app 0.2.0
@honua/sdk-js/app-controller @honua/app-platform/app-controller 0.2.0
@honua/sdk-js/app-workspace @honua/app-platform/app-workspace 0.2.0
@honua/sdk-js/scene-workspace @honua/app-platform/scene-workspace 0.2.0
@honua/sdk-js/collaboration @honua/app-platform/collaboration 0.2.0
@honua/sdk-js/control-plane @honua/app-platform/control-plane 0.2.0
@honua/sdk-js/replica-sync @honua/app-platform/replica-sync 0.2.0
@honua/sdk-js/share @honua/app-platform/share 0.2.0
@honua/sdk-js/operate @honua/app-platform/operate 0.2.0
@honua/sdk-js/generated-app @honua/app-platform/generated-app 0.2.0
@honua/sdk-js/studio @honua/app-platform/studio 0.2.0
@honua/sdk-js/operator @honua/app-platform/operator 0.2.0
@honua/sdk-js/operator/controllers @honua/app-platform/operator/controllers 0.2.0
@honua/sdk-js/operator/workspace @honua/app-platform/operator/workspace 0.2.0
@honua/sdk-js/operator/theming @honua/app-platform/operator/theming 0.2.0
@honua/sdk-js/operator/i18n @honua/app-platform/operator/i18n 0.2.0
@honua/sdk-js/controls @honua/app-platform/controls 0.2.0
@honua/sdk-js/web-components @honua/app-platform/web-components 0.2.0

Application-platform entrypoints (@honua/app-platform)

App-shell, app-builder, and hosted-product surfaces have moved out of the client SDK into the separate @honua/app-platform package, which versions at its own pre-1.0 cadence so @honua/sdk-js can reach a frozen 1.0 without waiting on them (see docs/decisions/scope-split-and-1.0.md).

@honua/app-platform subpath What it gives you
@honua/app-platform/app App bootstrap helper for browser shells
@honua/app-platform/app-controller HonuaController — renderer-neutral app controller
@honua/app-platform/app-workspace Framework-neutral workspace state orchestration
@honua/app-platform/scene-workspace 3D scene workspace + MapLibre/Cesium adapters (optional cesium peer) — beta; see the surface tiers table for the exports it covers and the ones still experimental
@honua/app-platform/collaboration Saved-map collaboration client
@honua/app-platform/control-plane Hosted-product / admin client
@honua/app-platform/replica-sync Offline-replica sync client
@honua/app-platform/share Embed-token + DCAT sharing helpers
@honua/app-platform/operate Operations/observability client
@honua/app-platform/generated-app Manifest projection + preview runtime for generated apps
@honua/app-platform/studio Studio package-family projections, validation/preview envelopes, capability manifest, publish/share/embed contracts (MCP/QGIS-safe)
@honua/app-platform/controls Native UI control kit (<honua-basemap-switcher>) for MapLibre maps
@honua/app-platform/web-components Framework-neutral custom elements
@honua/app-platform/operator Operator-native chat/plan-review/approval controllers
@honua/app-platform/operator/controllers Framework-neutral controllers behind /operator
@honua/app-platform/operator/workspace Operator workspace state container
@honua/app-platform/operator/theming Operator design-system theme provider + tokens
@honua/app-platform/operator/i18n Operator message catalog + resolution

During the transition, the deprecated imports listed above keep working through 0.1.x; they are removed in 0.2.0. Update imports to @honua/app-platform/<subpath>. The @honua/sdk-js/console entrypoint was removed outright (its projection helpers are owned by the @honua/console application) and has no shim.

Prerequisites

Install

npm install @honua/sdk-js

Optional peer dependencies

A few integration paths are gated behind optional peer dependencies so a Node-only or REST-only consumer never pays the install cost:

Integration Peer to install
MapLibre MapPackage runtime (@honua/sdk-js/runtime) npm install maplibre-gl — supported majors: 5 and 6 (^5.0.0 || ^6.0.0; the 6.x half of that range ships with the next release, the current published beta still declares ^5.0.0). MapLibre 6 is ESM-only and requires WebGL2; see docs/maplibre-runtime.md
deck.gl binary projection (@honua/sdk-js/deckgl) npm install @deck.gl/layers
Kepler.gl workspace bridge (@honua/sdk-js/kepler) npm install @kepler.gl/actions (plus the Kepler UI packages your app renders)
Cesium 3D adapters (@honua/app-platform/scene-workspace) npm install cesium
gRPC-Web transport (new HonuaClient({ transport: "grpc-web" })) npm install @connectrpc/connect @connectrpc/connect-web @bufbuild/protobuf
Geometry ops (@honua/sdk-js/geometry) npm install proj4 @turf/buffer @turf/area … (only the ops you import) — or use the @honua/geometry split package
Migration API (@honua/sdk-js/migration) npm install typescript

If you stay on the default REST transport with no MapLibre/Cesium scene work, no extra installs are required.

Quick Start

import { HonuaClient } from "@honua/sdk-js";

const client = new HonuaClient({
  baseUrl: "https://your-honua-server.com",
});

const compatibility = await client.checkCompatibility();
if (!compatibility.supported) {
  throw new Error(
    `Unsupported Honua server. Minimum supported version: ${HonuaClient.minimumSupportedServerVersion}. ` +
      `Reasons: ${compatibility.reasons.join("; ")}`,
  );
}

const result = await client.queryFeatures({
  serviceId: "natural-earth",
  layerId: 0,
  where: "1=1",
  returnGeometry: true,
  outFields: ["*"],
  outSr: 4326,
  resultRecordCount: 25,
});

const featureCount = result.features?.length ?? 0;
console.log(`Found ${featureCount} feature(s)`);

This quick start uses the raw GeoServices queryFeatures() request. Its where member is GeoServices SQL and is not the deprecated, source-native protocol-neutral Query.where compatibility member.

Use focused stable subpaths for advanced APIs. The generated root import migration table maps every symbol removed from the transition-era root to its supported replacement; the machine-readable source is config/root-surface.json.

checkCompatibility() reads the parsed data.compatibility contract from GET /api/v1/admin/capabilities. For a runnable browser example from this repo, including the renderable-geometry checks used by the committed MapLibre quickstart, see examples/maplibre-quickstart/README.md.

Canonical Contract And Exploration

The SDK exposes a protocol-neutral client contract and exploration state module that wrap the existing HonuaFeatureLayer / HonuaMapService / HonuaOgcFeatureCollection classes. These are reachable via the @honua/sdk-js/contract and @honua/sdk-js/exploration subpaths:

Esri Migration

The migration helpers live behind the @honua/sdk-js/migration subpath. They power the same codemod that the standalone CLI runs:

import { runEsriCompatCodemod, scanArcGisUsage } from "@honua/sdk-js/migration";

const report = scanArcGisUsage("./src");
const migration = runEsriCompatCodemod({ rootDir: "./src", write: true });

Version Policy

Advanced packaging. Downstream packagers can also produce a three-package split (@honua/sdk / @honua/sdk-esri-compat / @honua/honua-migrate) via npm run build:split-packages. This is an opt-in build target, not the default consumer install. See docs/split-packages.md if you are integrating with a downstream registry that needs the smaller surfaces.

Maintainers can verify the artifact consumers actually install with npm run verify:packed-sdk after the library and browser builds. The gate packs the root package, installs it offline into an isolated ESM project, imports every stable and experimental subpath, typechecks every shipped declaration target, and runs the packaged honua --help command. Temporary package and consumer directories are removed after both successful and failed runs.