readonlytasks:AgentHarnessTaskPort
On the Agent Runtime
The runtime adapter builds the port fromhost, which carries the protected members of the Agent class.
queue()callsqueue(), for a task due at once.schedule()callsschedule(), for a task due after a delay.every()callsevery(), for a task that recurs at an interval.cancel()callscancelSchedule(), which removes a pending task.list()callslistSchedules(), which returns aTaskRecordfor every pending task.- With a stable
idin itsScheduleOptions, a call toqueue(),schedule()orevery()replaces the pending task with that id. deliverydeclares the scheduler’s own guarantee. A task survives crashes and restarts. It can be delivered more than once.- The harness’s task names begin with
__telnyx_agent_harness_and name no method of the class, so they reachonTask(). Its default does nothing and counts the task as delivered.
AgentHarnessTaskPort
Existing Agent task scheduler semantics. Stable ids are pending-task upserts only. This is deliberately not a run admission ledger: there are no run statuses, terminal records, or persistent idempotency history in this contract. Properties deliveryMethods cancel()readonlydelivery:"at-least-once"
cancel(Parametersid):Promise<boolean>
Returns
Promise<boolean>
every()
every(ParametersintervalSeconds,method,payload?,options?):Promise<string>
Returns
Promise<string>
list()
list():ReturnsPromise<TaskRecord[]>
Promise<TaskRecord[]>
queue()
queue(Parametersmethod,payload?,options?):Promise<string>
Returns
Promise<string>
schedule()
schedule(ParametersdelaySeconds,method,payload?,options?):Promise<string>
Returns
Promise<string>