ai.fireweave:fireweave-{sdk,openfeature,adapter-posthog,testing} at 0.1.0-SNAPSHOT. It evaluates flags, drives a release lifecycle, and records exposures and signals. OpenFeature and the wire protocol use flagKey.
Supported versions
From the parent POM:
CI runs JDK 11 and 25. Document 11+ from the POM; do not treat CI “latest” as a support guarantee.
Install
Initialize
Plain constructors. No DI framework.FireweaveClient implements AutoCloseable.
FireweaveRuntime.initialize() / shutdown() / close(). Shutdown waits at most shutdownTimeoutMs (default 10_000) on a daemon thread.
Configuration and authentication
FireweaveConfig fields: projectApiKey, personalApiKey, host, allowedHosts, requireTargetingKey, limits, reservedAttributeKeys, globalContext, localEvaluation, onlyEvaluateLocally, requestTimeoutMs (3000), shutdownTimeoutMs (10000), defaultEvaluationOptions, telemetryAttributeAllowlist, releasesEnabled, exposuresEnabled, signalsEnabled.
Authorization: Bearer <key> from FireweaveConfig.projectApiKey(). Paths: /v1/flags/evaluate, /v1/capture only.
DEFAULT_ALLOWED_HOSTS: five PostHog hosts + loopback. Opt-out: ALLOW_ANY_HOST = "*". https off-loopback; http on loopback only.
See Configuration and auth.
Targets
Not in this SDK onmaster. The remote adapter has no /v1/targets/register path. A local feature branch with Java parity is not source of truth. Pass targetingKey and attributes on each evaluate / OpenFeature call.
See Targeting and targets.
Evaluate (no controlPoints namespace)
There is no controlPoints or flags facade. Use FireweaveClient.evaluate or the two typed helpers.
FlagType: BOOLEAN, STRING, INTEGER, FLOAT, OBJECT.
Native helpers: getBooleanValue and getStringValue only. Integer, float, and object go through evaluate(...) or OpenFeature.
EvaluationOptions: sendExposure() (default false), includePayloadMetadata(). Evaluation never throws — failures are reason=ERROR with the default.
See Control points.
Releases
ExtensionResult, not thrown errors. rolloutId + stampIds required (stmp_ + 26 Crockford characters).
See Releases.
Exposures
sendExposure defaults to false. Dedup is on (targetingKey, flagKey, variant, value).
See Exposures.
Signals
Capabilities
guardrails().check is a stub (UnsupportedCapability).
See Capabilities.
Adapters
PostHogAdapter.create(config) returns UnsupportedCapability until a Java PostHog server SDK exists. Production PostHog use requires an injected PostHogClientApi. There is no local/dev adapter on Java master.
See Adapters.
OpenFeature
ai.fireweave.openfeature.FireweaveProvider on dev.openfeature:sdk 1.15.1. Synchronous — no CompletionStage.
Five resolvers: boolean, string, integer (Integer, 32-bit), double, object (Value). Values outside Integer range → TYPE_MISMATCH + default (never silent truncation).
InitMode.AUTOMATIC | MANUAL. Tracking is not implemented.
See OpenFeature.
Errors
ErrorKind enum (15 kinds) + FireweaveException + FireweaveError value type. Evaluation returns defaults; extensions return ExtensionResult.
See Errors.
Testing
ai.fireweave.testing.InMemoryAdapter with FlagDefinition. The test-server stub does not implement /v1/targets/register.
See Testing.
Shutdown
close(): “flushes nothing implicitly.”
See Initialize, ready, shutdown.
Not in this SDK
registerTargetcontrolPoints/flagsnamespace- Native
getIntegerValue/getFloatValue/getObjectValue System.getenvforFW_*- Local/dev adapter
- Live PostHog from API keys alone
- Implicit flush on
close - Working guardrails
- OpenFeature Tracking
Next
Quickstart
Offline evaluate in every language.
Compatibility
Type split, adapters, and conformance.