trading_agent.client.skill_commands
¶
The trading-agent skills commands: list and import.
Typical usage example:
exit_code = SkillCommands(layout, desk_names, passed_environment).run('import', '~/.hermes/skills/research', replace=False)
SkillCommands
¶
Lists and imports skills for the user.
Creates the commands.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
layout
|
WorkspaceLayout
|
Where the skills are. |
required |
desk_names
|
Sequence[str]
|
The desks whose own skills to list. |
required |
passed_environment
|
Mapping[str, str]
|
The variables the bash sandbox receives, against which skills' needs are checked. |
required |
output
|
TextIO
|
Where to print. |
stdout
|
Source code in src/trading_agent/client/skill_commands.py
run
¶
Runs one action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action
|
str
|
"list" or "import". |
required |
source
|
str | None
|
For "import", the folder, zip file or git URL. |
required |
replace
|
bool
|
For "import", whether to replace installed skills of the same name. |
required |
Returns:
| Type | Description |
|---|---|
int
|
0 on success, 1 when the import failed or a skill in it was invalid. |