Skip to content

Providers and interfaces

Important public types live in src/lib/types.ts.

  • ProviderKind
  • ProviderConfig
  • BookmarkSorterSettings
  • AgentProvider
  • AgentRequest
  • AgentDecision
  • ProcessBookmarkResult
  • ReviewQueueItem
  • EventLogEntry
  • RuntimeMessageMap

src/lib/providers.ts currently contains:

  • OpenAiCompatibleProvider
  • AnthropicProvider
  • AzureOpenAiProvider
  • OllamaProvider
  • HeuristicFallbackProvider
  • OpenAI-compatible providers use POST /chat/completions
  • Anthropic uses POST /messages
  • Azure OpenAI uses deployment-specific chat completion URLs
  • Ollama uses POST /api/chat

createSafeProvider() returns the heuristic fallback if required configuration is missing or provider creation fails.

Folder resolution is now split across focused helpers:

  • bookmark-roots.ts classifies bookmark roots
  • bookmark-tree.ts normalizes titles and path segments
  • bookmark-resolver.ts resolves existing target folders and can prepend a preferred root
  1. extend ProviderKind
  2. update PROVIDERS and DEFAULT_SETTINGS
  3. extend hasProviderConfiguration()
  4. implement the concrete provider class
  5. wire it into createProvider()