Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

!Dockerfile
!entrypoint.sh
!mcp-bridge/
!mcp-bridge/package.json
!mcp-bridge/package-lock.json
!pyproject.toml
!uv.lock
!src/
Expand Down
11 changes: 0 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -117,17 +117,6 @@ TELEGRAM_ENABLED=false
# 3. Copy the token you receive
# See docs/telegram-setup.md for detailed instructions

# ---------------------------------------------------------------------------
# Zepto MCP (optional, one shared account)
# ---------------------------------------------------------------------------
# Authenticate first: uv run python -m blacki.zepto.auth login
# Then allow positive private Telegram chat IDs only (comma-separated).
ZEPTO_MCP_ENABLED=false
# ZEPTO_MCP_ALLOWED_TELEGRAM_CHAT_IDS=123456789
# The host and container both resolve this through the ./data volume.
# ZEPTO_MCP_CONFIG_DIR=data/credentials/zepto-mcp-remote
# See docs/zepto-mcp.md for security, OAuth, and verification details.

# ---------------------------------------------------------------------------
# Gmail API connector (private Telegram users only)
# ---------------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/developer-experience.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ on:
- "docs/**"
- "entrypoint.sh"
- "mkdocs.yml"
- "mcp-bridge/**"
- "pyproject.toml"
- "scripts/write_compose_env.py"
- "setup.sh"
Expand All @@ -43,7 +42,6 @@ on:
- "docs/**"
- "entrypoint.sh"
- "mkdocs.yml"
- "mcp-bridge/**"
- "pyproject.toml"
- "scripts/write_compose_env.py"
- "setup.sh"
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,6 @@ jobs:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
KOKORO_TTS_BASE_URL: ${{ secrets.KOKORO_TTS_BASE_URL }}
KOKORO_TTS_VOICE: ${{ secrets.KOKORO_TTS_VOICE }}
ZEPTO_MCP_ENABLED: ${{ secrets.ZEPTO_MCP_ENABLED }}
ZEPTO_MCP_CONFIG_DIR: ${{ secrets.ZEPTO_MCP_CONFIG_DIR }}
ZEPTO_MCP_ALLOWED_TELEGRAM_CHAT_IDS: ${{ secrets.ZEPTO_MCP_ALLOWED_TELEGRAM_CHAT_IDS }}
EXA_API_KEY: ${{ secrets.EXA_API_KEY }}
BRAVE_SEARCH_API_KEY: ${{ secrets.BRAVE_SEARCH_API_KEY }}
BROWSER_USE_API_KEY: ${{ secrets.BROWSER_USE_API_KEY }}
Expand Down Expand Up @@ -195,9 +192,6 @@ jobs:
CLOUDFLARE_API_TOKEN \
KOKORO_TTS_BASE_URL \
KOKORO_TTS_VOICE \
ZEPTO_MCP_ENABLED \
ZEPTO_MCP_CONFIG_DIR \
ZEPTO_MCP_ALLOWED_TELEGRAM_CHAT_IDS \
EXA_API_KEY \
BRAVE_SEARCH_API_KEY \
BROWSER_USE_API_KEY \
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ capability boundaries:
a sandbox.

The root agent may receive private, user-scoped integrations such as Google
Health, Gmail, Zepto, TTS, and durable user files. Public ADK requests receive
Health, Gmail, TTS, and durable user files. Public ADK requests receive
only the tools explicitly allowed for their boundary.
Shared session-sandbox access does not grant access to another user's accounts.

Expand Down
26 changes: 0 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# syntax=docker/dockerfile:1

# ============================================================================
# MCP Bridge Stage: Install the exact locked Zepto transport dependency
# ============================================================================
FROM node:22-bookworm-slim AS mcp-bridge

WORKDIR /opt/blacki-mcp-bridge

COPY mcp-bridge/package.json mcp-bridge/package-lock.json ./

RUN --mount=type=cache,target=/root/.npm \
npm ci --omit=dev --ignore-scripts

# ============================================================================
# Builder Stage: Install dependencies with optimal caching
# ============================================================================
Expand Down Expand Up @@ -48,20 +36,6 @@ RUN --mount=type=cache,target=/root/.cache/uv \
# ============================================================================
FROM python:3.13-slim-bookworm AS runtime

