Installation
import { Tabs, TabItem } from ‘@astrojs/starlight/components’;
Installation
ContractShield is distributed as multiple npm packages. Install only what you need.
Core Package
The PDP (Policy Decision Point) is always required:
npm install @cshield/pdpFramework Adapters
Choose the adapter for your framework:
Optional Packages
| Package | Purpose | When to use |
|---|---|---|
@cshield/client | SDK with caching/retry | Sidecar or centralized deployment |
@cshield/license | License verification | Pro/Enterprise features |
# Client SDK (for sidecar/centralized)npm install @cshield/client
# License verification (Pro features)npm install @cshield/licensePackage Versions
All packages follow semantic versioning and are released together:
| Package | Current Version | License |
|---|---|---|
@cshield/pdp | 0.3.0 | Apache 2.0 |
@cshield/pep-express | 0.3.0 | Apache 2.0 |
@cshield/pep-fastify | 0.3.0 | Apache 2.0 |
@cshield/sidecar | 0.3.0 | Apache 2.0 |
@cshield/client | 1.1.0 | Apache 2.0 |
@cshield/license | 0.3.1 | Apache 2.0 |
@cshield/sink-rasp | 1.0.0 | Commercial |
Requirements
- Node.js: 18.x or later (LTS recommended)
- TypeScript: 5.0+ (optional, types included)
Verify Installation
import { evaluate } from '@cshield/pdp';
const policy = { policyVersion: '0.1', routes: []};
const context = { version: '0.1', request: { method: 'GET', path: '/health' }};
const decision = await evaluate(policy, context);console.log(decision.action); // "ALLOW"Next Steps
- Quick Start - Get running in 5 minutes
- Configuration - Full configuration options