Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
c69e747
fix(ollama): use 127.0.0.1 as default host and improve error diagnost…
futuremeng Mar 16, 2026
84e4fdc
fix(skills): add missing channels to cron SKILL.md --channel options …
toby1123yjh Mar 16, 2026
6f8e02f
feat(skills): add a guidance skill for documentation of copaw (#1522)
hiyuchang Mar 16, 2026
dd10136
feat(channels): add XiaoYi channel support (#1213)
wwx814 Mar 16, 2026
f8aef03
fest(channel): add WeCom channel (#1407)
hongxicheng Mar 16, 2026
fdd000b
feat(CLI): Add `copaw update` command to update CoPaw automatically (…
pan-x-c Mar 16, 2026
c9baa18
feat(channels): normalize prefixed discord ids for cron sends
fancyboi999 Mar 16, 2026
7b8d1e0
feat(discord): prevent cross-channel message merging due to sender_id…
Atletico1999 Mar 16, 2026
699c6bf
feat(timezone): add user timezone configuration (#1535)
xieyxclack Mar 16, 2026
0bc99ef
docs(zh): fix documentation formatting and consistency issues (#1300)
hanson-hex Mar 16, 2026
5b4a9eb
add docker-compose.yml (#1320)
JackyMao1999 Mar 16, 2026
db90ef6
chore: delete tool choice (#1570)
gnipping Mar 16, 2026
6b16a80
feat(tools): add view_image tool for LLM visual analysis (#1526)
Leirunlin Mar 16, 2026
aee877d
feat(provider) add gemini provider (#1507)
ekzhu Mar 16, 2026
8bf89fc
Fixed incomplete file imports during skill import. (#1576)
lalaliat Mar 16, 2026
70acceb
feat(tools): suppress Windows AutoRun stderr in shell commands (#1556)
mvanhorn Mar 16, 2026
f6aefc6
fix(channels): skip empty text blocks in DingTalk rich text parsing (…
mvanhorn Mar 16, 2026
cd3d045
docs(quickstart): align secrets of CoPaw at the QuickStart page. (#1584)
yuanxs21 Mar 16, 2026
80bf8ee
feat!: Multi-agent/multi-workspace architecture (#1375)
rayrayraykk Mar 16, 2026
2592cce
feat(channels): generalize discord debounce key fix to all channels (…
Leirunlin Mar 16, 2026
267dd44
feat(console): preserve custom cron expressions in UI (#1257)
fancyboi999 Mar 16, 2026
28f8294
feat(console): implement console/chat endpoint instead of agent/proc…
zhijianma Mar 16, 2026
a2bd2df
feat(security): add skill scanner (#564)
gnipping Mar 17, 2026
6aee944
Feat(console): dark mode (#1566)
zhaozhuang521 Mar 17, 2026
629909c
feat(migration): add MEMORY.md and BOOTSTRAP.md to markdown migration…
zhijianma Mar 17, 2026
df9bdaf
fix: handle None system_prompt in memory compaction (#1608)
aissac Mar 17, 2026
526eb81
chore(version): bumping version to 0.1.0b1 (#1617)
xieyxclack Mar 17, 2026
dc75aed
docs(wecom): Add doc redirection to wecom channel (#1618)
hongxicheng Mar 17, 2026
f1142ca
feat(win): Windows GBK encoding support for console logging (#1601)
lcq225 Mar 17, 2026
039e897
chore: built-in mcp not enabled (#1625)
rayrayraykk Mar 17, 2026
7340ba0
feat(console): Workspace Path (Editing Prohibited) (#1624)
zhaozhuang521 Mar 17, 2026
0e0c4ee
chore: update release note link in console (#1622)
xieyxclack Mar 17, 2026
191a9b2
chore: show skill descriptions (#1626)
lalaliat Mar 17, 2026
7bc2008
docs(WeCom): Optimize WeCom documents (#1631)
hongxicheng Mar 17, 2026
58fe3c8
perf(desktop): pre-compile pyc in windows (#1639)
rayrayraykk Mar 17, 2026
4d04676
Feat/console style (#1637)
zhaozhuang521 Mar 17, 2026
6b7abac
feat(voice): audio transcription for voice messages with Local Whispe…
ekzhu Mar 17, 2026
1879fb4
feat(console): Version update delayed by one hour (shown) (#1647)
zhaozhuang521 Mar 17, 2026
b4a01d7
perf(desktop): kill subprocess gracefully when desktop is closed (#1646)
rayrayraykk Mar 17, 2026
3a8a554
feat(dingtalk): add AI Card reply support (#1118)
Justin-lu Mar 17, 2026
1402de6
chore: update agentscope version (#1640)
lalaliat Mar 17, 2026
d984283
chore: only update website when new release comes (#1651)
rayrayraykk Mar 17, 2026
109e914
feat(authentication): add optional web authentication with single-use…
rowanchen-com Mar 17, 2026
5992fd5
feat(prompt): add os information in system prompt (#1660)
xieyxclack Mar 17, 2026
047034b
fix: validate the customized working directory (#1652)
yuanxs21 Mar 17, 2026
f2899e0
fix(console): Fixed the night mode issue and resolved the issue of pa…
zhaozhuang521 Mar 17, 2026
8727e18
docs: add Web Authentication section to security docs (#1666)
rowanchen-com Mar 17, 2026
09e026e
feat: zero downtime when agent reload (#1664)
rayrayraykk Mar 17, 2026
52f9a51
feat(security): add detection rules for destructive shell commands (#…
pzlav Mar 17, 2026
803b7af
feat(memory): add token counter and history management features (#1628)
jinliyl Mar 17, 2026
4ab59e9
feat(skills): add version-aware builtin skill sync with bidirectional…
Leirunlin Mar 17, 2026
a3c89ba
docs: add developer group notes (#1678)
Osier-Yi Mar 17, 2026
724c5ab
feat(skills): add modelscope skillhub (#1673)
lalaliat Mar 17, 2026
f536e4c
feat: fix multi agent hearbeat (#1670)
rayrayraykk Mar 17, 2026
de6234f
feat(model): add filtering media blocks for non multimodal llms (#1676)
qbc2016 Mar 17, 2026
7eff2d8
feat(knowledge): add knowledge layer APIs, UI, and chat retrieval
futuremeng Mar 16, 2026
eb15457
feat(console): refine knowledge note cards
futuremeng Mar 17, 2026
a4c129d
feat(knowledge): unify summary/subject model and nlp dependency layering
futuremeng Mar 17, 2026
84090bf
refactor(knowledge): remove cognee compatibility from mvp branch
futuremeng Mar 17, 2026
c1434f8
fix(knowledge): require runtime and config enable switches
futuremeng Mar 17, 2026
088af45
feat(chat): add chat status management and reconnect functionality (#…
zhijianma Mar 17, 2026
397743b
feat: fix wecom version (#1681)
rayrayraykk Mar 17, 2026
94d8d03
fix: upgrade agentscope-runtime to 1.1.1 and bump version to 0.1.0b2 …
rayrayraykk Mar 17, 2026
1635acd
chore: bumping version to 0.1.0b3 (#1688)
xieyxclack Mar 18, 2026
3dc706d
feat(console): update multi language in console (#1686)
xieyxclack Mar 18, 2026
053307c
feat(console): Optimize document navigation anchors and their languag…
zhaozhuang521 Mar 18, 2026
fd0dfbb
feat(memory): enhance memory compaction with progress indicators (#1689)
jinliyl Mar 18, 2026
9b01283
docs(contributing): add dual-mainline branching SOP
futuremeng Mar 18, 2026
dd51ce1
Merge remote-tracking branch 'upstream/main' into feat/upstream/knowl…
futuremeng Mar 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 2 additions & 8 deletions .github/workflows/deploy-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@
name: Deploy website to GitHub Pages

on:
push:
branches: [main]
paths:
- "website/**"
- "scripts/install.sh"
- "scripts/install.ps1"
- "scripts/install.bat"
- ".github/workflows/deploy-website.yml"
release:
types: [published]
workflow_dispatch:

permissions:
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Thank you for your interest in contributing to CoPaw! CoPaw is an open-source **

To keep collaboration smooth and maintain quality, please follow these guidelines.

> Branching recommendation: read the [Dual-Mainline Branching SOP (Local Collaboration)](DEV_BRANCHING_SOP.md) first.

### 1. Check Existing Plans and Issues

Before starting:
Expand Down
2 changes: 2 additions & 0 deletions CONTRIBUTING_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

为了保持协作顺畅并维护质量,请遵循以下指南。

> 分支协作建议:请先阅读[双主线开发 SOP(本地协作版)](DEV_BRANCHING_SOP_zh.md)。

### 1. 检查现有计划和问题

在开始之前:
Expand Down
80 changes: 80 additions & 0 deletions DEV_BRANCHING_SOP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# CoPaw Dual-Mainline Branching SOP (Local Collaboration)

This SOP standardizes local dual-mainline workflows and prevents accidental merges into the wrong mainline.

## 1. Branch Roles

- upstream/main: upstream source-of-truth mainline for sync and upstream PR baselines.
- fork/main: local development mainline where features are merged and validated first.
- main (local): choose exactly one model and keep it consistent.
- Model A (recommended): upstream mirror line.
- Model B: local release integration line.

Important: The team must align on what local main means before daily work.

## 2. Standard Development Flow

1. Refresh base lines
- git fetch --all --prune
- git checkout fork/main
- git merge --ff-only upstream/main

2. Create feature branch
- git checkout -b feat/upstream/<topic> fork/main

3. Develop and commit
- Follow Conventional Commits.
- Pass local gates before push/PR (pre-commit, pytest).

4. First merge stage (required)
- Merge feature into fork/main first.
- Commands:
- git checkout fork/main
- git merge --no-ff feat/upstream/<topic>

5. Second merge stage (optional, policy-based)
- If main is a local release integration line: merge fork/main into main.
- If main is an upstream mirror line: do not merge fork/main directly into main; open PR to upstream/main instead.

## 3. PR Target Mapping

- For upstream contribution:
- source: feat/upstream/<topic> (or cleaned equivalent)
- target: upstream/main
- For local fork integration:
- source: feat/upstream/<topic>
- target: fork/main

## 4. Pre-Merge Checklist

- Working tree is clean (git status has no pending changes).
- Target branch is correct (fork/main or main).
- Local mainline role is explicit (mirror vs integration).
- Diff/log range is explainable (git log / git diff).
- Required tests have passed (at least local gates).

## 5. Command Templates

### 5.1 Merge into development mainline first (fork/main)

- git checkout fork/main
- git merge --no-ff feat/upstream/knowledge-layer-mvp-sop-cognee

### 5.2 Merge into local mainline (only when main = integration line)

- git checkout main
- git merge --no-ff fork/main

## 6. Common Pitfalls

- Pitfall 1: Merge feature directly into main after implementation.
- Risk: pollutes mirror semantics if main is meant to track upstream.
- Pitfall 2: Let fork/main drift too far from upstream/main.
- Risk: conflict debt accumulates and PR review cost rises.
- Pitfall 3: Merge to mainline before local gates pass.
- Risk: unstable mainline and expensive rollback.

## 7. Relation to CONTRIBUTING

- This SOP complements, not replaces, CONTRIBUTING rules.
- Keep enforcing Conventional Commits, PR title format, pre-commit and test gates.
80 changes: 80 additions & 0 deletions DEV_BRANCHING_SOP_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# CoPaw 双主线开发 SOP(本地协作版)

本文用于规范本地双主线协作,避免 feature 直接误合到错误主线。

## 1. 分支角色

- upstream/main:上游事实主线,仅用于同步上游状态、构建上游 PR 基线。
- fork/main:本地开发主线,功能先合入这里并完成验证。
- main(本地):建议固定为以下两种之一。
- 方案 A(推荐):上游镜像线。尽量保持与 upstream/main 对齐。
- 方案 B:本地发布整合线。承接 fork/main,服务本地发布。

注意:项目内必须先统一 main 的定位,避免不同成员按不同语义操作。

## 2. 标准开发路径

1. 更新基线
- git fetch --all --prune
- git checkout fork/main
- git merge --ff-only upstream/main

2. 创建功能分支
- git checkout -b feat/upstream/<topic> fork/main

3. 开发与提交
- 按 Conventional Commits 提交。
- push/提 PR 前通过本地门禁(pre-commit、pytest)。

4. 第一段合并(必须)
- 目标:先合入 fork/main。
- 命令:
- git checkout fork/main
- git merge --no-ff feat/upstream/<topic>

5. 第二段合并(按需)
- 如果 main 是“本地发布整合线”:再将 fork/main 合入 main。
- 如果 main 是“上游镜像线”:不要把 fork/main 直接合入 main;改为对 upstream/main 提 PR。

## 3. PR 与分支对应关系

- 面向 upstream:
- 源分支:feat/upstream/<topic>(或清理后的等价分支)
- 目标分支:upstream/main
- 面向 fork 内部整合:
- 源分支:feat/upstream/<topic>
- 目标分支:fork/main

## 4. 合并前检查清单

- 当前工作区干净(git status 无未提交改动)。
- 当前目标分支正确(fork/main 或 main)。
- 明确 main 当前语义(上游镜像线 / 本地发布整合线)。
- 确认 feature 与目标分支差异范围可解释(git log/ git diff)。
- 必要测试已通过(至少本地门禁)。

## 5. 推荐命令模板

### 5.1 先合开发主线(fork/main)

- git checkout fork/main
- git merge --no-ff feat/upstream/knowledge-layer-mvp-sop-cognee

### 5.2 再合本地 main(仅当 main=本地发布整合线)

- git checkout main
- git merge --no-ff fork/main

## 6. 常见误区

- 误区 1:feature 完成后直接合 main。
- 风险:若 main 是上游镜像线,会污染镜像语义。
- 误区 2:fork/main 与 upstream/main 长期不对齐。
- 风险:后续冲突集中爆发,PR 审核成本升高。
- 误区 3:未先做门禁验证就推进主线合并。
- 风险:主线不稳定,后续回滚成本上升。

## 7. 与贡献规范的关系

- 本 SOP 不替代 CONTRIBUTING 中的提交与质量规范。
- 所有分支流程仍需遵守:Conventional Commits、PR 标题规范、pre-commit 与测试门禁。
Binary file added console/public/copaw-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added console/public/dark-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
100 changes: 96 additions & 4 deletions console/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { createGlobalStyle } from "antd-style";
import { ConfigProvider, bailianTheme } from "@agentscope-ai/design";
import { BrowserRouter } from "react-router-dom";
import { BrowserRouter, Routes, Route, Navigate } from "react-router-dom";
import { useEffect, useState } from "react";
import { useTranslation } from "react-i18next";
import zhCN from "antd/locale/zh_CN";
import enUS from "antd/locale/en_US";
import jaJP from "antd/locale/ja_JP";
import ruRU from "antd/locale/ru_RU";
import type { Locale } from "antd/es/locale";
import { theme as antdTheme } from "antd";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import "dayjs/locale/ja";
import "dayjs/locale/ru";
import MainLayout from "./layouts/MainLayout";
import { ThemeProvider, useTheme } from "./contexts/ThemeContext";
import LoginPage from "./pages/Login";
import { authApi } from "./api/modules/auth";
import { getApiUrl, getApiToken, clearAuthToken } from "./api/config";
import "./styles/layout.css";
import "./styles/form-override.css";

Expand All @@ -37,8 +42,71 @@ const GlobalStyle = createGlobalStyle`
}
`;

function App() {
function AuthGuard({ children }: { children: React.ReactNode }) {
const [status, setStatus] = useState<"loading" | "auth-required" | "ok">(
"loading",
);

useEffect(() => {
let cancelled = false;
(async () => {
try {
const res = await authApi.getStatus();
if (cancelled) return;
if (!res.enabled) {
setStatus("ok");
return;
}
const token = getApiToken();
if (!token) {
setStatus("auth-required");
return;
}
try {
const r = await fetch(getApiUrl("/auth/verify"), {
headers: { Authorization: `Bearer ${token}` },
});
if (cancelled) return;
if (r.ok) {
setStatus("ok");
} else {
clearAuthToken();
setStatus("auth-required");
}
} catch {
if (!cancelled) {
clearAuthToken();
setStatus("auth-required");
}
}
} catch {
if (!cancelled) setStatus("ok");
}
})();
return () => {
cancelled = true;
};
}, []);

if (status === "loading") return null;
if (status === "auth-required")
return (
<Navigate
to={`/login?redirect=${encodeURIComponent(window.location.pathname)}`}
replace
/>
);
return <>{children}</>;
}

function getRouterBasename(pathname: string): string | undefined {
return /^\/console(?:\/|$)/.test(pathname) ? "/console" : undefined;
}

function AppInner() {
const basename = getRouterBasename(window.location.pathname);
const { i18n } = useTranslation();
const { isDark } = useTheme();
const lang = i18n.resolvedLanguage || i18n.language || "en";
const [antdLocale, setAntdLocale] = useState<Locale>(
antdLocaleMap[lang] ?? enUS,
Expand All @@ -61,18 +129,42 @@ function App() {
}, [i18n]);

return (
<BrowserRouter>
<BrowserRouter basename={basename}>
<GlobalStyle />
<ConfigProvider
{...bailianTheme}
prefix="copaw"
prefixCls="copaw"
locale={antdLocale}
theme={{
...(bailianTheme as any)?.theme,
algorithm: isDark
? antdTheme.darkAlgorithm
: antdTheme.defaultAlgorithm,
}}
>
<MainLayout />
<Routes>
<Route path="/login" element={<LoginPage />} />
<Route
path="/*"
element={
<AuthGuard>
<MainLayout />
</AuthGuard>
}
/>
</Routes>
</ConfigProvider>
</BrowserRouter>
);
}

function App() {
return (
<ThemeProvider>
<AppInner />
</ThemeProvider>
);
}

export default App;
21 changes: 20 additions & 1 deletion console/src/api/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
declare const BASE_URL: string;
declare const TOKEN: string;

const AUTH_TOKEN_KEY = "copaw_auth_token";

/**
* Get the full API URL with /api prefix
* @param path - API path (e.g., "/models", "/skills")
Expand All @@ -14,9 +16,26 @@ export function getApiUrl(path: string): string {
}

/**
* Get the API token
* Get the API token - checks localStorage first (auth login),
* then falls back to the build-time TOKEN constant.
* @returns API token string or empty string
*/
export function getApiToken(): string {
const stored = localStorage.getItem(AUTH_TOKEN_KEY);
if (stored) return stored;
return typeof TOKEN !== "undefined" ? TOKEN : "";
}

/**
* Store the auth token in localStorage after login.
*/
export function setAuthToken(token: string): void {
localStorage.setItem(AUTH_TOKEN_KEY, token);
}

/**
* Remove the auth token from localStorage (logout / 401).
*/
export function clearAuthToken(): void {
localStorage.removeItem(AUTH_TOKEN_KEY);
}
Loading