sdk/packages/shared/README.md
Package-level docs are centralized:
packages/README.mdARCHITECTURE.md@cline/shared owns shared cross-package primitives (session common types/utilities).
Node-only filesystem path resolvers live under the storage subpath export:
@cline/shared/storageresolveClineDataDir, resolveDbDataDir, resolveSessionDataDir, resolveTeamDataDirIt 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:
AgentModeSessionPromptConfigSessionWorkspaceConfigSessionExecutionConfig (includes canonical ToolPolicy map shape)It now also exports hook session context primitives used across agents/core/CLI:
HookSessionContextresolveHookSessionContext(...)resolveRootSessionId(...)resolveHookLogPath(...)It also exports cross-client runtime payload DTOs used by multiple hosts
(@cline/cli, @cline/code) so request/response contracts are not duplicated
outside transport wiring:
ChatStartSessionRequest, ChatRunTurnRequest, ChatTurnResult)ProviderActionRequest, ProviderCatalogResponse, ProviderOAuthLoginResponse)ClineAccountActionRequest)AddProviderActionRequest, SaveProviderSettingsActionRequest,
ProviderCapability, and OAuthProviderIdChat 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.