Files
archie/internal/domain/workflow/task/caller.go
T
sam 3c338a9722 refactor: strip doc and issue narration from code comments
Remove PRD/doc paths, bead IDs, phase notes and deleted-test references
from comments; drop test-only hooks left by the test deletion. Includes
in-progress archied bootstrap, gateway and query changes.
2026-10-03 21:47:46 +10:00

23 lines
1.2 KiB
Go

package task
import "context"
// Caller is what a workflow.call step uses to start a callee run and read it
// back while waiting. It is the consumer-owned contract the workflow engine
// holds (the same shape as Store), satisfied by *staterpc.Client for an
// agent-container run: the callee is a first-class task the State Store
// derives from the caller's row.
type Caller interface {
// StartCall enqueues the callee task for callerTaskID's workflow.call
// step: org, workspace, identity, owner, repo and issue number are
// derived from the caller's row, the callee carries the call's inputs,
// and the callee's depth is the caller's + 1. The store refuses a
// caller that is not running and a call past the depth limit.
StartCall(ctx context.Context, callerTaskID int64, workflow string, inputs map[string]any) (*Task, error)
// CallStatus reads one call's callee: its status, latest transition detail
// and written outputs. A store only answers for a task whose
// call_parent_task_id is callerTaskID, so a caller reads only its own
// callees.
CallStatus(ctx context.Context, callerTaskID, callTaskID int64) (status, detail string, outputs map[string]any, err error)
}