Documentation
¶
Overview ¶
Package scheduling implements the 6 MCP scheduling tools that codex uses to schedule, list, update, cancel, pause, and resume tasks. The tools forward every call to a Transport (production: loopback HTTP to the app-gateway; tests: transportFunc stub).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSchedulingTools ¶
func NewSchedulingTools(transport ScheduleTransport) []tools.Tool
NewSchedulingTools returns the 6 nanoclaw-aligned scheduling tools. transport may be nil if only metadata (Name/Description/InputSchema) is needed.
Types ¶
type LoopbackTransport ¶
type LoopbackTransport struct {
// contains filtered or unexported fields
}
LoopbackTransport implements ScheduleTransport by POSTing to the app-gateway loopback endpoint at http://127.0.0.1:<port>/internal/scheduled-tasks/<action>. All 6 actions are sent as POST (the proxy translates list → GET upstream).
func NewLoopbackTransport ¶
func NewLoopbackTransport(base, token string) *LoopbackTransport
NewLoopbackTransport returns a ScheduleTransport that forwards to the app-gateway loopback. base should be the full prefix including the "/internal/scheduled-tasks" path segment (no trailing slash).
func (*LoopbackTransport) Call ¶
func (t *LoopbackTransport) Call(ctx context.Context, action string, body any) (json.RawMessage, error)
Call POSTs body as JSON to baseURL/<action> with X-Loopback-Token set.
type ScheduleTransport ¶
type ScheduleTransport interface {
Call(ctx context.Context, action string, body any) (json.RawMessage, error)
}
ScheduleTransport is the abstraction the scheduling tools use to forward calls to the app-gateway loopback. In production it is a LoopbackTransport (HTTP POST to /internal/scheduled-tasks/<action>). In tests it can be any function via transportFunc.