Skip to main content

Class: WikiCompiler

Defined in: packages/agentos/src/cognition/substrate/memory/wiki/WikiCompiler.ts:93

Constructors​

Constructor​

new WikiCompiler(opts): WikiCompiler

Defined in: packages/agentos/src/cognition/substrate/memory/wiki/WikiCompiler.ts:94

Parameters​

opts​

WikiCompilerOptions

Returns​

WikiCompiler

Methods​

compile()​

compile(input): Promise<WikiCompileResult>

Defined in: packages/agentos/src/cognition/substrate/memory/wiki/WikiCompiler.ts:110

Fold traces into the pages the cluster step assigns them to. An assignment whose page id the wiki refuses (see isWikiPageId) is not read, merged or written: it is reported in conflicts, with the reason as its note, and the other assignments go on. An assignment whose page the file system refuses for its path, such as a name too long or a file where a folder must be, is reported there too: writing it would fail the same way on every compile. Its traces are not counted as consumed. Any other failed write, such as a full disk or a missing permission, rejects the compile, so a caller that keeps a watermark compiles the same traces again.

The pages are read and written through input.store, the store of the scope the traces are of, else through the store the compiler was built with.

Parameters​

input​
reason​

"explicit" | "consolidation" | "session-end"

store?​

WikiCompilerStorePort

traces​

TraceLike[]

Returns​

Promise<WikiCompileResult>

Throws​

TypeError when neither the input nor the compiler's options name a page store.