Documentation
¶
Overview ¶
Package trackerwrite implements the tracker_write Eino tool.
The model-facing tool is a discriminated union over comment, transition, close, and link_pr operations. V0.1 always executes close through tracker.CloseWriter and executes transition and comment when the configured writer also satisfies tracker.TransitionWriter or tracker.CommentWriter. Unsupported operations, including link_pr, return a structured unsupported_op result so existing prompts receive an actionable response.
Writer error mapping is intentionally coarse: only context deadline and cancellation map to the timeout/canceled categories; every other writer error (including a permanently invalid transition target state) surfaces as the retryable unknown category. Writers are therefore responsible for not returning permanent failures in a way the agent loop will retry indefinitely; richer category mapping remains a future tracker API design.
Index ¶
Constants ¶
const ( ErrCategoryUnsupportedOp = "unsupported_op" ErrCategoryValidation = "validation" ErrCategoryNotFound = "not_found" ErrCategoryAuthFailed = "auth_failed" ErrCategoryConflict = "conflict" ErrCategoryAPIRequest = "api_request" ErrCategoryAPIStatus = "api_status" ErrCategoryRateLimited = "rate_limited" ErrCategoryTimeout = "timeout" ErrCategoryUnsupported = "unsupported" ErrCategoryUnknown = "unknown" ErrCategoryCanceled = "canceled" )
const Name = "tracker_write"
Name is the tool's registered name.
Variables ¶
This section is empty.
Functions ¶
func Schema ¶
func Schema() json.RawMessage
Schema returns a fresh JSON Schema copy for tracker_write arguments.
Types ¶
type Args ¶
type Args struct {
Op Op `json:"op"`
ID string `json:"id"`
Body string `json:"body,omitempty"`
ToState string `json:"toState,omitempty"`
Reason string `json:"reason,omitempty"`
PRURL string `json:"prURL,omitempty"`
}
Args is the parsed tracker_write input shape.
type Result ¶
type Result struct {
Outcome result.Outcome `json:"outcome"`
Op Op `json:"op,omitempty"`
ID string `json:"id,omitempty"`
Error *ResultError `json:"error,omitempty"`
RawJSON json.RawMessage `json:"-"`
}
Result is the structured envelope returned to the model.
func (Result) IsRetryable ¶
IsRetryable reports whether the agent loop should retry the same call.
func (*Result) UnmarshalJSON ¶
UnmarshalJSON decodes Result and preserves the original object in RawJSON.
type ResultError ¶
type ResultError struct {
Category string `json:"category"`
Message string `json:"message"`
Op string `json:"op,omitempty"`
}
ResultError is the structured failure envelope nested inside Result.