Quick Start
Install
npm install @gratiaos/gratia
Read a verb
import vocabulary from '@gratiaos/gratia/vocabulary.json';
const breathe = vocabulary.verbs.find((v) => v.id === 'breathe');
console.log(breathe.description);
// → "Return to the body through conscious breathing. Reduces cognitive load and brings attention back to the present."
Implement an adapter
import type { ExecuteVerbInput } from '@gratiaos/gratia/adapters/types';
async function executeVerb(input: ExecuteVerbInput) {
const verb = vocabulary.verbs.find((v) => v.id === input.verbId);
if (!verb) throw new Error(`Unknown verb: ${input.verbId}`);
for (const effect of verb.effects) {
console.log(`[${effect.type}] ${effect.target} → ${effect.direction || effect.to}`);
}
return { ok: true, effects: verb.effects };
}
Install a domain pack
npm install @gratiaos/pack-product
import manifest from '@gratiaos/pack-product/gratia.manifest.json';
console.log(manifest.title); // → "Product Domain Pack"