Skip to content

Packages

PackageVersionRole
@atheory-ai/kitsune-core0.xRuntime — events, commands, modules, providers, boundaries, diagnostics, metadata normalization
@atheory-ai/kitsune-app0.x<kit-shell>, <kit-boundary>, the metadata bridge
@atheory-ai/kitsune-ui0.xUI custom elements + the modules that drive them
@atheory-ai/kitsune-theme0.xToken-driven CSS, theme switching helpers
@atheory-ai/kitsune-react0.xReact provider, boundary, and hooks
@atheory-ai/kitsune-dev0.xDebug module + diagnostic helpers
@atheory-ai/kitsune-modules-analytics0.xAnalytics capability module
@atheory-ai/kitsune-modules-audit0.xAudit trail capability module
@atheory-ai/kitsune-modules-observability0.xObservability capability module
@atheory-ai/kitsune-modules-storage0.xStorage capability module
@atheory-ai/kitsune-modules-permissions0.xPermission-checking capability module
@atheory-ai/kitsune-modules-flags0.xFeature flag capability module
@atheory-ai/kitsune-modules-validation0.xNative form validation capability module
@atheory-ai/kitsune-modules-search0.xIn-memory search capability module
@atheory-ai/kitsune-modules-sync0.xRuntime event sync capability module
@atheory-ai/kitsune-modules-command-palette0.xCommand palette registry capability module

All packages are published under @atheory-ai. They follow ^0.x until the runtime API is committed to v1.

The framework-neutral runtime.

Terminal window
pnpm add @atheory-ai/kitsune-core

Exports

  • createKitRuntime()KitRuntime
  • defineKitModule(module)KitModule
  • createProviderToken<T>(description)ProviderToken<T>
  • normalizeMetadata(input)NormalizedMetadata
  • Types: KitRuntime, KitModule, KitEvent, KitEventInput, KitCommandInput, CommandResult, KitContext, Entity, BoundaryHandle, BoundaryOptions, ProviderToken, KitDiagnostic, EventHandler, CommandHandler, DiagnosticHandler, Unsubscribe

Dependencies — none. Plain TypeScript.

Runtime API reference →

Custom elements for the application skeleton.

Terminal window
pnpm add @atheory-ai/kitsune-app

Registers

  • <kit-shell> — application root, owns the runtime
  • <kit-boundary> — context zone with click delegation
  • <kit-route> — route context zone that emits route.changed

Exports

  • KitShellElement, KitBoundaryElement, KitRouteElement — the classes
  • formDraftModule(options?) — applies loaded draft values into matching form controls
  • parseMetadata(element, context) — read DOM metadata
  • readDomMetadata(element, context) — raw read without normalization
  • Types: RouteContext

Dependencies@atheory-ai/kitsune-core, lit.

Web-native UI components and the modules that activate them.

Terminal window
pnpm add @atheory-ai/kitsune-ui

Registers

  • <kit-button> — slot-bearing native button
  • <kit-card> — card with header / default / footer slots
  • <kit-disclosure> — native details/summary disclosure wrapper
  • <kit-dialog> — wrapper around native <dialog>
  • <kit-field> — labelled form-field container
  • <kit-form> — light-DOM form wrapper with composed submit/reset events
  • <kit-input> — form-associated custom input
  • <kit-select> — form-associated native select wrapper
  • <kit-tabs> — ARIA tablist and tabpanel coordinator
  • <kit-table> — semantic table styling wrapper
  • <kit-toast-region> — fixed-position toast container with aria-live

Exports

  • Element classes: KitButtonElement, KitCardElement, KitDisclosureElement, KitDialogElement, KitFieldElement, KitFormElement, KitInputElement, KitSelectElement, KitTabsElement, KitTableElement, KitToastRegionElement
  • Modules: dialogModule(options?), notificationModule(options?)
  • Events: KitDisclosureToggleEvent, KitFieldChangedEvent, KitFormSubmitEvent, KitFormResetEvent, KitTabsChangeEvent
  • Types: KitDisclosureToggleDetail, KitFieldChangedDetail, KitFormSubmitDetail, KitInputType, KitTabsChangeDetail, Toast, ToastTone, DialogModuleOptions, NotificationModuleOptions

