Files
open-harness/.pi/overlays/docker-compose.slack.yml
T
OpenHarness BotandClaude Opus 4.7 e7e96ccfdd feat: add Slack support to .pi/ as a Pi extension
Adds .pi/extensions/slack/ with Socket Mode bridge, allowlist gating,
and 4 LLM-callable tools (slack_post/reply/react/upload). Inbound
messages bridge into pi.sendUserMessage() with ctx.isIdle() guard;
turn_end posts the assistant's reply back to Slack via SlackContext.
session_shutdown tears down the Socket Mode connection.

Customizations preserved from portfolio-advisor reference:
- threadTs field on event types (7 sites in events.ts)
- threadParent routing in createSlackContext (context.ts:45)
- exported parseEventContent + buildSyntheticEvent

Tests: 27 new (3 files); 78 pre-existing tests still green; 114 total.

Plan: .claude/plans/context-study-https-github-com-ryaneggz-binary-hartmanis.md

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 23:03:04 -06:00

17 lines
715 B
YAML

# Slack Integration Overlay
# ==========================
# Purpose: Enable Slack bot (pi) automation with configurable LLM provider.
# Requirements: SLACK_APP_TOKEN and SLACK_BOT_TOKEN env vars must be set before use
# Optional: OPENAI_API_KEY for OpenAI-based integrations
# Usage: docker compose -f docker-compose.yml -f docker-compose.slack.yml up
# Provides: Slack env vars only. Pi auth persistence lives in the base
# compose (pi-auth named volume → /home/sandbox/.pi) or in the
# docker-compose.pi-host.yml overlay (host bind-mount).
services:
sandbox:
environment:
- SLACK_APP_TOKEN=${SLACK_APP_TOKEN:-}
- SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-}