Skip to content

feat(runtime): add AgentLocality and ScheduledBackend for distributed scheduling#93

Closed
chaizhenhua wants to merge 2 commits intomainfrom
pr/acp-rebase
Closed

feat(runtime): add AgentLocality and ScheduledBackend for distributed scheduling#93
chaizhenhua wants to merge 2 commits intomainfrom
pr/acp-rebase

Conversation

@chaizhenhua
Copy link
Copy Markdown
Contributor

Summary

  • Add AgentLocality enum to AgentSpec with Local, Remote, and Distributed variants
  • Add ScheduledBackend implementing AgentBackend for Worker-dispatched agent execution
  • Extend resolve pipeline to select backend based on agent locality

Motivation

Enable agents to be scheduled to distributed Worker Nodes (e.g., Claude Code, Codex CLI) rather than executing only in-process or on fixed remote endpoints. This is the framework-level support for the distributed CLI agent architecture.

Changes

  • crates/awaken-contract/src/registry_spec.rs — add AgentLocality, DistributedConfig, SchedulingPolicy types (+222 lines)
  • crates/awaken-runtime/src/extensions/a2a/scheduled_backend.rs — new ScheduledBackend impl (+399 lines)
  • crates/awaken-runtime/src/registry/resolve/pipeline.rs — route Distributed locality to ScheduledBackend (+73/-28 lines)
  • crates/awaken-runtime/src/extensions/a2a/mod.rs — module export (+2 lines)
  • crates/awaken-runtime/src/registry/resolver.rs — add locality field default (+1 line)

Test plan

  • Unit tests for AgentLocality serialization roundtrip
  • ScheduledBackend integration with mock ScheduledBackendFactory
  • Resolve pipeline selects correct backend for each locality variant

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.

1 participant