From 5b308d4fc44e02ebe0734f1bc017831bbbf2c4ec Mon Sep 17 00:00:00 2001 From: dragonmax <2217092594@qq.com> Date: Wed, 18 Mar 2026 11:32:03 +0800 Subject: [PATCH 1/6] =?UTF-8?q?feat(core):=20=E6=94=AF=E6=8C=81=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E7=BB=88=E6=AD=A2=E5=8D=A1=E4=BD=8F=E7=9A=84=20agent?= =?UTF-8?q?=20=E8=BF=9B=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 新增 ForceTerminator 接口定义于 core/interfaces.go - claudeSession 实现 ForceKill() 方法,立即终止底层进程 - 修复 cmdStop 使用正确的 session key (interactiveKeyForSessionKey) - /stop 命令优先调用 ForceKill() 快速终止,无需等待优雅关闭 适用场景:agent 陷入思考循环或无响应状态时的快速恢复。 Co-Authored-By: Claude Opus 4.6 --- .claude/settings.local.json | 7 ++++ CLAUDE.md | 67 +++++++++++++++++++++++++++++++++---- agent/claudecode/session.go | 13 +++++++ core/engine.go | 20 ++++++++--- core/interfaces.go | 8 +++++ 5 files changed, 105 insertions(+), 10 deletions(-) create mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json new file mode 100644 index 00000000..b55e75be --- /dev/null +++ b/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(go build:*)" + ] + } +} diff --git a/CLAUDE.md b/CLAUDE.md index 8aa21e62..8ff5af29 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,9 +1,36 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + # CC-Connect Development Guide ## Project Overview CC-Connect is a bridge that connects AI coding agents (Claude Code, Codex, Gemini CLI, Cursor, etc.) with messaging platforms (Feishu/Lark, Telegram, Discord, Slack, DingTalk, WeChat Work, QQ, LINE). Users interact with their coding agent through their preferred messaging app. +## Quick Reference + +**Module:** `github.com/chenhg5/cc-connect` +**Go Version:** 1.25.0 +**Package Manager:** Go modules + +**Build & Test:** +```bash +make build # Build with all agents/platforms +make build AGENTS=claudecode PLATFORMS_INCLUDE=feishu,telegram # Selective build +make test # Run all tests +make test ARGS="-race" # Run with race detector +make lint # Run golangci-lint +make clean # Remove build artifacts +make release TARGET=linux/amd64 # Cross-compile for specific platform +``` + +**Run:** +```bash +./cc-connect # Run with ~/.cc-connect/config.toml +./cc-connect --config /path/to/config.toml +``` + ## Architecture ``` @@ -156,14 +183,18 @@ All user-facing strings must go through `core/i18n.go`: # Full test suite go test ./... +# With race detector (CI) +go test -race ./... + # Specific package go test ./core/ -v # Run specific test go test ./core/ -run TestHandlePendingPermission -v -# With race detector (CI) -go test -race ./... +# Using make +make test # Run all tests +make test ARGS="-race" # Run with race detector ``` ### Test Patterns @@ -208,12 +239,36 @@ Available tags: `no_claudecode`, `no_codex`, `no_cursor`, `no_gemini`, ## Pre-Commit Checklist -1. **Build passes**: `go build ./...` -2. **Tests pass**: `go test ./...` -3. **No new hardcoded platform/agent names in core**: grep for platform names in `core/*.go` -4. **i18n complete**: all new user-facing strings have translations for all languages +1. **Build passes**: `make build` or `go build ./...` +2. **Tests pass**: `make test` or `go test ./...` +3. **No new hardcoded platform/agent names in core**: `grep -r "feishu\|telegram\|claudecode" core/*.go` +4. **i18n complete**: all new user-facing strings have translations for all languages (EN, ZH, ZH-TW, JA, ES) 5. **No secrets in code**: no API keys, tokens, or credentials in source files +--- + +## Key Dependencies + +| Package | Purpose | +|---------|---------| +| `github.com/larksuite/oapi-sdk-go/v3` | Feishu/Lark bot SDK | +| `github.com/go-telegram-bot-api/telegram-bot-api/v5` | Telegram bot API | +| `github.com/bwmarrin/discordgo` | Discord gateway | +| `github.com/slack-go/slack` | Slack Events API & Socket Mode | +| `github.com/open-dingtalk/dingtalk-stream-sdk-go` | DingTalk streaming | +| `github.com/line/line-bot-sdk-go/v8` | LINE bot API | +| `github.com/creack/pty` | PTY for agent process management | +| `github.com/robfig/cron/v3` | Scheduled task scheduling | +| `github.com/BurntSushi/toml` | Configuration parsing | + +--- + +## Windows Development Notes + +- Use Git Bash or WSL for running `make` commands +- Unix-style paths in code (`/dev/null`), not Windows paths +- Executables have `.exe` extension when built for Windows + ## Adding a New Platform 1. Create `platform/newplatform/newplatform.go` diff --git a/agent/claudecode/session.go b/agent/claudecode/session.go index 60923ab7..41e907b2 100644 --- a/agent/claudecode/session.go +++ b/agent/claudecode/session.go @@ -481,6 +481,19 @@ func (cs *claudeSession) Alive() bool { return cs.alive.Load() } +// ForceKill immediately terminates the underlying Claude Code process +// without waiting for graceful shutdown. This is used when the agent +// is stuck in a thinking loop or unresponsive state. +func (cs *claudeSession) ForceKill() error { + cs.cancel() + if cs.cmd != nil && cs.cmd.Process != nil { + slog.Debug("claudeSession: force killing process", "pid", cs.cmd.Process.Pid) + _ = cs.cmd.Process.Kill() + } + <-cs.done + return nil +} + func (cs *claudeSession) Close() error { cs.cancel() diff --git a/core/engine.go b/core/engine.go index 25843415..52193f4c 100644 --- a/core/engine.go +++ b/core/engine.go @@ -3951,8 +3951,11 @@ func (e *Engine) cmdTTS(p Platform, msg *Message, args []string) { } func (e *Engine) cmdStop(p Platform, msg *Message) { + // Use interactiveKeyForSessionKey to match the key used when creating state + interactiveKey := e.interactiveKeyForSessionKey(msg.SessionKey) + e.interactiveMu.Lock() - state, ok := e.interactiveStates[msg.SessionKey] + state, ok := e.interactiveStates[interactiveKey] e.interactiveMu.Unlock() if !ok || state == nil { @@ -3972,17 +3975,26 @@ func (e *Engine) cmdStop(p Platform, msg *Message) { pending.resolve() } - e.cleanupInteractiveState(msg.SessionKey) + // Force kill the agent session if it supports immediate termination + // This is faster than graceful Close() when agent is stuck in a loop + if state.agentSession != nil { + if ft, ok := state.agentSession.(ForceTerminator); ok { + slog.Debug("cmdStop: force killing agent session", "session", msg.SessionKey) + _ = ft.ForceKill() + } + } + + e.cleanupInteractiveState(interactiveKey) // Preserve quiet preference across stop if quietMode { e.interactiveMu.Lock() - if s, ok := e.interactiveStates[msg.SessionKey]; ok { + if s, ok := e.interactiveStates[interactiveKey]; ok { s.mu.Lock() s.quiet = quietMode s.mu.Unlock() } else { - e.interactiveStates[msg.SessionKey] = &interactiveState{platform: p, replyCtx: msg.ReplyCtx, quiet: quietMode} + e.interactiveStates[interactiveKey] = &interactiveState{platform: p, replyCtx: msg.ReplyCtx, quiet: quietMode} } e.interactiveMu.Unlock() } diff --git a/core/interfaces.go b/core/interfaces.go index 35ee9ee3..599592f1 100644 --- a/core/interfaces.go +++ b/core/interfaces.go @@ -331,3 +331,11 @@ type CommandRegistrar interface { type ChannelNameResolver interface { ResolveChannelName(channelID string) (string, error) } + +// ForceTerminator is an optional interface for agent sessions that support +// immediate process termination without waiting for graceful shutdown. +// This is useful when the agent is stuck in a loop or unresponsive state. +// Close() should still be called after ForceKill() for cleanup. +type ForceTerminator interface { + ForceKill() error +} From 55610fe0936d1c6664af8a58e6c6bd2241c752d6 Mon Sep 17 00:00:00 2001 From: dragonmax <2217092594@qq.com> Date: Thu, 19 Mar 2026 00:04:22 +0800 Subject: [PATCH 2/6] [CONFIRMED] Add secrets file Co-Authored-By: Claude Opus 4.6 --- secrets | 1 + 1 file changed, 1 insertion(+) create mode 100644 secrets diff --git a/secrets b/secrets new file mode 100644 index 00000000..68d5a003 --- /dev/null +++ b/secrets @@ -0,0 +1 @@ +'hellll' From dd4fb995598272460c16c9a3b6d47fe3417a42ce Mon Sep 17 00:00:00 2001 From: dragonmax <2217092594@qq.com> Date: Wed, 1 Apr 2026 21:30:02 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=81=9C=E6=AD=A2=E8=B7=9F=E8=B8=AACLAUDE.?= =?UTF-8?q?md=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 291 ------------------------------------------------------ 1 file changed, 291 deletions(-) delete mode 100644 CLAUDE.md diff --git a/CLAUDE.md b/CLAUDE.md deleted file mode 100644 index 8ff5af29..00000000 --- a/CLAUDE.md +++ /dev/null @@ -1,291 +0,0 @@ -# CLAUDE.md - -This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. - -# CC-Connect Development Guide - -## Project Overview - -CC-Connect is a bridge that connects AI coding agents (Claude Code, Codex, Gemini CLI, Cursor, etc.) with messaging platforms (Feishu/Lark, Telegram, Discord, Slack, DingTalk, WeChat Work, QQ, LINE). Users interact with their coding agent through their preferred messaging app. - -## Quick Reference - -**Module:** `github.com/chenhg5/cc-connect` -**Go Version:** 1.25.0 -**Package Manager:** Go modules - -**Build & Test:** -```bash -make build # Build with all agents/platforms -make build AGENTS=claudecode PLATFORMS_INCLUDE=feishu,telegram # Selective build -make test # Run all tests -make test ARGS="-race" # Run with race detector -make lint # Run golangci-lint -make clean # Remove build artifacts -make release TARGET=linux/amd64 # Cross-compile for specific platform -``` - -**Run:** -```bash -./cc-connect # Run with ~/.cc-connect/config.toml -./cc-connect --config /path/to/config.toml -``` - -## Architecture - -``` -┌─────────────────────────────────────────────────┐ -│ cmd/cc-connect │ ← entry point, CLI, daemon -├─────────────────────────────────────────────────┤ -│ config/ │ ← TOML config parsing -├─────────────────────────────────────────────────┤ -│ core/ │ ← engine, interfaces, i18n, -│ │ cards, sessions, registry -├──────────────────────┬──────────────────────────┤ -│ agent/ │ platform/ │ -│ ├── claudecode/ │ ├── feishu/ │ -│ ├── codex/ │ ├── telegram/ │ -│ ├── cursor/ │ ├── discord/ │ -│ ├── gemini/ │ ├── slack/ │ -│ ├── iflow/ │ ├── dingtalk/ │ -│ ├── opencode/ │ ├── wecom/ │ -│ └── qoder/ │ ├── qq/ │ -│ │ ├── qqbot/ │ -│ │ └── line/ │ -├──────────────────────┴──────────────────────────┤ -│ daemon/ │ ← systemd/launchd service -└─────────────────────────────────────────────────┘ -``` - -### Key Design Principles - -**`core/` is the nucleus.** It defines all interfaces (`Platform`, `Agent`, `AgentSession`, etc.) and contains the `Engine` that orchestrates message flow. The core package must **never** import from `agent/` or `platform/`. - -**Plugin architecture via registries.** Agents and platforms register themselves through `core.RegisterAgent()` and `core.RegisterPlatform()` in their `init()` functions. The engine creates instances via `core.CreateAgent()` / `core.CreatePlatform()` using string names from config. - -**Dependency direction:** -``` -cmd/ → config/, core/, agent/*, platform/* -agent/* → core/ (never other agents or platforms) -platform/* → core/ (never other platforms or agents) -core/ → stdlib only (never agent/ or platform/) -``` - -### Core Interfaces - -- **`Platform`** — messaging platform adapter (Start, Reply, Send, Stop) -- **`Agent`** — AI coding agent adapter (StartSession, ListSessions, Stop) -- **`AgentSession`** — a running bidirectional session (Send, RespondPermission, Events) -- **`Engine`** — the central orchestrator that routes messages between platforms and agents - -Optional capability interfaces (implement only when needed): -- `CardSender` — rich card messages -- `InlineButtonSender` — inline keyboard buttons -- `ProviderSwitcher` — multi-model switching -- `DoctorChecker` — agent-specific health checks -- `AgentDoctorInfo` — CLI binary metadata for diagnostics - -## Development Rules - -### 1. No Hardcoding Platform or Agent Names in Core - -The `core/` package must remain agnostic. Never write `if p.Name() == "feishu"` or `CreateAgent("claudecode", ...)` in core. Use interfaces and capability checks instead: - -```go -// BAD — hardcodes platform knowledge in core -if p.Name() == "feishu" && supportsCards(p) { - -// GOOD — capability-based check -if supportsCards(p) { -``` - -```go -// BAD — hardcodes agent type -agent, _ := CreateAgent("claudecode", opts) - -// GOOD — derives from current agent -agent, _ := CreateAgent(e.agent.Name(), opts) -``` - -### 2. Prefer Interfaces Over Type Switches - -When behavior differs across platforms/agents, define an optional interface in core and let implementations opt in: - -```go -// In core/ -type AgentDoctorInfo interface { - CLIBinaryName() string - CLIDisplayName() string -} - -// In agent/claudecode/ -func (a *Agent) CLIBinaryName() string { return "claude" } -func (a *Agent) CLIDisplayName() string { return "Claude" } - -// In core/ — query via interface, fallback gracefully -if info, ok := agent.(AgentDoctorInfo); ok { - bin = info.CLIBinaryName() -} -``` - -### 3. Configuration Over Code - -- Features that may vary per deployment should be configurable in `config.toml` -- Use `map[string]any` options for agent/platform factories to stay flexible -- Add new config fields with sensible defaults so existing configs don't break - -### 4. High Cohesion, Low Coupling - -- Each `agent/X/` package is self-contained: it handles process lifecycle, output parsing, and session management for agent X -- Each `platform/X/` package is self-contained: it handles API connection, message receiving/sending, and card rendering for platform X -- Cross-cutting concerns (i18n, cards, streaming, rate limiting) live in `core/` - -### 5. Error Handling - -- Always wrap errors with context: `fmt.Errorf("feishu: reply card: %w", err)` -- Never silently swallow errors; at minimum log them with `slog.Error` / `slog.Warn` -- Use `slog` (structured logging) consistently; never `log.Printf` or `fmt.Printf` for runtime logs -- Redact tokens/secrets in error messages using `core.RedactToken()` - -### 6. Concurrency Safety - -- Agent sessions are accessed from multiple goroutines; protect shared state with `sync.Mutex` or `atomic` types -- Use `context.Context` for cancellation propagation -- Channels should have clear ownership; document who closes them -- Prefer `sync.Once` for one-time teardown (`pendingPermission.resolve()`) - -### 7. i18n - -All user-facing strings must go through `core/i18n.go`: -- Define a `MsgKey` constant -- Add translations for all supported languages (EN, ZH, ZH-TW, JA, ES) -- Use `e.i18n.T(MsgKey)` or `e.i18n.Tf(MsgKey, args...)` - -## Code Style - -- Follow standard Go conventions (`gofmt`, `go vet`) -- Use `strings.EqualFold` for case-insensitive comparisons -- Avoid `init()` for anything other than platform/agent registration -- Keep functions focused; extract helpers when a function exceeds ~80 lines -- Naming: `New()` for constructors, `Get/Set` for accessors, avoid stuttering (`feishu.FeishuPlatform` → `feishu.Platform`) - -## Testing - -### Requirements - -- All new features must include unit tests -- All bug fixes should include a regression test -- Tests must pass before committing: `go test ./...` - -### Running Tests - -```bash -# Full test suite -go test ./... - -# With race detector (CI) -go test -race ./... - -# Specific package -go test ./core/ -v - -# Run specific test -go test ./core/ -run TestHandlePendingPermission -v - -# Using make -make test # Run all tests -make test ARGS="-race" # Run with race detector -``` - -### Test Patterns - -- Use stub types for `Platform` and `Agent` in core tests (see `core/engine_test.go`) -- Test card rendering by inspecting the returned `*Card` struct, not JSON -- For agent session tests, simulate event streams via channels - -## Selective Compilation - -Each agent and platform is imported via a separate `plugin_*.go` file with a -build tag (e.g. `//go:build !no_feishu`). By default **all** agents and -platforms are compiled in. - -### Include only specific agents/platforms - -```bash -# Only Claude Code agent + Feishu and Telegram platforms -make build AGENTS=claudecode PLATFORMS_INCLUDE=feishu,telegram - -# Multiple agents -make build AGENTS=claudecode,codex PLATFORMS_INCLUDE=feishu,telegram,discord -``` - -### Exclude specific agents/platforms - -```bash -# Exclude some platforms you don't need -make build EXCLUDE=discord,dingtalk,qq,qqbot,line -``` - -### Direct build tag usage (without Make) - -```bash -go build -tags 'no_discord no_dingtalk no_qq no_qqbot no_line' ./cmd/cc-connect -``` - -Available tags: `no_claudecode`, `no_codex`, `no_cursor`, `no_gemini`, -`no_iflow`, `no_opencode`, `no_qoder`, `no_feishu`, `no_telegram`, -`no_discord`, `no_slack`, `no_dingtalk`, `no_wecom`, `no_qq`, `no_qqbot`, -`no_line`. - -## Pre-Commit Checklist - -1. **Build passes**: `make build` or `go build ./...` -2. **Tests pass**: `make test` or `go test ./...` -3. **No new hardcoded platform/agent names in core**: `grep -r "feishu\|telegram\|claudecode" core/*.go` -4. **i18n complete**: all new user-facing strings have translations for all languages (EN, ZH, ZH-TW, JA, ES) -5. **No secrets in code**: no API keys, tokens, or credentials in source files - ---- - -## Key Dependencies - -| Package | Purpose | -|---------|---------| -| `github.com/larksuite/oapi-sdk-go/v3` | Feishu/Lark bot SDK | -| `github.com/go-telegram-bot-api/telegram-bot-api/v5` | Telegram bot API | -| `github.com/bwmarrin/discordgo` | Discord gateway | -| `github.com/slack-go/slack` | Slack Events API & Socket Mode | -| `github.com/open-dingtalk/dingtalk-stream-sdk-go` | DingTalk streaming | -| `github.com/line/line-bot-sdk-go/v8` | LINE bot API | -| `github.com/creack/pty` | PTY for agent process management | -| `github.com/robfig/cron/v3` | Scheduled task scheduling | -| `github.com/BurntSushi/toml` | Configuration parsing | - ---- - -## Windows Development Notes - -- Use Git Bash or WSL for running `make` commands -- Unix-style paths in code (`/dev/null`), not Windows paths -- Executables have `.exe` extension when built for Windows - -## Adding a New Platform - -1. Create `platform/newplatform/newplatform.go` -2. Implement `core.Platform` interface (and optional interfaces as needed) -3. Register in `init()`: `core.RegisterPlatform("newplatform", factory)` -4. Create `cmd/cc-connect/plugin_platform_newplatform.go` with `//go:build !no_newplatform` tag -5. Add `newplatform` to `ALL_PLATFORMS` in `Makefile` -6. Add config example in `config.example.toml` -7. Add unit tests - -## Adding a New Agent - -1. Create `agent/newagent/newagent.go` -2. Implement `core.Agent` and `core.AgentSession` interfaces -3. Register in `init()`: `core.RegisterAgent("newagent", factory)` -4. Create `cmd/cc-connect/plugin_agent_newagent.go` with `//go:build !no_newagent` tag -5. Add `newagent` to `ALL_AGENTS` in `Makefile` -6. Optionally implement `AgentDoctorInfo` for `cc-connect doctor` support -7. Add config example in `config.example.toml` -8. Add unit tests From cbf61f89341e74f168b58e4b04947eb9fc9a101f Mon Sep 17 00:00:00 2001 From: dragonmax <2217092594@qq.com> Date: Wed, 1 Apr 2026 21:37:44 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=8D=E5=BF=85?= =?UTF-8?q?=E8=A6=81=E7=9A=84=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- secrets | 1 - 1 file changed, 1 deletion(-) delete mode 100644 secrets diff --git a/secrets b/secrets deleted file mode 100644 index 68d5a003..00000000 --- a/secrets +++ /dev/null @@ -1 +0,0 @@ -'hellll' From 7b5bc8ebda64b2eab61eaaf147bbf4ab463e0679 Mon Sep 17 00:00:00 2001 From: dragonmax <2217092594@qq.com> Date: Wed, 1 Apr 2026 21:45:09 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E6=97=A0=E5=85=B3?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .claude/settings.local.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 .claude/settings.local.json diff --git a/.claude/settings.local.json b/.claude/settings.local.json deleted file mode 100644 index b55e75be..00000000 --- a/.claude/settings.local.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(go build:*)" - ] - } -} From 2656d8878d8acb4f80767cf27b11550e63f614db Mon Sep 17 00:00:00 2001 From: dragonmax <2217092594@qq.com> Date: Wed, 1 Apr 2026 22:44:43 +0800 Subject: [PATCH 6/6] add gitinore --- .gitignore | 250 +++++++++++++++++++++++++++-------------------------- 1 file changed, 126 insertions(+), 124 deletions(-) diff --git a/.gitignore b/.gitignore index e446849b..85875eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,124 +1,126 @@ -# ============================================================================ -# Binary outputs -# ============================================================================ -/cc-connect -*.exe -*.exe~ -*.dll -*.so -*.dylib -*.test -*.out - -# ============================================================================ -# Go workspace & tooling -# ============================================================================ -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool -coverage.html -coverage.txt -*.out - -# Go workspace files (go.work) -go.work -go.work.sum - -# Go module environment (local proxy settings) -go.env - -# Dependency directories -vendor/ - -# ============================================================================ -# Project-specific -# ============================================================================ -# Runtime configuration (contains secrets) -config.toml -.env -*.local.toml - -# CC-Connect runtime state -.cc-connect/ - -# npm (for npm package distribution) -.npmrc -package-lock.json - -# ============================================================================ -# Build & distribution -# ============================================================================ -dist/ -build/ -bin/ -release/ - -# ============================================================================ -# Testing & temporary files -# ============================================================================ -test/ -scripts/ -tmp/ -temp/ -*.tmp -*.swp -*.swo -*~ -*.pid -*.log - -# ============================================================================ -# IDE & Editor -# ============================================================================ -.vscode/ -.idea/ -*.iml -*.ipr -*.iws -.vs/ -*.suo -*.user -*.userosscache -*.sln.docstates - -# Emacs -*~ -\#*\# -.\#* - -# Vim -*.swp -*.swo -*.swn - -# macOS -.DS_Store -.AppleDouble -.LSOverride - -# ============================================================================ -# Documentation (drafts) -# ============================================================================ -RELEASE.md -DRAFTS.md -NOTES.md - -# ============================================================================ -# System -# ============================================================================ -# Thumbs.db on Windows -Thumbs.db -ehthumbs.db -Desktop.ini - -# ============================================================================ -# Security -# ============================================================================ -# Never commit secrets or credentials -*.key -*.pem -*.p12 -*.pfx -secrets/ -credentials/ +# ============================================================================ +# Binary outputs +# ============================================================================ +/cc-connect +*.exe +*.exe~ +*.dll +*.so +*.dylib +*.test +*.out + +# ============================================================================ +# Go workspace & tooling +# ============================================================================ +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool +coverage.html +coverage.txt +*.out + +# Go workspace files (go.work) +go.work +go.work.sum + +# Go module environment (local proxy settings) +go.env + +# Dependency directories +vendor/ + +# ============================================================================ +# Project-specific +# ============================================================================ +# Runtime configuration (contains secrets) +config.toml +.env +*.local.toml + +# CC-Connect runtime state +.cc-connect/ + +# npm (for npm package distribution) +.npmrc +package-lock.json + +# ============================================================================ +# Build & distribution +# ============================================================================ +dist/ +build/ +bin/ +release/ + +# ============================================================================ +# Testing & temporary files +# ============================================================================ +test/ +scripts/ +tmp/ +temp/ +*.tmp +*.swp +*.swo +*~ +*.pid +*.log + +# ============================================================================ +# IDE & Editor +# ============================================================================ +.vscode/ +.idea/ +*.iml +*.ipr +*.iws +.vs/ +*.suo +*.user +*.userosscache +*.sln.docstates + +# Emacs +*~ +\#*\# +.\#* + +# Vim +*.swp +*.swo +*.swn + +# macOS +.DS_Store +.AppleDouble +.LSOverride + +# ============================================================================ +# Documentation (drafts) +# ============================================================================ +RELEASE.md +DRAFTS.md +NOTES.md + +# ============================================================================ +# System +# ============================================================================ +# Thumbs.db on Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +# ============================================================================ +# Security +# ============================================================================ +# Never commit secrets or credentials +*.key +*.pem +*.p12 +*.pfx +secrets/ +credentials/ +CLAUDE.md +.claude/