Skip to main content

Class: MockMeetingBotProvider

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:38

A provider for tests: it records dispatches and commands, and its reports are driven by the test through mockEventContext.

Implements​

Constructors​

Constructor​

new MockMeetingBotProvider(): MockMeetingBotProvider

Returns​

MockMeetingBotProvider

Properties​

alive​

alive: Map<string, number>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:58

What usage() answers; tests set it.


beforeDispatch​

beforeDispatch: (input) => Promise<void> | undefined

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:66

Runs inside dispatch, before it records anything: a test puts a race here (a cancel while the dispatch is in flight).


capabilities​

readonly capabilities: MeetingBotCapabilities

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:41

What the provider declares about itself; the notice and the stop path follow from it.

Implementation of​

IMeetingBotProvider.capabilities


commandError​

commandError: Error | undefined

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:64

When set, command() records the command and then rejects with it.


commands​

readonly commands: Map<string, ProviderCommand[]>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:54

Each run's commands, in the order they were sent.


deleted​

readonly deleted: string[] = []

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:56

The run ids deleteRun was called with, in order.


dispatched​

readonly dispatched: Map<string, DispatchInput>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:52

Each run's dispatch input, by run id.


dispatchError​

dispatchError: Error | undefined

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:60

When set, dispatch rejects with it (a worker with no slot).


name​

readonly name: "mock" = 'mock'

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:39

The name the manager registers the provider under; runs and reports carry it.

Implementation of​

IMeetingBotProvider.name


platforms​

readonly platforms: readonly MeetingPlatform[]

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:40

The platforms the provider joins.

Implementation of​

IMeetingBotProvider.platforms


usageError​

usageError: Error | undefined

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:62

When set, usage() rejects with it: a scheduler that cannot be reached.

Methods​

checkJoinUrl()​

checkJoinUrl(url): { ok: true; platform: MeetingPlatform; } | { message: string; ok: false; }

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:93

Tells a join url's platform, or why it is refused.

Parameters​

url​

string

Returns​

{ ok: true; platform: MeetingPlatform; } | { message: string; ok: false; }

Implementation of​

IMeetingBotProvider.checkJoinUrl


command()​

command(runId, command): Promise<void>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:107

Sends a command to the run's bot. A provider passes on no audio of a run before the run's first startCapture, and none after a suspendCapture until the next startCapture: the manager sends startCapture only once the run's notice is confirmed posted and its stop monitor is healthy.

Parameters​

runId​

string

command​

ProviderCommand

Returns​

Promise<void>

Implementation of​

IMeetingBotProvider.command


deleteRun()​

deleteRun(input): Promise<{ deleted: boolean; }>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:114

Deletes a provider's own copies of a run. Ours keep none; the method stands so a purge always has an answer.

Parameters​

input​
runId​

string

Returns​

Promise<{ deleted: boolean; }>

Implementation of​

IMeetingBotProvider.deleteRun


dispatch()​

dispatch(input): Promise<DispatchResult>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:99

Hands the run to a worker with the room and the tokens minted for it; rejects when the run cannot start.

Parameters​

input​

DispatchInput

Returns​

Promise<DispatchResult>

Implementation of​

IMeetingBotProvider.dispatch


parseEvent()​

parseEvent(ctx): ProviderParseResult

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:77

Turns a verified report into the channel's events, each with a stable id; throws on a report it cannot read. When the report was verified against a run, its caller applies only the events that name that run: a worker's per-run token speaks for its own run alone.

Parameters​

ctx​

ProviderEventContext

Returns​

ProviderParseResult

Implementation of​

IMeetingBotProvider.parseEvent


tokenOf()​

tokenOf(runId): string

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:126

The token a run was dispatched with, for a test that drives its reports.

Parameters​

runId​

string

Returns​

string


usage()​

usage(input): Promise<ProviderUsage[]>

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:119

Each run asked for (every run the provider knows when runIds is absent), alive or not, with the seconds it has counted.

Parameters​

input​
runIds?​

string[]

Returns​

Promise<ProviderUsage[]>

Implementation of​

IMeetingBotProvider.usage


verifyEvent()​

verifyEvent(ctx, run): ProviderVerificationResult

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:68

The provider's own authentication of a report: a platform's signature scheme, or the worker's per-run token against the run's dispatch record.

Parameters​

ctx​

ProviderEventContext

run​

MeetingRunRecord | undefined

Returns​

ProviderVerificationResult

Implementation of​

IMeetingBotProvider.verifyEvent


hash()​

static hash(token): string

Defined in: packages/agentos/src/io/channels/meetings/providers/mock.ts:133

For a test that wants the hash a run store would hold.

Parameters​

token​

string

Returns​

string