JSPM

@omegaengine/sdk

1.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 22
  • Score
    100M100P100Q70584F
  • License Apache-2.0

Decision infrastructure for autonomous AI — Official TypeScript SDK

Package Exports

  • @omegaengine/sdk
  • @omegaengine/sdk/testing

Readme

@omegaengine/sdk

Decision infrastructure for autonomous AI — TypeScript SDK

The official TypeScript SDK for OmegaEngine. Full type coverage for the public API contract and Security Intelligence Suite.

Installation

npm install @omegaengine/sdk

Quick Start

import { OmegaClient } from "@omegaengine/sdk";

const omega = new OmegaClient({
  baseUrl: "https://api.omegaengine.ai",
  apiKey: process.env.OMEGA_API_KEY!,
});

// Authorize execution before side effects (recommended first path)
const authz = await omega.authorize({
  agent_id: "sales-agent",
  action: "send_email",
  vendor: "SendGrid",
  amount: 0,
});

if (authz.decision === "approved") {
  console.log("✅ Approved:", authz.audit_id);
} else {
  console.log(`⚠️ Blocked (${authz.decision}):`, authz.reason);
}

// Stateful multi-step authorization (start -> step -> end)
const session = await omega.authorizeSessionStart({
  agent_id: "sales-agent",
  metadata: { runId: "run-42" },
});

const step = await omega.authorizeSessionStep({
  session_id: session.session.session_id,
  action: "send_email",
  vendor: "SendGrid",
});

await omega.authorizeSessionEnd({
  session_id: session.session.session_id,
  reason: "workflow complete",
});

// Advanced: full scenario judgment (v2/judge)
const decision = await omega.judge({
  scenario: "AI agent wants to send a $5,000 wire transfer to a new vendor",
  context: "First-time vendor, no previous transactions",
  domain: "FINANCIAL",
  riskTolerance: "low",
});

if (decision.judge?.riskLevel === "HIGH" || decision.judge?.needsHumanReview) {
  console.log("Escalate:", decision.judge.summary);
}

if (decision.meta?.locked?.length) {
  console.log("Upgrade to unlock:", decision.meta.locked);
}

Security Intelligence

Access the full CISO-grade security intelligence platform:

// Get the complete security posture (16 engines, ~5ms)
const posture = await omega.security.posture({
  organization: "Acme Corp",
  industry: "fintech",
});

// Adversarial Robustness Score — the FICO score for AI security
const ars = await omega.security.score();
console.log(`ARS: ${ars.report.score}/1000 (${ars.report.bandLabel})`);

// Security SLA tracking
const sla = await omega.security.sla();
if (sla.sla.violated > 0) {
  console.warn(`${sla.sla.violated} SLAs violated!`);
}

// Threat intelligence feed
const threats = await omega.security.threatIntel("critical");
for (const t of threats.catalog) {
  console.log(`[${t.severity}] ${t.name}${t.mitre}`);
}

// Zero-day discovery
const zd = await omega.security.zeroDay();

// Anomaly detection
const anomalies = await omega.security.anomalies();

// Chaos engineering
const chaos = await omega.security.chaos();
console.log(`Resilience: ${chaos.chaos.overallResilience}/100`);

CI/CD Security Gate

Block unsafe deploys in your pipeline:

const gate = await omega.security.ciGate({
  minScore: 700,
  failOn: "high",
  sarif: true,
  commitSha: process.env.GITHUB_SHA,
  branch: "main",
});

if (gate.verdict === "FAIL") {
  console.error(gate._ci.annotation);
  process.exit(1);
}

Or use the GitHub Action:

- name: OmegaEngine Security Gate
  uses: omegaengine/omega-gate@v1
  with:
    api-key: ${{ secrets.OMEGA_API_KEY }}
    min-score: 700
    fail-on: high
    sarif: true

Webhooks

Subscribe to real-time security alerts:

// Register a webhook
const wh = await omega.security.registerWebhook({
  url: "https://your-app.com/webhooks/omega",
  events: ["sla.violated", "zero_day.discovered", "anomaly.spike"],
  secret: "whsec_your_signing_secret",
});

// List registered webhooks
const list = await omega.security.listWebhooks();

Available Webhook Events

Event Description
sla.violated Security SLA threshold breached
sla.at_risk SLA approaching violation
anomaly.spike Anomalous traffic detected
zero_day.discovered Novel adversarial pattern found
attack.campaign_detected Cross-tenant coordinated attack
drift.regression Safety score decreased
chaos.failure Chaos experiment failed
contract.violation Model behavior breach
incident.escalated Incident escalated to P1/P0
regulatory.action_required New compliance requirement

Full API Coverage

Intelligence

  • omega.security.score() — Adversarial Robustness Score
  • omega.security.anomalies() — Anomaly detection
  • omega.security.forensics() — Model forensics
  • omega.security.zeroDay() — Zero-day discovery
  • omega.security.threatIntel() — Threat intelligence feed
  • omega.security.surface() — Attack surface graph
  • omega.security.correlate() — Cross-tenant correlation
  • omega.security.fingerprint() — Model fingerprinting
  • omega.security.threatModel() — STRIDE threat model

Operations

  • omega.security.incidents() — Incident timeline
  • omega.security.costs() — Cost attribution
  • omega.security.playbooks() — Response playbooks
  • omega.security.contracts() — Behavior contracts
  • omega.security.sla() — Security SLAs
  • omega.security.chaos() — Chaos engineering
  • omega.security.simulate() — Threat simulation
  • omega.security.tenantRisk() — Tenant risk scoring

Compliance & Reporting

  • omega.security.regulatory() — Regulatory tracker
  • omega.security.maturity() — Maturity model
  • omega.security.sbom() — AI SBOM
  • omega.security.pentest() — Pen test report
  • omega.security.executiveBrief() — Executive brief
  • omega.security.benchmark() — Industry benchmark
  • omega.security.drift() — Safety drift detection

Webhooks & CI/CD

  • omega.security.registerWebhook() — Register webhook
  • omega.security.listWebhooks() — List webhooks
  • omega.security.ciGate() — CI/CD security gate

Configuration

const omega = new OmegaClient({
  baseUrl: "https://api.omegaengine.ai",
  apiKey: "omega_your_api_key",
  retry: {
    maxRetries: 3,
    baseDelay: 500,
    maxDelay: 5000,
  },
});

License

Apache-2.0 — © OmegaEngine Inc.