fix(schedule): reconcile latest master contracts

This commit is contained in:
Tianyi Cui
2026-08-08 22:39:07 +08:00
parent 31e83f8ee7
commit 1f88085b53
35 changed files with 260 additions and 141 deletions

View File

@@ -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':

View File

@@ -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 () => {

View File

@@ -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. */