> This page is for NeMo Fabric, version Latest (v0.6.0) (default).
> For other versions, use one of these documentation indexes:
> - Latest (v0.6.0) (default): https://docs.nvidia.com/nemo/fabric/latest/llms.txt
> - dev: https://docs.nvidia.com/nemo/fabric/dev/llms.txt
> - v0.6.0: https://docs.nvidia.com/nemo/fabric/v0.6.0/llms.txt
> - v0.5.0: https://docs.nvidia.com/nemo/fabric/v0.5.0/llms.txt
> - v0.4.0: https://docs.nvidia.com/nemo/fabric/v0.4.0/llms.txt
> - v0.3.0: https://docs.nvidia.com/nemo/fabric/v0.3.0/llms.txt
> - v0.2.0: https://docs.nvidia.com/nemo/fabric/v0.2.0/llms.txt
> - v0.1.1: https://docs.nvidia.com/nemo/fabric/v0.1.1/llms.txt
> - v0.1.0: https://docs.nvidia.com/nemo/fabric/v0.1.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/fabric/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/fabric/_mcp/server.

# Use the Cline Adapter

> Install and configure the NVIDIA NeMo Fabric harness integration for Cline.

Use the NVIDIA NeMo Fabric `nvidia.fabric.cline` adapter to run Cline through
its supported TypeScript SDK while retaining conversation context for the
lifetime of a NeMo Fabric runtime.

## Install Cline and the Adapter

Cline requires Node.js 22.19.0 or newer. Install the supported Cline SDK
harness separately in the Node.js project that owns the NeMo Fabric
configuration:

```bash
npm install --save-exact @cline/sdk@0.0.83
```

Then install the NeMo Fabric adapter in the same project:

```bash
npm install nemo-fabric-adapters-cline
```

The Cline SDK is not an adapter package dependency. Installing the NeMo Fabric
adapter does not install the harness, and the adapter never installs it at
runtime. A missing SDK produces `cline_harness_unavailable` with an explicit
Cline installation command.

For source development in the NeMo Fabric repository, run:

```bash
just install-typescript-cline
npm install --prefix adapters/typescript \
  --workspace nemo-fabric-adapters-cline \
  --include-workspace-root \
  --no-save \
  --package-lock=false \
  --ignore-scripts \
  --no-audit \
  --no-fund \
  @cline/sdk@0.0.83
npm run build --prefix adapter-contract/typescript
npm run build --prefix adapters/typescript --workspace nemo-fabric-adapters-common
npm run build --prefix adapters/typescript --workspace nemo-fabric-adapters-cline
```

## Configure the Adapter

Select the Cline adapter and point discovery at its installed descriptor:

```python
from nemo_fabric import DiscoveryConfig, FabricConfig, HarnessConfig
from nemo_fabric import InstructionConfig, InstructionsConfig
from nemo_fabric import MetadataConfig, ModelConfig, ToolsConfig

config = FabricConfig(
    metadata=MetadataConfig(name="cline-review"),
    discovery=DiscoveryConfig(
        local_paths=[
            "./node_modules/nemo-fabric-adapters-cline/cline.fabric-adapter.json"
        ]
    ),
    harness=HarnessConfig(adapter_id="nvidia.fabric.cline"),
    models={
        "default": ModelConfig(
            provider="nvidia",
            model="nvidia/nemotron-3-nano-omni-30b-a3b-reasoning",
            api_key_env="NVIDIA_API_KEY",
            base_url="https://integrate.api.nvidia.com/v1",
        )
    },
    instructions=InstructionsConfig(
        system=InstructionConfig(
            content="Review code for correctness risks.",
            mode="replace",
        )
    ),
    tools=ToolsConfig(enabled=["read_files", "search_codebase", "skills"]),
)
config.add_skill_path("./skills/code-review")
```

For a source build, use
`adapters/typescript/cline/cline.fabric-adapter.json`. Set the environment
variable named by `api_key_env` before starting the runtime.

Start one runtime and reuse it for ordered turns:

