瓦格米奥斯

运维部署 社区

技能解读

当前原文的自动摘译,尚未人工审校。

核心原则

WAGMOS API 是容器管理的主要接口。在 Linux 上,Docker 需要 sudo — 无需 root 访问权限,WAGMIOS 是唯一可用于家庭实验室控制的接口代理。不要: 直接执行 docker CLI 命令 访问 Docker 套接字或守护进程 操纵 API 密钥或范围 通过任何方式绕过范围限制

启动检查(首次交互)

在尝试任何 WAGMIOS 操作之前: 确认 Docker 可用 — WAGMIOS 管理 Docker 容器,因此 Docker 必须在主机上运行 确认后端可访问 — 后端端口(默认 5179)必须可访问 检查密钥范围 — 调用 GET /api/auth/status 了解该密钥可以做什么 如果 Docker 未安装或运行:

认证

每个请求都需要 X-API-Key 标头。用户在运行时提供密钥和基本 URL — 不要存储它。首先通过GET /api/auth/status检查密钥范围——这会告诉你密钥可以做什么。凭证处理:密钥由用户在运行时提供,而不是由代理存储 API 密钥是有范围的 — 它只允许用户明确授予的内容

范围图

范围 · 允许的操作 containers:read · 列出容器、检查、查看日志 containers:write · 创建、启动、停止、重新启动容器 containers:delete · 删除容器(需要用户确认) images:read · 列出 Docker 镜像

标准工作流程

验证范围 - 在尝试任何操作之前检查GET /api/auth/status 确认 - 对于破坏性操作(删除),在执行之前始终与用户确认 执行 - 调用适当的 API 端点 报告 - 清楚地返回结果

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
运维部署
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
94 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@mentholmike · Apache-2.0
上下文用量评级
低消耗
接入复杂程度
需手动接入
是否需要外部接口密钥
需要 · Vendor-specific
兼容的系统
Linux · Docker
运行环境要求
Docker
检测到的文件与系统行为
  • 只读
  • 允许写入 / 修改
  • 命令执行
网络行为
允许外网请求
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# WAGMIOS

**Scope = Permission. API Only. No Workarounds.**

## Core Principle

The WAGMIOS API is the **primary interface** for container management. On Linux, Docker requires sudo — without root access, WAGMIOS is the only interface agents can use for homelab control. Do not:
- Execute `docker` CLI commands directly
- Access the Docker socket or daemon
- Manipulate API keys or scopes
- Bypass scope restrictions through any means

**If a scope is missing, the agent cannot do the task — ask the user to enable it.**

---

## Startup Check (First Interaction)

Before attempting any WAGMIOS operation:

1. **Confirm Docker is available** — WAGMIOS manages Docker containers, so Docker must be running on the host
2. **Confirm backend is reachable** — the backend port (default 5179) must be accessible
3. **Check key scopes** — call `GET /api/auth/status` to know what the key can do

**If Docker is not installed or running:**
→ See `references/docker-install.md` for installation instructions by OS.

**If WAGMIOS backend is not reachable:**
→ Ask the user to confirm the backend is running at the provided URL.

---

## Authentication

Every request requires the `X-API-Key` header. The user provides the key and base URL at runtime — do not store it.

```
Base URL: http://localhost:5179 (user provides, may differ for remote hosts)
Header:   X-API-Key: <key>
```

Check key scopes first via `GET /api/auth/status` — this tells you what the key can do.

**Credential handling:**
- Keys are provided by the user at runtime, not stored by the agent
- The API key is scoped — it only allows what the user explicitly granted
- Do not log or expose the full key value

---

## Scope Map

| Scope | Permitted Actions |
|-------|------------------|
| `containers:read` | List containers, inspect, view logs |
| `containers:write` | Create, start, stop, restart containers |
| `containers:delete` | Remove containers (with user confirmation) |
| `images:read` | List Docker images |
| `images:write` | Pull and delete images |
| `templates:read` | Use saved container templates |
| `templates:write` | Create and edit templates |
| `marketplace:read` | Browse the app marketplace |
| `marketplace:write` | Install, start, stop marketplace apps |

---

## Standard Workflow

1. **Verify scope** — check `GET /api/auth/status` before attempting any action
2. **Confirm** — for destructive actions (delete), always confirm with user before executing
3. **Execute** — call the appropriate API endpoint
4. **Report** — return the result clearly

---

## Decision Tree

```
User asks to do X
    │
    ├── Missing scope for X?
    │       YES → Tell user, ask them to enable it in Settings
    │       NO  → Continue
    │
    ├── X is destructive (delete, stop)?
    │       YES → Confirm with user before executing
    │       NO  → Execute immediately
    │
    └── Execute via API, report result
```

---

## Multi-Machine Management

WAGMIOS supports managing multiple hosts from a single agent. Each machine runs its own WAGMIOS instance with its own URL and its own scoped API key.

**How it works:**
1. User installs WAGMIOS on each machine they want to manage
2. User creates a separate API key per machine, with only the scopes that machine needs
3. User provides the agent with the URL and key for each machine
4. Agent routes requests to the correct machine based on the user's request

**Example:**
```
User: "Install Jellyfin on the media server and make sure Nginx is running on the NAS."

Agent → POST media-server:5179/api/marketplace/create { "app_id": "jellyfin" }
Agent → GET nas:5179/api/containers
Agent → POST nas:5179/api/containers/nginx/start

"Jellyfin is installing on the media server (port 8096). Nginx is running on the NAS."
```

**Key principle:** Each instance is independent. The agent cannot move containers between machines, cannot escalate permissions beyond what a key allows, and each action is logged in the instance's own activity feed.

---

## Safeguards

→ See `references/safeguards.md`

## Docker Installation

→ See `references/docker-install.md`

## API Reference

→ See `references/api.md`

## Marketplace

→ See `references/marketplace.md`

## Workflows

→ See `references/workflows.md`

## Scope Reference

→ See `references/scopes.md`

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。