forked from farhoodlabs/paperclip
feat(plugin-sdk): thread agentId into environmentAcquireLease params
Add an optional agentId field to PluginEnvironmentAcquireLeaseParams and thread it through the host's environment-runtime + run-orchestrator call sites so plugin-backed sandbox providers can scope lease state (subdirs, PVCs, etc.) per agent without an SDK callback or DB lookup. The field is required-but-nullable on the internal EnvironmentDriverAcquireInput (string | null) so every call site has to think about whether it has an agent context. Ad-hoc operator probes (agent test-environment route) pass null. The plugin RPC payload omits the field entirely when null, keeping wire compatibility with older plugin worker SDKs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -379,6 +379,13 @@ export interface PluginEnvironmentLease {
|
||||
|
||||
export interface PluginEnvironmentAcquireLeaseParams extends PluginEnvironmentDriverBaseParams {
|
||||
runId: string;
|
||||
/**
|
||||
* UUID of the agent the run is being acquired for. Omitted only for ad-hoc
|
||||
* invocations (e.g. operator-initiated environment test probes) where no
|
||||
* agent context exists. Plugins should treat undefined as "no per-agent
|
||||
* partitioning available" and fall back to environment-level behavior.
|
||||
*/
|
||||
agentId?: string;
|
||||
workspaceMode?: string;
|
||||
requestedCwd?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user