Skip to content

Renames to improve code consistency#2867

Merged
vigoo merged 4 commits intoagent-types-changes-step1-step2from
agent-types-changes-step3
Mar 9, 2026
Merged

Renames to improve code consistency#2867
vigoo merged 4 commits intoagent-types-changes-step1-step2from
agent-types-changes-step3

Conversation

@vigoo
Copy link
Contributor

@vigoo vigoo commented Mar 2, 2026

Step 3 of #2835

Improve consistency between WIT and Rust namings, and converge towards our new "agentic" namings.

Most importantly:

  • WorkerId → AgentId
  • OwnedWorkerId → OwnedAgentId
  • AgentId → ParsedAgentId

Some follow-up renamings (some of them were already inconsistent with its WIT counterparts, and the WorkerId->AgentId:

  • WorkerStatus → AgentStatus
  • WorkerStatusRecord → AgentStatusRecord
  • WorkerFilter → AgentFilter (+ all variants: WorkerNameFilter → AgentNameFilter, etc.)
  • WorkerMetadata → AgentMetadata, WorkerMetadataDto → AgentMetadataDto
  • WorkerCreationRequest → AgentCreationRequest
  • WorkerUpdateMode → AgentUpdateMode
  • WorkerResourceDescription → AgentResourceDescription
  • WorkerInvocation → AgentInvocation,
  • WorkerInvocationPayload → AgentInvocationPayload,
  • WorkerInvocationResult → AgentInvocationResult,
  • WorkerInvocationOutput → AgentInvocationOutput
  • WorkerConfig → AgentConfig
  • Oplog: WorkerError enum → AgentError, variant WorkerError(String) → AgentGuestError(String)
  • Fields/variables (codebase-wide): worker_id → agent_id, worker_name → agent_name in structs, parameters, methods (e.g., to_worker_urn → to_agent_urn)
  • Protobuf: WorkerId message → AgentId, fields worker_id → agent_id, worker_name → agent_name
  • WorkerExecutorError variants renamed (WorkerNotFound → AgentNotFound, etc.)

Breaks the HTTP API, but I think this is a right time to do so (as we already broke it by removing the old invocation endpoints)

@vigoo vigoo marked this pull request as ready for review March 3, 2026 14:41
@@ -779,31 +778,31 @@ impl WorkerApi {
///
/// The plugin must be one of the installed plugins for the worker's current component version.
#[oai(
path = "/:component_id/workers/:worker_name/activate-plugin",
path = "/:component_id/workers/:agent_name/activate-plugin",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's also rename these to

/:component_id/agents/:agent_name/activate-plugin

in a followup

* Normalized SDK metadata to native naming

* Prepared helper macros for further tests

* Agent types changes step 5 (last) (#2945)

* New AgentId format and language-specific rendering, cleanups

* More cleanups and tests

* Benchmark

* Compilation fixes

* Unit tests passing

* Test adjustments

* Fixes

* CLI improvements

* CLI fixes

* cli test fixes

* Cleanup

* Format

* Fixes

* analysing ci failures skill

* Fix

* Add migration 006 to drop agent_wrapper_type_name column

Amp-Thread-ID: https://ampcode.com/threads/T-019cc47e-a88c-73f6-86e8-678b8e506697
Co-authored-by: Amp <amp@ampcode.com>

* Fixes

* Fixes

* Eliminated some test-code redundancy

* Review feedback

---------

Co-authored-by: Amp <amp@ampcode.com>

---------

Co-authored-by: Amp <amp@ampcode.com>
@vigoo vigoo merged commit b64f909 into agent-types-changes-step1-step2 Mar 9, 2026
13 checks passed
@vigoo vigoo deleted the agent-types-changes-step3 branch March 9, 2026 16:41
@github-actions github-actions bot locked and limited conversation to collaborators Mar 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants