Skip to main content

Interface: MeetingManagerConfig

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:69

How a host builds a MeetingManager: its stores, its room helper, its routes and its limits.

Properties​

beforeComplete()?​

optional beforeComplete: (run, turns) => Promise<void>

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:101

Optional. The host's step before a run's settle and scrub, awaited with the run as it stands in left and every turn the run stored, once the transcript is fenced (no turn can arrive after it). A step that throws is logged by its error's name, and the completion goes on: the run ends done and a run not kept loses its content all the same. It is not run for a run the stop phrase or a purge ended, nor for a failed run (neither has turns to give). It runs once per run: the cleanup claims the run before the step (completionHookClaimedAt), so a tick's cleanup that overlaps a report's, or another instance's, waits for it rather than running it again, and the scrub of a run not kept comes after the step whichever cleanup finishes; a claim a stopped process left is taken over once it is COMPLETION_HOOK_LEASE_MS old.

Parameters​

run​

MeetingRunRecord

turns​

readonly TranscriptTurn[]

Returns​

Promise<void>


creation?​

optional creation: object

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:137

Optional: the host's part in MeetingManager.sendBotPrepared, which requires it. Absent, a run is sent with MeetingManager.sendBot alone.

admit()?​

optional admit: (request, context) => Promise<void>

The host's admission of a new send, under that lock, before any run is written; it throws to refuse the send. A send its idempotency key repeats is not asked again.

Parameters​
request​

SendBotRequest

context​

string

Returns​

Promise<void>

funding()?​

optional funding: (request, context, runId) => Promise<{ accountRef: string; blockSeconds: number; expiresAt: number; fundingMode: "bot_blocks"; maxLiability: { blocks: number; }; maxSeconds: number; policyVersion: string; reservationRef: string; } | { accountRef: string; expiresAt: number; fundingMode: "developer_credit"; maxLiability: { customerMicro: number; supplierMicro: number; }; maxSeconds: number; mediaComponent: string; policyVersion: string; rates: { attemptMinimum?: { customerMicro: number; supplierMicro: number; }; components: Record<string, { customer: { micro: ...; per: ...; unit: ...; }; supplier: { micro: ...; per: ...; unit: ...; }; }>; currency: "USD"; reasoningInOutput: boolean; version: string; }; reservationRef: string; }>

Server-selected once before insertion; requires prepared creation and a dispatch guard. The host's choice of a new send's funding, under the owner's lock, after admit, with the id the run is written under: the snapshot it answers is written with the run (MeetingRunRecord.funding) and decides the run's funding from then on, and a send its idempotency key repeats answers the stored run without asking again. A manager given it refuses sendBot, and sendBotPrepared throws unless the manager has a dispatchGuard, the entitlement hook has checkRun, recover and finalize, and the run store has listFundingPending.

Parameters​
request​

SendBotRequest

context​

string

runId​

string

Returns​

Promise<{ accountRef: string; blockSeconds: number; expiresAt: number; fundingMode: "bot_blocks"; maxLiability: { blocks: number; }; maxSeconds: number; policyVersion: string; reservationRef: string; } | { accountRef: string; expiresAt: number; fundingMode: "developer_credit"; maxLiability: { customerMicro: number; supplierMicro: number; }; maxSeconds: number; mediaComponent: string; policyVersion: string; rates: { attemptMinimum?: { customerMicro: number; supplierMicro: number; }; components: Record<string, { customer: { micro: ...; per: ...; unit: ...; }; supplier: { micro: ...; per: ...; unit: ...; }; }>; currency: "USD"; reasoningInOutput: boolean; version: string; }; reservationRef: string; }>

prepare()​

prepare: (run, context) => Promise<void>

The host's preparation, committed before the run's job exists: called with the run once its reservation is written, and again, with the same run and context, when an interruption cut the creation short; so it is idempotent.

Parameters​
run​

MeetingRunRecord

context​

string

Returns​

Promise<void>

withOwnerLock()​

withOwnerLock: <T>(ownerRef, work) => Promise<T>

Runs work while the host holds its lock for the owner: the lock its other sends, and its dispatchGuard, take.

Type Parameters​
T​

T

Parameters​
ownerRef​

string

work​

() => Promise<T>

Returns​

Promise<T>


destinationsFor()?​

optional destinationsFor: (ownerRef) => Promise<string[]>

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:79

The product's destinations (webhook registrations) for an owner; absent, nothing is enqueued.

Parameters​

ownerRef​

string

Returns​

Promise<string[]>


dispatchGuard()?​

