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.4.tar.gz
(16.9 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.4.tar.gz.
File metadata
- Download URL: amrita_plugin_exec-0.1.4.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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 |
7fe99543424ae61f159cb35b28b43f9a47ed6220e2c9ea044023210d2b855150
|
|
| MD5 |
75dd861e087e3a76be8c058ece734003
|
|
| BLAKE2b-256 |
6824c5595215956a78936b9a570c596b228cc4eece169c19778fa15db7514ecc
|
File details
Details for the file amrita_plugin_exec-0.1.4-py3-none-any.whl.
File metadata
- Download URL: amrita_plugin_exec-0.1.4-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","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 |
7829ba524ff429648069622441343ea2f1a0cec59e06b396aa23e6c6a02f59ec
|
|
| MD5 |
b7f08ce3e463a985c81a45828fdd5a3d
|
|
| BLAKE2b-256 |
6ccfbc7fb2b4292aa911966bf2ad0af9db35ddd9e3ed93eb5e100f431365d53b
|