mirror of
https://github.com/cline/cline.git
synced 2026-09-19 10:13:34 +08:00
* feat: add @clinebot/enterprise SDK package Introduces @clinebot/enterprise, a new optional composition layer that adds enterprise capabilities on top of @clinebot/core and @clinebot/agents without leaking enterprise-specific concerns into lower-level packages. The package handles the full enterprise sync lifecycle: 1. Identity resolution — pluggable IdentityAdapter interface (WorkOS adapter included) 2. Control plane sync — fetches remote config bundles via EnterpriseControlPlane 3. Policy materialization — writes managed rules, workflows, and skills to disk so @clinebot/core discovers them through its standard local file path (no special in-memory injection) 4. Telemetry configuration — maps bundle data to normalized OpenTelemetryClientConfig from @clinebot/shared 5. Runtime integration — exposes createEnterprisePlugin() and prepareEnterpriseRuntime() to wire everything into @clinebot/core as an AgentExtension Design decisions - Provider-agnostic contracts — IdentityAdapter, EnterpriseControlPlane, and EnterpriseTelemetryAdapter are thin interfaces; WorkOS is an included provider, not a hard dependency - File-based materialization — enterprise-managed instructions land on disk and are loaded through the same path as any local instruction file, keeping prompt assembly consistent - Shared RemoteConfig — EnterpriseConfigBundle normalizes into RemoteConfig from @clinebot/shared; no separate enterprise-only config contract - Clean boundary — if a feature works without org identity, remote policy, or enterprise telemetry, it doesn't belong in this package * clean up * refactor: rpc/src/client.ts * revert package.json * autoload * rename agents directory to extensions * fix renamed path * fix: use renamed extensions path * fix checkpoint hooks
Cline SDK Packages
This repository contains the packages and host apps that power Cline agent runtimes.
It is a Bun workspace centered around a small stack of reusable packages:
@clinebot/shared: shared contracts, schemas, path helpers, and runtime utilities@clinebot/llms: model catalogs, provider schemas, and handler creation@clinebot/agents: stateless agent loop, tools, hooks, and extension primitives@clinebot/scheduler: scheduled execution and concurrency control@clinebot/rpc: cross-process runtime gateway@clinebot/core: stateful orchestration, sessions, storage, and runtime assembly@clinebot/enterprise: used for internal enterprise integrations. It is intentionally excluded from the root SDK build/version/publish flows.
Host apps in apps/ compose those packages into real user-facing products such as the CLI, desktop apps, and the VS Code extension.
What This Repo Is
This repo is the implementation workspace for the next-generation Cline SDK.
If you are visiting to understand the project at a high level:
README.md: visitor-facing overview of the repository- ARCHITECTURE.md: system design, dependency direction, and runtime flows
- DOC.md: detailed API and behavior reference
- AGENTS.md: contributor onboarding and codebase navigation
Resources
Use the docs by question type:
- Start with
README.mdif you want a high-level introduction to what this repository is and what lives here. - Read AGENTS.md if you are a developer onboarding into the codebase and need workflow, ownership, and change-routing guidance.
- Read ARCHITECTURE.md if you want to understand the design of the system, package boundaries, and runtime flows.
- Read DOC.md if you need detailed package/API/behavior reference while implementing or debugging something.
Workspace Overview
Packages
packages/shared: cross-package building blockspackages/llms: provider/model runtime layerpackages/agents: stateless execution layerpackages/scheduler: scheduled runtime executionpackages/rpc: transport and control-plane layerpackages/core: stateful orchestration layerpackages/enterprise: internal enterprise bridge
Apps
apps/cli: command-line hostapps/code: Tauri + Next.js desktop appapps/desktop: Tauri desktop app with board-oriented UXapps/vscode: VS Code extensionapps/examples: sample integrations and usage examples
Quick Look
flowchart LR
shared["@clinebot/shared"] --> llms["@clinebot/llms"] & agents["@clinebot/agents"] & rpc["@clinebot/rpc"] & core["@clinebot/core"]
llms --> agents & core
scheduler["@clinebot/scheduler"] --> rpc
agents --> core
rpc --> core
enterprise["@clinebot/enterprise (internal)"] --> agents & core & shared
core --> apps["CLI / Desktop / VS Code / Code App"]
Getting Around
If you want to:
- understand the design: start with ARCHITECTURE.md
- inspect APIs and behaviors: use DOC.md
- work on the codebase as a contributor: read AGENTS.md
- see how the SDK is consumed: look at
apps/cli,apps/code,apps/desktop, andapps/examples
Development Entry Points
Common root commands:
bun run buildbun run build:sdkbun run build:appsbun run testbun run typesbun run check
Root SDK build/version/publish automation only includes the publishable SDK packages. Internal-only workspace packages such as packages/enterprise are worked on directly when needed.