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
使用方法
在Amrita机器人中,授权用户可以使用以下命令:
/exec <command>:执行指定的服务器命令。
权限节点
插件添加了以下权限节点:
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
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.2.post1.tar.gz.
File metadata
- Download URL: amrita_plugin_exec-0.1.2.post1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","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 |
ce3b43ac8a47224a5f0473f5befa03ba724ee6138449f80c9440cc782cac6181
|
|
| MD5 |
cef7497655a888d7660b06721fb5d7e7
|
|
| BLAKE2b-256 |
2483d6e54cb7ca9852cc16601f38333811d19e01eb2702d832f31a844f67c253
|
File details
Details for the file amrita_plugin_exec-0.1.2.post1-py3-none-any.whl.
File metadata
- Download URL: amrita_plugin_exec-0.1.2.post1-py3-none-any.whl
- Upload date:
- Size: 17.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","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 |
a8de3353828ecea68c6951fb6e398d610ed6ae53e603471cb713e74a2e0a9a57
|
|
| MD5 |
6a97872c0d1748c4a70f0d56d0d6b010
|
|
| BLAKE2b-256 |
50aca8cdafad8c1995ee6328997c27b774ecef2f43822b66e9e29abba9e61639
|