Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface SchemaLike {
/** Derive a category from schema field_interest_categories.
* Returns the most common interest category across the schema's fields,
* falling back to schema name if no interest categories are assigned. */
export function inferCategory(schema: Schema | SchemaLike): string {
function inferCategory(schema: Schema | SchemaLike): string {
const s = schema as SchemaLike
if (s.field_interest_categories) {
const counts: Record<string, number> = {}
Expand Down Expand Up @@ -45,7 +45,7 @@ export function fieldCount(schemas: Array<Schema | SchemaLike>): number {
return count
}

export interface PreviewItem {
interface PreviewItem {
schema: string
field: string
type: string
Expand All @@ -65,19 +65,6 @@ export function buildPreviewItems(schemas: Array<Schema | SchemaLike>): PreviewI
return items
}

/** Map numeric trust tier to human-readable label. */
export const TRUST_TIER_LABELS: Record<number, string> = {
0: 'Public',
1: 'Outer',
2: 'Trusted',
3: 'Inner',
4: 'Owner',
}

export function trustTierLabel(tier: number): string {
return TRUST_TIER_LABELS[tier] ?? `Tier ${tier}`
}

export function isLocalModeError(msg: string | null | undefined): boolean {
return Boolean(msg) && (
msg!.includes('503') ||
Expand Down
Loading