New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@llm-dev-ops/contracts

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@llm-dev-ops/contracts

Authoritative, enforceable contract layer for the Agentics platform

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

npm version JSON Schema Draft 07 Node.js >= 18 TypeScript License

📜 @llm-dev-ops/contracts

The Authoritative Contract Layer for the Agentics Platform
Enforceable · Versioned · Strongly Typed · Zero Bypass

Getting Started · Domains · Lifecycle Specs · Enforcement · Licensing

⚠️ Licensing

This package requires a valid license for use in production environments.

Use CaseLicense RequiredContact
🔍 Evaluation & Development✅ Free
🏢 Commercial / Production💼 Commercial Licensesales@globalbusinessadvisors.co
🎓 Academic / Research📄 Academic Licensesales@globalbusinessadvisors.co
🤝 Open Source Integration📄 OSS Licensesales@globalbusinessadvisors.co

By installing or using this package, you agree to the License Terms. Unauthorized use in production without a valid license is prohibited.

🏛️ Constitutional Authority

This repository is the single source of truth for all request/response contracts in the Agentics platform. Every service, CLI tool, and agent MUST validate against these contracts.

PrincipleGuarantee
🔒 AuthoritativeContracts define what is valid — no other source
⚖️ EnforceableValidation is mandatory, not optional
🏷️ VersionedBreaking changes require new major versions
🚫 No BypassRequests failing validation MUST be rejected

📋 Table of Contents

