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

@ai-operations/spark-engine

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ai-operations/spark-engine

SPARK engine — Self-Perpetuating Adaptive Reasoning Kernel with predict/learn feedback loop, awareness, and conversational reasoning

latest
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@ai-operations/spark-engine

Self-Perpetuating Adaptive Reasoning Kernel — A closed feedback loop that makes CORD safety scoring learn from outcomes.

The Spark

Most AI safety systems use static rules. SPARK closes the loop: Predict → Act → Measure → Learn.

Step arrives → Predictor predicts outcome → CORD scores (with learned weights)
                                                ↓
                                          Step executes
                                                ↓
           LearningCore compares ← OutcomeTracker measures
                    ↓
          WeightManager updates (bounded by SENTINEL)

Core Modules

Predictor

Before each step, predicts the CORD score, expected outcome, and confidence.

import { Predictor } from '@ai-operations/spark-engine';

const predictor = new Predictor(sparkStore);
const prediction = predictor.predict(stepId, runId, 'gmail', 'send');
// { predictedScore: 35, predictedOutcome: 'success', confidence: 0.72 }

OutcomeTracker

After execution, measures what actually happened.

import { OutcomeTracker } from '@ai-operations/spark-engine';

const tracker = new OutcomeTracker(sparkStore);
const outcome = tracker.measure(step, runId, wasApproved);
// { actualOutcome: 'failure', signals: { succeeded: false, hasError: true } }

LearningCore

Compares prediction to reality and adjusts weights.

import { LearningCore } from '@ai-operations/spark-engine';

const core = new LearningCore(sparkStore);
const episode = core.learn(prediction, outcome);
// { adjustmentDirection: 'increase', reason: 'CORD scored 15 but action failed' }

AdaptiveSafetyGate

Wraps CordSafetyGate with learned weight multipliers.

import { AdaptiveSafetyGate } from '@ai-operations/spark-engine';

const gate = new AdaptiveSafetyGate(cordGate, weightManager);
const result = gate.evaluateAction('gmail', 'send', input);
// score adjusted by learned weight, decision may change

Safety Bounds (SENTINEL)

  • All weights bounded ±30% of base (0.70–1.30)
  • Destructive and financial categories can NEVER decrease below 1.0
  • Minimum 3 episodes before any learning occurs
  • EMA smoothing (α=0.1) prevents oscillation

License

MIT

Keywords

ai

FAQs

Package last updated on 10 Mar 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