Skip to content

Added helper for getting available tasks for agent#1953

Merged
jessevz merged 4 commits intodevfrom
get-best-task-helper
Mar 5, 2026
Merged

Added helper for getting available tasks for agent#1953
jessevz merged 4 commits intodevfrom
get-best-task-helper

Conversation

@jessevz
Copy link
Contributor

@jessevz jessevz commented Mar 4, 2026

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new APIv2 helper endpoint to retrieve the “best/available” tasks for a given agent, and wires it into the APIv2 router so it can be called via HTTP.

Changes:

  • Introduces GetBestTasksAgent helper endpoint (GET /api/v2/helper/getBestTasksAgent) that returns a JSON:API list of candidate tasks for an agent.
  • Registers the new helper in src/api/v2/index.php.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/inc/apiv2/helper/GetBestTasksAgent.php New helper implementation that looks up an agent by query param and returns tasks via TaskUtils::getBestTask($agent, true).
src/api/v2/index.php Adds import + registers the new helper route.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jessevz jessevz requested a review from s3inlc March 5, 2026 14:36
@jessevz jessevz merged commit 1be0103 into dev Mar 5, 2026
4 checks passed
@jessevz jessevz deleted the get-best-task-helper branch March 5, 2026 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants