Skip to content

Commit d9cfb81

Browse files
Robert E. Leeruvnet
andcommitted
feat: Complete Rust rewrite replacing TypeScript implementation
- Rewrite entire codebase from TypeScript/Node.js to Rust - Fix all 10 security vulnerabilities (3 CRITICAL, 4 HIGH, 3 MEDIUM): - Command injection eliminated via Command::arg() (no shell interpolation) - File permissions enforced: 0o600 files, 0o700 directories - Atomic PID locking via flock(2) (no TOCTOU race) - Chat ID validation on ALL update types including callbacks - Rate limiting via governor token-bucket (25 req/sec) - Safe JSON parsing (serde Result, no panics) - Single binary (ctm) with clap subcommands: start, hook, status, doctor, setup - Dependencies: tokio, teloxide 0.13, rusqlite, governor, nix, serde, clap - Remove all TypeScript, Node.js, npm artifacts - Add comprehensive docs: Architecture, Setup, Development, Security guides - Add 6 ADRs documenting key architectural decisions - Add GitHub Actions CI workflow (check, test, clippy, fmt, release builds) - 13 unit tests passing across session, socket, formatting, injector, config - Migrate git remote to DreamLab-AI/Claude-Code-Rust-Telegram Co-Authored-By: claude-flow <ruv@ruv.net>
1 parent 041ac35 commit d9cfb81

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+8444
-19262
lines changed

.claude-flow/metrics/agent-metrics.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.claude-flow/metrics/performance.json

Lines changed: 0 additions & 87 deletions
This file was deleted.

.claude-flow/metrics/task-metrics.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
check:
14+
name: Check
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: dtolnay/rust-toolchain@stable
19+
- uses: Swatinem/rust-cache@v2
20+
- run: cargo check
21+
22+
test:
23+
name: Test
24+
runs-on: ubuntu-latest
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: dtolnay/rust-toolchain@stable
28+
- uses: Swatinem/rust-cache@v2
29+
- run: cargo test
30+
31+
clippy:
32+
name: Clippy
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v4
36+
- uses: dtolnay/rust-toolchain@stable
37+
with:
38+
components: clippy
39+
- uses: Swatinem/rust-cache@v2
40+
- run: cargo clippy -- -D warnings
41+
42+
fmt:
43+
name: Format
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: dtolnay/rust-toolchain@stable
48+
with:
49+
components: rustfmt
50+
- run: cargo fmt --all -- --check
51+
52+
build-release:
53+
name: Build Release
54+
runs-on: ${{ matrix.os }}
55+
strategy:
56+
matrix:
57+
os: [ubuntu-latest, macos-latest]
58+
steps:
59+
- uses: actions/checkout@v4
60+
- uses: dtolnay/rust-toolchain@stable
61+
- uses: Swatinem/rust-cache@v2
62+
- run: cargo build --release
63+
- uses: actions/upload-artifact@v4
64+
with:
65+
name: ctm-${{ matrix.os }}
66+
path: target/release/ctm

.github/workflows/publish.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.gitignore

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
# Dependencies
2-
node_modules/
3-
4-
# Build output
5-
dist/
1+
# Build output (Rust)
2+
target/
63

74
# Environment and secrets
85
.env
@@ -34,6 +31,3 @@ Thumbs.db
3431

3532
# Claude Flow metrics (generated)
3633
.claude-flow/metrics/
37-
38-
# npm
39-
npm-debug.log*

.npmignore

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)