@gtcx/ai
v0.2.2
Published
Observability stubs and tracing hooks for AI-native operations.
Readme
@gtcx/ai
Observability stubs and tracing hooks for AI-native operations.
Stub package.
traced()andwithTrace()are no-ops in this package. The full tracing implementation lives ingtcx-intelligenceand is injected at runtime via the optional peer dependency pattern described in ADR-008. Downstream packages (@gtcx/crypto,@gtcx/verification) gracefully degrade when the full implementation is unavailable.
Installation
pnpm add @gtcx/aiQuick Start
import { traced, createCategoryLogger } from '@gtcx/ai';
const classify = traced('classify', async (data) => {
return { category: 'gold', confidence: 0.97 };
});
const logger = createCategoryLogger('ai.classification');
logger.info('Done', { confidence: 0.97 });API
| Export | Description |
| -------------------------------- | -------------------------- |
| traced(name, fn) | Wrap function with tracing |
| withTrace(name, fn) | Create traced version |
| createCategoryLogger(category) | Scoped logger |
No runtime dependencies.
Related
License
MIT