```python
from nemo_fabric import Fabric

async with await Fabric().start_runtime(config) as runtime:
    first = await runtime.invoke(input="Review the authentication changes.")
    second = await runtime.invoke(input="Now summarize the highest-risk finding.")
```

The second invocation uses the conversation retained by the Cline session;
the caller does not replay the first prompt or response.

The adapter maps the provider, model ID, API-key environment reference, and
optional compatible base URL into Cline. It supports only `replace` system
instructions. Tool policy names are Cline built-in tool names; unknown names
fail during startup.

Enabled Cline built-in tools run non-interactively and are explicitly
auto-approved. `tools.enabled` and `tools.blocked` define harness tool policy;
they do not provide a filesystem or process sandbox. Run Cline in an isolated
task environment when enabling `run_commands`, `editor`, or `apply_patch`.

The `replace` instruction mode discards Cline's native system prompt. Include
required workspace-location context in the replacement instruction or provide
absolute paths in user input.

## Configure MCP Servers and Skills

Normalized skill paths are staged into a runtime-scoped Agent Plugins v1
package and loaded through Cline's native skill discovery. Each path must name
a directory containing `SKILL.md`.

Normalized MCP servers use the same runtime-scoped native plugin. The adapter
supports unauthenticated stdio, SSE, and streamable HTTP servers.
Normalized MCP authentication, `allowed_tools`, and `blocked_tools` are not
supported and fail during planning or startup.

## Understand Runtime Behavior

Each NeMo Fabric runtime creates an isolated local `ClineCore` and starts one interactive Cline session without a prompt. Every invocation sends a prompt to the same session ID, and runtime shutdown stops the session and disposes the
core. Callers do not replay conversation history. Independent NeMo Fabric
runtimes use separate Cline state directories and sessions.

Successful results include the response text. Results from a Cline model send
keep positive input, output, and cache counts as observations in
`RunResult.usage.metadata["nvidia.fabric.cline.usage_evidence.v1"]`. The `gaps` list
identifies missing or unverified usage. Cline can fill unavailable counts with
zero, so a zero in the Cline SDK result does not prove that the provider
reported zero.

When the selected provider is `nvidia` and `base_url` is set, the adapter captures
model requests through Cline's configured HTTP hook during each send. It sets
input, output, and total token counts only when every captured request returns
valid terminal usage that does not conflict with nonzero SDK counts. A zero
reported by the provider stays zero. The OpenAI-compatible input count includes
cache reads, and its output count includes reasoning tokens. The adapter reports
cache reads only when the provider supplies that count. Failed requests,
missing usage, and unexpected request paths leave complete counts unknown.
Other Cline providers return observations with unverified coverage.
Provider-reported cost remains unknown. Harbor uses complete counts when present
and keeps observations in NeMo Fabric result metadata.
Adapter-owned result metadata also includes the Cline session ID, finish
reason, iteration count, and selected model when available.

The initial adapter does not support NeMo Relay telemetry, native streaming,
Relay-backed streaming, or adapter-specific `harness.settings`.

## Check Runtime Health

Startup creates an idle native session. Cline runtime checks support `live`, `active`, and `ready` before the first invocation, during a model request, and between turns. `live` verifies native residency, identity, and closure state. `active` also observes the initialized native request interface; busy sessions remain healthy. `ready` also reads a fresh native session snapshot through `ClineCore.get()`. A stored session-history row cannot establish health.

Checks do not invoke a model or change session state. A timeout leaves the invocation running. These checks qualify local Cline SDK 0.0.83 state, including guarded native residency fields. Refer to the [runtime health guide](/nemo/fabric/sdk/python-sdk#runtime-health) and the [Cline adapter qualification](https://github.com/NVIDIA/NeMo-Fabric/blob/v0.6.0/adapters/typescript/cline/README.md#runtime-health).

Refer to the [SDK health-check overview](/nemo/fabric/sdk/health-checks) for shared behavior and a comparison of native evidence across adapters.