Use cases and boundaries
The parser extracts goals, constraints and missing information. A host can hold a workflow when a constraint is unclear and retain the result as an input to a later decision. A selected model executor is supplied by the caller. The structured output alone does not perform the requested action.
Getting started and compatibility
Install the released package
npm install @devcodex/intent-runtime@3.0.0 schema-dsl@3.0.4
Use Node.js 20+ and ESM. Version 3.0.0 requires the exact schema-dsl@3.0.4 peer. If the same installation already uses Schema DSL 3.0.5, use a separate project for this example. Run the fragment with a model executor configured by the host. v3.0.0 model executor setup
import { Intent } from '@devcodex/intent-runtime';
// executor is the model executor configured by the host.
const intent = new Intent({ language: 'en', executor });
try {
const result = await intent.parse({ input: 'Find invoice 42. Do not send it.' });
const { constraints: rootConstraints, intents } = result.effective;
console.dir({ rootConstraints, intents, issues: result.issues }, { depth: null });
} finally { await intent.dispose(); }
Check for the lookup goal and inspect the constraint kind and scope at both the root and the intent nodes. For this request, the host must preserve the prohibition against sending the invoice wherever the parser records it. Model wording can vary. The host checks ambiguity and business rules and makes a separate authorization decision before dispatch.