fix(schedule): reconcile latest master contracts
This commit is contained in:
@@ -328,7 +328,6 @@ export function scheduleReminderPresentation(
|
||||
scheduleId: change.schedule.id,
|
||||
prompt: change.schedule.prompt,
|
||||
occurrenceAt: change.schedule.scheduledAt,
|
||||
deliveryMode: 'session-local',
|
||||
})
|
||||
case 'delete':
|
||||
case 'dispatch':
|
||||
|
||||
@@ -38,13 +38,13 @@ export function apply(ctx: Context): void {
|
||||
let stopping = false
|
||||
|
||||
ctx.effect(() => {
|
||||
const stopCreated = ctx.on('agent/created', (agent) => {
|
||||
const stopCreated = ctx.on('agent/created', ({ agent }) => {
|
||||
if (stopping || owners.has(agent) || !ctx.agents.roots().includes(agent)) return
|
||||
const owner = new ScheduleOwner(ctx, agent)
|
||||
const cleanup: OwnerCleanup = agent.ctx.effect(() => {
|
||||
const disposeTools = registerScheduleTools(ctx, agent.ctx, agent, () => { owner.requestDrive() })
|
||||
const stopStatus = agent.ctx.on('agent/status', (subject, status) => {
|
||||
if (subject === agent && status === 'idle') owner.requestDrive()
|
||||
const stopStatus = agent.ctx.on('agent/status', ({ status }) => {
|
||||
if (status === 'idle') owner.requestDrive()
|
||||
})
|
||||
owner.start()
|
||||
return async () => {
|
||||
|
||||
@@ -72,8 +72,6 @@ export interface ScheduleReminderPresentation {
|
||||
readonly prompt: string
|
||||
/** Scheduled one-shot occurrence represented by the dispatch. */
|
||||
readonly occurrenceAt: string
|
||||
/** Fixed delivery boundary rendered by the client plugin. */
|
||||
readonly deliveryMode: ScheduleDeliveryMode
|
||||
}
|
||||
|
||||
/** Management operations whose persistence barrier may be uncertain. */
|
||||
|
||||
Reference in New Issue
Block a user