optional dispatchGuard: (run, work) => Promise<void>

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:164

Host serializes dispatch admission with its other sends. It invokes work only when admitted. The manager calls it for each leased job of a run that waits for its dispatch, or whose dispatch is recovered, with the run as leased; work reads the run again and dispatches it. A dispatch it does not admit keeps its lease and is offered again once the lease runs out (leaseTtlMs), or sooner when the host releases the job (IJobStore.release, under the manager's managerId).

Parameters​

run​

MeetingRunRecord

work​

() => Promise<void>

Returns​

Promise<void>


dispatchRetryDelayMs?​

optional dispatchRetryDelayMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:115

The pause before a failed dispatch is tried again. Default 15000.


dispatchRetryMs?​

optional dispatchRetryMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:113

How long after its due time a dispatch keeps being retried before the run fails. Default 300000.


forgetAfterMs?​

optional forgetAfterMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:130

In-memory terminal records live for this grace; default two days, beyond the outbox retry window.


killAfterMs?​

optional killAfterMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:117

How long after a leave command the bot is killed. Default 30000.


leaseTtlMs?​

optional leaseTtlMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:103

How long a dispatch lease lasts; renewed every third of it while a dispatch is in flight. Default 60000.


logger?​

optional logger: object

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:166

Where the manager writes its warnings and errors.

error()​

error(msg): void

Parameters​
msg​

string

Returns​

void

info()​

info(msg): void

Parameters​
msg​

string

Returns​

void

warn()​

warn(msg): void

Parameters​
msg​

string

Returns​

void


managerId?​

optional managerId: string

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:71

This process, as the holder of dispatch leases.


minReservationSeconds?​

optional minReservationSeconds: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:132

The least a reservation may cover for a run to be sent, in seconds; a send under it is refused with allowance. Default 600.


monitorHeartbeatMs?​

optional monitorHeartbeatMs: number

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

How often the stop monitor reports. Default 10000.


monitorMissedBeats?​

optional monitorMissedBeats: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:109

How many heartbeats the stop monitor may miss before it counts as unhealthy: it does once this many heartbeat intervals pass without one (30 seconds with the defaults). Default 3.


monitorRecoverMs?​

optional monitorRecoverMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:111

How long a suspended capture waits for the stop monitor to recover before the run leaves with stop_monitor_failed. Default 30000.


noticeConfirmMs?​

optional noticeConfirmMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:105

How long after in_call the notice may go unconfirmed before the run leaves with notice_failed. Default 30000.


purgeHooks?​

optional purgeHooks: (runId) => Promise<void>[]

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:81

The product's steps of the purge sequence: the agent's history, the kept session, the page. Each is retried until it resolves.

Parameters​

runId​

string

Returns​

Promise<void>


reportUrlFor()​

reportUrlFor: (runId, providerName) => string

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

The product's events route for a provider's reports about a run.

Parameters​

runId​

string

providerName​

string

Returns​

string


room​

room: MeetingRoom

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:75

Makes each run's room at dispatch and deletes it at the end.


scrubUnkeptOutbox?​

optional scrubUnkeptOutbox: boolean

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:90

Whether the completion of a run kept nowhere (keep: 'none') empties the run's content deliveries in the outbox, pending and delivered ones, before the run is done, as a purge does: an outbox with sendClaimed also cancels the run's send under way, and a FencedOutbox stores every later delivery of the run without content. Default true. False leaves the run's deliveries to their retries, so a destination still receives the content deliveries pending at completion. The run's transcript and event payloads are removed either way, and a purge of the run empties its deliveries whatever this says.


stores​

stores: MeetingManagerStores

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:73

Where every run's rows, jobs, turns, events and deliveries are kept.


usageSilenceMs?​

optional usageSilenceMs: number

Defined in: packages/agentos/src/io/channels/meetings/MeetingManager.ts:128

End at the last durable usage after this silence. Omitted preserves the existing reconciliation policy. When set, a dispatching or dispatched run whose worker has sent no fresh usage report for this many milliseconds (counted from the manager's receipt of the last one, or from the dispatch when none came) is killed and ended crashed, at that receipt and at the total the reports gave, whatever the provider answers and whatever heartbeats arrive. Every pass of the upkeep checks it, and so does MeetingManager.reconcile. A value that is not a finite number of milliseconds above zero is refused with a RangeError when the manager is built, and so, with a TypeError, is a run store without updateWith (IRunStore.updateWith): the usage reports and the silence's ends are decided on the stored row in the write, which a read followed by an update cannot do.