No description
Find a file
Nick Tabeling 714e0c01e5
Some checks failed
CI / build-and-test (ubuntu-latest) (pull_request) Has been cancelled
CI / build-and-test (windows-latest) (pull_request) Has been cancelled
CI / lint (pull_request) Has been cancelled
fix(DIS-102): sanitize response before DB storage to break path feedback loop
The root cause was twofold:
1. Raw (unsanitized) agent responses were stored in the conversation
   history DB. On subsequent calls, these paths were fed back to the
   agent as context, causing it to reproduce full paths regardless of
   Discord-side sanitization.
2. repoRoot (workspace_path) was not passed to sanitizeForDiscord,
   so workspace-specific paths were only partially masked via the
   home directory fallback.

Fix: sanitize the full response once before both sending to Discord
and storing in the DB. Pass workspace_path as repoRoot for precise
path replacement. Add Windows path tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 10:02:17 +02:00
.claude/commands initial 2026-04-08 14:21:19 +02:00
.forgejo feat(ci): add Forgejo Actions pipeline with build, test, lint 2026-04-09 11:49:48 +02:00
.obsidian forgejo management-token + organization/tasks created + workflow/board 2026-04-08 16:44:12 +02:00
docs Merge pull request 'docs(DIS-110): add cli-feature-probe.md for Phase 2 sanity checks' (#43) from phase-1/cli-probe into main 2026-04-09 15:25:57 +00:00
scripts forgejo management-token + organization/tasks created + workflow/board 2026-04-08 16:44:12 +02:00
src fix(DIS-102): sanitize response before DB storage to break path feedback loop 2026-04-10 10:02:17 +02:00
tasks forgejo management-token + organization/tasks created + workflow/board 2026-04-08 16:44:12 +02:00
tests fix(DIS-102): sanitize response before DB storage to break path feedback loop 2026-04-10 10:02:17 +02:00
.env.example chore(DIS-109): add vitest.config.mts, complete .env.example, test scripts 2026-04-09 17:08:39 +02:00
.eslintrc.cjs feat(ci): add Forgejo Actions pipeline with build, test, lint 2026-04-09 11:49:48 +02:00
.gitignore Merge pull request 'chore: add dist/ to .gitignore, remove from tracking' (#31) from fix/ci-env-login into main 2026-04-09 11:29:19 +00:00
ARCHITECTURE.md initial 2026-04-08 14:21:19 +02:00
CLAUDE.md initial 2026-04-08 14:21:19 +02:00
disclaw.yaml feat(DIS-104): global semaphore for max_concurrent_agents cap 2026-04-09 17:08:58 +02:00
package-lock.json feat(DIS-107): Zod schemas for disclaw.yaml, agent.yaml, CLI output 2026-04-09 17:49:44 +02:00
package.json Merge pull request 'refactor(DIS-108): extract DB schema to src/db/schema.sql (SSOT)' (#50) from phase-1/db-schema-ssot into main 2026-04-09 16:01:48 +00:00
README.md feat(ci): add Forgejo Actions pipeline with build, test, lint 2026-04-09 11:49:48 +02:00
tsconfig.json initial 2026-04-08 14:21:19 +02:00
vitest.config.mts chore(DIS-109): add vitest.config.mts, complete .env.example, test scripts 2026-04-09 17:08:39 +02:00

DisClaw

DisClaw is a Discord-bot-powered multi-agent workspace manager built on Claude Code. It turns a Discord server into a multi-agent development environment where each channel maps to a local workspace folder with its own Claude Code agent identity.

Quick Start

npm install
cp .env.example .env      # add DISCORD_BOT_TOKEN and DISCORD_GUILD_ID
npm run build
npm run start

Configuration

Edit disclaw.yaml to customise global settings:

Key Default Description
workspaces_root ~/.disclaw/workspaces Directory where agent workspaces are created
management_channel disclaw Discord channel name for bot management
claude_command claude Path or name of the Claude Code CLI binary
claude_timeout_seconds 120 Timeout for each Claude CLI invocation

Secrets go in .env:

DISCORD_BOT_TOKEN=your-token-here
DISCORD_GUILD_ID=your-guild-id       # optional, speeds up slash-command registration
CLAUDE_PATH=/path/to/claude          # optional, overrides claude_command

Architecture

See ARCHITECTURE.md for a detailed breakdown of the component design.

Development

npm install        # install dependencies
npm run build      # compile TypeScript
npm test           # run unit tests (Vitest)
npm run dev        # build + start in one step

Migration bestehender Workspaces

Ab dieser Version werden Workspaces standardmaessig unter ~/.disclaw/workspaces/ angelegt (konfigurierbar via disclaw.yaml -> workspaces_root).

Bestehende Workspaces unter ./workspaces/ muessen manuell verschoben werden:

mv ./workspaces/* ~/.disclaw/workspaces/

Danach die DB-Eintraege in data/disclaw.db (Tabelle workspaces, Spalte workspace_path) aktualisieren.

CI

Jeder Pull Request gegen main durchläuft automatisch:

  • npm run build — TypeScript-Kompilierung (Linux + Windows)
  • npm test — Vitest Unit- und Integration-Tests (Linux + Windows)
  • npm run lint — ESLint mit shell:true-Guard

Pipeline-Konfiguration: .forgejo/workflows/ci.yml