Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ node_name: "node_remote_agent_invoke_effect"
contract_version:
major: 0
minor: 1
patch: 2
patch: 3
node_version:
major: 0
minor: 1
Expand All @@ -25,16 +25,26 @@ runtime_profiles:
- workers
input_model:
name: "ModelInvocationCommand"
module: "omnibase_infra.nodes.node_remote_agent_invoke_effect.models"
description: "Invocation command selected by delegation routing."
module: "omnibase_core.models.delegation.model_invocation_command"
description: "Invocation command selected by delegation routing (canonical omnibase_core class used by the producer + HandlerA2ATask)."
output_model:
name: "ModelAgentTaskLifecycleEvent"
module: "omnibase_infra.nodes.node_remote_agent_invoke_effect.models"
description: "Lifecycle event emitted while watching a remote agent task."
module: "omnibase_core.models.delegation.model_agent_task_lifecycle_event"
description: "Lifecycle event emitted while watching a remote agent task (canonical omnibase_core class emitted by HandlerA2ATask)."
handler_routing:
routing_strategy: "operation_match"
handlers:
- operation: "agent.a2a_task"
# Declares the typed dispatch payload so auto-wiring delivers a validated
# ModelInvocationCommand to HandlerA2ATask.handle() (def B). Without an
# event_model the callback falls to the untyped arm and hands the handler a
# raw ModelEventEnvelope, and the dispatcher is indexed only under
# topic-derived message_type aliases while the producer stamps event_type
# with the payload CLASS name. Declaring it registers "ModelInvocationCommand"
# as a message_type alias and type-scopes the route (OMN-12416).
event_model:
name: "ModelInvocationCommand"
module: "omnibase_core.models.delegation.model_invocation_command"
handler:
name: "HandlerA2ATask"
module: "omnibase_infra.nodes.node_remote_agent_invoke_effect.handlers.handler_a2a_task"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,34 @@ def handler_type(self) -> EnumHandlerType:
def handler_category(self) -> EnumHandlerTypeCategory:
return EnumHandlerTypeCategory.EFFECT

async def handle(
self, request: ModelInvocationCommand
) -> ModelAgentTaskLifecycleEvent:
"""Canonical dispatch entrypoint (def B) for the auto-wired runtime.

Auto-wiring binds ``handle``/``handle_async`` at wiring time; a handler
exposing neither is bound to ``_missing_handle``, which raises on EVERY
dispatch. Without this method the node passed ingress validation and then
died before any A2A work ran (OMN-14489).

The RETURN value is the node's only publish path on the auto-wired
runtime: zero-arg runtime discovery constructs this handler with a
``NoopLifecycleEventSink``, so the lifecycle events written by ``submit``
are dropped, and only the event returned here reaches
``onex.evt.omnibase-infra.agent-task-lifecycle.v1``. ``watch`` is NOT
driven from here — it reads the submitted row back, which the zero-arg
``NoopRemoteTaskStateRepository`` cannot serve.
"""
response = await self.submit(request)
return ModelAgentTaskLifecycleEvent(
task_id=request.task_id,
correlation_id=request.correlation_id,
lifecycle_type=EnumAgentTaskLifecycleType.SUBMITTED,
remote_task_handle=response.remote_task_handle,
occurred_at=self._clock(),
remote_status=_remote_status_value(response.status),
)

async def submit(self, command: ModelInvocationCommand) -> ModelA2ATaskResponse:
"""Submit a command to a remote A2A peer and persist the returned handle."""
target = self._resolve_target(command.target_ref)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

