API Reference
TypeScript API reference for @nimbalyst/extension-sdk, covering ExtensionContext, custom editors, AI tools, panels, storage, and manifest types.
This document summarizes the main TypeScript exports from @nimbalyst/extension-sdk.
Main Imports
import type {
ExtensionContext,
ExtensionManifest,
ExtensionModule,
EditorHostProps,
ExtensionAITool,
AIToolContext,
ExtensionToolResult,
PanelHostProps,
SettingsPanelProps,
SettingsRouteContribution,
SettingsRouteProjectTarget,
ResolvedTrackerReference,
} from '@nimbalyst/extension-sdk';
import {
REQUIRED_EXTERNALS,
TrackerReferenceChip,
TrackerReferencePicker,
navigateToTrackerReference,
useEditorLifecycle,
useResolvedTrackerReference,
validateExtensionBundle,
} from '@nimbalyst/extension-sdk';
import { createExtensionConfig } from '@nimbalyst/extension-sdk/vite';Extension Entry Point
Your extension module can export any subset of these fields:
ExtensionContext
Passed to activate() and available inside AIToolContext.extensionContext.
ExtensionServices
ExtensionAIService
Available when permissions.ai is true. Provides AI tool registration and direct access to chat/completion models.
Chat Completion Types
Custom Editors
Custom editors receive a single host prop. Use the useEditorLifecycle hook (from @nimbalyst/extension-sdk) to handle all lifecycle concerns.
useEditorLifecycle Hook
EditorHost Interface
The useEditorLifecycle hook wraps this interface. You rarely need to use it directly.
Supporting editor types:
Project Filesystem
EditorHost.fs provides workspace-bounded, versioned access to additional project files:
The service is optional and is unavailable for hosts without local project-file semantics. Writes use the SHA-256 returned by read() to prevent stale overwrites.
Tracker References
The SDK exports host-owned Tracker UI so extensions can store portable issue keys while Nimbalyst owns search, live resolution, display, and navigation.
TrackerReferencePickerprovides the canonical typed search and selection UI.TrackerReferenceChiprenders a live reference in default or compact form.useResolvedTrackerReference(referenceKey)resolves a stored key reactively.navigateToTrackerReference(reference)opens the item in Nimbalyst.
Persist the issue key or reference key, not a copied title or workflow state. The host resolves mutable fields when it renders the reference.
AI Tools
JSON Schema Types
Panels
Panels are non-file-based extension UIs.
workspacePath and projectTarget are provided only for first-class project settings routes. Application routes and legacy nested settings panels do not receive project context.
Extension Storage
ExtensionStorage is available to custom editors, panels, and settings panels.
Manifest Types
The manifest shape is defined by ExtensionManifest and ExtensionContributions. See Manifest Reference for field-by-field guidance.
The interfaces above are a working map of the common surface, not a substitute for your installed SDK's declarations. Advanced provider, backend-module, collaboration, and tracker-importer APIs evolve with the host; import their types from the package rather than copying these abbreviated declarations into an extension.
Vite Helper
Use createExtensionConfig() to get the correct externalization and output shape for extensions.
Validation Helpers
Required Externals
REQUIRED_EXTERNALS exports the package names that must stay external in your build because Nimbalyst provides them at runtime.
Last updated
