Skip to content

Commit 4fafb7e

Browse files
committed
2 parents 4638983 + 02a1deb commit 4fafb7e

72 files changed

Lines changed: 6119 additions & 419 deletions

Some content is hidden

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

.github/workflows/pr-label.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,23 @@ jobs:
1616
with:
1717
script: |
1818
const author = context.payload.pull_request.user.login;
19+
let isFirstTime = false;
1920
20-
const { data: searchResult } = await github.rest.search.issuesAndPullRequests({
21-
q: `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${author} is:closed`,
22-
});
23-
24-
const isFirstTime = searchResult.total_count === 0;
21+
try {
22+
const { data: searchResult } = await github.rest.search.issuesAndPullRequests({
23+
q: `repo:${context.repo.owner}/${context.repo.repo} type:pr author:${author} is:closed`,
24+
});
25+
isFirstTime = searchResult.total_count === 0;
26+
if (!isFirstTime) {
27+
core.info(`${author} has ${searchResult.total_count} closed PRs, skipping label`);
28+
}
29+
} catch (err) {
30+
if (err.status === 422 && err.message && err.message.includes('cannot be searched')) {
31+
core.warning(`Search API cannot look up author ${author}, skipping first-time label`);
32+
return;
33+
}
34+
throw err;
35+
}
2536
2637
if (isFirstTime) {
2738
await github.rest.issues.addLabels({
@@ -31,6 +42,4 @@ jobs:
3142
labels: ['first-time-contributor'],
3243
});
3344
core.info(`Labeled PR #${context.payload.pull_request.number} as first-time-contributor`);
34-
} else {
35-
core.info(`${author} has ${searchResult.total_count} PRs, skipping label`);
3645
}

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,31 @@ Images are on **Docker Hub** (`agentscope/copaw`). Image tags: `latest` (stable)
223223

224224
```bash
225225
docker pull agentscope/copaw:latest
226-
docker run -p 8088:8088 -v copaw-data:/app/working agentscope/copaw:latest
226+
docker run -p 127.0.0.1:8088:8088 -v copaw-data:/app/working agentscope/copaw:latest
227227
```
228228

229229
Also available on Alibaba Cloud Container Registry (ACR) for users in China: `agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/copaw` (same tags).
230230

231231
Then open **http://127.0.0.1:8088/** for the Console. Config, memory, and skills are stored in the `copaw-data` volume. To pass API keys (e.g. `DASHSCOPE_API_KEY`), add `-e VAR=value` or `--env-file .env` to `docker run`.
232232

