Kind: Class
Source: atloria-monorepo/libs/agent-core/src/context/instruction-loader.ts
Methods
| Method | Signature | Returns |
|---|---|---|
addPersistent | addPersistent(layer: InstructionLayer) | void |
removePersistent | removePersistent(id: string) | void |
addTurn | addTurn(layer: InstructionLayer) | void |
getInstructions | getInstructions(_context: RunContext<TContext>) | string |
createDynamicInstructions | createDynamicInstructions() | (context: RunContext<TContext>) => string |
addConditional | addConditional(layer: ConditionalLayer) | void |
removeConditional | removeConditional(id: string) | void |
setActiveTools | setActiveTools(toolNames: string[]) | void |
hasActiveTool | hasActiveTool(name: string) | boolean |
addToZone | addToZone(zone: InstructionZone, layer: Omit<InstructionLayer, 'priority'>, offset: undefined) | void |
discover | discover(rootDir: string, options: DiscoveryOptions) | DiscoveredInstruction[] |
loadFromDirectory | loadFromDirectory(rootDir: string, options: DiscoveryOptions) | DiscoveredInstruction[] |
Where it refuses work
InstructionLoaderstops the work with an early return whenallLayers.length === 0.InstructionLoaderstops the work with an early return whendepth > opts.maxDepth.
When something fails
InstructionLoaderhandles failure in 1 place: it turns it into a return value in all 1.
Was this page helpful?