Dependencies@atheory-ai/kitsune-core, lit.

Elements → · Modules →

CSS tokens and theme switching.

Terminal window
pnpm add @atheory-ai/kitsune-theme

Exports

  • defaultTheme: KitTheme — the built-in token set
  • defineTheme(theme) — type-safe theme constructor
  • themeToCss(theme, selector?) — render a theme to a CSS string
  • applyTheme(theme, root?) — set custom properties on a root element
  • Types: KitTheme, KitThemeTokens

Dependencies — none.

Theme tokens →

React adapter — same runtime, React idioms.

Terminal window
pnpm add @atheory-ai/kitsune-react react react-dom

Exports

  • <KitShellProvider> — wraps a tree, installs modules, creates runtime
  • <KitBoundary> — semantic context zone with click delegation
  • useKitRuntime(), useKitContext(), useKitEmit(), useKitCommand()
  • readReactDomMetadata(element, context) — for advanced cases
  • Types: KitShellProviderProps, KitBoundaryProps

Dependencies@atheory-ai/kitsune-core, react (peer), react-dom (peer).

React integration →

Development-time diagnostics.

Terminal window
pnpm add -D @atheory-ai/kitsune-dev

Exports

  • debugModule(options?) → a module that logs every event and diagnostic
  • devtoolsModule(options?) → a module that records a runtime timeline for in-app inspection
  • defineKitDevtoolsElement(registry?) → registers <kit-devtools>
  • bindKitDevtoolsElement(element, runtime) → connects an element to an installed devtools module
  • DevtoolsToken → provider token for the devtools service
  • consoleInspector(options?) → console-backed inspector module
  • diagnosticsRecorder(options?) → bounded diagnostics recorder module
  • formatDiagnostic(diagnostic) → string formatter
  • Types: DebugModuleOptions, DevtoolsModuleOptions, DevtoolsService, DevtoolsTimelineEntry, KitDevtoolsElement, InspectorOptions, RecorderOptions, DiagnosticsRecorder

Dependencies@atheory-ai/kitsune-core.

debugModule →

Storage capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-storage

Exports

  • storageModule(options?) → a module that handles storage commands
  • StorageToken → provider token for the storage service
  • memoryStorageAdapter(seed?) → test/SSR-friendly adapter
  • StorageQuotaError
  • Types: StorageModuleOptions, StorageAutosaveOptions, StorageAdapter, StorageService, StorageBackend, StorageCommandPayload, StorageCommandResult

Commands

  • storage.write
  • storage.read
  • storage.delete
  • storage.list
  • storage.clear

Autosave

When storageModule({ autosave: true }) is installed, the module observes field.changed, writes a draft, and clears the draft on form.submit or form.reset. It also observes form.connected and emits storage.draft_loaded when a saved draft exists.

Dependencies@atheory-ai/kitsune-core.

Analytics capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-analytics

Exports

  • analyticsModule(options?) → a module that queues, tracks, and flushes analytics events
  • AnalyticsToken → provider token for the analytics service
  • memoryAnalyticsTransport() → test/SSR-friendly transport
  • Types: AnalyticsModuleOptions, AnalyticsAutoTrackOptions, AnalyticsEvent, AnalyticsTransport, AnalyticsService, AnalyticsTrackInput, AnalyticsTrackResult, AnalyticsFlushResult

Commands

  • analytics.track
  • analytics.flush

Auto Tracking

When analyticsModule({ autoTrack: true }) is installed, the module observes runtime events and queues product events while ignoring internal analytics.*, storage.*, and runtime.* events.

Dependencies@atheory-ai/kitsune-core.

Audit trail capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-audit

Exports

  • auditModule(options?) → a module that records and queries audit entries
  • AuditToken → provider token for the audit service
  • memoryAuditStore(seed?) → test/SSR-friendly store
  • Types: AuditModuleOptions, AuditAutoRecordOptions, AuditEntry, AuditActor, AuditStore, AuditService, AuditRecordInput, AuditRecordResult, AuditQuery

Commands

  • audit.record
  • audit.query
  • audit.clear

Auto Recording

