Commit graph

23 commits

Author SHA1 Message Date
dev
b3b9ecb6c2 .gitignore aktualisiert
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
2026-04-09 11:27:11 +00:00
dev
fc9c229f92 Merge pull request 'fix(env): remove CI=true -- breaks Claude Code OAuth login' (#29) from fix/ci-env-login into main
Some checks are pending
CI / build-and-test (ubuntu-latest) (push) Waiting to run
CI / build-and-test (windows-latest) (push) Waiting to run
CI / lint (push) Waiting to run
Reviewed-on: #29
2026-04-09 11:19:14 +00:00
Nick Tabeling
ca461d0da6 fix(env): remove CI=true from sanitizedEnv, breaks Claude Code OAuth login
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
2026-04-09 13:18:25 +02:00
dev
5765cf285f Merge pull request 'DIS-008: Forgejo Actions CI (build, test, lint)' (#28) from phase-0/ci-pipeline into main
Some checks are pending
CI / build-and-test (ubuntu-latest) (push) Waiting to run
CI / build-and-test (windows-latest) (push) Waiting to run
CI / lint (push) Waiting to run
Reviewed-on: #28
2026-04-09 10:55:54 +00:00
dev
f0d6c62347 Merge pull request 'DIS-007: Lock-File gegen Doppelstart' (#27) from phase-0/startup-lockfile into main
Reviewed-on: #27
2026-04-09 10:55:29 +00:00
Nick Tabeling
c2a264f6d0 feat(ci): add Forgejo Actions pipeline with build, test, lint
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
- Add .forgejo/workflows/ci.yml with matrix (ubuntu/windows), build, test, lint jobs
- Add .eslintrc.cjs with shell:true guard (no-restricted-syntax) and @typescript-eslint rules
- Add lint script to package.json and ESLint v8 devDependencies
- Add CI section to README.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:49:48 +02:00
Nick Tabeling
dc4a1ef241 feat(runtime): add startup lockfile to prevent double-start
Implements acquireLock() in src/runtime/lockfile.ts that writes a PID-stamped
lock file under workspaces_root, detects live vs stale locks via process.kill(pid, 0),
and returns a release function. src/index.ts acquires the lock before DB init and
releases it in the graceful-shutdown handler. Four unit tests cover acquire, duplicate-
acquire rejection, stale-lock recovery, and release.
2026-04-09 11:49:17 +02:00
dev
0c512a0cbc Merge pull request 'DIS-005: Path-Traversal-Check in /new-agent' (#25) from phase-0/path-traversal-check into main
Reviewed-on: #25
2026-04-09 09:44:54 +00:00
dev
90e7cf37ab Merge pull request 'DIS-006: settings.json-Template haerten + CLAUDE.md Injection-Klausel' (#24) from phase-0/harden-settings-and-claudemd into main
Reviewed-on: #24
2026-04-09 09:44:33 +00:00
dev
613758e912 Merge branch 'main' into phase-0/path-traversal-check 2026-04-09 09:43:41 +00:00
dev
3cb9a5c636 Merge pull request 'DIS-004: Runner mit --bare + --append-system-prompt-file aufrufen' (#26) from phase-0/bare-and-append-identity into main
Reviewed-on: #26
2026-04-09 09:43:25 +00:00
Nick Tabeling
a54918c3be feat(runner): add --bare and --append-system-prompt-file flags
Prevents CLAUDE.md walk-up through parent directories by passing --bare
to every Claude CLI invocation, and explicitly injects the workspace
CLAUDE.md via --append-system-prompt-file so agent identity is isolated.
Adds fake-claude fixture and integration test to verify flags are present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:22:44 +02:00
Nick Tabeling
b4cc00e93c fix(new-agent): add path traversal containment check
Extracts validateAgentName() with path.resolve containment guard after
regex validation; returns clean ephemeral Discord reply on violation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:19:28 +02:00
Nick Tabeling
028ea0bf28 feat(identity): harden settings.json template, add injection-resistance clause
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 11:19:19 +02:00
dev
390661eea9 Merge pull request 'DIS-001: Workspace-Root nach ~/.disclaw/workspaces/ verschieben' (#23) from phase-0/workspace-root-home into main
Reviewed-on: #23
2026-04-09 09:00:27 +00:00
Nick Tabeling
d71081d2b1 feat(config): move workspaces_root to home dir, add tilde expansion
- disclaw.yaml: change default workspaces_root to ~/.disclaw/workspaces
- src/config/loader.ts: add expandWorkspacesRoot() with ~ expansion via
  os.homedir(), path.resolve() normalisation, and in-repo warning via
  console.warn (explains CLAUDE.md walk-up leak risk)
- tests/unit/workspace-root-resolve.test.ts: Vitest unit tests (a-d)
- README.md: add Migration bestehender Workspaces section

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 10:40:34 +02:00
Nick Tabeling
510969b2d1 fix(runner): add sanitizedEnv, remove process.env passthrough
Introduces src/runtime/env.ts with a pure sanitizedEnv() function that
strips DISCORD_BOT_TOKEN, DISCORD_CLIENT_SECRET, DISCORD_PUBLIC_KEY, and
all keys matching /^(DISCLAW_SECRET_|SECRET_|TOKEN_|API_KEY_?)/i before
passing the environment to spawned Claude Code child processes. Adds
optional env_blocklist field to DisclawConfig. Runner now passes
DISCLAW_AGENT_NAME and respects the blocklist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 10:39:06 +02:00
dev
b20f1fa769 Merge pull request 'DIS-002: shell:false + cross-spawn Windows-Fix im Runner' (#21) from phase-0/harden-spawn into main
Reviewed-on: #21
2026-04-09 08:34:43 +00:00
Nick Tabeling
bade6d07f6 fix(runner): replace shell:true with cross-spawn, add resolveClaude
- Remove shell:true from runner.ts (command injection vector closed)
- Import cross-spawn instead of child_process.spawn; add windowsHide:true
- Add src/runtime/resolve-claude.ts: CLAUDE_PATH env override, where/which
  PATH fallback, in-memory cache, clear error message on not-found
- Add tests/unit/resolve-claude.test.ts: 5 Vitest tests covering env override,
  PATH fallback, multi-line output trimming, error case, and cache behaviour
- Add cross-spawn + @types/cross-spawn to package.json; add vitest + test script
2026-04-09 10:29:58 +02:00
dev
59c5a0c387 Merge pull request 'forgejo management-token + organization/tasks created + workflow/board' (#20) from phase-pre/organization into main
Reviewed-on: #20
2026-04-08 14:49:30 +00:00
Nick Tabeling
d8f70aa188 forgejo management-token + organization/tasks created + workflow/board 2026-04-08 16:44:12 +02:00
Nick Tabeling
8ca3ebffde dist-folder 2026-04-08 14:24:45 +02:00
Nick Tabeling
69e0b7d727 initial 2026-04-08 14:21:19 +02:00