Files
zeekay def63157ec update framework package: clean exports for schemas and tools
- Add index.js exporting getProfileSchema(), getPersonaSchemaYaml(), getToolPreferences()
- Update package.json: exports point to index.js and schemas/tools dirs
- Data now lives in @hanzo/personas; this package is framework-only
2026-02-17 18:25:01 -08:00

37 lines
891 B
JavaScript

import { readFileSync } from 'fs'
import { join, dirname } from 'path'
import { fileURLToPath } from 'url'
const __dirname = dirname(fileURLToPath(import.meta.url))
/**
* Load the JSON Schema for profile validation.
* @returns {object}
*/
export function getProfileSchema() {
return JSON.parse(
readFileSync(join(__dirname, 'schemas', 'personality.schema.json'), 'utf-8')
)
}
/**
* Load the YAML schema definition for PERSONA.md frontmatter.
* @returns {string}
*/
export function getPersonaSchemaYaml() {
return readFileSync(
join(__dirname, 'schemas', 'persona_schema.yaml'),
'utf-8'
)
}
/**
* Load the unix tool preferences definition.
* @returns {string}
*/
export function getToolPreferences() {
return readFileSync(join(__dirname, 'tools', 'unix_tools.yaml'), 'utf-8')
}
export default { getProfileSchema, getPersonaSchemaYaml, getToolPreferences }