When auditModule({ autoRecord: true }) is installed, the module observes runtime events and records append-only audit entries while ignoring internal audit.*, analytics.*, observability.*, storage.*, and runtime.* events.

Dependencies@atheory-ai/kitsune-core.

Observability capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-observability

Exports

  • observabilityModule(options?) → a module that captures issues, breadcrumbs, and selected diagnostics
  • ObservabilityToken → provider token for the observability service
  • memoryObservabilityTransport() → test/SSR-friendly transport
  • Types: ObservabilityModuleOptions, ObservabilityIssue, ObservabilityBreadcrumb, ObservabilityTransport, ObservabilityService, ObservabilityCaptureInput, ObservabilityCaptureResult, ObservabilityFlushResult, ObservabilitySeverity

Commands

  • observability.capture
  • observability.breadcrumb
  • observability.flush

Diagnostics

When observabilityModule({ captureDiagnostics: true }) is installed, the module captures command.failed, event.handler_failed, and module.failed diagnostics as issues.

Dependencies@atheory-ai/kitsune-core.

Permission-checking capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-permissions

Exports

  • permissionsModule(options?) → a module that evaluates permission rules
  • PermissionsToken → provider token for the permission service
  • Types: PermissionsModuleOptions, PermissionInput, PermissionResult, PermissionRule, PermissionService

Commands

  • permission.check

Dependencies@atheory-ai/kitsune-core.

Feature flag capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-flags

Exports

  • flagsModule(options?) → a module that evaluates local or provider-backed flags
  • FlagsToken → provider token for the flag service
  • Types: FlagsModuleOptions, FlagProvider, FlagService, FlagEvaluateInput, FlagEvaluateResult, FlagValue

Commands

  • flag.evaluate
  • flag.set

Dependencies@atheory-ai/kitsune-core.

Native form validation capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-validation

Exports

  • validationModule() → a module that validates native HTMLFormElement instances
  • ValidationToken → provider token for the validation service
  • Types: ValidationInput, ValidationIssue, ValidationResult, ValidationService

Commands

  • form.validate

Dependencies@atheory-ai/kitsune-core.

In-memory search capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-search

Exports

  • searchModule() → a module that indexes and queries documents
  • SearchToken → provider token for the search service
  • Types: SearchDocument, SearchQuery, SearchResult, SearchService

Commands

  • search.index
  • search.remove
  • search.query

Dependencies@atheory-ai/kitsune-core.

Runtime event sync capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-sync

Exports

  • syncModule(options?) → a module that queues selected runtime events and flushes them to a transport
  • SyncToken → provider token for the sync service
  • memorySyncTransport() → test/SSR-friendly transport
  • Types: SyncModuleOptions, SyncRecord, SyncService, SyncTransport, MemorySyncTransport

Commands

  • sync.flush

Event Sync

The module observes runtime events, skips internal module/runtime events, and supports include or exclude filters.

Dependencies@atheory-ai/kitsune-core.

@atheory-ai/kitsune-modules-command-palette

Section titled “@atheory-ai/kitsune-modules-command-palette”

Command palette registry capability module.

Terminal window
pnpm add @atheory-ai/kitsune-modules-command-palette

Exports

  • commandPaletteModule(options?) → a module that registers, searches, and runs command actions
  • CommandPaletteToken → provider token for the command palette service
  • Types: CommandPaletteAction, CommandPaletteModuleOptions, CommandPaletteService

Commands

  • command_palette.register
  • command_palette.search
  • command_palette.run

Dependencies@atheory-ai/kitsune-core.

Two private packages are used by the workspace for golden-test acceptance:

  • @atheory-ai/kitsune-acceptance — native browser fixtures
  • @atheory-ai/kitsune-react-acceptance — React fixtures

These aren’t published; they exercise the published packages end-to-end.

There is no @atheory-ai/kitsune meta-package. Pick the layers you need.

The most common starter set:

Terminal window
pnpm add @atheory-ai/kitsune-core @atheory-ai/kitsune-app @atheory-ai/kitsune-ui
pnpm add -D @atheory-ai/kitsune-dev

Add @atheory-ai/kitsune-theme if you want the default token set, and @atheory-ai/kitsune-react if you’re integrating with React.