Skip to content

Commit 799aab2

Browse files
Mingwwwwcursoragent
andcommitted
chore: relicense to Apache 2.0 and align PilotDeck naming
Switch project license and README badges from AGPL-3.0 to Apache 2.0, recognize ~/.pilotdeck as the general-chat cwd for skills, and use messageTypes.pilotdeck for assistant labels instead of the legacy claude key. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 518a1a0 commit 799aab2

13 files changed

Lines changed: 230 additions & 698 deletions

File tree

LICENSE

Lines changed: 202 additions & 661 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<p align="center">
1010
<a href="https://pilotdeck.openbmb.cn"><img src="https://img.shields.io/badge/Website-pilotdeck.openbmb.cn-FF6B35?style=flat-square&logo=googlechrome&logoColor=white" alt="Official Website"/></a>
1111
<a href="https://pilotdeck.openbmb.cn/pilotdeck.github.io/demo/p/pilotdeck-demo"><img src="https://img.shields.io/badge/Demo-Live-brightgreen?style=flat-square" alt="Live Demo"/></a>
12-
<a href="LICENSE"><img src="https://img.shields.io/badge/License-AGPL_3.0-blue.svg?style=flat-square" alt="License"/></a>
12+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg?style=flat-square" alt="License"/></a>
1313
<a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-Native-6366F1?style=flat-square" alt="MCP Native"/></a>
1414
<a href="#-desktop-app-apple-silicon"><img src="https://img.shields.io/badge/macOS-Desktop_App-000000?style=flat-square&logo=apple&logoColor=white" alt="Desktop App"/></a>
1515
<a href="https://github.com/OpenBMB/PilotDeck/stargazers"><img src="https://img.shields.io/github/stars/OpenBMB/PilotDeck?style=flat-square" alt="Stars"/></a>
@@ -459,4 +459,4 @@ If PilotDeck has been helpful in your work or research, please consider giving u
459459

460460
## 📄 License
461461

462-
This project is licensed under the [GNU Affero General Public License v3.0 (AGPL-3.0)](LICENSE). The `products/**` directory contains customer-specific customizations and is **not** part of the open-source release scope.
462+
This project is licensed under the [Apache License, Version 2.0](LICENSE).

README.zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<p align="center">
1010
<a href="https://pilotdeck.openbmb.cn"><img src="https://img.shields.io/badge/官网-pilotdeck.openbmb.cn-FF6B35?style=flat-square&logo=googlechrome&logoColor=white" alt="官方网站"/></a>
1111
<a href="https://pilotdeck.openbmb.cn/pilotdeck.github.io/demo/p/pilotdeck-demo"><img src="https://img.shields.io/badge/Demo-在线体验-brightgreen?style=flat-square" alt="在线体验"/></a>
12-
<a href="LICENSE"><img src="https://img.shields.io/badge/License-AGPL_3.0-blue.svg?style=flat-square" alt="License"/></a>
12+
<a href="LICENSE"><img src="https://img.shields.io/badge/License-Apache_2.0-blue.svg?style=flat-square" alt="License"/></a>
1313
<a href="https://modelcontextprotocol.io/"><img src="https://img.shields.io/badge/MCP-Native-6366F1?style=flat-square" alt="MCP Native"/></a>
1414
<a href="#-桌面端-app-apple-silicon"><img src="https://img.shields.io/badge/macOS-Desktop_App-000000?style=flat-square&logo=apple&logoColor=white" alt="Desktop App"/></a>
1515
<a href="https://github.com/OpenBMB/PilotDeck/stargazers"><img src="https://img.shields.io/github/stars/OpenBMB/PilotDeck?style=flat-square" alt="Stars"/></a>
@@ -462,4 +462,4 @@ PilotDeck 的建设离不开以下优秀开源项目的支持:
462462

463463
## 📄 许可证
464464

