@trumbodev/shared
v0.0.63
Published
Shared utilities, types, and schemas for Trumbo packages
Readme
████████╗██████╗ ██╗ ██╗███╗ ███╗██████╗ ██████╗
╚══██╔══╝██╔══██╗██║ ██║████╗ ████║██╔══██╗██╔═══██╗
██║ ██████╔╝██║ ██║██╔████╔██║██████╔╝██║ ██║
██║ ██╔══██╗██║ ██║██║╚██╔██║██╔══██╗██║ ██║
██║ ██║ ██║╚██████╔╝██║ ╚═╝ ██║██████╔╝╚██████╔╝
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚═════╝ [experimental] @trumbodev/shared
Package-level docs are centralized:
- Overview:
packages/README.md - Architecture and interactions:
ARCHITECTURE.md
@trumbodev/shared owns the shared cross-package primitives (session common types and utilities) that the rest of the SDK builds on.
Node-only filesystem path resolvers live under the storage subpath export:
@trumbodev/shared/storage- examples:
resolveTrumboDataDir,resolveDbDataDir,resolveSessionDataDir,resolveTeamDataDir
It also exports cross-client logging contracts, including BasicLogger, so the runtime, SDK, and host applications can all share a single logger type.
Session config primitives are centralized here so hosts and runtimes can compose one base shape instead of redefining similar fields over and over:
AgentModeSessionPromptConfigSessionWorkspaceConfigSessionExecutionConfig(includes the canonicalToolPolicymap shape)
It also exports the hook session context primitives used across agents, core, and the CLI:
HookSessionContextresolveHookSessionContext(...)resolveRootSessionId(...)resolveHookLogPath(...)
It also exports cross-client runtime payload DTOs used by multiple hosts (@trumbodev/cli, @trumbodev/code) so request/response contracts are not duplicated outside transport wiring:
- chat runtime payloads (
ChatStartSessionRequest,ChatRunTurnRequest,ChatTurnResult) - provider runtime payloads (
ProviderActionRequest,ProviderCatalogResponse,ProviderOAuthLoginResponse) - Trumbo account action payloads (
TrumboAccountActionRequest) - 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, andOAuthProviderId
Chat runtime payload notes:
ChatStartSessionRequestsupportsinitialMessages, optionaltoolPolicies, optionalrulesfor default system prompt assembly, and optionalloggerruntime config (RuntimeLoggerConfig) so hosts can pass serialized logger settings across transport boundaries.RuntimeLoggerConfig.bindingslets hosts attach stable context fields (for exampleclientId,clientType,clientApp) to all runtime log records.