#SectionDescription
1🚀 Getting StartedInstallation and basic usage
2🏗️ Platform ArchitectureLayer overview and service map
3📦 Contract DomainsAll schema domains and their purpose
4🔄 Lifecycle SpecsCanonical lifecycle state machines
5🏷️ Versioning RulesSemver policy and breaking change rules
6🖥️ CLI ConsumptionCLI integration patterns
7⚙️ Service ConsumptionService-side validation patterns
8🔗 Execution Graph ProofCryptographic layer-traversal proof
9🛡️ Enforcement ModelFailure modes and enforcement points
10📐 Schema Design RulesWhat belongs (and doesn't) in this repo
11🤝 ContributingHow to add or modify contracts
12📄 LicensingFull license terms

🚀 Getting Started

Installation

npm install @llm-dev-ops/contracts

Quick Start

const contracts = require('@llm-dev-ops/contracts');
const Ajv = require('ajv');
const addFormats = require('ajv-formats');

const ajv = new Ajv({ allErrors: true });
addFormats(ajv);

// 📌 Load any schema by domain / version / name
const schemaPath = contracts.getSchema('simulation', 'v1', 'request');
const validate = ajv.compile(require(schemaPath));

// ✅ Validate before sending
const valid = validate(payload);
if (!valid) throw new Error(JSON.stringify(validate.errors));

TypeScript

import contracts = require('@llm-dev-ops/contracts');

const path: string | undefined = contracts.getSchema('lifecycle', 'v1', 'simulationLifecycle');
const domains: string[] = contracts.getDomains();

Direct Import

// Import schemas directly via package exports
const schema = require('@llm-dev-ops/contracts/lifecycle/v1/simulation-lifecycle');
const policy = require('@llm-dev-ops/contracts/governance/v1/policy');

🏗️ Platform Architecture

The Agentics platform is organized into distinct layers. Every layer MUST validate against contracts defined in this repository.

┌──────────────────────────────────────────────────────────────────┐
│  🔺 APEX LAYER                                                   │
│  Dev Platform · CLI · Console · API Gateway · Agent Runtime      │
├──────────────────────────────────────────────────────────────────┤
│  🧩 LAYER 3 — CORE BUNDLES                                      │
│  Intelligence · Security · Automation · Governance · Data · ...  │
├──────────────────────────────────────────────────────────────────┤
│  🧠 LAYER 2 — INTELLIGENCE SERVICES                             │
│  CoPilot · Simulator · Benchmark · Gateway · Vault · Research    │
├──────────────────────────────────────────────────────────────────┤
│  🔧 LAYER 1 — FOUNDATIONAL SERVICES                             │
│  Test-Bench · Observatory · Shield · Sentinel · Memory-Graph     │
│  Latency-Lens · Forge · Edge-Agent · Optimizer · Incident · ...  │
├──────────────────────────────────────────────────────────────────┤
│  📜 @llm-dev-ops/contracts — THIS REPOSITORY (SOURCE OF TRUTH)  │
└──────────────────────────────────────────────────────────────────┘

🔧 Layer 1 — Foundational Services

ServicePurpose
LLM-Test-BenchAutomated testing framework for LLM behaviors
LLM-ObservatoryReal-time monitoring and observability
LLM-ShieldPrompt injection & jailbreak prevention
LLM-SentinelContinuous security monitoring & threat detection
LLM-Memory-GraphPersistent memory and context management
LLM-Latency-LensPerformance profiling and latency analysis
LLM-ForgeModel fine-tuning and customization pipeline
LLM-Edge-AgentEdge deployment and local inference
LLM-Auto-OptimizerAutomatic prompt and config optimization
LLM-Incident-ManagerIncident detection, escalation, and resolution
LLM-OrchestratorMulti-agent coordination and workflow management
LLM-CostOpsCost tracking, budgeting, and optimization
LLM-Governance-DashboardVisual governance and compliance monitoring
LLM-Policy-EnginePolicy evaluation and enforcement runtime
LLM-RegistryService discovery and model registry
LLM-MarketplaceModel and plugin marketplace
LLM-Analytics-HubAnalytics aggregation and reporting
LLM-Config-ManagerConfiguration management and distribution
LLM-Schema-RegistrySchema versioning and compatibility checking
LLM-Connector-HubIntegration connectors for external systems

🧠 Layer 2 — Intelligence Services

ServicePurpose
LLM-CoPilot-AgentInteractive AI assistant with multi-modal capabilities
LLM-SimulatorSimulation engine for what-if scenarios
LLM-Benchmark-ExchangeBenchmark sharing and comparison platform
LLM-Inference-GatewayUnified inference API with routing & load balancing
LLM-Data-VaultSecure data storage with encryption & access control
LLM-Research-LabExperimental features and research integrations

🧩 Layer 3 — Core Bundles

BundleServicesPurpose
Intelligence-CoreCoPilot, Simulator, Auto-OptimizerPrimary intelligence
Security-CoreShield, Sentinel, Data-VaultSecurity & protection
Automation-CoreOrchestrator, Config-Manager, ForgeAutomation
Governance-CorePolicy-Engine, Governance-DashboardCompliance
Data-CoreMemory-Graph, Analytics-Hub, Data-VaultData management
Ecosystem-CoreRegistry, Marketplace, Connector-HubIntegrations
Research-CoreResearch-Lab, Benchmark-ExchangeResearch
Interface-CoreGateway, Edge-Agent, CoPilotUser-facing

🔺 Apex Layer

ComponentPurpose
Agentics Dev PlatformUnified development environment & SDK
Agentics CLICommand-line interface for all platform operations
Agentics ConsoleWeb-based management console
Agentics API GatewayUnified API surface for external consumers
Agentics Agent RuntimeProduction runtime for deployed agents

📦 Contract Domains

Overview

DomainDirectorySchemasPurpose
🔗 Executionexecution/v1/3Execution graphs, metadata, telemetry
🧪 Simulationsimulation/v1/3Simulation requests, responses, errors
🎯 Intentintent/v1/1User intent parsing and routing
📤 Exportersexporters/v1/1Data export request formats
✅ Diligencediligence/v1/1Compliance and due diligence checks
💰 ROIroi/v1/1ROI calculation and reporting
⚖️ Governancegovernance/v1/2Policy definitions and enforcement
🔄 Lifecyclelifecycle/v1/5Canonical lifecycle state machines

🔗 Execution Contracts

execution/v1/execution-graph.schema.json

Cryptographic proof that a request traversed all required layers.

{
  "executionId": "uuid",
  "timestamp": "ISO-8601",
  "layers": [
    {
      "layerId": "layer-1",
      "service": "LLM-Shield",
      "entryTime": "ISO-8601",
      "exitTime": "ISO-8601",
      "status": "completed",
      "hash": "sha256-of-input-output"
    }
  ],
  "rootHash": "merkle-root-of-all-layer-hashes"
}

execution/v1/execution-metadata.schema.json

Execution context and environment metadata.

execution/v1/telemetry-envelope.schema.json

Standard envelope for all telemetry data emitted during execution.

🧪 Simulation Contracts

simulation/v1/request.schema.json

{
  "simulationId": "uuid",
  "scenario": { "name": "string", "parameters": {}, "constraints": [] },
  "executionMetadata": {}
}

simulation/v1/response.schema.json

Simulation results including outcomes, metrics, and recommendations.

simulation/v1/errors.schema.json

Standardized error format for simulation failures.

🎯 Intent · 📤 Exporters · ✅ Diligence · 💰 ROI

Each domain provides a request.schema.json governing the input contract for its respective service. See individual schema files for full property definitions.

⚖️ Governance Contracts

governance/v1/policy.schema.json

Policy definitions with rules, conditions, enforcement modes.

governance/v1/definitions.schema.json

Shared type definitions: UUIDs, semver, timestamps, layer enums, principals, resources.

🔄 Lifecycle Specs

New in v1.1.0 — Canonical lifecycle state machines consumed by all downstream repos.

Every lifecycle spec defines 10 ordered stages, each tracked by a uniform stage_record:

{
  "status": "pending | in_progress | completed | failed | skipped",
  "entered_at": "ISO-8601",
  "completed_at": "ISO-8601",
  "initiated_by": "principal-or-service",
  "error": { "code": "...", "message": "...", "recoverable": true },
  "artifacts": [{ "artifact_type": "...", "artifact_id": "uuid", "uri": "..." }]
}

🧪 SimulationLifecycleSpec

📄 lifecycle/v1/simulation-lifecycle.schema.json

#StageDescription
1simulation_requestedSimulation run formally requested
2plan_createdSimulation plan generated from request
3plan_evaluatedPlan evaluated for feasibility and risk
4plan_approvedRequired approvals obtained
5execution_startedSimulation execution begins
6execution_completedExecution finishes (success or failure)
7telemetry_recordedTelemetry data persisted
8cost_recordedResource and financial costs captured
9governance_recordedCompliance artifacts recorded
10results_indexedResults indexed for querying and analysis

🚀 DeploymentLifecycleSpec

📄 lifecycle/v1/deployment-lifecycle.schema.json

#StageDescription
1intent_receivedDeployment intent received and validated
2pre_checks_passedHealth, capacity, and policy checks passed
3artifacts_resolvedImages, configs, and secrets resolved
4approval_grantedHuman or automated approvals obtained
5rollout_startedDeployment rollout begins
6rollout_completedRollout finished across all targets
7verification_passedSmoke tests and health checks passed
8traffic_shiftedTraffic shifted to new deployment
9telemetry_recordedDeployment telemetry persisted
10governance_recordedCompliance records filed

Includes a rollback block for tracking rollback triggers, timestamps, and target versions.

⚖️ PolicyLifecycleSpec

📄 lifecycle/v1/policy-lifecycle.schema.json

#StageDescription
1policy_draftedPolicy authored in draft form
2policy_reviewedPeer or compliance review completed
3policy_approvedRequired approvals for activation
4policy_publishedPublished to governance registry
5enforcement_startedEnforcement activated across services
6compliance_verifiedInitial compliance verification
7audit_recordedAudit trail persisted
8review_scheduledPeriodic review cycle scheduled
9policy_expiredReached expiration or superseded
10policy_archivedArchived for historical reference

Metadata includes enforcement_level, compliance_frameworks (SOC2, HIPAA, GDPR, etc.), and target_layers.

💰 RoiLifecycleSpec

📄 lifecycle/v1/roi-lifecycle.schema.json

#StageDescription
1analysis_requestedROI analysis formally requested
2baseline_capturedCurrent-state baselines captured
3cost_data_collectedCompute, license, labor costs gathered
4benefit_data_collectedThroughput, savings, quality metrics gathered
5projection_calculatedROI projections and payback period calculated
6projection_validatedProjections validated against actuals/benchmarks
7report_generatedROI report generated
8stakeholder_reviewedStakeholders reviewed and acknowledged
9governance_recordedGovernance artifacts filed
10results_indexedResults indexed for trend analysis

Metadata includes time_horizon_months, currency (ISO 4217), and analysis_type.

🏢 ErpLifecycleSpec

📄 lifecycle/v1/erp-lifecycle.schema.json

#StageDescription
1sync_requestedERP sync operation requested
2connection_establishedConnection to external ERP established
3schema_validatedSource/target schemas validated for compatibility
4data_extractedData extracted from source system
5data_transformedData transformed to match target schema
6data_loadedTransformed data loaded into target
7reconciliation_completedSource and target data reconciled
8telemetry_recordedSync telemetry (rows, latency, errors) persisted
9governance_recordedData lineage and compliance records filed
10sync_finalizedOperation finalized, connections released

Supports: SAP S/4HANA, Oracle Fusion, Microsoft Dynamics 365, NetSuite, Workday, Sage Intacct, Custom. Metadata includes erp_system, sync_direction (inbound/outbound/bidirectional), and record_count.

🏷️ Versioning Rules

Semantic Versioning

All contracts follow Semantic Versioning 2.0.0:

Change TypeVersion BumpExample
🔴 Breaking (remove field, change type)MAJORv1 → v2
🟢 Additive (new optional field, new schema)MINORv1.0 → v1.1
🔵 Fix (description, constraint widening)PATCHv1.0.0 → v1.0.1

❌ Breaking Changes

A change is BREAKING if it:

  • Removes a required field
  • Adds a new required field without a default
  • Changes the type of an existing field
  • Narrows validation constraints
  • Changes enumeration values
  • Modifies the semantic meaning of a field

✅ Non-Breaking Changes

A change is NON-BREAKING if it:

  • Adds an optional field
  • Widens validation constraints
  • Adds new enum values (when consumers handle unknowns)
  • Improves descriptions or examples
  • Adds new schemas to an existing version

🚫 No Silent Mutations

Schema files MUST NOT be modified after publication without a version increment. Every change requires:

  • Version increment (patch minimum)
  • Changelog entry
  • Consumer notification

🖥️ CLI Consumption

The Agentics CLI validates all requests against contracts before making network calls.

┌──────────────┐     ┌──────────────┐     ┌──────────────┐
│ 📝 User      │ ──→ │ 📜 Load      │ ──→ │ ✅ Validate  │
│ Command      │     │ Contract     │     │ Request      │
└──────────────┘     └──────────────┘     └──────┬───────┘
                                                  │
                     ┌──────────────┐             │ only if valid
                     │ 🌐 Network   │ ←───────────┘
                     │ Call         │
                     └──────────────┘
const contracts = require('@llm-dev-ops/contracts');
const Ajv = require('ajv');
const ajv = new Ajv();

const schemaPath = contracts.getSchema('simulation', 'v1', 'request');
const validate = ajv.compile(require(schemaPath));

function sendSimulationRequest(request) {
  if (!validate(request)) {
    console.error('❌ Contract validation failed:', validate.errors);
    process.exit(1);  // HARD FAILURE — no bypass
  }
  return fetch('/api/simulation', { method: 'POST', body: JSON.stringify(request) });
}

CLI Commands

# Validate a request payload against a contract
agentics validate --schema simulation/v1/request --file request.json

# List all available contracts
agentics contracts list

# Show contract schema
agentics contracts show lifecycle/v1/simulation-lifecycle

⚙️ Service Consumption

Every service MUST validate incoming requests and outgoing responses.

Node.js Express Middleware

const contracts = require('@llm-dev-ops/contracts');
const Ajv = require('ajv');
const addFormats = require('ajv-formats');

const ajv = new Ajv({ allErrors: true });
addFormats(ajv);

function contractMiddleware(domain, version, schemaName) {
  const schemaPath = contracts.getSchema(domain, version, schemaName);
  const validate = ajv.compile(require(schemaPath));

  return (req, res, next) => {
    if (!validate(req.body)) {
      return res.status(400).json({
        error: 'CONTRACT_VALIDATION_FAILED',
        contract: `${domain}/${version}/${schemaName}`,
        violations: validate.errors
      });
    }
    next();
  };
}

app.post('/api/simulation',
  contractMiddleware('simulation', 'v1', 'request'),
  async (req, res) => { /* ✅ Request is guaranteed valid */ }
);

Python (FastAPI)

import json
from pathlib import Path
from jsonschema import validate, ValidationError
from fastapi import Request, HTTPException

class ContractValidator:
    def __init__(self, contracts_path: str):
        self.base = Path(contracts_path)
        self._cache = {}

    def get_schema(self, domain: str, version: str, name: str) -> dict:
        key = f"{domain}/{version}/{name}"
        if key not in self._cache:
            path = self.base / domain / version / f"{name}.schema.json"
            self._cache[key] = json.loads(path.read_text())
        return self._cache[key]

    def validate(self, domain: str, version: str, name: str, data: dict):
        validate(instance=data, schema=self.get_schema(domain, version, name))

🔗 Execution Graph Proof

The execution graph is the cryptographic proof that a request traversed all required layers.

Why Execution Graphs Exist

GuaranteeHow
🔒 All required layers participatedLayer entries are mandatory
📊 Correct execution orderEntry/exit timestamps enforce sequence
🔐 Data integritySHA-256 hash chain between layers
⏱️ Timing accountabilityPer-layer execution time recorded

Structure

{
  "executionId": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "layers": [
    {
      "layerId": "layer-1-shield",
      "service": "LLM-Shield",
      "version": "2.3.1",
      "entryTime": "2024-01-15T10:30:00.100Z",
      "exitTime": "2024-01-15T10:30:00.150Z",
      "status": "completed",
      "inputHash": "sha256:abc123...",
      "outputHash": "sha256:def456..."
    }
  ],
  "rootHash": "sha256:merkle-root",
  "valid": true
}

Every API response MUST include an execution graph proving layer participation.

🛡️ Enforcement Model

🚨 Core Principle: No Optional Participation

Every layer defined in the architecture MUST participate. There is no concept of "degraded mode."

  • 🔒 Security layers (Shield, Sentinel) — cannot be bypassed for performance
  • ⚖️ Governance layers (Policy-Engine) — cannot be bypassed for convenience
  • 📊 Observability layers (Observatory) — cannot be bypassed to reduce overhead

Failure Modes

ScenarioHTTPRecovery
Request fails validation400Fix request format
Required layer unreachable503Retry with backoff
Layer rejects (policy violation)403Address policy issue
Layer times out504Retry or escalate
Response fails validation500Service bug — escalate
Execution graph missing layers502Infrastructure issue

🚫 Prohibition on Bypassing

IT IS STRICTLY FORBIDDEN TO BYPASS CONTRACT VALIDATION.

Attempted JustificationResponse
"It's just for testing"Use test contracts or mock data
"The schema is too strict"Fix the schema or fix your data
"Performance is critical"Validation is measured in microseconds
"It's an emergency"Emergencies don't justify invalid data
"My team doesn't have time"Invalid data costs more time to debug

Detected bypass attempts trigger: immediate rejection → incident creation → audit logging → escalation.

📐 Schema Design Rules

✅ Schemas MUST

  • Be pure validation — no business logic
  • Be deterministic — same input → same result
  • Be self-contained — minimize external $ref dependencies
  • Be documenteddescription for all fields
  • Be testable — include valid examples

❌ Schemas MUST NOT

  • Contain default values encoding business rules
  • Reference external URLs (all refs must be local)
  • Include conditional logic based on environment
  • Embed API endpoints or service URLs
  • Include authentication/authorization logic

🤝 Contributing

Adding New Schemas

  • Create schema in {domain}/v1/{name}.schema.json
  • Follow JSON Schema Draft 07 specification
  • Include $id, $schema, title, and description
  • Add comprehensive field descriptions
  • Update index.js to register the schema
  • Update index.d.ts with type declarations
  • Run npm run validate to verify

Schema Template

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://agentics.org/schemas/{domain}/v1/{name}.schema.json",
  "title": "{Schema Title}",
  "description": "Detailed description of what this schema validates",
  "type": "object",
  "properties": {
    "example_field": {
      "type": "string",
      "description": "Description of this field"
    }
  },
  "required": ["example_field"],
  "additionalProperties": false
}

Contract Compliance Checklist

  • All request handlers validate against contracts
  • All response builders validate against contracts
  • No hardcoded bypasses of validation
  • No environment flags that disable validation
  • Execution graph entries added correctly
  • Error responses conform to error contracts

📄 License Terms

Copyright © 2025 Global Business Advisors. All rights reserved.

This software and associated documentation files (the "Software") are the proprietary property of Global Business Advisors.

Permitted (with valid license)

  • ✅ Use in internal development and testing environments
  • ✅ Integration into licensed production systems
  • ✅ Schema validation in downstream services

Prohibited (without written authorization)

  • ❌ Redistribution or sublicensing
  • ❌ Use in production environments without a commercial license
  • ❌ Modification of schema $id URIs or authorship metadata
  • ❌ Removal of license notices from source files

Obtaining a License

Contact sales@globalbusinessadvisors.co to obtain a commercial, academic, or open-source integration license.

Use of this package constitutes acceptance of these terms.

📜 These contracts are LAW. No bypass. No exceptions. No excuses.

🐛 Report Issue · 📧 Contact · 🏠 LLM-Dev-Ops

Keywords

agentics

FAQs

Package last updated on 15 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts