@parmana/shared has no internal dependencies — every other package depends on it. Its public surface (packages/shared/src/index.ts) exports four things: ./domain/index.js, ./repositories/index.js, ./config/index.js, ./errors/index.js, plus a few standalone types and normalizePolicy.
Domain model
packages/shared/src/domain/ is the canonical, interface-based model — Authority, Authorization, Intent, BusinessTransaction, PolicyReference, Decision, Execution, Verification, Receipt, Override, ExecutionTrustRecord, plus enums like AuthorityType and BusinessTransactionStatus. This is the model both SDKs mirror — see TypeScript SDK → Models and Python SDK → APIs & Models — and the one every Concepts page describes.
Repository contracts
packages/shared/src/repositories/:
storage implements and runtime depends on — runtime never imports a concrete repository class directly.
Errors
packages/shared/src/errors/ defines a base ParmanaError plus specific errors like ValidationError, BusinessTransactionNotFoundError, PolicyNotFoundError, VerificationFailedError, ReceiptGenerationError, UnauthorizedError, ForbiddenError, ConflictError, OverrideNotAllowedError, DecisionNotApprovedError, and others. packages/runtime/src/errors/ layers a small number of runtime-specific errors (like VerificationFailedError, ReceiptGenerationError) on top of these.
This
ParmanaError is unrelated to the TypeScript SDK’s own ParmanaError (typescript/src/errors/ParmanaError.ts) — same name, two independent classes in two different packages, one server-side and one client-side. Don’t assume instanceof checks cross the boundary.Configuration
packages/shared/src/config/ defines Config, ConfigLoader, and validation/parsing utilities, along with enumerated CryptoAlgorithms, KeyProviders, StorageProviders, and TrustProfiles — the vocabulary other packages (crypto, storage) use for their own configuration.
Related
Package Architecture
Where
shared sits in the dependency graph.Business Transaction
The concept this package’s central type models.
Error Model
How these errors surface over HTTP.
storage
Implements
shared’s repository contracts.