T-HUB/packages/safe-content/src/limits.ts
glass beadian aa5e262f3a Tactical Media Broadcast Hub — initial release
Self-hosted multi-platform broadcast newsroom for activist collectives:
publishing pipeline with group approval and DST-proof scheduling, TweetDeck-style
column wall with hostile-content-safe rendering, live control room with Auto
Director, bridged chat governance with polls and quorum, distributed sandboxed
transcode workers, encrypted content-addressed archive, monthly analytics.

MIT licensed. See README.md and docs/.
2026-10-10 11:56:42 +00:00

23 lines
672 B
TypeScript

export type SafeContentLimits = {
/** Max input characters considered; the rest is dropped and `truncated` set. */
readonly maxInputLength: number;
/** Max element nesting tracked by the HTML parser; deeper structure is flattened to text. */
readonly maxDepth: number;
/** Max AST nodes emitted per document. */
readonly maxNodes: number;
/** Max characters in any single URL. */
readonly maxUrlLength: number;
};
export const DEFAULT_LIMITS: SafeContentLimits = {
maxInputLength: 20_000,
maxDepth: 32,
maxNodes: 2_000,
maxUrlLength: 2_048,
};
export const LINK_PREVIEW_LIMITS = {
title: 300,
description: 1_000,
siteName: 100,
} as const;