sync: auto-sync from GURU-BEAST-ROG at 2026-05-01 15:05:53

Author: Mike Swanson
Machine: GURU-BEAST-ROG
Timestamp: 2026-05-01 15:05:53
This commit is contained in:
2026-05-01 15:05:53 -07:00
parent ec98c6c636
commit b008b61440
11 changed files with 429 additions and 559 deletions

View File

@@ -12,13 +12,23 @@ Discord bot providing MSP team access to ClaudeTools database, M365 remediation-
## Architecture
As of Phase 1.5, the bot is "Claude Code in a Discord channel." Each Discord
thread is a persistent `ClaudeSDKClient` session whose `cwd` is the ClaudeTools
repo root, with `.claude/CLAUDE.md` as the system prompt. The agent uses the
Claude Agent SDK's native tools (Read, Edit, Write, Bash, Glob, Grep, etc.) —
the bot does not hand-write tool definitions or call the ClaudeTools HTTP API.
```
Discord Message Handler Claude API (with Tools)
┌────────────┴────────────┐
ClaudeTools API Remediation Scripts
(HTTP Client) (Bash Subprocess)
Discord thread ──> MessageHandler ──> ClaudeAgentManager
v
ClaudeSDKClient (per thread)
cwd = ClaudeTools repo
system_prompt = .claude/CLAUDE.md
v
Native SDK tools:
Read / Edit / Write / Bash / Glob / Grep / ...
```
## Prerequisites
@@ -171,13 +181,16 @@ discord-bot/
## Development Roadmap
### Phase 1: MVP (Current)
### Phase 1.5: Claude Agent SDK refactor (Current)
- [x] Discord bot connection
- [x] Claude API streaming
- [x] Thread-based conversations
- [x] Basic tool definitions
- [ ] **TODO:** Tool execution (ClaudeTools API)
- [ ] **TODO:** Tool execution (Remediation scripts)
- [x] Claude Agent SDK streaming (replaces raw Anthropic SDK)
- [x] Per-thread persistent agent sessions (`ClaudeSDKClient`)
- [x] Workspace = ClaudeTools repo; system prompt = `.claude/CLAUDE.md`
- [x] Native SDK tools (Read/Edit/Write/Bash/Glob/Grep) — no hand-written tools
- The hand-written `query_claudetools_api`, `run_breach_check`, and
`run_tenant_sweep` tools from the Phase 1 scaffold were removed. The agent
invokes those workflows via the existing skills under `.claude/skills/` and
via Bash + the vault wrapper, the same way Claude Code does.
### Phase 2: ClaudeTools API Integration
- [ ] HTTP client with JWT auth