程序员阿江(Relakkes) 6d9aa98022 Support DingTalk IM without blocking on project history
DingTalk uses QR registration to store client credentials, then reuses the existing IM pairing and session bridge. The merged main implementation keeps the existing WeChat QR binding path intact while adding DingTalk as a peer IM platform. The default IM workdir now falls back to the local user working directory so a newly bound chat can start immediately even when recent-project history is empty.

Constraint: Local main already carries WeChat IM, so the merge keeps WeChat config, QR binding, sidecar args, and unbind behavior intact while adding DingTalk.
Rejected: Keep empty defaultProjectDir as project-picker-only | newly bound IM users can hit a dead end with no recent projects.
Confidence: high
Scope-risk: moderate
Directive: Keep IM platform unions synchronized across config, pairing, sidecar args, desktop settings, and docs.
Tested: bun test common/ dingtalk/ wechat/; bun test src/server/__tests__/adapters.test.ts; cd adapters && bunx tsc --noEmit; bun run check:policy; bun run check:server; bun run check:desktop; bun run check:adapters; bun run check:native; bun run check:docs
Not-tested: quality:pr full gate was blocked by existing local main CLI-core diff requiring allow-cli-core-change maintainer approval; live post-fix DingTalk second-message delivery was not repeated after the merge.
2026-05-03 17:56:22 +08:00

108 lines
2.8 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/nicegui/nicegui/main/nicegui/static/tauri-capabilities-schema-v2.json",
"identifier": "default",
"description": "Default capabilities for Claude Code Desktop",
"windows": ["main"],
"permissions": [
"core:default",
"core:window:allow-close",
"core:window:allow-minimize",
"core:window:allow-start-dragging",
"core:window:allow-toggle-maximize",
"shell:allow-open",
{
"identifier": "shell:allow-execute",
"allow": [
{
"args": [
"server",
{ "validator": "regex", "value": "^(--port|--host|--config)=.+$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
},
{
"args": [
"adapters",
{ "validator": "regex", "value": "^(feishu|telegram|wechat|dingtalk|lark|slack)(:.+)?$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
},
{
"args": [
"cli",
{ "validator": "regex", "value": "^.+$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
}
]
},
{
"identifier": "shell:allow-spawn",
"allow": [
{
"args": [
"server",
{ "validator": "regex", "value": "^(--port|--host|--config)=.+$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
},
{
"args": [
"adapters",
{ "validator": "regex", "value": "^(feishu|telegram|wechat|dingtalk|lark|slack)(:.+)?$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
},
{
"args": [
"cli",
{ "validator": "regex", "value": "^.+$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
}
]
},
{
"identifier": "shell:allow-kill",
"allow": [
{
"args": [
"server",
{ "validator": "regex", "value": "^(--port|--host|--config)=.+$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
},
{
"args": [
"adapters",
{ "validator": "regex", "value": "^(feishu|telegram|wechat|dingtalk|lark|slack)(:.+)?$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
},
{
"args": [
"cli",
{ "validator": "regex", "value": "^.+$" }
],
"name": "binaries/claude-sidecar",
"sidecar": true
}
]
},
"dialog:allow-open",
"dialog:allow-save",
"notification:default",
"process:allow-exit",
"process:allow-restart",
"updater:default"
]
}