Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

840 B
Raw Blame
// agent-sniper — structured logging.
//
// One JSON line per event so the worker's stdout drops straight into the
// existing Cloud Run / Vercel log search ([agent-sniper] prefix) without a
// parser. Secrets (keypairs, encrypted blobs) must NEVER be passed here.

function emit(level, msg, fields) {
	const line = { t: new Date().toISOString(), level, tag: 'agent-sniper', msg };
	if (fields && typeof fields === 'object') Object.assign(line, fields);
	const out = level === 'error' || level === 'warn' ? process.stderr : process.stdout;
	out.write(JSON.stringify(line) + '\n');
}

export const log = {
	info: (msg, fields) => emit('info', msg, fields),
	warn: (msg, fields) => emit('warn', msg, fields),
	error: (msg, fields) => emit('error', msg, fields),
	trade: (msg, fields) => emit('info', msg, { ...fields, event: 'trade' }),
};