初始化仓库

This commit is contained in:
2026-06-02 23:14:41 +08:00
commit 0bc3f02670
520 changed files with 191097 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: chg80333
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: cg33
thanks_dev: # Replace with a single thanks.dev username
custom: ['https://github.com/chenhg5/cc-connect/blob/main/docs/images/alipay.jpg?raw=true', 'https://raw.githubusercontent.com/chenhg5/cc-connect/refs/heads/main/docs/images/wechatpay.jpg'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+141
View File
@@ -0,0 +1,141 @@
name: Bug Report
description: Report a bug to help us improve cc-connect
title: "[Bug] "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the form below to help us understand and reproduce the issue.
- type: input
id: version
attributes:
label: cc-connect Version
description: Run `cc-connect --version` to get the version.
placeholder: "e.g. v0.3.0"
validations:
required: true
- type: dropdown
id: os
attributes:
label: Operating System
options:
- macOS
- Linux (Ubuntu/Debian)
- Linux (Other)
- Windows (WSL)
- Other
validations:
required: true
- type: dropdown
id: agent
attributes:
label: Agent Type
description: Which AI agent are you using?
options:
- Claude Code
- Codex (OpenAI)
- Cursor Agent
- Gemini CLI
- Other
validations:
required: true
- type: dropdown
id: platform
attributes:
label: Platform
description: Which messaging platform(s) are involved?
multiple: true
options:
- Feishu (Lark)
- DingTalk
- Telegram
- Slack
- Discord
- LINE
- WeChat Work (企业微信)
- QQ (NapCat/OneBot)
- N/A
validations:
required: true
- type: dropdown
id: install-method
attributes:
label: Installation Method
options:
- npm (npm install -g cc-connect)
- Binary download (GitHub Releases)
- Build from source
validations:
required: false
- type: textarea
id: description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: Describe the bug...
validations:
required: true
- type: textarea
id: steps
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Configure config.toml with ...
2. Run `cc-connect`
3. Send message '...' in the chat
4. See error ...
validations:
required: true
- type: textarea
id: expected
attributes:
label: Expected Behavior
description: What you expected to happen.
validations:
required: true
- type: textarea
id: actual
attributes:
label: Actual Behavior
description: What actually happened.
validations:
required: true
- type: textarea
id: config
attributes:
label: Configuration (config.toml)
description: |
Please share the relevant parts of your config.toml (remove sensitive info like tokens/keys).
render: toml
validations:
required: false
- type: textarea
id: logs
attributes:
label: Logs / Error Output
description: Paste any relevant logs or error messages here.
render: shell
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional Context
description: Any other context, screenshots, or information about the problem.
validations:
required: false
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Documentation
url: https://github.com/chenhg5/cc-connect#readme
about: Check the README and platform setup guides before opening an issue
- name: Discussions
url: https://github.com/chenhg5/cc-connect/discussions
about: Ask questions and share ideas in GitHub Discussions
@@ -0,0 +1,74 @@
name: Feature Request
description: Suggest a new feature or improvement for cc-connect
title: "[Feature] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please describe your idea clearly so we can evaluate and discuss it.
- type: dropdown
id: area
attributes:
label: Feature Area
description: Which part of cc-connect does this relate to?
options:
- Core / Engine
- Agent (Claude Code, Codex, Cursor, Gemini, etc.)
- Platform (Feishu, DingTalk, Telegram, Slack, etc.)
- Session Management
- API Provider Management
- Voice / Speech-to-Text
- Image / Multimodal
- CLI / Commands
- Configuration
- Documentation
- Other
validations:
required: true
- type: textarea
id: problem
attributes:
label: Problem or Motivation
description: |
Is your feature request related to a problem? Please describe.
A clear description of what the problem is, e.g. "I'm always frustrated when..."
placeholder: Describe the problem or motivation behind this feature...
validations:
required: true
- type: textarea
id: solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like. How should this feature work?
placeholder: Describe your ideal solution...
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Have you considered any alternative solutions or workarounds?
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional Context
description: Add any other context, mockups, or references about the feature request here.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: Willingness to Contribute
description: Would you be willing to contribute this feature via a pull request?
options:
- label: I'd be willing to submit a PR for this feature
@@ -0,0 +1,80 @@
name: Platform / Agent Support Request
description: Request support for a new messaging platform or AI agent
title: "[Support Request] "
labels: ["new-integration"]
body:
- type: markdown
attributes:
value: |
Want cc-connect to support a new messaging platform or AI coding agent? Let us know!
- type: dropdown
id: type
attributes:
label: Request Type
options:
- New Platform (messaging app)
- New Agent (AI coding assistant)
validations:
required: true
- type: input
id: name
attributes:
label: Platform / Agent Name
placeholder: "e.g. Microsoft Teams, WhatsApp, Aider, etc."
validations:
required: true
- type: textarea
id: description
attributes:
label: Description
description: Brief description of the platform/agent and why you'd like it supported.
validations:
required: true
- type: textarea
id: api-info
attributes:
label: API / SDK Information
description: |
Please share any relevant links to official documentation, bot APIs, SDKs, or developer resources.
placeholder: |
- Official docs: https://...
- Bot API: https://...
- SDK (Go/Python/Node): https://...
validations:
required: false
- type: dropdown
id: connection
attributes:
label: Connection Type (for platforms)
description: If known, what type of connection does this platform support for bots?
options:
- WebSocket (no public IP needed)
- Long Polling (no public IP needed)
- Stream / SSE (no public IP needed)
- Webhook (public URL required)
- Unknown / Not sure
- N/A (agent request)
validations:
required: false
- type: textarea
id: additional
attributes:
label: Additional Context
description: Any other context about why this integration would be valuable.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: Willingness to Contribute
description: Would you be willing to help implement this integration?
options:
- label: I'd be willing to submit a PR for this integration
+181
View File
@@ -0,0 +1,181 @@
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [published]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml
- name: Build web assets
working-directory: web
run: |
pnpm install --frozen-lockfile
pnpm build
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Lint code
run: |
set -euo pipefail
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4
LINT_BIN="$(go env GOPATH)/bin/golangci-lint"
run_lint() {
"$LINT_BIN" run "$@" || {
code=$?
# exit code 5 = "no go files to analyze" (e.g. only non-Go files changed) — not a lint failure
[ "$code" -eq 5 ] && return 0
return "$code"
}
}
if [ "${{ github.event_name }}" = "pull_request" ]; then
git fetch --no-tags origin "${{ github.base_ref }}"
run_lint --new-from-rev "origin/${{ github.base_ref }}" ./...
elif [ "${{ github.event_name }}" = "push" ] && [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
run_lint --new-from-rev "${{ github.event.before }}" ./...
elif git rev-parse --verify HEAD^ >/dev/null 2>&1; then
run_lint --new-from-rev "$(git rev-parse HEAD^)" ./...
else
run_lint ./...
fi
- name: Lint GitHub workflows
run: |
go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.8
"$(go env GOPATH)/bin/actionlint" -color
unit-test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
cache-dependency-path: web/pnpm-lock.yaml
- name: Build web assets
working-directory: web
run: |
pnpm install --frozen-lockfile
pnpm build
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Download dependencies
run: go mod download
env:
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
GONOSUMDB: ""
- name: Verify module checksums
run: go mod verify
env:
GOPROXY: https://proxy.golang.org,direct
GOSUMDB: sum.golang.org
GONOSUMDB: ""
- name: Build
run: go build ./...
- name: Run tests
run: go test ./... -v -race
- name: Run tests with coverage
run: go test ./... -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: github.event_name == 'push'
with:
files: ./coverage.out
fail_ci_if_error: false
smoke-test:
runs-on: ubuntu-latest
needs: unit-test
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Run smoke tests
run: go test -v -tags=smoke,no_web ./tests/e2e/...
regression-test:
runs-on: ubuntu-latest
needs: smoke-test
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Run regression tests
run: go test -v -tags=regression,no_web ./tests/e2e/...
performance-test:
runs-on: ubuntu-latest
needs: regression-test
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Run performance benchmarks
run: go test -bench=. -benchmem -tags=performance,no_web ./tests/performance/...
+51
View File
@@ -0,0 +1,51 @@
name: Issue Reply
on:
issues:
types: [opened]
jobs:
greet:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Greet new issue
uses: actions/github-script@v7
with:
script: |
const issue = context.payload.issue;
const author = issue.user.login;
// 检查是否是首次提 issue
const { data: issues } = await github.rest.issues.listForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
creator: author,
state: 'all'
});
const isFirstIssue = issues.length === 1;
let comment;
if (isFirstIssue) {
comment = [
`👋 Hi @${author}! Thanks for opening your first issue here!`,
``,
`We'll review it as soon as possible. While waiting, please make sure:`,
`- You've provided enough details about the issue`,
`- Any error messages are included in full`,
`- For feature requests, describe your use case`,
``,
`Thanks for your feedback!`,
].join('\n');
} else {
comment = `👋 Thanks @${author} for opening this issue! We'll take a look soon.`;
}
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
body: comment
});
+44
View File
@@ -0,0 +1,44 @@
name: Stale Issue Handler
on:
schedule:
- cron: '0 0 * * *' # 每天运行一次
workflow_dispatch: # 手动触发
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# Issue settings
stale-issue-message: |
⚠️ This issue has been inactive for 30 days.
If this is still relevant, please add a comment; otherwise it will be closed in 7 days.
close-issue-message: |
🔒 This issue has been automatically closed due to inactivity.
If this is still relevant, feel free to reopen or create a new issue.
stale-issue-label: 'stale'
days-before-issue-stale: 30
days-before-issue-close: 7
# PR settings
stale-pr-message: |
⚠️ This PR has been inactive for 60 days.
If this change is still needed, please update the code or add a comment; otherwise it will be closed in 7 days.
close-pr-message: |
🔒 This PR has been automatically closed due to inactivity.
stale-pr-label: 'stale'
days-before-pr-stale: 60
days-before-pr-close: 7
# 豁免标签
exempt-issue-labels: 'pinned,security,enhancement'
exempt-pr-labels: 'pinned,security'