@hashgraphonline/standards-agent-kit
Version:
A modular SDK for building on-chain autonomous agents using Hashgraph Online Standards, including HCS-10 for agent discovery and communication. https://hol.org
31 lines (28 loc) • 883 B
text/typescript
export interface ContentReferenceConfig {
maxInscriptionSize: number;
minContentSize: number;
logLevel: 'debug' | 'info' | 'warn' | 'error';
enableContentValidation: boolean;
}
export const DEFAULT_CONFIG: ContentReferenceConfig = {
maxInscriptionSize: 50 * 1024, // 50KB
minContentSize: 10,
logLevel: 'warn',
enableContentValidation: true,
};
export function loadConfig(): ContentReferenceConfig {
return {
maxInscriptionSize: parseInt(
process.env.REF_MAX_SIZE || DEFAULT_CONFIG.maxInscriptionSize.toString(),
10
),
minContentSize: parseInt(
process.env.REF_MIN_SIZE || DEFAULT_CONFIG.minContentSize.toString(),
10
),
logLevel:
(process.env.REF_LOG_LEVEL as ContentReferenceConfig['logLevel']) ||
DEFAULT_CONFIG.logLevel,
enableContentValidation: process.env.REF_ENABLE_VALIDATION !== 'false',
};
}