Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 3.87 KB

File metadata and controls

59 lines (43 loc) · 3.87 KB

API Stability Tiers

statekit is v1.0 with a stability commitment, but not every package has the same maturity. This page makes the tiers explicit so you can pick the right tools and know what to pin.

Tier 1 — Stable (semver-protected)

These are the load-bearing parts of the library. We follow semver: no breaking changes within v1.x.

  • Builder APIstatekit.NewMachine, MachineBuilder, StateBuilder, TransitionBuilder, RegionBuilder
  • Core typesEvent, State, StateID, EventType, Action, Guard, MachineConfig
  • InterpreterNewInterpreter, Start, Send, State, Matches, Done, Stop, Close, UpdateContext
  • Reflection DSLMachineDef, StateNode, CompoundNode, FinalNode, ActionRegistry, FromStruct
  • SnapshotsSnapshot, Restore, InterpreterSnapshot
  • Hierarchy + parallel + history + delayed transitions — all builder methods that produce these
  • Plugin systemplugin.Plugin, all hook interfaces, Composite
  • Static analysislint.Lint, lint.Linter, Diagnostic, all rule constants
  • Visualizationviz.ParseNativeJSON, export.NativeExporter, ASCII / Mermaid / HTML / TUI renderers
  • Testing utilitiesstatetest
  • HTTP integrationhttp.MachineHandler, http.MachineRegistry, middleware
  • OpenTelemetry tracingotel.TracingInterpreter, otel.TracingHook
  • Prometheus metricsmetrics.MetricsInterpreter
  • Health checkshealth package
  • Code generationgenerate package + statekit generate CLI
  • Clock injectionClock, Timer, SystemClock, FakeClock, WithClock

Tier 2 — Experimental (may change in v1.x)

These features ship in v1.0 but explore problem spaces where the right shape isn't fully settled. We may iterate on the API in a future minor release based on real-world usage. Pin the exact version if you depend on them in production today.

  • Actor modelSpawn, SpawnWithContext, ActorRef, SendTo, SendParent, supervision strategies (SupervisionEscalate, SupervisionRecover, SupervisionRestart, SupervisionStop)
  • Persistent interpreterPersistentInterpreter, EventStore, SnapshotStore, MemoryEventStore, MemorySnapshotStore
  • Distributed executionDistributedInterpreter, StreamLock, ClusterMembership, StreamRouter, MemoryStreamLock, ConsistentHashRouter
  • Machine compositionInvokeMachine, MachineInvokeBuilder, WithChildMachine
  • MCP integrationmcp.NewServer, mcp.ExposeInterpreter, registry, tools/resources
  • AI pluginsaiplugin.TokenCounter, aiplugin.PromptRecorder

Why experimental

  • Actor model overlaps with the InvokeMachine builder helper for child machine composition. The right shape (one mechanism vs two) is an open question.
  • Distributed + Persistent features compete with mature workflow engines (Temporal, Cadence). Real-world use will tell us whether to deepen these or position statekit as in-process-only.
  • MCP / aiplugin are recent additions tracking a fast-moving ecosystem (MCP spec, agent runtimes). API may evolve as norms settle.

What "experimental" means concretely

  • Bug fixes: yes, always.
  • API additions: yes.
  • API breaking changes: only in a clearly-numbered minor (v1.1, v1.2, ...) with deprecation warnings for at least one release.
  • Removal: only after a deprecation cycle, never inside a patch release.

If you depend on a Tier 2 feature in production, pin to a specific minor version (e.g., v1.2.x) and read release notes before bumping.

Tier 3 — Internal

The internal/ packages (internal/ir, internal/parser) are not subject to semver. They can change in any release.

See also