Port OpenClaw skills: add clawdbot metadata support + deps
Some checks failed
Build Nanobot OAuth / build (push) Failing after 6m51s
Some checks failed
Build Nanobot OAuth / build (push) Failing after 6m51s
- skills.py: recognize "clawdbot" metadata key alongside "nanobot"
so OpenClaw SKILL.md files work without rewriting
- Dockerfile.oauth: add skill binary dependencies
- APT: ffmpeg, jq, tmux, gh
- Go: blogwatcher, blucli, gifgrep, sonoscli, wacli
- Brew: gogcli, goplaces, songsee, gemini-cli, obsidian-cli,
himalaya, openai-whisper
- npm: @steipete/oracle
- uv: nano-pdf
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,47 @@
|
||||
FROM birdxs/nanobot:latest
|
||||
|
||||
# Copy full project (pyproject.toml + source)
|
||||
# ── Skill dependencies ──────────────────────────────────────────────
|
||||
|
||||
# APT: ffmpeg (video-frames), jq, tmux, build-essential (for go/brew)
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ffmpeg jq tmux build-essential procps && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# gh CLI via GitHub official apt repo
|
||||
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg \
|
||||
| dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg && \
|
||||
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" \
|
||||
> /etc/apt/sources.list.d/github-cli.list && \
|
||||
apt-get update && apt-get install -y gh && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Go toolchain
|
||||
RUN curl -fsSL https://go.dev/dl/go1.23.6.linux-amd64.tar.gz | tar -C /usr/local -xzf -
|
||||
ENV PATH="/usr/local/go/bin:/root/go/bin:${PATH}"
|
||||
|
||||
# Go tools: blogwatcher, blu (blucli), gifgrep, sonos (sonoscli), wacli
|
||||
RUN go install github.com/Hyaxia/blogwatcher/cmd/blogwatcher@latest && \
|
||||
go install github.com/steipete/blucli/cmd/blu@latest && \
|
||||
go install github.com/steipete/gifgrep/cmd/gifgrep@latest && \
|
||||
go install github.com/steipete/sonoscli/cmd/sonos@latest && \
|
||||
go install github.com/steipete/wacli/cmd/wacli@latest
|
||||
|
||||
# Homebrew (for tools only available via brew taps)
|
||||
RUN NONINTERACTIVE=1 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
ENV PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:${PATH}"
|
||||
RUN brew tap steipete/tap && \
|
||||
brew install steipete/tap/gogcli steipete/tap/goplaces steipete/tap/songsee \
|
||||
gemini-cli yakitrak/yakitrak/obsidian-cli himalaya openai-whisper
|
||||
|
||||
# Node tools: oracle
|
||||
RUN npm install -g @steipete/oracle
|
||||
|
||||
# Python tools: nano-pdf
|
||||
RUN uv tool install nano-pdf
|
||||
ENV PATH="/root/.local/bin:${PATH}"
|
||||
|
||||
# ── Nanobot source ──────────────────────────────────────────────────
|
||||
|
||||
COPY pyproject.toml README.md LICENSE /app/
|
||||
COPY nanobot/ /app/nanobot/
|
||||
|
||||
# Install with all dependencies
|
||||
RUN uv pip install --system --no-cache --reinstall /app
|
||||
|
||||
ENTRYPOINT ["nanobot"]
|
||||
|
||||
@@ -170,7 +170,7 @@ class SkillsLoader:
|
||||
"""Parse nanobot metadata JSON from frontmatter."""
|
||||
try:
|
||||
data = json.loads(raw)
|
||||
return data.get("nanobot", {}) if isinstance(data, dict) else {}
|
||||
return (data.get("nanobot") or data.get("clawdbot") or {}) if isinstance(data, dict) else {}
|
||||
except (json.JSONDecodeError, TypeError):
|
||||
return {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user