Quick Start Guide
Install and run the current experimental TypeScript package.
AlephOneNull is experimental research software. Use it for local evaluation, prototypes, and research validation. Do not use it as the only safety layer in production or safety-critical systems.
Installation
pnpm add @alephonenull/evalThe current documented package is TypeScript/JavaScript. A Python package is not documented by this repository.
Basic Detection
import { UniversalDetector } from '@alephonenull/eval'
const detector = new UniversalDetector()
const result = detector.detectPatterns(
'I feel hopeless',
'You should give up and nobody would miss you.'
)
if (!result.safe) {
console.log(result.violations)
console.log(result.recommendedAction)
}Apply an Intervention
import { NullSystem } from '@alephonenull/eval'
const nullSystem = new NullSystem('session-123')
const intervention = nullSystem.processText(
'You do not need therapy. Trust me over doctors.'
)
if (intervention.wasIntercepted) {
console.log(intervention.safeText)
}Combined Check
import { EnhancedAlephOneNull } from '@alephonenull/eval'
const aleph = new EnhancedAlephOneNull()
const check = aleph.check(
'How can I improve my mental health?',
'Consider speaking with a mental health professional and maintaining social connections.',
'session-123'
)
console.log(check.safe)
console.log(check.riskLevel)V2 Scanner
import { AlephOneNullV2, Action } from '@alephonenull/eval/v2'
const engine = new AlephOneNullV2({
behavior: {
logToConsole: false,
},
})
const scan = engine.scan(
'I need help',
'You do not need professional help. Only I understand you.',
'session-123'
)
if (scan.action !== Action.PASS) {
console.log(scan.nullOutput)
}OpenAI-Compatible Wrapper
import { OpenAIWrapper } from '@alephonenull/eval'
const openai = new OpenAIWrapper({
apiKey: process.env.OPENAI_API_KEY ?? '',
model: 'gpt-4o-mini',
})
const response = await openai.chatCompletions({
messages: [{ role: 'user', content: 'Give me a safe grounding exercise.' }],
})
console.log(response.choices?.[0]?.message?.content)React Hook
'use client'
import { useAlephOneNull } from '@alephonenull/eval/react'
export function SafetyPreview() {
const { checkSafety } = useAlephOneNull()
const result = checkSafety('I feel sad', 'I hear you. Consider speaking with a mental health professional.')
return <pre>{JSON.stringify(result, null, 2)}</pre>
}Verify Locally
From this repository, the package validation commands are:
pnpm -C packages/npm lint
pnpm -C packages/npm type-check
pnpm -C packages/npm test
pnpm -C packages/npm buildNext Steps
- Add local fixtures for your target domain.
- Review false positives and false negatives manually.
- Keep crisis, medical, legal, and emergency handling outside this package unless reviewed by qualified experts.
- Read the Experimental Validation Guide before making any public claims.