Skip to content

Repoint Rust client and CLI project commands to core #1311

Description

@geoffjay

Summary

Update the orchestrator Rust client and CLI project commands so that project CRUD operations target the core service instead of orchestrator. Association operations (add/remove agent/workflow to a project) remain on orchestrator.

Context

Part of Phase 4 of #1305 (Migrate projects entity from orchestrator into core). Child of #1307. Once core has the projects API (Phase 1) and data is backfilled (Phase 2), consumers must be redirected before the orchestrator project CRUD can be removed (Phase 3).

Blocked By

Acceptance Criteria

Rust client (crates/orchestrator/src/client.rs)

  • Split project client methods into two groups:
    • CRUD (target core): `list_projects`, `create_project`, `get_project`, `get_project_by_name`, `update_project`, `delete_project` (lines 396-425)
    • Associations (stay on orchestrator): `list_project_agents`, `associate_project_agent`, `dissociate_project_agent`, `list_project_workflows`, `associate_project_workflow`, `dissociate_project_workflow` (lines 427-490)
  • Add a `core_base_url` field to the client (or create a lightweight `CoreClient`) so CRUD methods can target the core service base URL
  • CRUD methods build URLs from the core base URL instead of `self.base_url`
  • Update `ProjectResponse` usage: core's response will NOT include `agent_count`/`workflow_count`

CLI (crates/cli/src/commands/project.rs)

  • Commands that call CRUD methods (`list`, `create`, `show`, `update`, `delete`) use the core-targeted client
  • Commands that call association methods (`add-agent`, `remove-agent`, `add-workflow`, `remove-workflow`) continue using the orchestrator client
  • The `show` command currently displays `agent_count` and `workflow_count` from `ProjectResponse` - either fetch counts separately from orchestrator or note their absence gracefully
  • Update `get_project_by_name` (client-side filter via list) to target core's list endpoint

Configuration

  • Ensure the core service URL is discoverable by the CLI (check existing config/env var patterns for service URLs)
  • Document the new URL requirement if it doesn't already exist

Reference Files

Stack Base

Stack on: `feature/projects-to-core`
Blocked by: #1310

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:mediumMedium scope: <200 lines, 1-2 filesrefactorCode improvement without changing behavior

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions