Merge updated feat/plugin-acquire-lease-agent-id into dev (adds resumeLease agentId)
This commit is contained in:
@@ -393,6 +393,14 @@ export interface PluginEnvironmentAcquireLeaseParams extends PluginEnvironmentDr
|
|||||||
export interface PluginEnvironmentResumeLeaseParams extends PluginEnvironmentDriverBaseParams {
|
export interface PluginEnvironmentResumeLeaseParams extends PluginEnvironmentDriverBaseParams {
|
||||||
providerLeaseId: string;
|
providerLeaseId: string;
|
||||||
leaseMetadata?: Record<string, unknown>;
|
leaseMetadata?: Record<string, unknown>;
|
||||||
|
/**
|
||||||
|
* UUID of the agent the run is being resumed for. Symmetric with
|
||||||
|
* `PluginEnvironmentAcquireLeaseParams.agentId`. Plugins can compare this
|
||||||
|
* to the agentId they stored in `leaseMetadata` at acquire time; if it
|
||||||
|
* doesn't match, return `{ providerLeaseId: null, metadata: { expired: true } }`
|
||||||
|
* to force the host to create a fresh lease for the current agent.
|
||||||
|
*/
|
||||||
|
agentId?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PluginEnvironmentReleaseLeaseParams extends PluginEnvironmentDriverBaseParams {
|
export interface PluginEnvironmentReleaseLeaseParams extends PluginEnvironmentDriverBaseParams {
|
||||||
|
|||||||
@@ -476,6 +476,7 @@ function createSandboxEnvironmentDriver(
|
|||||||
config: workerConfig,
|
config: workerConfig,
|
||||||
providerLeaseId: reusableLease.providerLeaseId,
|
providerLeaseId: reusableLease.providerLeaseId,
|
||||||
leaseMetadata: reusableLease.metadata ?? undefined,
|
leaseMetadata: reusableLease.metadata ?? undefined,
|
||||||
|
...(input.agentId ? { agentId: input.agentId } : {}),
|
||||||
},
|
},
|
||||||
resolvePluginSandboxRpcTimeoutMs(workerConfig),
|
resolvePluginSandboxRpcTimeoutMs(workerConfig),
|
||||||
).then((resumed) =>
|
).then((resumed) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user