# @clinebot/shared

> Shared utilities, types, and schemas for Cline packages

Latest version **0.0.38** (published 2026-05-05) · 0 weekly downloads

## Install

```sh
npm install @clinebot/shared
pnpm add @clinebot/shared
yarn add @clinebot/shared
bun add @clinebot/shared
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.0.38 |
| Published | 2026-05-05 |
| First published | 2026-03-22 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22 |
| Dependencies | 3 |
| Unpacked size | 902.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | johnsimbot, saoudcline, beatrix-cline, barreirot, maxpaulus, arakhan |

## Links

- npm: https://www.npmjs.com/package/@clinebot/shared
- Repository: https://github.com/cline/sdk-wip
- npm.io page: https://npm.io/package/@clinebot/shared

## Dependencies (3)

- [zod](https://npm.io/package/zod.md) ^4.3.6
- [jsonrepair](https://npm.io/package/jsonrepair.md) ^3.13.2
- [zod-to-json-schema](https://npm.io/package/zod-to-json-schema.md) ^3.25.1

## Recent versions

- 0.0.38 (latest) — 2026-05-05
- 0.0.38-nightly.1778038008 (nightly) — 2026-05-06
- 0.0.37-nightly.1777950585 — 2026-05-05
- 0.0.37-nightly.1777940884 — 2026-05-05
- 0.0.37-nightly.1777939956 — 2026-05-05
- 0.0.37-nightly.1777939276 — 2026-05-05
- 0.0.37 — 2026-04-28
- 0.0.36 — 2026-04-22
- 0.0.35 — 2026-04-21
- 0.0.34 — 2026-04-14
- 0.0.33 — 2026-04-12
- 0.0.32 — 2026-04-11
- 0.0.31 — 2026-04-11
- 0.0.30 — 2026-04-11
- 0.0.29 — 2026-04-10
- … 19 more at https://npm.io/package/@clinebot/shared/versions

## README

# [experimental] @clinebot/shared

Package-level docs are centralized:

- Overview: [`packages/README.md`](../README.md)
- Architecture and interactions: [`ARCHITECTURE.md`](./ARCHITECTURE.md)

`@clinebot/shared` owns shared cross-package primitives (session common types/utilities).

Node-only filesystem path resolvers live under the storage subpath export:

- `@clinebot/shared/storage`
- examples: `resolveClineDataDir`, `resolveDbDataDir`, `resolveSessionDataDir`, `resolveTeamDataDir`

It also exports cross-client logging contracts, including `BasicLogger`, so
runtime, SDK, and host applications can share a single logger type.

Session config primitives are also centralized here so hosts/runtimes can
compose one base shape instead of redefining similar fields repeatedly:

- `AgentMode`
- `SessionPromptConfig`
- `SessionWorkspaceConfig`
- `SessionExecutionConfig` (includes canonical `ToolPolicy` map shape)

It now also exports hook session context primitives used across agents/core/CLI:

- `HookSessionContext`
- `resolveHookSessionContext(...)`
- `resolveRootSessionId(...)`
- `resolveHookLogPath(...)`

It also exports cross-client runtime payload DTOs used by multiple hosts
(`@clinebot/cli`, `@clinebot/code`) so request/response contracts are not duplicated
outside transport wiring:

- chat runtime payloads (`ChatStartSessionRequest`, `ChatRunTurnRequest`, `ChatTurnResult`)
- provider runtime payloads (`ProviderActionRequest`, `ProviderCatalogResponse`, `ProviderOAuthLoginResponse`)
- Cline account action payloads (`ClineAccountActionRequest`)
- provider action requests include provider catalog/model operations plus provider add/save operations for settings hosts
- provider action payloads now expose granular request/type contracts for reuse:
  `AddProviderActionRequest`, `SaveProviderSettingsActionRequest`,
  `ProviderCapability`, and `OAuthProviderId`

Chat runtime payload notes:
- `ChatStartSessionRequest` supports `initialMessages`, optional `toolPolicies`, optional `rules` for default system prompt assembly, and optional `logger` runtime config (`RuntimeLoggerConfig`) so hosts can pass serialized logger settings across transport boundaries.
- `RuntimeLoggerConfig.bindings` lets hosts attach stable context fields (for example `clientId`, `clientType`, `clientApp`) to all runtime log records.

---
_Source: https://npm.io/package/@clinebot/shared · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
