OffloadStrategyBuilder
Defined in: src/context-manager/strategies/offload/base.ts:71
Intermediate builder result that allows chaining .when() conditions.
Also implements ContextStrategy directly so it can be used without .when().
Extends
Section titled “Extends”Properties
Section titled “Properties”readonly name: string;Defined in: src/context-manager/types.ts:23
Stable identifier for logging and observability.
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”when()
Section titled “when()”when(conditions): ContextStrategy;Defined in: src/context-manager/strategies/offload/base.ts:73
Add conditions that determine when this strategy fires.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
conditions | OffloadConditions |
Returns
Section titled “Returns”init()?
Section titled “init()?”init?(agent, stash?): void;Defined in: src/context-manager/types.ts:29
Called once when the ContextManager is attached to an agent. Strategies can use this to register hooks (e.g., eager offloading on message arrival).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
agent | LocalAgent |
stash? | Stash |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”apply()
Section titled “apply()”apply(context): Promise<boolean>;Defined in: src/context-manager/types.ts:35
Attempt to reduce context. Returns true if it made changes, false if it decided not to act (e.g., conditions not met, nothing to offload).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
context | ContextState |
Returns
Section titled “Returns”Promise<boolean>