#### Subsystems

# Project Contexts

- `FoundryContext`
- `FoundryContextual`
- `FoundryInhibitor`

## Context

At the root of the object graph in Foundry is the `FoundryContext`. Generally, it represents a single project on the users system. However, to allow for project-less use-cases a “shared” context may be created.

See `foundry_context_new()` to create a new context for a specific project. See `foundry_context_new_for_user()` to create a new context for the user without involving a project such as for simple text editor or documentation services.

## Contextual

For objects that are to be used solely within the context of a `FoundryContext`, subclass `FoundryContextual`. These objects will have their `FoundryContextual:context` property cleared when the foundry is shutdown.

Contextuals do not hold a full reference to the `FoundryContext`. Instead it is a weak reference which may be upgraded to a full reference when calling `foundry_contextual_dup_context()`.

## Inhibitor

Use `FoundryInhibitor` to prevent the shutdown of a context during a long running operation. Calls to `foundry_context_shutdown()` will be asynchornously delayed until the inhibitor as released the shutdown lock.

# Services

Many features in Foundry are implemented through independent services. The `FoundryService` base-class is inhereted by these services and attached to the `FoundryContext`.

You may implement your own services in your application using libfoundry. Register the dynamically by calling `foundry_context_dup_service_typed()`.

# SDK Management

- `FoundrySdkManager`
- `FoundrySdkProvider`
- `FoundrySdk`

# Building

- `FoundryBuildManager`
- `FoundryBuildPipeline`
- `FoundryBuildAddin`
- `FoundryCommandStage`
- `FoundryBuildProgress`
- `FoundryBuildFlags`
- `FoundryCompileCommands`
- `FoundryDeployStrategy`
- `FoundryLinkedPipelineStage`

# Running

- `FoundryRunManager`
- `FoundryRunTool`

# Build Configuration

- `FoundryConfigManager`
- `FoundryConfigProvider`
- `FoundryConfig`

# Commands and Subprocesses

- `FoundryProcessLauncher`
- `FoundryUnixFDMap`
- `FoundryCommandManager`
- `FoundryCommandProvider`
- `FoundryCommand`

# Managing Terminals

- `FoundryTerminalLauncher`
- `FoundryTerminalIntent`
- `FoundryTerminalService`

# CLI Commands

- `FoundryCommandLine`
- `FoundryCliCommandTree`
- `FoundryCliCommand`

# Devices

- `FoundryDeviceManager`
- `FoundryDeviceProvider`
- `FoundryDeviceInfo`
- `FoundryDevice`
- `FoundryLocalDevice`

# Diagnostics

- `FoundryDiagnosticManager`
- `FoundryDiagnosticProvider`
- `FoundryDiagnostic`

# Symbol Extraction

- `FoundrySymbol`
- `FoundrySymbolProvider`

# File Management

- `FoundryFileManager`
- `FoundryDirectoryListing`
- `FoundryDirectoryItem`
- `FoundryDirectoryReaper`
- `FoundryFileMonitor`
- `FoundryFileMonitorEvent`

# Settings

- `FoundrySettings`

Foundry supports robust hierarchical settings which puts the user in control. The settings are applied in the following order from highest-to-lowest priority. The first “layer” where a setting has been applied will take priority.

- User setting with a specific projects `.foundry/user/settings.keyfile`
- Project setting shared with collaborators in `.foundry/project/settings.keyfile`
- Application-wide user preferences
- Application defaults

You may use the `foundry settings` command-line tool or `FoundrySettings` to modify settings at any of these layers.

# Documentation

- `FoundryDocumentationBundle`
- `FoundryDocumentationManager`
- `FoundryDocumentationMatches`
- `FoundryDocumentationProvider`
- `FoundryDocumentationQuery`
- `FoundryDocumentationRoot`
- `FoundryDocumentation`

# Text Editing

- `FoundryTextManager`
- `FoundryTextDocument`
- `FoundryTextDocumentAddin`
- `FoundryTextBufferProvider`
- `FoundryTextBuffer`
- `FoundryTextEdit`
- `FoundrySimpleTextBuffer`
- `FoundryCompletionProvider`
- `FoundryCompletionProposal`
- `FoundryCompletionRequest`
- `FoundryHoverProvider`
- `FoundryCodeAction`
- `FoundryOnTypeFormatter`
- `FoundryOnTypeDiagnostics`
- `FoundryTextFormatter`
- `FoundryTextSettings`
- `FoundryTextSettingsProvider`

# Language Server Protocol

- `FoundryLspManager`
- `FoundryLspProvider`
- `FoundryLspServer`

# Search

- `FoundrySearchManager`
- `FoundrySearchProvider`
- `FoundrySearchRequest`
- `FoundrySearchResult`

# Flatpak

- `FoundryFlatpakManifest`

# Version Control

- `FoundryVcsManager`
- `FoundryVcsProvider`
- `FoundryVcs`
- `FoundryNoVcs`
- `FoundryGitVcs`
- `FoundryVcsBlame`
- `FoundryVcsTag`
- `FoundryVcsBranch`
- `FoundryVcsReference`
- `FoundryVcsRemote`
- `FoundryVcsCommit`
- `FoundryVcsTree`
- `FoundryVcsDiff`
- `FoundryVcsDelta`
- `FoundryVcsSignature`
- `FoundryVcsLineChanges`

# Operations & Logging

- `FoundryOperationManager`
- `FoundryOperation`
- `FoundryLogManager`
- `FoundryAuthProvider`

# Unit Testing

- `FoundryTestManager`
- `FoundryTestProvider`
- `FoundryTest`

# Dependency Tracking

- `FoundryDependencyManager`
- `FoundryDependencyProvider`
- `FoundryDependency`

# Debuggers

- `FoundryDebuggerManager`
- `FoundryDebuggerProvider`
- `FoundryDebugger`
- `FoundryDebuggerModule`
- `FoundryDebuggerTarget`
- `FoundryDebuggerTargetCommand`
- `FoundryDebuggerTargetProcess`
- `FoundryDebuggerTargetRemote`
- `FoundryDebuggerThread`
- `FoundryDebuggerThreadGroup`
- `FoundryDebuggerStackFrame`
- `FoundryDebuggerTrap`
- `FoundryDebuggerBreakpoint`
- `FoundryDebuggerWatchpoint`
- `FoundryDebuggerCountpoint`
- `FoundryDebuggerSource`
- `FoundryDebuggerMappedRegion`
- `FoundryDebuggerInstruction`
- `FoundryDebuggerEvent`
- `FoundryDebuggerStopEvent`
- `FoundryDebuggerVariable`

# Large Language Models

- `FoundryLlmManager`
- `FoundryLlmProvider`
- `FoundryLlmModel`
- `FoundryLlmCompletion`
- `FoundryLlmCompletionChunk`
- `FoundryLlmConversation`
- `FoundryLlmMessage`
- `FoundryLlmTool`
- `FoundryLlmToolCall`