Repository navigation
feat(desktop): Add desktop app package with Qwen ACP SDK integration #3778
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
85f9c17
0243084
7ae2c79
d12f2c9
01630ec
d20e9f3
f427023
b41e284
1937cba
e5e868b
4f08361
1890d1e
61a27aa
cd57ab4
559dc75
ef4230b
46e2852
06cd392
7174a27
9950a2f
73a7194
cd00a5c
e83bc10
99c057c
bf83d4d
8ba8997
c5f55f9
f6af7c4
56dd1f2
d069e91
c2b7dd1
dc9969f
f57887d
c61ae67
c104ad1
6f91ad4
92963b7
f0f30ba
488e232
32bdcd8
496c16c
ec92224
a8c4479
99cc212
db2911e
ac741da
ec232b5
f89e9b6
e8c7577
f2e3e2c
29e005e
518c008
e73ac20
5409c0b
565598a
b419b65
48323a5
dff6227
eec0556
1ddf152
a9c1a1e
ee9b65e
4823d85
3ce07e0
1ece7f4
2508763
8ed5609
54794e0
c0d6474
3af5201
13c4eb9
e7e4edb
007554f
597adc4
ae9fb06
24be382
ff55960
debfbd9
d7212f6
fde9b04
2d1e743
7269465
520cfe6
c19eb60
7239418
ae48a0d
1d94321
686827e
36ea92f
e6efab9
e88e0fd
8b5d5fc
9daf736
1cfbe45
fe2c6e2
6df83d4
41c8636
3891304
0b9e4bd
f1cc980
139d2dd
1437877
60f76e8
7c2109d
225b72b
476460a
8fe4f4d
938f4c0
85f6fb9
3090d33
64a5f43
ab326d2
488c023
a81b07a
782e0ed
68de0ff
cc32852
ca369b1
6fc2a8d
a4d71ce
92cbe36
06b78d3
05ce100
4fe346a
e044b21
491455f
751e45c
3937912
efd5f48
c4bb9ab
afe5452
b6bf1ff
ccee491
c1023d9
b652350
659039f
388874f
f02dbda
1fbfe63
386a241
7bdbef2
bcfdb0d
6979ff4
822e0a5
f6c02dd
4b2fd72
7c0c664
dc92f89
f6bb3ce
5a9e426
df131dc
390fd27
500d809
d05e648
3249889
0ecead5
040e751
bc3543c
bc5cb35
5f3ea97
28b806c
3e4eb22
f26d06b
4599cd7
5448b86
058af20
92c11e8
59baa1e
172bb3a
d0da44d
c88614f
d490e72
c1c86fe
41b80c9
f7dc701
6b280ae
c0af314
606fd16
4b35470
ba6ccdc
90b3592
2c8068b
c0d67cf
9e3bb3b
78a469b
d728924
664e040
1041997
4da3da2
053cf45
7295a1b
076d6b5
d39b6b9
37e8a6e
2419040
3a99bb3
3968e6d
fbb5d46
ebb3a18
e5f9ba4
473c9dc
4fada0b
b2e07ac
dfc9034
e28c321
f011644
44f324a
6eb10ea
b64592c
1f05c45
27f86ff
e136e9c
4c8946e
7124b47
238c8d3
1e3725d
c3da09a
a1e9f9f
c1826a2
1a8c8e7
276111c
3ee5790
de24b11
f46e78e
31e55b7
f1e9de9
4336074
9d522a8
2216749
1ad4b4b
957b0f1
02f59d8
8a5a5a3
029416c
f42730a
238c13c
26aa765
b298f2e
d42c3d2
c3546c7
452c2ad
4b39081
23e28a2
5b05423
03e0331
26d873d
a4f70bf
4af0071
551a7ee
9f2d508
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,151 @@ | ||
| --- | ||
| name: desktop-brand-builder | ||
| description: Generate a branded qwen-code desktop package from a minimal brandId and logo. Use when the user wants a custom, white-label, rebranded, ModelStudio/OpenWork/Qwen Code desktop client, installer, DMG/EXE/AppImage, or one-click brand build. | ||
| --- | ||
|
|
||
| # Desktop Brand Builder | ||
|
|
||
| ## Goal | ||
|
|
||
| Create a branded desktop package with the least user input possible. The user | ||
| should usually provide only: | ||
|
|
||
| ```text | ||
| brandId: acme-ai | ||
| logo: /absolute/path/to/logo.png | ||
| website: https://acme.ai | ||
| ``` | ||
|
|
||
| `website` is optional. Do not ask for app name, app id, artifact name, | ||
| copyright, dock icon, renderer symbol, signing, or local installation unless | ||
| the user explicitly asks to override them. | ||
|
|
||
| ## Input Rules | ||
|
|
||
| Required fields: | ||
|
|
||
| - `brandId`: must match `^[a-z][a-z0-9-]*$` | ||
| - `logo`: local file path; must exist | ||
|
|
||
| Optional overrides: | ||
|
|
||
| - `website` | ||
| - `appName` | ||
| - `appId` | ||
| - `artifactPrefix` | ||
| - `target`: `mac`, `win`, `linux`, or `all` | ||
|
|
||
| If required input is missing, ask once: | ||
|
|
||
| ```text | ||
| 请提供: | ||
| brandId: 例如 acme-ai,只能小写字母、数字、短横线 | ||
| logo: 本地 logo 文件路径 | ||
| website: 可选 | ||
| ``` | ||
|
|
||
| Once the required fields are present, proceed without a confirmation step. | ||
|
|
||
| ## Derived Defaults | ||
|
|
||
| Infer missing values deterministically: | ||
|
|
||
| - `appName`: title-case the hyphen-separated `brandId`; `acme-ai` becomes | ||
| `Acme AI` | ||
| - `artifactPrefix`: title-case the hyphen-separated `brandId` and join with | ||
| hyphens; `acme-ai` becomes `Acme-AI` | ||
| - `appId`: if `website` has a valid host, reverse the host labels and append | ||
| `.desktop`; `https://acme.ai` becomes `ai.acme.desktop` | ||
| - fallback `appId`: `app.<brandId>.desktop` | ||
| - `copyright`: `Copyright © <current year> <appName>` | ||
| - all brand images: generate icon, dock icon, and renderer symbol from `logo` | ||
|
Collaborator
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. [Critical] Documentation/code mismatch: SKILL.md states — claude-opus-4-6 via Qwen Code /review |
||
|
|
||
| Use explicit user-provided override values as-is after basic validation. | ||
|
|
||
| ## Build Workflow | ||
|
|
||
| Use an isolated build directory under the current working directory so user | ||
| changes in the current worktree are not mutated. Default to the qwen-code desktop branch; do not clone from | ||
| `craft-agents-oss`, OpenWork, or another local checkout unless the user | ||
| explicitly asks for that source: | ||
|
|
||
| ```bash | ||
| BUILD_ROOT="$PWD/brand-builds/<brandId>-<timestamp>" | ||
| mkdir -p "$BUILD_ROOT" | ||
| git clone --branch dragon/feat-unstable-desktop-app --single-branch \ | ||
| https://github.com/QwenLM/qwen-code.git \ | ||
| "$BUILD_ROOT/qwen-code" | ||
| cd "$BUILD_ROOT/qwen-code" | ||
| git checkout -B dragon/brand-<brandId> origin/dragon/feat-unstable-desktop-app | ||
| ``` | ||
|
|
||
| If the branch fetch or checkout fails, stop and report the failure. Do not | ||
| continue as if `dragon/brand-<brandId>` was created. | ||
|
|
||
| Create a temporary `brand.json` in the build directory: | ||
|
|
||
| ```json | ||
| { | ||
| "brandId": "acme-ai", | ||
| "logo": "/absolute/path/to/logo.png", | ||
| "website": "https://acme.ai", | ||
| "appName": "Acme AI", | ||
| "appId": "ai.acme.desktop", | ||
| "artifactPrefix": "Acme-AI", | ||
| "copyright": "Copyright © 2026 Acme AI" | ||
| } | ||
| ``` | ||
|
|
||
| Install desktop dependencies if `packages/desktop/node_modules` is missing: | ||
|
|
||
| ```bash | ||
| cd packages/desktop | ||
| bun install | ||
| ``` | ||
|
|
||
| Then run this skill's bundled brand creation script: | ||
|
|
||
| ```bash | ||
| cd /absolute/path/to/qwen-code | ||
| bun run packages/desktop/.agents/skills/desktop-brand-builder/scripts/brand-create.ts \ | ||
| --desktop-root /absolute/path/to/qwen-code/packages/desktop \ | ||
| --config /absolute/path/to/brand.json | ||
| ``` | ||
|
|
||
| The agent should not hand-edit `branding.ts` or brand asset files when this | ||
| bundled script is available. The bundled script is the source of truth for | ||
| patching code and generating resources. | ||
|
|
||
| Package with the current host target unless the user requested a target: | ||
|
|
||
| ```bash | ||
| CRAFT_BRAND=<brandId> bun run electron:dist:mac | ||
| CRAFT_BRAND=<brandId> bun run electron:dist:win | ||
| CRAFT_BRAND=<brandId> bun run electron:dist:linux | ||
| ``` | ||
|
|
||
| For `target: all`, run only targets supported by the current machine or CI | ||
| environment. Do not claim cross-platform artifacts were produced unless the | ||
| files exist. | ||
|
|
||
| ## Validation | ||
|
|
||
| After packaging: | ||
|
|
||
| 1. Confirm the expected artifact exists under | ||
| `packages/desktop/apps/electron/release/`. | ||
| 2. Compute `sha256sum` or `shasum -a 256` for each artifact. | ||
| 3. On macOS, run `hdiutil verify` for generated DMG files. | ||
| 4. Report the artifact path, SHA-256, app name, app id, and build directory. | ||
|
|
||
| ## Failure Handling | ||
|
|
||
| - Invalid `brandId`: show the regex and ask for a corrected value. | ||
| - Missing `logo`: ask for a valid local path. | ||
| - Missing bundled script: report that | ||
| `packages/desktop/.agents/skills/desktop-brand-builder/scripts/brand-create.ts` | ||
| is missing, and include the expected command. | ||
| - Build failure: preserve the build directory, return the last useful error | ||
| lines, and include the full log path or command that produced the failure. | ||
|
|
||
| Do not delete the build directory on failure. | ||
Uh oh!
There was an error while loading. Please reload this page.