forked from admin/VolcanicAgenticCore
Spec: a skipped one-off fires after the next start; the late note's placement and no-exit-code failure wording are pinned down; IsDeliverable is part of the watcher invariant and must not create a session; saves snapshot inside a serialising gate.
21 lines
1.2 KiB
C#
21 lines
1.2 KiB
C#
namespace Volcanic.AgenticCore.Extensions.Scheduler;
|
|
|
|
/// <summary>What the host does for the scheduler. Passed to <see cref="JobScheduler.StartAsync"/>, not the constructor, to break the host's DI cycle.</summary>
|
|
public interface IJobDelivery
|
|
{
|
|
/// <summary>Send Markdown to the target's chat, in order with that chat's rendered output.</summary>
|
|
Task SendTextAsync(string target, string markdown, CancellationToken cancellationToken);
|
|
|
|
/// <summary>Run a prompt in the target's session (follow-up when busy); completes when the run that consumed it settles.</summary>
|
|
Task RunPromptAsync(string target, string prompt, CancellationToken cancellationToken);
|
|
|
|
/// <summary>Working directory for the target's scripts. A path computation: must not create or wake a session.</summary>
|
|
string WorkspaceFor(string target);
|
|
|
|
/// <summary>False when the target may no longer be served (e.g. removed from the allow-list): the job is skipped, not deleted. Must not create or wake a session.</summary>
|
|
bool IsDeliverable(string target);
|
|
|
|
/// <summary>The target's current zone (the chat's, else the host default). Read on every computation, never cached. Must not create or wake a session.</summary>
|
|
TimeZoneInfo TimeZoneFor(string target);
|
|
}
|