43 changes: 31 additions & 12 deletions tests/fixtures/dispatch_parity/baseline-selection-v2.json
Original file line number Diff line number Diff line change
Expand Up @@ -910,17 +910,18 @@
"dispatcher.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e": {
"category": "command",
"contract_name": "node_remote_agent_invoke_effect",
"event_model_module": null,
"event_model_name": null,
"event_model_module": "omnibase_core.models.delegation.model_invocation_command",
"event_model_name": "ModelInvocationCommand",
"handler_id": "dispatcher.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e",
"handler_module": "omnibase_infra.nodes.node_remote_agent_invoke_effect.handlers.handler_a2a_task",
"handler_name": "HandlerA2ATask",
"message_types": [
"ModelInvocationCommand",
"omnibase-infra.remote-agent-invoke",
"onex.cmd.omnibase-infra.remote-agent-invoke.v1"
],
"package": "omnibase_infra",
"type_scoped": false
"type_scoped": true
},
"dispatcher.auto.node_reward_binder_effect.HandlerRewardBinder.emit_reward_events_f0dda7f0": {
"category": "event",
Expand Down Expand Up @@ -1473,10 +1474,10 @@
"contracts_discovered": 122,
"discovery_errors": 0,
"distinct_subscribe_topics": 90,
"probe_count": 330,
"probe_count": 331,
"registered_dispatchers": 85,
"registered_routes": 101,
"type_scoped_dispatchers": 41
"type_scoped_dispatchers": 42
},
"duplicate_winners": [],
"epic": "OMN-12525",
Expand Down Expand Up @@ -1516,7 +1517,7 @@
"omnimemory"
],
"fixture_version": "v2",
"generated_at_utc": "2026-07-12T20:40:01.404120+00:00",
"generated_at_utc": "2026-07-13T02:12:01.781985+00:00",
"installed_package_versions": {
"omnibase-core": "0.46.7",
"omnibase-infra": "0.38.4",
Expand Down Expand Up @@ -1793,13 +1794,11 @@
"payload": "_DictPayload"
},
"selection": {
"dispatcher_ids": [
"dispatcher.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e"
],
"dlq_topic": null,
"dispatcher_ids": [],
"dlq_topic": "onex.dlq.omnibase-infra.omnibase-infra.v1",
"message_category": "command",
"message_type": "omnibase-infra.remote-agent-invoke",
"status": "success"
"status": "no_dispatcher"
},
"topic": "onex.cmd.omnibase-infra.remote-agent-invoke.v1"
},
Expand Down Expand Up @@ -6138,6 +6137,26 @@
},
"topic": "onex.intent.platform.runtime-tick.v1"
},
"P4::dispatcher.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e::onex.cmd.omnibase-infra.remote-agent-invoke.v1": {
"construct_only": true,
"dispatcher_id": "dispatcher.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e",
"event_model": "omnibase_core.models.delegation.model_invocation_command.ModelInvocationCommand",
"family": "P4_payload_type_scoping",
"input": {
"event_type": "omnibase-infra.remote-agent-invoke",
"payload": "ModelInvocationCommand"
},
"selection": {
"dispatcher_ids": [
"dispatcher.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e"
],
"dlq_topic": null,
"message_category": "command",
"message_type": "omnibase-infra.remote-agent-invoke",
"status": "success"
},
"topic": "onex.cmd.omnibase-infra.remote-agent-invoke.v1"
},
"P4::dispatcher.auto.node_routing_orchestrator.HandlerHealthComplete::onex.cmd.router.route-request.v1": {
"construct_only": true,
"dispatcher_id": "dispatcher.auto.node_routing_orchestrator.HandlerHealthComplete",
Expand Down Expand Up @@ -7840,7 +7859,7 @@
"route_id": "route.auto.node_remote_agent_invoke_effect.HandlerA2ATask.agent_a2a_task_8289e52e.onex_cmd_omnibase_infra_remote_agent_invoke_v1",
"topic": "onex.cmd.omnibase-infra.remote-agent-invoke.v1",
"topic_pattern": "*.cmd.omnibase-infra.remote-agent-invoke.*",
"type_scoped": false
"type_scoped": true
},
{
"contract_name": "node_routing_orchestrator",
Expand Down
Loading
Loading