-
Notifications
You must be signed in to change notification settings - Fork 0
chore: 开源协作所需的许可证、CI 与模板 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| name: 缺陷 / Bug | ||
| about: 实际行为和预期不一致 / Something does not work as expected | ||
| labels: bug | ||
| --- | ||
|
|
||
| ## 现象 / What happened | ||
|
|
||
|
|
||
|
|
||
| ## 复现 / How to reproduce | ||
|
|
||
|
|
||
|
|
||
| ## 期望 / Expected |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| blank_issues_enabled: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| name: 讨论 / Discussion | ||
| about: 架构、产品范围或模块边界 / Architecture, scope, or module boundaries | ||
| --- | ||
|
|
||
| ## 议题 / Topic | ||
|
|
||
|
|
||
|
|
||
| ## 倾向(可选) / Leanings (optional) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| name: 改进 / Enhancement | ||
| about: 新能力或现有行为调整 / New capability or a change in existing behavior | ||
| labels: enhancement | ||
| --- | ||
|
|
||
| ## 想做什么 / What | ||
|
|
||
|
|
||
|
|
||
| ## 为什么 / Why |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ## 改了什么 / What changed | ||
|
|
||
|
|
||
|
|
||
| ## 怎么验证 / How to verify | ||
|
|
||
| - [ ] `cd server && go test ./...` | ||
| - [ ] `pnpm test:client` | ||
|
|
||
| 相关 Issue / Related issue: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| concurrency: | ||
| group: ci-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| server: | ||
| runs-on: ubuntu-latest | ||
| defaults: | ||
| run: | ||
| working-directory: server | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: actions/setup-go@v6 | ||
| with: | ||
| go-version-file: server/go.mod | ||
| cache-dependency-path: server/go.sum | ||
|
|
||
| - name: Lint | ||
| run: | | ||
| test -z "$(gofmt -l .)" || { echo "gofmt needed:"; gofmt -l .; exit 1; } | ||
| go vet ./... | ||
|
|
||
| - name: Test | ||
| run: go test ./... | ||
|
|
||
| - name: Build | ||
| run: go build -o /tmp/codedock ./cmd/server | ||
|
|
||
| - name: Smoke | ||
| env: | ||
| HTTP_ADDR: :18080 | ||
| LLM_PROVIDER: fake | ||
| LLM_MODEL: fake | ||
| DB_DSN: file:ci.db | ||
| LOG_LEVEL: info | ||
| run: | | ||
| set -euo pipefail | ||
| /tmp/codedock & | ||
| pid=$! | ||
| cleanup() { kill "$pid" 2>/dev/null || true; wait "$pid" 2>/dev/null || true; } | ||
| trap cleanup EXIT | ||
| for _ in $(seq 1 30); do | ||
| if curl -fsS http://127.0.0.1:18080/health >/dev/null; then | ||
| echo "health ok" | ||
| exit 0 | ||
| fi | ||
| sleep 1 | ||
| done | ||
| echo "server did not become healthy" >&2 | ||
| exit 1 | ||
|
|
||
| web: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
|
|
||
| - uses: pnpm/action-setup@v4 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
test "$(node -p "require('./package.json').packageManager")" = "pnpm@11.17.0"
test "$(pnpm --version)" = "11.17.0"
pnpm install --frozen-lockfile --ignore-scriptsRepository: SATA260/CodeDock Length of output: 891 🏁 Script executed: #!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- workflow ---'
sed -n '1,130p' .github/workflows/ci.yml
printf '%s\n' '--- package manager declarations ---'
rg -n '"packageManager"|"pnpm"|packageManager' package.json pnpm-workspace.yaml pnpm-lock.yaml 2>/dev/null || trueRepository: SATA260/CodeDock Length of output: 2072 🌐 Web query:
💡 Result: Official documentation from the pnpm project explicitly states that pnpm/action-setup is intended for installing pnpm v10 and older [1][2]. For pnpm v11 and newer, the official successor is pnpm/setup [1][3][4]. Key details regarding this transition include: 1. Support Status: pnpm/action-setup is not the recommended tool for pnpm v11+. Users requiring pnpm v11 or newer are directed to use pnpm/setup [1][2]. 2. Successor Functionality: pnpm/setup is designed to download pnpm's self-contained release binary, which eliminates the requirement for a pre-installed Node.js or npm [1][4]. Additionally, it can install a JavaScript runtime (Node.js, Bun, or Deno) within the same GitHub Actions step, replacing the need for actions/setup-node [1][3][4]. 3. Migration: Users moving to pnpm/setup should note that it requires pnpm v11+ [1][4]. If a workflow specifically requires pnpm v10 or older, pnpm/action-setup remains the appropriate action [1][3]. The README for pnpm/action-setup prominently displays this guidance, marking pnpm/setup as the successor for newer versions [1][2]. Citations:
🌐 Web query:
💡 Result: The error you are encountering, often manifesting as an Citations:
Use
🤖 Prompt for AI Agents |
||
|
|
||
| - uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: 22 | ||
| cache: pnpm | ||
|
|
||
| - name: Install | ||
| run: pnpm install --frozen-lockfile | ||
|
|
||
| - name: Lint | ||
| run: pnpm lint:web | ||
|
|
||
| - name: Test | ||
| run: pnpm test:client | ||
|
|
||
| - name: Build | ||
| run: pnpm build:web | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 SATA260 | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,50 @@ | ||
| CodeDock 是一个面向 Agent 的执行与协作平台骨架,提供 Agent 上下文、执行请求、过程事件和结果回报所需的服务端与 Web 端边界。 | ||
| # CodeDock | ||
|
|
||
| 项目本身不绑定 Issue、Task、Review、Workspace 等具体业务域;业务能力应在明确需求后以独立模块加入。 | ||
| 面向 Agent 的执行与协作平台骨架:提供会话、执行请求、过程事件和结果回报所需的服务端与 Web 端边界。不绑定 Issue、Task、Review、Workspace 等具体业务域。 | ||
|
|
||
| 改代码前请阅读 [`docs/architecture.md`](docs/architecture.md) 和 [`AGENTS.md`](AGENTS.md)。 | ||
|
|
||
| ## 本地运行 | ||
|
|
||
| 需要 [Go](https://go.dev/dl/) 1.26.5、[Node.js](https://nodejs.org/) 22.13+、[pnpm](https://pnpm.io/) 11.17.0。默认 `LLM_PROVIDER=fake`,不必配置模型 Key。 | ||
|
|
||
| ```bash | ||
| cp .env.example .env | ||
| cp apps/web/.env.example apps/web/.env.local | ||
| pnpm install | ||
| ``` | ||
|
|
||
| API(默认 `http://localhost:8080`): | ||
|
|
||
| ```bash | ||
| cd server | ||
| go run ./cmd/server | ||
| ``` | ||
|
|
||
| 服务会从当前目录向上查找 `.env`,在 `server/` 下启动也能读到仓库根的 `.env`。 | ||
|
|
||
| Web(默认 `http://localhost:3000`): | ||
|
|
||
| ```bash | ||
| pnpm dev:web | ||
| ``` | ||
|
|
||
| 浏览器打开 [http://localhost:3000](http://localhost:3000)。完整环境变量见 [`.env.example`](.env.example),不要提交 `.env` 或密钥。 | ||
|
|
||
| ## 测试 | ||
|
|
||
| ```bash | ||
| cd server && go test ./... && go vet ./... | ||
| pnpm test:client | ||
| pnpm lint:web | ||
| ``` | ||
|
|
||
| Go 源文件用 `gofmt` 格式化(`gofmt -w .`)。CI 会检查未格式化的文件。 | ||
|
|
||
| ## 参与 | ||
|
|
||
| 从 `main` 开分支,按架构文档放置代码。本地测试通过后,向 `main` 开 Pull Request,说明改了什么、怎么验证。一种改动一个 PR;较大的行为或边界变化请先开 Issue。 | ||
|
|
||
| ## License | ||
|
|
||
| [MIT](LICENSE) |
Uh oh!
There was an error while loading. Please reload this page.