Skip to content

Add async runtime tool broker#2207

Merged
chubes4 merged 2 commits into
mainfrom
issue-2205-async-runtime-tool-broker
May 24, 2026
Merged

Add async runtime tool broker#2207
chubes4 merged 2 commits into
mainfrom
issue-2205-async-runtime-tool-broker

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented May 23, 2026

Summary

  • Adds an async runtime-tool broker path for client tools that cannot return inline: the run pauses, a pending runtime-tool job is persisted, and chat metadata exposes the pending request.
  • Adds Action Scheduler hooks for timeout and resume: submitted client results append a normal tool-result message, enqueue chat continuation, and complete the runtime-tool job.
  • Keeps inline callback fulfillment as the fast path while using Data Machine jobs for durable pending state.

Scope

This PR builds on #2206. The broker is intentionally chat-resume focused because chat sessions already own pending-tool continuation semantics; pipeline-specific pause/resume can be layered later if a pipeline transport needs client runtime tools.

Closes #2205.
Refs #1485.

Tests

  • php -l inc/Engine/AI/conversation-loop.php
  • php -l inc/Api/Chat/ChatOrchestrator.php
  • php -l tests/runtime-tool-async-broker-smoke.php
  • php tests/runtime-tool-async-broker-smoke.php
  • php tests/agent-conversation-runner-request-smoke.php
  • php tests/tool-source-registry-smoke.php
  • git diff --check origin/main...HEAD

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (GPT-5.5)
  • Used for: Implemented the async runtime tool broker path and smoke coverage; Chris remains responsible for review and merge.

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented May 23, 2026

Homeboy Results — data-machine

Lint

lint — passed

ℹ️ Full options: homeboy docs commands/lint
Deep dive: homeboy lint data-machine --changed-since 2043b33

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-lint-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-lint-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26338456476

Test

test — passed

  • 120 passed
  • 3 skipped

ℹ️ Auto-fix lint issues: homeboy refactor data-machine --from lint --write
ℹ️ Collect coverage: homeboy test data-machine --coverage
ℹ️ Save test baseline: homeboy test data-machine --baseline
ℹ️ Pass args to test runner: homeboy test -- [args]
ℹ️ Full options: homeboy docs commands/test
Deep dive: homeboy test data-machine --changed-since 2043b33

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-test-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-test-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26338456476

Audit

audit — passed

  • requested_detectors — 9 finding(s)
  • intra-method-duplication — 7 finding(s)
  • dead_code — 4 finding(s)
  • dead_guard — 3 finding(s)
  • structural — 2 finding(s)
  • Directives — 1 finding(s)
  • Retention — 1 finding(s)
  • Total: 27 finding(s)

Deep dive: homeboy audit data-machine --changed-since 2043b33

Artifacts and drill-down
  • CI results artifact: homeboy-ci-results-data-machine-audit-quality-Linux-node24 contains immediate command JSON for this action invocation.
  • Observation artifact: homeboy-observations-data-machine-audit-quality-Linux-node24 contains exported Homeboy run history for deeper queries.
  • Drill-down: download the observation artifact, then run homeboy runs import <dir>, homeboy runs list, and homeboy runs findings <run-id>.
  • Artifacts are attached to the workflow run: https://github.com/Extra-Chill/data-machine/actions/runs/26338456476
Tooling versions
  • Homeboy CLI: homeboy 0.197.2+c798b5ec
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: dd23ee80
  • Action: unknown@unknown

@chubes4 chubes4 merged commit 008878b into main May 24, 2026
5 checks passed
@chubes4 chubes4 deleted the issue-2205-async-runtime-tool-broker branch May 24, 2026 00:13
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.

Implement client runtime tool callback fulfillment

1 participant