@traits-dev/core
v0.7.4
Published
Core traits.dev SDK for voice profile validation, behavioral policy compilation, and evaluation.
Maintainers
Readme
@traits-dev/core
Core SDK for traits.dev voice profiles and behavioral policies: validate, compile, inject, and evaluate.
Install
pnpm add @traits-dev/coreBasic Usage
import { compileProfile, validateProfile } from "@traits-dev/core";
const profilePath = "profiles/resolve.yaml";
const validation = validateProfile(profilePath);
if (validation.exitCode !== 0) throw new Error("Invalid profile");
const compiled = compileProfile(profilePath, {
model: "gpt-4o",
bundledProfilesDir: "profiles",
knowledgeBaseDir: "knowledge-base"
});
console.log(compiled.text);Public API is exported from @traits-dev/core. Monorepo/internal helpers are exported from @traits-dev/core/internal.
