Skip to content
mercury framework
GitHub

ChannelHostReads

ChannelHostReads = object

Defined in: types/channel-types/index.ts:341

Read-only introspection getters the core injects for a channel that exposes an API/UI (the HTTP surface today). Every getter reads state that already exists in-process — nothing computes anything new — so these can’t come from env. Returns are unknown/primitive by design, to keep this contract free of any domain types. Tokens are never exposed.

Every getter but health takes the caller’s Principal and returns only what belongs to that person (the common wiki area included) and what they’re offered (the manifest); the channel authenticates, the core decides what the person can see. For someone the core doesn’t admit, a getter answers null.

conversation: (principal, sessionKey, limit, offset?) => Promise<unknown>

Defined in: types/channel-types/index.ts:345

A conversation’s durable verbatim transcript, chronological, paginated; empty unless sessionKey is one of the person’s own.

Principal

string

number

string

Promise<unknown>


conversations: (principal, limit) => Promise<unknown>

Defined in: types/channel-types/index.ts:347

The person’s conversations, most-recently-active first.

Principal

number

Promise<unknown>


health: () => Promise<unknown>

Defined in: types/channel-types/index.ts:355

Promise<unknown>


manifest: (principal) => Promise<unknown>

Defined in: types/channel-types/index.ts:342

Principal

Promise<unknown>


optional me?: (principal) => Promise<unknown>

Defined in: types/channel-types/index.ts:357

Who the caller is to the core: { name, language, timeZone }, how they asked to be called, the language and the time zone they saved, null for what they never said (timeZone absent on an older core). Absent on an older core.

Principal

Promise<unknown>


memoryScroll: (principal, collection, limit, offset?) => Promise<unknown>

Defined in: types/channel-types/index.ts:353

A page of the person’s points in collection, or null when it isn’t a collection kept per person.

Principal

string

number

string

Promise<unknown>


pendingConfirmations: (principal) => Promise<unknown>

Defined in: types/channel-types/index.ts:343

Principal

Promise<unknown>


toolLog: (principal) => Promise<unknown>

Defined in: types/channel-types/index.ts:354

Principal

Promise<unknown>


wikiGrep: (principal, pattern) => Promise<unknown>

Defined in: types/channel-types/index.ts:351

Principal

string

Promise<unknown>


wikiList: (principal) => Promise<unknown>

Defined in: types/channel-types/index.ts:348

Principal

Promise<unknown>


wikiRead: (principal, path) => Promise<unknown>

Defined in: types/channel-types/index.ts:350

The file at path as the person names it (curated/..., personal/...), or null when it isn’t among what they can see.

Principal

string

Promise<unknown>