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

@ai-operations/ops-core

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/ops-core

Pipeline engine for AI Operations OS — intent classification, state machine, LLM integration, structured logging

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

@ai-operations/ops-core

Workflow engine, state machine, and intent classification for AI Operations OS.

Part of AI Operations OS — autonomous business workflow orchestration with safety enforcement.

Install

npm install @ai-operations/ops-core

Quick Start

import { WorkflowEngine, IntentClassifier } from '@ai-operations/ops-core';

const classifier = new IntentClassifier();
const intent = classifier.classify('Please reply to John about the meeting');
// => 'reply'

const engine = new WorkflowEngine(connectorRegistry, safetyGate);
for await (const event of engine.execute(workflowRun)) {
  console.log(event.type, event);
}

API

WorkflowEngine

Sequential step executor with safety gates. Drives a WorkflowRun through its steps, yielding typed events via an AsyncGenerator.

constructor(connectors: ConnectorRegistry, safetyGate: SafetyGate)
async *execute(run: WorkflowRun): AsyncGenerator<WorkflowEvent>
pause(): void
resume(): void

Event types: step_start | step_complete | step_blocked | step_failed | run_complete | run_failed

StateMachine

Enforces valid workflow step state transitions with O(1) lookup.

const sm = new StateMachine();
sm.transition('pending', 'start');           // => 'running'
sm.canTransition('running', 'complete');     // => true
sm.validEvents('blocked');                   // => ['approve']

Step events: start | complete | fail | block | approve | pause | resume

IntentClassifier

Keyword-based heuristic intent classification. Fast, deterministic first pass.

const classifier = new IntentClassifier();
const result = classifier.classifyDetailed('Please reply to John');
// => { intent: 'reply', confidence: 'low', matchedKeywords: ['reply'] }

LLMIntentClassifier

LLM-backed classification with heuristic fallback. Supports Anthropic, OpenAI, and Ollama providers via environment variables.

const llm = new LLMIntentClassifier();
const intent = await llm.classify('Can you handle the refund for order #123?');
// => 'refund' (via LLM when heuristic confidence is low)

Environment variables: OPS_LLM_PROVIDER, ANTHROPIC_API_KEY, OPENAI_API_KEY, OLLAMA_URL

TaskStore

In-memory + JSON file task persistence with filtering.

Interfaces

  • Connector{ name: string; execute(operation, input): Promise<Record<string, unknown>> }
  • ConnectorRegistry{ get(name): Connector | undefined }
  • SafetyGate(step, run) => Promise<SafetyGateResult>
  • SafetyGateResult{ decision: CordDecision; score: number; reason: string }

License

MIT

Keywords

ai-ops

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