Skip to content

Mediate conversation tools through Agents API#2476

Merged
chubes4 merged 4 commits into
mainfrom
fix/issue-2453-agents-api-mediated-tools
Jun 3, 2026
Merged

Mediate conversation tools through Agents API#2476
chubes4 merged 4 commits into
mainfrom
fix/issue-2453-agents-api-mediated-tools

Conversation

@chubes4
Copy link
Copy Markdown
Member

@chubes4 chubes4 commented Jun 3, 2026

Summary

  • Closes Migrate conversation tool execution to Agents API mediation #2453 by moving Data Machine conversation tool execution onto the Agents API mediated loop (tool_executor, tool_declarations, pre_tool_mediator, and canonical runtime-tool pending handling).
  • Keeps Data Machine-specific policy at the mediation seam: duplicate rejection, runtime-rule rejection, client/runtime tool fulfillment, async pending requests, trace metadata, and provider-failure shaping.
  • Preserves legacy chat/pipeline semantics while using upstream mediation: preflight policies evaluate prior transcript history, rejected preflight calls stay in canonical audit/transcript events but not DM's legacy tool result list, and completion assertions still see Data Machine result/parameter shapes.
  • Updates the bundled Agents API dependency/package path from automattic/agents-api to wordpress/agents-api at the merged upstream commit that includes pre-tool mediation.

Upstream status

Verification

  • php tests/agent-conversation-runtime-policy-smoke.php
  • php tests/tool-executor-ability-native-smoke.php
  • php tests/pending-actions-agents-api-contract-smoke.php
  • php vendor/wordpress/agents-api/tests/conversation-loop-tool-execution-smoke.php
  • vendor/bin/phpcs inc/Engine/AI/conversation-loop.php inc/Engine/AI/DataMachineHandlerCompletionPolicy.php inc/Engine/AI/DataMachineCompletionAssertions.php

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Implemented and tightened the mediated tool execution migration, preserved Data Machine compatibility seams, and ran smoke/lint verification. Chris remains responsible for review and testing.

@homeboy-ci
Copy link
Copy Markdown
Contributor

homeboy-ci Bot commented Jun 3, 2026

Homeboy Results — data-machine

Lint

lint — passed

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

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/26900687961

Test

test — passed

  • 1313 passed
  • 4 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 53a97ac

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/26900687961

Audit

audit — passed

  • audit — 514 finding(s)
  • Total: 514 finding(s)

Deep dive: homeboy audit data-machine --changed-since 53a97ac

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/26900687961
Tooling versions
  • Homeboy CLI: homeboy 0.219.1+1eee2cef
  • Extension: wordpress from https://github.com/Extra-Chill/homeboy-extensions
  • Extension revision: 471a6b73
  • Action: unknown@unknown

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.

Migrate conversation tool execution to Agents API mediation

1 participant