resolveValue
resolveValue<
T>(ctx,gadgetName,options):T
Defined in: utils/config-resolver.ts:59
Resolve a single configuration value through the priority chain.
Priority (highest to lowest):
- Runtime parameter (if provided and not undefined)
- Subagent config (from ctx.subagentConfig[gadgetName][key])
- Parent config (from ctx.agentConfig[key], if parentKey specified)
- Default value
Special handling for “inherit” string:
- If handleInherit is true and value is “inherit”, falls through to parent/default
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”ExecutionContext from gadget execution
gadgetName
Section titled “gadgetName”string
Name of the subagent gadget (e.g., “BrowseWeb”)
options
Section titled “options”Resolution options
Returns
Section titled “Returns”T
Resolved value
Example
Section titled “Example”const model = resolveValue(ctx, "BrowseWeb", { runtime: params.model, subagentKey: "model", parentKey: "model", defaultValue: "sonnet", handleInherit: true,});