233+
> **Connecting to Ollama or other services on the host machine**
234+
>
235+
> Inside a Docker container, `localhost` refers to the container itself, not your host machine. If you run Ollama (or other model services) on the host and want CoPaw in Docker to reach them, use one of these approaches:
236+
>
237+
> **Option A** — Explicit host binding (all platforms):
238+
> ```bash
239+
> docker run -p 127.0.0.1:8088:8088 \
240+
> --add-host=host.docker.internal:host-gateway \
241+
> -v copaw-data:/app/working agentscope/copaw:latest
242+
> ```
243+
> Then in CoPaw **Settings → Models → Ollama**, change the Base URL to `http://host.docker.internal:11434/v1` or your corresponding port.
244+
>
245+
> **Option B** — Host networking (Linux only):
246+
> ```bash
247+
> docker run --network=host -v copaw-data:/app/working agentscope/copaw:latest
248+
> ```
249+
> No port mapping (`-p`) is needed; the container shares the host network directly. Note that all container ports are exposed on the host, which may cause conflicts if the port is already in use.
250+
233251
The image is built from scratch. To build the image yourself, please refer to the [Build Docker image](scripts/README.md#build-docker-image) section in `scripts/README.md`, and then push to your registry.
234252
235253
### Using ModelScope
@@ -373,10 +391,20 @@ CoPaw represents both a **Co Personal Agent Workstation** and a "co-paw"—a par
373391
374392
| [Discord](https://discord.gg/eYMpfnkG8h) | [DingTalk](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
375393
| ------------------------------------------------------------ | ------------------------------------------------------------ |
376-
| [<img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="80" height="80" alt="Discord">](https://discord.gg/eYMpfnkG8h) | [<img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="80" height="80" alt="DingTalk">](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
394+
| [<img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="80" height="80" alt="Discord">](https://discord.gg/eYMpfnkG8h) | [<img src="https://img.alicdn.com/imgextra/i2/O1CN01vCWI8a1skHtLGXEMQ_!!6000000005804-2-tps-458-460.png" width="80" height="80" alt="DingTalk">](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
377395
378396
---
379397
380398
## License
381399
382400
CoPaw is released under the [Apache License 2.0](LICENSE).
401+
402+
---
403+
404+
## Contributors
405+
406+
All thanks to our contributors:
407+
408+
<a href="https://github.com/agentscope-ai/CoPaw/graphs/contributors">
409+
<img src="https://contrib.rocks/image?repo=agentscope-ai/CoPaw" alt="Contributors" />
410+
</a>

README_ja.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,29 @@ copaw uninstall --purge # すべて削除
204204

205205
```bash
206206
docker pull agentscope/copaw:latest
207-
docker run -p 8088:8088 -v copaw-data:/app/working agentscope/copaw:latest
207+
docker run -p 127.0.0.1:8088:8088 -v copaw-data:/app/working agentscope/copaw:latest
208208
```
209209

210210
ブラウザで **http://127.0.0.1:8088/** を開くとコンソールが利用できます。設定、メモリ、スキルは `copaw-data` ボリュームに保存されます。APIキー(例: `DASHSCOPE_API_KEY`)を渡すには、`docker run``-e VAR=value` または `--env-file .env` を追加してください。
211211

212+
> **ホストマシン上のOllamaや他のモデルサービスに接続する**
213+
>
214+
> Dockerコンテナ内の `localhost` はコンテナ自身を指し、ホストマシンではありません。Ollama(または他のモデルサービス)がホスト上で動作している場合、以下のいずれかの方法でCoPawコンテナからアクセスできます:
215+
>
216+
> **方法A** — ホストアドレスの明示的バインディング(全プラットフォーム対応):
217+
> ```bash
218+
> docker run -p 127.0.0.1:8088:8088 \
219+
> --add-host=host.docker.internal:host-gateway \
220+
> -v copaw-data:/app/working agentscope/copaw:latest
221+
> ```
222+
> その後、CoPawの **Settings → Models → Ollama** で、Base URLを `http://host.docker.internal:11434/v1` または対応するポートに変更してください。
223+
>
224+
> **方法B** — ホストネットワーク(Linuxのみ):
225+
> ```bash
226+
> docker run --network=host -v copaw-data:/app/working agentscope/copaw:latest
227+
> ```
228+
> ポートマッピング(`-p`)は不要で、コンテナはホストネットワークを直接共有します。ただし、コンテナの全ポートがホスト上に公開されるため、使用中のポートと競合する可能性があります。
229+
212230
イメージはゼロからビルドされています。自分でイメージをビルドする場合は、`scripts/README.md` の [Build Docker image](scripts/README.md#build-docker-image) セクションを参照し、レジストリにプッシュしてください。
213231
214232
### ModelScopeを使用
@@ -312,10 +330,20 @@ CoPawは **Co Personal Agent Workstation**(共同パーソナルエージェ
312330
313331
| [Discord](https://discord.gg/eYMpfnkG8h) | [DingTalk](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
314332
| ------------------------------------------------------------ | ------------------------------------------------------------ |
315-
| [<img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="80" height="80" alt="Discord">](https://discord.gg/eYMpfnkG8h) | [<img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="80" height="80" alt="DingTalk">](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
333+
| [<img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="80" height="80" alt="Discord">](https://discord.gg/eYMpfnkG8h) | [<img src="https://img.alicdn.com/imgextra/i2/O1CN01vCWI8a1skHtLGXEMQ_!!6000000005804-2-tps-458-460.png" width="80" height="80" alt="DingTalk">](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
316334
317335
---
318336
319337
## ライセンス
320338
321339
CoPawは[Apache License 2.0](LICENSE)の下でリリースされています。
340+
341+
---
342+
343+
## コントリビューター
344+
345+
CoPawをより良くするために貢献してくださったすべての方々に感謝します:
346+
347+
<a href="https://github.com/agentscope-ai/CoPaw/graphs/contributors">
348+
<img src="https://contrib.rocks/image?repo=agentscope-ai/CoPaw" alt="コントリビューター" />
349+
</a>

README_zh.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,31 @@ copaw uninstall --purge # 删除所有内容
223223

224224
```bash
225225
docker pull agentscope/copaw:latest
226-
docker run -p 8088:8088 -v copaw-data:/app/working agentscope/copaw:latest
226+
docker run -p 127.0.0.1:8088:8088 -v copaw-data:/app/working agentscope/copaw:latest
227227
```
228228

229229
国内用户也可选用阿里云容器镜像服务 (ACR):`agentscope-registry.ap-southeast-1.cr.aliyuncs.com/agentscope/copaw`(tag 相同)。
230230

231231
然后在浏览器打开 **http://127.0.0.1:8088/** 进入控制台。配置、记忆与 Skills 保存在 `copaw-data` 卷中。如需传入 API Key(如 `DASHSCOPE_API_KEY`),在 `docker run` 时添加 `-e VAR=value``--env-file .env`
232232

233+
> **从容器内连接宿主机上的 Ollama 或其他模型服务**
234+
>
235+
> Docker 容器内的 `localhost` 指向容器自身,而非宿主机。如果 Ollama(或其他模型服务)运行在宿主机上,可通过以下方式让容器内的 CoPaw 访问:
236+
>
237+
> **方式 A** — 显式绑定宿主机地址(全平台通用):
238+
> ```bash
239+
> docker run -p 127.0.0.1:8088:8088 \
240+
> --add-host=host.docker.internal:host-gateway \
241+
> -v copaw-data:/app/working agentscope/copaw:latest
242+
> ```
243+
> 然后在 CoPaw **设置 → 模型 → Ollama** 中,将 Base URL 改为 `http://host.docker.internal:11434/v1` 或对应端口。
244+
>
245+
> **方式 B** — 使用宿主机网络(仅限 Linux):
246+
> ```bash
247+
> docker run --network=host -v copaw-data:/app/working agentscope/copaw:latest
248+
> ```
249+
> 无需端口映射(`-p`),容器直接共享宿主机网络。注意这会将容器的所有端口暴露在宿主机上,可能与已占用的端口产生冲突。
250+
233251
镜像从零构建。若需自行构建镜像,请参阅 [scripts/README.md](scripts/README.md#build-docker-image) 中的「Build Docker image」小节,构建后推送到你的镜像仓库。
234252
235253
### 使用魔搭创空间
@@ -375,10 +393,20 @@ CoPaw 既是「你的搭档小爪子」(co-paw),也寓意 **Co Personal Ag
375393
376394
| [Discord](https://discord.gg/eYMpfnkG8h) | [钉钉](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
377395
| ------------------------------------------------------------ | ------------------------------------------------------------ |
378-
| [<img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="80" height="80" alt="Discord">](https://discord.gg/eYMpfnkG8h) | [<img src="https://img.alicdn.com/imgextra/i4/O1CN014mhqFq1ZlgNuYjxrz_!!6000000003235-2-tps-400-400.png" width="80" height="80" alt="钉钉">](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
396+
| [<img src="https://gw.alicdn.com/imgextra/i1/O1CN01hhD1mu1Dd3BWVUvxN_!!6000000000238-2-tps-400-400.png" width="80" height="80" alt="Discord">](https://discord.gg/eYMpfnkG8h) | [<img src="https://img.alicdn.com/imgextra/i2/O1CN01vCWI8a1skHtLGXEMQ_!!6000000005804-2-tps-458-460.png" width="80" height="80" alt="钉钉">](https://qr.dingtalk.com/action/joingroup?code=v1,k1,OmDlBXpjW+I2vWjKDsjvI9dhcXjGZi3bQiojOq3dlDw=&_dt_no_comment=1&origin=11) |
379397
380398
---
381399
382400
## 许可证
383401
384402
CoPaw 采用 [Apache License 2.0](LICENSE) 开源协议。
403+
404+
---
405+
406+
## 贡献者
407+
408+
感谢所有为 CoPaw 做出贡献的朋友们:
409+
410+
<a href="https://github.com/agentscope-ai/CoPaw/graphs/contributors">
411+
<img src="https://contrib.rocks/image?repo=agentscope-ai/CoPaw" alt="贡献者" />
412+
</a>

0 commit comments

Comments
 (0)