Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #2286
Implements support for phantom agents, identified by a UUID as part of the agent ID.
The phantom-id when presetn is part of the agent-id, with a
agent-type(params)[uuid]syntax. If not set, the agent-ids are just like before.In the agent SDKs a new RPC client constructor is now available, called
phantom, taking an optional phantom ID:TypeScript:
Rust:
The
forkhost function has been changed so it no longer receives anameparameter, but always creates a new phantom agent with the same agent type and parameters but a newly generated ID. The forked agent's phantom ID is returned as part of the fork result.NOTE
The original plan was that if an invocation targets an agent that is ephemeral and no phantom ID is set, we automatically generate one.
I did not implement this, because it's not straightforward to do it without significant performance loss, so I propose to revisit it after atomic deployment is merged, in 1.4.
The primary problem is:
I did not want to do the above, so right now it's the user's responsibility to "correctly" use ephemeral agents - always generate a random phantom ID for them:
phantomclient constructors, without explicitly setting a phantom-id, will always generate a fresh one