Command execution plugin for Amrita
Project description
amrita-plugin-exec
Amrita的命令执行插件
功能描述
这是一个为Amrita框架开发的命令执行插件,允许授权用户在聊天中执行服务器命令。
安装
使用uv安装:
uv add amrita-plugin-exec
或者使用amrita-cli安装:
amrita plugin install amrita-plugin-exec
配置
插件提供了以下配置选项,可以在 .env 或环境变量中进行配置:
ENABLE_DOCKER=false
# 是否启用Docker下的指令执行,默认为 False
PLUGIN_EXEC_IMAGE_NAME=alpine:latest
# 要使用的Docker镜像名称,默认为 "alpine:latest"
PLUGIN_EXEC_DOCKER_HOST=unix://var/run/docker.sock
# Docker守护进程的地址,默认为 "unix://var/run/docker.sock"
PLUGIN_EXEC_SHELL_NAME=sh
# 在容器中执行命令时使用的shell名称,默认为 "sh"
AUTO_REBUILD_CONTAINER=true
# 是否在运行完成后自动重建容器,默认为 true
ENABLE_IN_TOOL=true
# 是否允许LLM执行此工具,默认为 true
使用方法
在Amrita机器人中,授权用户可以使用以下命令:
/exec <command>:执行指定的服务器命令。
注意事项
如果要交给LLM进行命令执行,则仅支持 Docker 容器。
权限节点
插件添加了以下权限节点:
amrita.exec.full:允许用户执行宿主命令。amrita.exec.safe:允许用户容器内执行命令。
TODO
- 包装为Amrita的Tool
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amrita_plugin_exec-0.1.3.tar.gz
(16.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file amrita_plugin_exec-0.1.3.tar.gz.
File metadata
- Download URL: amrita_plugin_exec-0.1.3.tar.gz
- Upload date:
- Size: 16.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ce5ddb578e906499381a9724e3ceabd0885327201300e9ec14a4f76a86ad50f
|
|
| MD5 |
e12d3223e5f3a012b93c1d675e698bae
|
|
| BLAKE2b-256 |
4cc05cadaa97a360ac74a4d1d35d8d0e2ded919c0bb14313fe96758205c07f48
|
File details
Details for the file amrita_plugin_exec-0.1.3-py3-none-any.whl.
File metadata
- Download URL: amrita_plugin_exec-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
326fb80a8fda6881744b4784dc3463577327ca8dce046cd75631229a13510d8e
|
|
| MD5 |
6e414178a6c1b515e89099309ab06317
|
|
| BLAKE2b-256 |
09ebde19132f665b86d180c9bd05e5f26e94a907ddea99a048a4048115b4f94e
|