Documentation
¶
Overview ¶
Package tasks provides Google Tasks API tools for agents. It enables list, create, update, and delete operations using the Tasks API with the shared Google OAuth token (Calendar, Contacts, Drive, Gmail). One sign-in can power all Google tools.
Available tools (prefixed with google_tasks_ when registered):
- google_tasks_list_task_lists — list the user's task lists
- google_tasks_list_tasks — list tasks in a task list
- google_tasks_create_task — create a task in a task list
- google_tasks_update_task — update a task (title, notes, completed)
- google_tasks_delete_task — delete a task
Authentication: Same as other pkg/tools/google packages — TokenFile, Token/Password, or device keyring; CredentialsFile for OAuth client config.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Service ¶
type Service interface {
ListTaskLists(ctx context.Context, maxResults int) ([]*TaskListSummary, error)
ListTasks(ctx context.Context, taskListID string, showCompleted bool, maxResults int) ([]*TaskSummary, error)
CreateTask(ctx context.Context, taskListID, title, notes, due string) (*TaskDetail, error)
UpdateTask(ctx context.Context, taskListID, taskID, title, notes string, completed bool) error
DeleteTask(ctx context.Context, taskListID, taskID string) error
Validate(ctx context.Context) error
}
Service provides Google Tasks operations for tools.
func NewFromSecretProvider ¶
NewFromSecretProvider creates a Tasks Service using the shared Google OAuth token (TokenFile, Token/Password, or device keyring). One sign-in can power Calendar, Contacts, Drive, Gmail, and Tasks.
type TaskDetail ¶
type TaskDetail struct {
ID string `json:"id"`
Title string `json:"title"`
Notes string `json:"notes,omitempty"`
Status string `json:"status"`
Due string `json:"due,omitempty"`
Updated string `json:"updated,omitempty"`
Completed string `json:"completed,omitempty"`
}
TaskDetail is a full task for create/update responses.
type TaskListSummary ¶
TaskListSummary is a task list entry for list results.
type TaskSummary ¶
type TaskSummary struct {
ID string `json:"id"`
Title string `json:"title"`
Notes string `json:"notes,omitempty"`
Status string `json:"status"` // "needsAction" or "completed"
Due string `json:"due,omitempty"`
Updated string `json:"updated,omitempty"`
Position string `json:"position,omitempty"`
Parent string `json:"parent,omitempty"`
Completed string `json:"completed,omitempty"`
}
TaskSummary is a task entry for list results.
type ToolProvider ¶
type ToolProvider struct {
// contains filtered or unexported fields
}
ToolProvider wraps a Tasks Service and satisfies the tools.ToolProviders interface so Tasks tools can be passed to tools.NewRegistry. Tools are prefixed with the given name (e.g. google_tasks).
func NewToolProvider ¶
func NewToolProvider(svc Service) *ToolProvider
NewToolProvider creates a ToolProvider from an initialized Tasks service.