ai-core
@alneas/ai-core
Section titled “@alneas/ai-core”Framework-independent actions, proposal review, generative UI data specifications, AI chat streaming and agent-output parsing. MIT licensed. No React, data-engine, DB, storage or task-graph dependency. The only runtime dependencies are Ajv and its format/localization helpers. This package in the ALNEAS public monorepo is canonical.
npm install @alneas/ai-coreimport { ActionRegistry, defineActionTool, createActionToolBridge } from '@alneas/ai-core/action';const registry = new ActionRegistry();const search = defineActionTool<{ query: string }, { query: string }>({ id: 'records.search', name: 'search_records', description: 'Search permitted records', inputSchema: { type: 'object', properties: { query: { type: 'string', minLength: 1 } }, required: ['query'], additionalProperties: false, }, parseInput: input => typeof input.query === 'string' ? { ok: true, data: { query: input.query } } : { ok: false, error: 'Invalid query' }, handler: input => ({ query: input.query }), mapOutput: value => value,});registry.registerAction(search.action);const bridge = createActionToolBridge(registry, { tools: [search.tool] });const result = await bridge.execute({ callId: 'call-1', name: 'search_records', arguments: { query: 'hello' } });Use /action, /proposal, /generative-ui, /ai-chat, /agent-output or
/validation. The root aggregates these modules. Explicit per-file module exports
support compatibility paths; internal/ modules are not public entry points.
Node >=24, browser/edge hosts with required Web APIs, ESM/CJS and NodeNext types
are supported by the verification matrix. Runtime Ajv compilation requires a host
that permits generated functions; restricted CSP/edge environments need validation
integration designed for their host. No AI service credentials or SDK are bundled.
Read Usage, JSON Schema and constraints before integrating.
Source JSDoc is the API reference. React bindings live in @alneas/react-ai;
graph-aware dispatch and persistence composition remain in @alneas/data-engine.
The engine’s existing AI subpaths re-export these exact implementations.
See CONTRIBUTING.md, RELEASING.md and
ALNEAS Docs.
Consumer AI guidance ships in dist/ai/SKILL.md and package-context.json. Preview the package-scoped additions to your project instructions with the following command. Add --write after reviewing the preview; existing instructions are preserved.
node node_modules/@alneas/ai-core/dist/ai/setup.mjs --project .