465-
本项目基于 [GNU Affero General Public License v3.0 (AGPL-3.0)](LICENSE) 开源`products/` 目录存放客户专属定制代码,不包含在开源发布范围内
465+
本项目基于 [Apache License, Version 2.0](LICENSE) 开源。

src/extension/skills/SkillManager.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@ export type SkillManagerOptions = {
5555
/** Resolved `~/.pilotdeck` root. Required. */
5656
pilotHome: string;
5757
/**
58-
* "General chat" cwds we treat as not-a-real-project. Defaults to the
59-
* paths the legacy UI server filtered out (general-chat cwd aliases).
60-
* When the caller passes a
61-
* `projectKey` matching one of these, the manager behaves as if no
62-
* project was set — only user-scope skills are visible.
58+
* "General chat" cwds we treat as not-a-real-project. Defaults to
59+
* `pilotHome` (~/.pilotdeck). When the caller passes a `projectKey`
60+
* matching one of these, the manager behaves as if no project was set —
61+
* only user-scope skills are visible.
6362
*/
6463
generalCwdPaths?: string[];
6564
};
@@ -78,10 +77,7 @@ export class SkillManager {
7877

7978
constructor(options: SkillManagerOptions) {
8079
this.pilotHome = resolve(options.pilotHome);
81-
const defaults = [
82-
join(homedir(), "Claude", "general"),
83-
join(homedir(), ".claude-gateway", "general"),
84-
];
80+
const defaults = [this.pilotHome];
8581
this.generalCwdPaths = (options.generalCwdPaths ?? defaults).map((p) => resolve(p));
8682
}
8783

ui/server/routes/commands.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { CURSOR_MODELS, CODEX_MODELS } from '../../shared/modelConstants.js';
99
import { parseFrontmatter } from '../utils/frontmatter.js';
1010
import { getClaudeRuntimeModelConfig, getClaudeRuntimeModelValues } from '../utils/claude-runtime-config.js';
1111
import { readPilotDeckConfigFile, resolveModel } from '../services/pilotdeckConfig.js';
12+
import { resolvePilotHome } from '../utils/pilotPaths.js';
1213
import { executeTurnkeySlashCommand } from '../turnkey-slash.js';
1314

1415
const execFileAsync = promisify(execFile);
@@ -640,15 +641,10 @@ Custom commands can be created in:
640641

641642
const projectPath = context?.projectPath || null;
642643

643-
// Some "projects" are actually the general-chat synthetic cwd (configured
644-
// in edgeclaw runtimePaths.generalCwd). They look like a real projectPath
645-
// but the user's mental model is "I'm in general chat" → user/global scope.
646-
// Detect the two known general-cwd patterns. If a user re-points generalCwd
647-
// elsewhere, they can still force user scope with --global.
648-
const GENERAL_CWD_PATHS = [
649-
path.join(os.homedir(), 'Claude', 'general'),
650-
path.join(os.homedir(), '.claude-gateway', 'general'),
651-
].map((p) => path.resolve(p));
644+
// PilotDeck's virtual "general" workspace roots at ~/.pilotdeck. It looks
645+
// like a real projectPath but the user's mental model is general chat →
646+
// user/global scope. Force user scope with --global when needed.
647+
const GENERAL_CWD_PATHS = [path.resolve(resolvePilotHome(process.env))];
652648
const isGeneralCwd =
653649
projectPath && GENERAL_CWD_PATHS.includes(path.resolve(projectPath));
654650
const effectiveProjectPath = isGeneralCwd ? null : projectPath;

ui/server/routes/skills.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ function safeSlug(slug) {
6363
return typeof slug === 'string' && SLUG_RE.test(slug) && !slug.includes('..');
6464
}
6565

66-
const GENERAL_CWD_PATHS = [
67-
path.join(os.homedir(), 'Claude', 'general'),
68-
path.join(os.homedir(), '.claude-gateway', 'general'),
69-
].map((p) => path.resolve(p));
66+
const GENERAL_CWD_PATHS = [path.resolve(PILOT_HOME)];
7067

7168
function isGeneralCwd(projectPath) {
7269
if (!projectPath) return false;

ui/src/components/chat/view/subcomponents/MessageComponent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ const MessageComponent = memo(({ message, prevMessage, createDiff, onFileOpen, o
312312
</div>
313313
)}
314314
<div className="text-sm font-medium text-gray-900 dark:text-white">
315-
{message.type === 'error' ? t('messageTypes.error') : message.type === 'tool' ? t('messageTypes.tool') : (provider === 'cursor' ? t('messageTypes.cursor') : provider === 'codex' ? t('messageTypes.codex') : provider === 'gemini' ? t('messageTypes.gemini') : t('messageTypes.claude'))}
315+
{message.type === 'error' ? t('messageTypes.error') : message.type === 'tool' ? t('messageTypes.tool') : (provider === 'cursor' ? t('messageTypes.cursor') : provider === 'codex' ? t('messageTypes.codex') : provider === 'gemini' ? t('messageTypes.gemini') : t('messageTypes.pilotdeck'))}
316316
</div>
317317
</div>
318318
)}

ui/src/components/main-content-v2/SkillsV2.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ function projectCwd(p: Project | null): string | null {
7777
return p.fullPath || p.path || null;
7878
}
7979

80-
function isGeneralCwd(p: string | null): boolean {
80+
function isGeneralProject(p: Project | null): boolean {
8181
if (!p) return false;
82-
return p.endsWith('/Claude/general') || p.endsWith('/.claude-gateway/general');
82+
return p.name === 'general' || p.displayName === 'general';
8383
}
8484

8585
async function api<T>(url: string, body: unknown): Promise<T> {
@@ -103,7 +103,7 @@ export default function SkillsV2({ selectedProject, projects }: SkillsV2Props) {
103103
const { isDarkMode } = useTheme() as { isDarkMode: boolean };
104104

105105
const cwd = projectCwd(selectedProject);
106-
const generalCwd = isGeneralCwd(cwd);
106+
const generalCwd = isGeneralProject(selectedProject);
107107
const effectiveProjectPath = generalCwd ? null : cwd;
108108

109109
const [skills, setSkills] = useState<SkillsListResponse | null>(null);
@@ -475,7 +475,7 @@ function SkillsList({
475475
for (const project of projects) {
476476
const path = project.fullPath || project.path || null;
477477
if (!path) continue;
478-
if (path.endsWith('/Claude/general') || path.endsWith('/.claude-gateway/general')) continue;
478+
if (project.name === 'general' || project.displayName === 'general') continue;
479479
targets.push({
480480
label: project.displayName || project.name,
481481
target: { scope: 'project', projectPath: path },

ui/src/components/settings/view/tabs/PermissionsSettingsTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ export default function PermissionsSettingsTab() {
197197
.catch((error) => {
198198
console.error('Failed to load permission settings from backend:', error);
199199
});
200-
// Stay in sync with grants from the chat surface (`grantClaudeToolPermission`)
200+
201201
// so users can flip back and forth between the chat and this dialog
202202
// without seeing stale state.
203203
const onStorage = (event: StorageEvent) => {
@@ -428,7 +428,7 @@ export default function PermissionsSettingsTab() {
428428
})}
429429
</span>
430430
}
431-
description={t('permissions.skipPermissions.claudeDescription', {
431+
description={t('permissions.skipPermissions.pilotdeckDescription', {
432432
defaultValue: 'Equivalent to passing --dangerously-skip-permissions.',
433433
})}
434434
>

ui/src/i18n/locales/en/chat.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"user": "U",
1616
"error": "Error",
1717
"tool": "Tool",
18-
"claude": "PilotDeck",
18+
"claude": "Claude",
19+
"pilotdeck": "PilotDeck",
1920
"cursor": "Cursor",
2021
"codex": "Codex",
2122
"gemini": "Gemini"

0 commit comments

Comments
 (0)