# Node is copied from the matching Debian base so the production runtime never
# downloads npm packages. libatomic1 is the only extra shared library required
# by the official Node binary on the slim image.
RUN apt-get update && \
apt-get install -y --no-install-recommends libatomic1 && \
rm -rf /var/lib/apt/lists/*

COPY --from=mcp-bridge /usr/local/bin/node /usr/local/bin/node
COPY --from=mcp-bridge /opt/blacki-mcp-bridge /opt/blacki-mcp-bridge
RUN ln -s /opt/blacki-mcp-bridge/node_modules/.bin/mcp-remote \
/usr/local/bin/mcp-remote && \
node --version && \
node -e "const p=require('/opt/blacki-mcp-bridge/node_modules/mcp-remote/package.json'); if(p.version!=='0.1.38') process.exit(1)"

# Create non-root user for security (matching common host UID 1000)
RUN groupadd -g 1000 app && \
useradd -u 1000 -g app -s /bin/sh -m app
Expand Down
15 changes: 1 addition & 14 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ Blacki uses different stores for different responsibilities:
| Telegram photo parts in ADK history | SQLite-backed session events | Yes |
| Optional Mem0 memory with local Qdrant | `/app/data` | Yes with the Compose volume |
| Optional Mem0 memory with Qdrant Cloud | Managed Qdrant | Provider-managed |
| Zepto OAuth credentials | `/app/data/credentials/zepto-mcp-remote/` | Yes with the Compose volume |
| Google Health refresh tokens and normalized summaries | SQLite (`tools.db`), tokens encrypted at rest | Yes with the Compose volume |
| Google Health meal export revisions and retry state | SQLite (`tools.db`), payloads account-bound and sent over HTTPS | Yes with the Compose volume |
| Application logs and traces | JSON files under `/app/logs` | Yes with the Compose volume |
Expand Down Expand Up @@ -161,9 +160,7 @@ Optional tools follow the project's cloud-first principle:
and screenshots remain in the temporary sandbox, and this tool adds no
saved-login service or durable file retention;
- speech synthesis can use a private Kokoro API reachable over Tailscale;
- grocery shopping can use Zepto's hosted MCP server for one allowlisted,
shared account;
- vector memory can use Qdrant Cloud; and
- vector memory can use Qdrant Cloud;
- code execution can use an OpenSandbox server; and
- health summaries can use Google Health API after private Telegram OAuth.

Expand All @@ -179,16 +176,6 @@ does not retry Telegram delivery automatically. Configuring the tool disables
content-rich ADK and OpenInference logging, although the local ADK session
database still retains tool calls and arguments as normal conversation history.

Zepto is registered only on a Telegram-specific root-agent runner. The public
ADK HTTP runner never receives the Zepto toolset.
Unauthorized Telegram identities are rejected before Blacki opens an MCP
connection. ADK confirmation is required only when an order or payment tool
uses `confirmOrder=true`; other individual Zepto tools run directly. Its OAuth
files are plaintext protected by a `0700` directory and `0600` file
permissions; they are not encrypted. Shopping prompts, tool calls, and results
remain in the local ADK session database and are sent to the configured model
as part of normal agent execution.

Google Health summaries are a separate read-only boundary. The connector uses
the current Google Health API, not the legacy Fitbit Web API. It requests the
current read-only activity/fitness, measurements, and sleep scopes plus
Expand Down
19 changes: 3 additions & 16 deletions docs/base-infra/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,6 @@ If R2 is unavailable, Telegram processing can continue with an explicit
temporary-storage warning. If the sandbox is unavailable, a successfully
stored object remains available for a later restore.

## Zepto MCP

| Variable | Default | Purpose |
| --- | --- | --- |
| `ZEPTO_MCP_ENABLED` | `false` | Enable the root-only Zepto skill after OAuth |
| `ZEPTO_MCP_ALLOWED_TELEGRAM_CHAT_IDS` | unset | Comma-separated positive private chat IDs allowed to use the shared account |
| `ZEPTO_MCP_CONFIG_DIR` | `data/credentials/zepto-mcp-remote` | Permission-protected bridge credential directory shared by host and container |

The allowlist deliberately rejects Telegram groups, topics, and arbitrary HTTP
user IDs. All allowed chats share one Zepto account and cart. Complete the
one-time OAuth flow before enabling the integration; see
[Zepto MCP](../zepto-mcp.md).

## Observability

| Variable | Default | Purpose |
Expand All @@ -276,9 +263,9 @@ Blacki always exports spans to local JSON. A validated trace-specific or global
endpoint adds gRPC or HTTP/protobuf OTLP export; trace-specific values take
precedence. See [Observability](observability.md).

When Zepto is enabled, Blacki forces both content-capture variables to `false`
and disables the OpenInference Google ADK instrumentor because it otherwise
records raw tool parameters.
When any private-tool integration is configured, Blacki forces both
content-capture variables to `false` and disables the OpenInference Google ADK
instrumentor because it otherwise records raw tool parameters.

## Precedence

Expand Down
7 changes: 3 additions & 4 deletions docs/base-infra/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ Both `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=false` and
and legacy ADK content capture. Capturing prompts and responses can expose
personal data, credentials, and tool results.

When `ZEPTO_MCP_ENABLED=true` or `KOKORO_TTS_BASE_URL` is configured, Blacki
forces both values to `false` and disables the OpenInference Google ADK
instrumentor. Zepto additionally prevents MCP body-debug logging. The ADK
session database still retains tool calls and results so interrupted turns and
When any private-tool integration is configured, Blacki forces both values to
`false` and disables the OpenInference Google ADK instrumentor. The ADK session
database still retains tool calls and results so interrupted turns and
confirmations can resume correctly.

## Remote OTLP export
Expand Down
2 changes: 0 additions & 2 deletions docs/documentation-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ The documentation is organized around the lifecycle of a Blacki installation.

- [First VPS deployment](DEPLOYMENT.md) is the supported Docker Compose path.
- [Telegram setup](telegram-setup.md) connects the primary chat interface.
- [Zepto MCP](zepto-mcp.md) authenticates and protects the optional shared
Zepto account.
- [Local development](development.md) covers uv, tests, and MkDocs.

## Operate
Expand Down
105 changes: 0 additions & 105 deletions docs/zepto-mcp.md

This file was deleted.

Loading
Loading