Skip to main content

CommunityBuilderDeps

@forge/monorepo


@forge/monorepo / backend/src / CommunityBuilderDeps

Type Alias: CommunityBuilderDeps

CommunityBuilderDeps = object

Defined in: backend/src/knowledge/communities.ts:310

Properties

clock?

readonly optional clock?: () => string

Defined in: backend/src/knowledge/communities.ts:331

Returns

string


knowledge?

readonly optional knowledge?: KnowledgeStore

Defined in: backend/src/knowledge/communities.ts:314


levels?

readonly optional levels?: number

Defined in: backend/src/knowledge/communities.ts:315


log?

readonly optional log?: (message, detail?) => void

Defined in: backend/src/knowledge/communities.ts:332

Parameters

message

string

detail?

Readonly<Record<string, unknown>>

Returns

void


maxExcerpts?

readonly optional maxExcerpts?: number

Defined in: backend/src/knowledge/communities.ts:317

Chunk excerpts handed to the summariser per community. A ceiling, because a community can span hundreds.


store

readonly store: GraphStore

Defined in: backend/src/knowledge/communities.ts:311


summariseLevels?

readonly optional summariseLevels?: readonly number[]

Defined in: backend/src/knowledge/communities.ts:330

Which levels to summarise. Absent means all of them.

Worth setting, because summarising a level nobody queries is pure cost. graph-global reads one level per query — the coarsest by default — and a two-level hierarchy over a real corpus has far more fine-grained communities than coarse ones. Summarising every level can therefore multiply the bill several times over for content no query will ever reduce across.

Not defaulted to the coarsest, deliberately: a deployment that lets callers ask at a finer granularity needs those summaries, and silently not writing them would make graph-global at that level return nothing with no explanation. The cost is real either way; this makes it a decision.


summariser?

readonly optional summariser?: CommunitySummariser

Defined in: backend/src/knowledge/communities.ts:313

Absent means cluster but do not summarise. Useful, and the honest default for a deployment without graph-global.