DefinitionBuilder Module
Builds runnable domain objects from parsed definitions
Functions and values
| Function or value |
Description
|
Full Usage:
buildAgent provider tools subAgents def
Parameters:
ILlmProvider
tools : Tool list
subAgents : IAgent list
def : AgentDef
Returns: IAgent
|
Build an IAgent from an AgentDef using the provided factory (or default Orchestrator).
|
Full Usage:
buildAgentWithFactory factory provider tools subAgents bus scope context memory def
Parameters:
IOrchestratorFactory
provider : ILlmProvider
tools : Tool list
subAgents : IAgent list
bus : IEventBus
scope : EventScope
context : ToolContext
memory : OrchestratorMemoryConfig
def : AgentDef
Returns: IAgent
|
Build an IAgent from an AgentDef using a custom factory.
|
|
|
Full Usage:
buildConstitutionRule def
Parameters:
ConstitutionRuleDef
Returns: ConstitutionRule
|
Build a ConstitutionRule from a ConstitutionRuleDef. The Pattern field becomes a regex-based Check function.
|
|
|
Full Usage:
buildMergedConstitution defs
Parameters:
ConstitutionDef list
Returns: Constitution option
|
Build a merged Constitution from multiple ConstitutionDefs
|
Full Usage:
buildOrchestratorConfig provider tools subAgents def
Parameters:
ILlmProvider
tools : Tool list
subAgents : IAgent list
def : AgentDef
Returns: OrchestratorConfig
|
Build an OrchestratorConfig from an AgentDef
|
Full Usage:
buildPromptTool provider def prompt
Parameters:
ILlmProvider
def : ToolDef
prompt : Prompt
Returns: Tool
|
Build a prompt-defined Tool: invoking the tool completes its prompt against the given LLM provider. The caller is responsible for any conversation/memory context (the runtime prepends it to the input before invoking the tool).
|
|
|
|
Build a Tool from a ToolDef, applying the given session runtime policy. Only executable tools are built here; prompt tools require an LLM provider and must be built via `buildPromptTool`. Async executable tools are built inline (the async wrapping is layered on separately by `wrapAsyncTool`).
|
|
Register a custom tool executor by name
|
Full Usage:
removeExecutor name
Parameters:
string
|
Remove a custom tool executor
|
Full Usage:
resolveProcessLauncher policy toolRuntime cmd
Parameters:
RuntimePolicy
toolRuntime : string
cmd : string
Returns: string * string list
|
Compute the actual launcher command and leading arguments for a process tool,
applying the tool's declared runtime and the session runtime policy.
The resolution order is:
1. A session `ForceRuntime` overrides the tool's declared runtime.
2. The (effective) runtime wraps the raw command, e.g.
deno -> `deno run -A
|
|
Layer asynchronous execution onto an already-built (inline) executable tool. When a session task host is available on the ambient `SessionExecution` scope, invoking the tool spawns a background "tool" task and immediately returns a tracking token instead of blocking; otherwise it falls back to running the tool inline.
|
Nao