sessions / Exports / TemplateManagerAdapter
Class: TemplateManagerAdapter
TemplateManagerAdapter - adapts agents package AgentFactory/AgentTemplates to TemplateManager interface
This adapter allows the sessions package to use the template functionality from the agents package without duplicating implementation.
Implements
Table of contents
Constructors
Methods
- getTemplate
- listTemplates
- validateTemplate
- registerTemplate
- unregisterTemplate
- getTemplateDetails
- applyTemplate
Constructors
constructor
• new TemplateManagerAdapter(agentFactory?): TemplateManagerAdapter
Parameters
| Name | Type |
|---|---|
agentFactory? | any |
Returns
Defined in
adapters/template-manager-adapter.ts:14
Methods
getTemplate
▸ getTemplate(name): any
Get template configuration by name
Parameters
| Name | Type |
|---|---|
name | string |
Returns
any
Implementation of
Defined in
adapters/template-manager-adapter.ts:22
listTemplates
▸ listTemplates(): string[]
List all available template names
Returns
string[]
Implementation of
Defined in
adapters/template-manager-adapter.ts:34
validateTemplate
▸ validateTemplate(config): boolean
Validate template configuration
Parameters
| Name | Type |
|---|---|
config | AgentConfig |
Returns
boolean
Implementation of
TemplateManager.validateTemplate
Defined in
adapters/template-manager-adapter.ts:42
registerTemplate
▸ registerTemplate(template): void
Register a new template
Parameters
| Name | Type |
|---|---|
template | AgentTemplate |
Returns
void
Defined in
adapters/template-manager-adapter.ts:56
unregisterTemplate
▸ unregisterTemplate(templateId): boolean
Unregister a template
Parameters
| Name | Type |
|---|---|
templateId | string |
Returns
boolean
Defined in
adapters/template-manager-adapter.ts:63
getTemplateDetails
▸ getTemplateDetails(name): any
Get template details (full template object)
Parameters
| Name | Type |
|---|---|
name | string |
Returns
any
Defined in
adapters/template-manager-adapter.ts:70
applyTemplate
▸ applyTemplate(templateId, overrides?): any
Apply template to create agent config with overrides
Parameters
| Name | Type |
|---|---|
templateId | string |
overrides | AgentConfig |
Returns
any