link-to-im
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLink-to-IM Bridge Skill
Link-to-IM桥接技能
You are managing the Link-to-IM bridge.
User data is stored at .
~/.link-to-im/你正在管理Link-to-IM桥接服务。
用户数据存储在目录下。
~/.link-to-im/Preamble — update check
前置说明——版本更新检查
Before processing any subcommand, run this silent check once per session:
bash
_UPD=$("SKILL_DIR/node_modules/.bin/update-kit" quick-check --cwd "SKILL_DIR" --json 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true(Replace SKILL_DIR with the actual skill directory path resolved below.)
- If output contains : tell user "Link-to-IM v{candidateVersion} 可用(当前 v{currentVersion})。要现在升级吗?" and offer to run
"status":"upgrade_available"."SKILL_DIR/node_modules/.bin/update-kit" apply --cwd "SKILL_DIR" --decision update_once - If output contains : tell user "已升级到最新版本!"
"status":"just_upgraded" - Otherwise: proceed silently.
First, locate the skill directory by finding this SKILL.md file:
- Use Glob with pattern to find its path, then derive the skill root directory from it.
**/skills/**/link-to-im/SKILL.md - Store that path mentally as SKILL_DIR for all subsequent file references.
在处理任何子命令之前,每个会话需静默执行一次以下检查:
bash
_UPD=$("SKILL_DIR/node_modules/.bin/update-kit" quick-check --cwd "SKILL_DIR" --json 2>/dev/null || true)
[ -n "$_UPD" ] && echo "$_UPD" || true(请将SKILL_DIR替换为下文解析出的实际技能目录路径。)
- 若输出包含:告知用户"Link-to-IM v{candidateVersion} 可用(当前 v{currentVersion})。要现在升级吗?",并提供执行
"status":"upgrade_available"的选项。"SKILL_DIR/node_modules/.bin/update-kit" apply --cwd "SKILL_DIR" --decision update_once - 若输出包含:告知用户"已升级到最新版本!"
"status":"just_upgraded" - 其他情况:静默继续执行。
首先,通过查找SKILL.md文件定位技能目录:
- 使用Glob模式查找文件路径,然后从中推导技能根目录。
**/skills/**/link-to-im/SKILL.md - 将该路径记为SKILL_DIR,后续所有文件引用均使用此路径。
Command parsing
命令解析
Parse the user's intent from into one of these subcommands:
$ARGUMENTS| User says (examples) | Subcommand |
|---|---|
| setup |
| start |
| stop |
| status |
| logs |
| reconfigure |
| doctor |
Disambiguation: vs — Use when the user just wants to check if the bridge is running (informational). Use when the user reports a problem or suspects something is broken (diagnostic). When in doubt and the user describes a symptom (e.g., "没反应了", "挂了"), prefer .
statusdoctorstatusdoctordoctorExtract optional numeric argument for (default 50).
logsBefore asking users for any platform credentials, read internally so you know where to find each credential. Do NOT dump the full guide to the user upfront — only mention the specific next step they need to do (e.g., "Go to https://open.feishu.cn → your app → Credentials to find the App ID"). If the user says they don't know how, then show the relevant section of the guide.
SKILL_DIR/references/setup-guides.md从中解析用户意图,匹配以下子命令之一:
$ARGUMENTS| 用户表述(示例) | 子命令 |
|---|---|
| setup |
| start |
| stop |
| status |
| logs |
| reconfigure |
| doctor |
歧义区分: vs — 当用户仅想检查桥接是否运行时(信息查询),使用;当用户报告问题或怀疑服务故障时(诊断排查),使用。若存在疑问且用户描述了故障症状(如"没反应了"、"挂了"),优先使用。
statusdoctorstatusdoctordoctor提取命令的可选数字参数(默认值为50)。
logs在向用户索要任何平台凭证之前,请先内部查阅,了解每个凭证的获取位置。不要直接向用户展示完整指南,仅告知他们当前所需的具体步骤(例如:"访问https://open.feishu.cn → 你的应用 → 凭证页面获取App ID")。若用户表示不知道如何操作,再展示指南中的相关章节。
SKILL_DIR/references/setup-guides.mdRuntime detection
运行环境检测
Before executing any subcommand, detect which environment you are running in:
- Interactive skill hosts — tool is available. Use it for interactive setup wizards.
AskUserQuestion - Non-interactive hosts — is NOT available. Fall back to non-interactive guidance: explain the steps, show
AskUserQuestion, and ask the user to createSKILL_DIR/config.env.examplemanually.~/.link-to-im/config.env
You can test this by checking if AskUserQuestion is in your available tools list.
在执行任何子命令之前,检测当前运行环境:
- 交互式技能主机 — 可使用工具。用于交互式设置向导。
AskUserQuestion - 非交互式主机 — 无法使用工具。 fallback到非交互式指导:解释操作步骤,展示
AskUserQuestion内容,并要求用户手动创建SKILL_DIR/config.env.example文件。~/.link-to-im/config.env
你可以通过检查可用工具列表中是否包含AskUserQuestion来测试当前环境类型。
Config check (applies to start
, stop
, status
, logs
, reconfigure
, doctor
)
startstopstatuslogsreconfiguredoctor配置检查(适用于start
、stop
、status
、logs
、reconfigure
、doctor
)
startstopstatuslogsreconfiguredoctorBefore running any subcommand other than , check if exists:
setup~/.link-to-im/config.env- If it does NOT exist:
- In interactive hosts: tell the user "No configuration found" and automatically start the wizard using AskUserQuestion.
setup - In non-interactive hosts: tell the user "No configuration found. Please create based on the example:" then show the contents of
~/.link-to-im/config.envand stop. Do NOT attempt to start the daemon — without config.env the process will crash on startup and leave behind a stale PID file that blocks future starts.SKILL_DIR/config.env.example
- In interactive hosts: tell the user "No configuration found" and automatically start the
- If it exists: proceed with the requested subcommand.
在执行除之外的任何子命令之前,检查是否存在:
setup~/.link-to-im/config.env- 若文件不存在:
- 交互式主机:告知用户"未找到配置文件",并自动使用AskUserQuestion启动向导。
setup - 非交互式主机:告知用户"未找到配置文件。请根据示例创建:",然后展示
~/.link-to-im/config.env的内容并停止操作。请勿尝试启动守护进程——缺少config.env会导致进程启动时崩溃,并留下无效PID文件,阻碍后续启动。SKILL_DIR/config.env.example
- 交互式主机:告知用户"未找到配置文件",并自动使用AskUserQuestion启动
- 若文件存在: 继续执行请求的子命令。
Subcommands
子命令详情
setup
setupsetup
setupRun an interactive setup wizard. This subcommand requires . If it is not available, instead show the contents of with field-by-field explanations and instruct the user to create the config file manually.
AskUserQuestionSKILL_DIR/config.env.exampleWhen AskUserQuestion IS available, collect input one field at a time. After each answer, confirm the value back to the user (masking secrets to last 4 chars only) before moving to the next question.
Step 1 — Choose channels
Ask which channels to enable (telegram, discord, feishu, qq, weixin). Accept comma-separated input. Briefly describe each:
- telegram — Best for personal use. Streaming preview, inline permission buttons.
- discord — Good for team use. Server/channel/user-level access control.
- feishu (Lark) — For Feishu/Lark teams. Streaming cards, tool progress, inline permission buttons.
- qq — QQ C2C private chat only. No inline permission buttons, no streaming preview. Permissions use text commands.
/perm ... - weixin — WeChat QR login. Single linked account only; a new login replaces the previous one. No inline permission buttons, no streaming preview. Permissions use text commands or quick
/perm ...replies. Voice messages only use WeChat's own speech-to-text text; raw voice audio is not transcribed by the bridge.1/2/3
Step 2 — Collect tokens per channel
For each enabled channel, collect one credential at a time. Tell the user where to find each value in one sentence. Only show the full guide section (from ) if the user asks for help or says they don't know how:
SKILL_DIR/references/setup-guides.md- Telegram: Bot Token → confirm (masked) → Chat ID (see guide for how to get it) → confirm → Allowed User IDs (optional). Important: At least one of Chat ID or Allowed User IDs must be set, otherwise the bot will reject all messages.
- Discord: Bot Token → confirm (masked) → Allowed User IDs → Allowed Channel IDs (optional) → Allowed Guild IDs (optional). Important: At least one of Allowed User IDs or Allowed Channel IDs must be set, otherwise the bot will reject all messages (default-deny).
- Feishu: App ID → confirm → App Secret → confirm (masked) → Domain (optional) → Allowed User IDs (optional). After collecting credentials, explain the two-phase setup the user must complete:
- Phase 1 (before starting bridge): (A) batch-add permissions, (B) enable bot capability, (C) publish first version + admin approve. This makes permissions and bot effective.
- Phase 2 (requires running bridge): (D) run , (E) configure events (
/agent-to-im start) and callback (im.message.receive_v1) with long connection mode, (F) publish second version + admin approve.card.action.trigger - Why two phases: Feishu validates WebSocket connection when saving event subscription — if the bridge isn't running, saving will fail. The bridge needs published permissions to connect.
- Keep this to a short checklist — show the full guide only if asked.
- QQ: Collect two required fields, then optional ones:
- QQ App ID (required) → confirm
- QQ App Secret (required) → confirm (masked)
- Tell the user: these two values can be found at https://q.qq.com/qqbot/openclaw
- Allowed User OpenIDs (optional, press Enter to skip) — note: this is , NOT QQ number. If the user doesn't have openid yet, they can leave it empty.
user_openid - Image Enabled (optional, default true, press Enter to skip) — if the underlying provider doesn't support image input, set to false
- Max Image Size MB (optional, default 20, press Enter to skip)
- Remind user: QQ first version only supports C2C private chat sandbox access. No group/channel support, no inline buttons, no streaming preview.
- Weixin: Do not ask for a static token. Instead:
- Tell the user this channel uses QR login, not manual credential entry.
- Run
cd SKILL_DIR && npm run weixin:login - The helper writes and tries to open it automatically in the local browser.
~/.agent-to-im/runtime/weixin-login.html - If auto-open fails, tell the user to open that HTML file manually and scan the QR code with WeChat.
- Wait for the helper to report success, then confirm that the linked account was saved locally.
- Explain briefly: the linked Weixin account is stored in . Running the helper again replaces the previously linked account.
~/.agent-to-im/data/weixin-accounts.json - Explain briefly: only controls inbound image/file/video downloads. For voice messages, the bridge only accepts the text returned by WeChat's built-in speech-to-text. If WeChat does not provide a transcript, the bridge replies with an error instead of downloading/transcribing raw audio.
CTI_WEIXIN_MEDIA_ENABLED
Step 3 — General settings
Ask for runtime, default working directory, model, and mode:
- Runtime: ,
claude,codex,geminiauto- — uses Claude CLI + Claude Agent SDK
claude - — uses OpenAI Codex SDK
codex - — uses Gemini CLI
gemini - — tries Gemini first, then Claude, then falls back to Codex if needed
auto
- Working Directory: default
$CWD - Model (optional): Leave blank to inherit the runtime's own default model. If the user wants to override, ask them to enter a model name. Do NOT hardcode or suggest specific model names — the available models change over time.
- Mode: (default),
code,planask
Step 4 — Write config and validate
- Show a final summary table with all settings (secrets masked to last 4 chars)
- Ask user to confirm before writing
- Use Bash to create directory structure:
mkdir -p ~/.link-to-im/{data,logs,runtime,data/messages} - Use Write to create with all settings in KEY=VALUE format
~/.link-to-im/config.env - Use Bash to set permissions:
chmod 600 ~/.link-to-im/config.env - Validate tokens — read for the exact commands and expected responses for each platform. This catches typos and wrong credentials before the user tries to start the daemon. For Weixin, a successful QR login already counts as validation.
SKILL_DIR/references/token-validation.md - Report results with a summary table. If any validation fails, explain what might be wrong and how to fix it.
- On success, tell the user: "Setup complete! Run to start the bridge."
/link-to-im start
运行交互式设置向导。该子命令需要工具。若无法使用该工具,则展示的内容并附带字段说明,指导用户手动创建配置文件。
AskUserQuestionSKILL_DIR/config.env.example当可使用AskUserQuestion时,逐个字段收集输入。用户每回答一个字段,先向用户确认输入值(仅显示密钥的最后4位),再进入下一个问题。
步骤1 — 选择渠道
询问用户要启用哪些渠道(telegram、discord、feishu、qq、weixin),接受逗号分隔的输入。简要描述每个渠道:
- telegram — 适合个人使用,支持流式预览、内联权限按钮。
- discord — 适合团队使用,支持服务器/频道/用户级别的访问控制。
- feishu(Lark) — 适用于飞书/Lark团队,支持流式卡片、工具进度展示、内联权限按钮。
- qq — 仅支持QQ单聊,无内联权限按钮、无流式预览,权限通过文本命令管理。
/perm ... - weixin — 使用微信扫码登录,仅支持单个关联账号;重新登录会替换之前的账号。无内联权限按钮、无流式预览,权限通过文本命令或快捷回复
/perm ...管理。语音消息仅使用微信自带的语音转文本结果,桥接服务不会转录原始语音音频。1/2/3
步骤2 — 按渠道收集凭证
对于每个启用的渠道,逐个收集凭证。用一句话告知用户每个值的获取位置。仅当用户请求帮助或表示不知道如何操作时,才展示中的完整指南章节:
SKILL_DIR/references/setup-guides.md- Telegram:Bot Token → 确认(掩码显示)→ Chat ID(参考指南获取方法)→ 确认 → 允许的用户ID(可选)。重要提示: Chat ID或允许的用户ID至少需设置一项,否则机器人会拒绝所有消息。
- Discord:Bot Token → 确认(掩码显示)→ 允许的用户ID → 允许的频道ID(可选)→ 允许的服务器ID(可选)。重要提示: 允许的用户ID或允许的频道ID至少需设置一项,否则机器人会拒绝所有消息(默认拒绝策略)。
- Feishu:App ID → 确认 → App Secret → 确认(掩码显示)→ 域名(可选)→ 允许的用户ID(可选)。收集完凭证后,向用户解释必须完成的两阶段设置:
- 阶段1(启动桥接前):(A) 批量添加权限,(B) 启用机器人能力,(C) 发布首个版本并等待管理员审批。此步骤使权限和机器人生效。
- 阶段2(需桥接服务运行):(D) 执行,(E) 配置事件(
/agent-to-im start)和回调(im.message.receive_v1)为长连接模式,(F) 发布第二个版本并等待管理员审批。card.action.trigger - 两阶段原因: 飞书在保存事件订阅时会验证WebSocket连接——若桥接服务未运行,保存会失败;而桥接服务需要已发布的权限才能连接。
- 仅提供简短的清单,仅在用户请求时展示完整指南。
- QQ:收集两个必填字段,然后是可选字段:
- QQ App ID(必填)→ 确认
- QQ App Secret(必填)→ 确认(掩码显示)
- 告知用户:这两个值可在https://q.qq.com/qqbot/openclaw获取
- 允许的用户OpenID(可选,按回车跳过)——注意:此处为,而非QQ号。若用户暂无openid,可留空。
user_openid - 图片启用(可选,默认true,按回车跳过)——若底层提供商不支持图片输入,设置为false
- 最大图片大小MB(可选,默认20,按回车跳过)
- 提醒用户:QQ初始版本仅支持单聊沙箱访问,无群组/频道支持、无内联按钮、无流式预览。
- Weixin:无需询问静态token,执行以下步骤:
- 告知用户该渠道使用扫码登录,无需手动输入凭证。
- 执行
cd SKILL_DIR && npm run weixin:login - 辅助工具会生成并尝试在本地浏览器自动打开。
~/.agent-to-im/runtime/weixin-login.html - 若自动打开失败,告知用户手动打开该HTML文件并用微信扫码。
- 等待辅助工具报告成功,然后确认关联账号已保存到本地。
- 简要说明:关联的微信账号存储在中,再次运行辅助工具会替换之前关联的账号。
~/.agent-to-im/data/weixin-accounts.json - 简要说明:仅控制图片/文件/视频的下载。对于语音消息,桥接服务仅接受微信内置语音转文本返回的文本;若微信未提供转录结果,桥接服务会回复错误,而非下载/转录原始音频。
CTI_WEIXIN_MEDIA_ENABLED
步骤3 — 通用设置
询问用户运行时环境、默认工作目录、模型和模式:
- 运行时环境:、
claude、codex、geminiauto- — 使用Claude CLI + Claude Agent SDK
claude - — 使用OpenAI Codex SDK
codex - — 使用Gemini CLI
gemini - — 优先尝试Gemini,其次是Claude,最后 fallback到Codex
auto
- 工作目录:默认
$CWD - 模型(可选):留空则继承运行时环境的默认模型。若用户想要覆盖,要求输入模型名称。请勿硬编码或建议特定模型名称——可用模型会随时间变化。
- 模式:(默认)、
code、planask
步骤4 — 写入配置并验证
- 展示包含所有设置的最终汇总表格(密钥仅显示最后4位)
- 询问用户确认后再写入配置
- 使用Bash创建目录结构:
mkdir -p ~/.link-to-im/{data,logs,runtime,data/messages} - 使用Write工具创建,所有设置采用KEY=VALUE格式
~/.link-to-im/config.env - 使用Bash设置权限:
chmod 600 ~/.link-to-im/config.env - 验证token——查阅获取每个平台的具体命令和预期响应。这可在用户尝试启动守护进程前捕获输入错误和无效凭证。对于微信,成功的扫码登录即视为验证通过。
SKILL_DIR/references/token-validation.md - 用汇总表格报告结果。若任何验证失败,解释可能的问题及修复方法。
- 成功完成后,告知用户:"设置完成!执行启动桥接服务。"
/link-to-im start
start
startstart
startPre-check: Verify exists (see "Config check" above). Without it, the daemon will crash immediately and leave a stale PID file.
~/.link-to-im/config.envRun:
bash "SKILL_DIR/scripts/daemon.sh" startShow the output to the user. If it fails, tell the user:
- Run to diagnose:
doctor/link-to-im doctor - Check recent logs:
/link-to-im logs
预检查: 验证是否存在(见上文"配置检查")。缺少该文件会导致守护进程立即崩溃并留下无效PID文件。
~/.link-to-im/config.env执行:
bash "SKILL_DIR/scripts/daemon.sh" start向用户展示输出结果。若启动失败,告知用户:
- 执行命令诊断:
doctor/link-to-im doctor - 查看最近日志:
/link-to-im logs
stop
stopstop
stopRun:
bash "SKILL_DIR/scripts/daemon.sh" stop执行:
bash "SKILL_DIR/scripts/daemon.sh" stopstatus
statusstatus
statusRun:
bash "SKILL_DIR/scripts/daemon.sh" status执行:
bash "SKILL_DIR/scripts/daemon.sh" statuslogs
logslogs
logsExtract optional line count N from arguments (default 50).
Run:
bash "SKILL_DIR/scripts/daemon.sh" logs N从参数中提取可选的行数N(默认50)。
执行:
bash "SKILL_DIR/scripts/daemon.sh" logs Nreconfigure
reconfigurereconfigure
reconfigure- Read current config from
~/.link-to-im/config.env - Show current settings in a clear table format, with all secrets masked (only last 4 chars visible)
- Use AskUserQuestion to ask what the user wants to change
- When collecting new values, tell the user where to find the value; only show the full guide from if they ask for help
SKILL_DIR/references/setup-guides.md - Update the config file atomically (write to tmp, rename)
- Re-validate any changed tokens
- Remind user: "Run then
/link-to-im stopto apply the changes."/link-to-im start
If the user wants to switch Weixin accounts during , run again. Each successful scan replaces the previously linked local account.
reconfigurecd SKILL_DIR && npm run weixin:login- 从读取当前配置
~/.link-to-im/config.env - 以清晰的表格格式展示当前设置,所有密钥掩码显示(仅可见最后4位)
- 使用AskUserQuestion询问用户想要修改的内容
- 收集新值时,告知用户值的获取位置;仅当用户请求帮助时,才展示中的完整指南
SKILL_DIR/references/setup-guides.md - 原子更新配置文件(先写入临时文件,再重命名)
- 重新验证任何已修改的token
- 提醒用户:"执行然后
/link-to-im stop以应用更改。"/link-to-im start
若用户在期间想要切换微信账号,再次执行。每次成功扫码都会替换本地之前关联的账号。
reconfigurecd SKILL_DIR && npm run weixin:logindoctor
doctordoctor
doctorRun:
bash "SKILL_DIR/scripts/doctor.sh"Show results and suggest fixes for any failures. Common fixes:
- SDK cli.js missing →
cd SKILL_DIR && npm install - dist/daemon.mjs stale →
cd SKILL_DIR && npm run build - Config missing → run
setup - Weixin account missing / expired →
cd SKILL_DIR && npm run weixin:login - Weixin voice message reports missing speech-to-text → enable WeChat's own voice transcription and resend; the bridge does not transcribe raw voice audio itself
For more complex issues (messages not received, permission timeouts, high memory, stale PID files), read for detailed diagnosis steps.
SKILL_DIR/references/troubleshooting.md执行:
bash "SKILL_DIR/scripts/doctor.sh"展示结果并针对任何失败给出修复建议。常见修复方法:
- 缺少SDK cli.js →
cd SKILL_DIR && npm install - dist/daemon.mjs过期 →
cd SKILL_DIR && npm run build - 缺少配置 → 执行
setup - 微信账号缺失/过期 →
cd SKILL_DIR && npm run weixin:login - 微信语音消息无转录结果 → 启用微信自带的语音转录功能并重发消息;桥接服务本身不会转录原始语音音频
对于更复杂的问题(未收到消息、权限超时、内存占用过高、无效PID文件),查阅获取详细诊断步骤。
SKILL_DIR/references/troubleshooting.mdSelf-Healing Protocol (UDD)
自我修复协议(UDD)
When finds unresolved issues, or when an error occurs during bridge operation, use the UDD self-healing flow. Always run UDD commands in a subagent — never in the main agent context.
doctor-
Check if upstream already fixed it:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" check --jsonIfis present with medium/high confidence, recommend update first.upstreamFixMatch -
Analyze the error:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" analyze --error "<error message>" --jsonReport theand suggested strategies.diagnosis.kind -
If user approves repair:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" heal --error "<error message>" --decision repair_once --jsonThis runs in an isolated git worktree. If verification passes, the fix is ready for review. -
If repair fails, draft an issue:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" issue-draft --error "<error message>" --out ./issue-draft.mdPresent the draft to the user for review before submission.
UDD rules: Never modify files outside SKILL_DIR. Never commit to main directly. If is missing, inform the user. Respect and paths in .
udd.config.json.envprotectedPathsFeishu upgrade note: If the user upgraded from an older version of this skill and Feishu is returning permission errors (e.g. streaming cards not working, typing indicators failing, permission buttons unresponsive), the root cause is almost certainly missing permissions or callbacks in the Feishu backend. Refer the user to the "Upgrading from a previous version" section in — they need to add new scopes (, , , , ), add the callback, and re-publish the app. The upgrade requires two publish cycles because adding the callback needs an active WebSocket connection (bridge must be running).
SKILL_DIR/references/setup-guides.mdcardkit:card:writecardkit:card:readim:message:updateim:message.reactions:readim:message.reactions:write_onlycard.action.trigger当发现未解决的问题,或桥接运行期间发生错误时,使用UDD自我修复流程。始终在子代理中运行UDD命令——切勿在主代理上下文中执行。
doctor-
检查上游是否已修复:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" check --json若存在且置信度为中/高,优先建议升级。upstreamFixMatch -
分析错误:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" analyze --error "<error message>" --json报告和建议的解决策略。diagnosis.kind -
若用户批准修复:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" heal --error "<error message>" --decision repair_once --json此命令在独立的git工作树中运行。若验证通过,修复结果可供审核。 -
若修复失败,生成问题草稿:bash
cd "SKILL_DIR" && "SKILL_DIR/node_modules/.bin/udd" issue-draft --error "<error message>" --out ./issue-draft.md将草稿提交给用户审核后再发布。
UDD规则:切勿修改SKILL_DIR之外的文件。切勿直接提交到主分支。若缺少,告知用户。遵守和中的路径设置。
udd.config.json.envprotectedPaths飞书升级注意事项: 若用户从旧版本升级该技能后,飞书返回权限错误(如流式卡片无法工作、输入指示器失效、权限按钮无响应),根本原因几乎肯定是飞书后台缺少权限或回调。请引导用户查阅中的"从旧版本升级"章节——他们需要添加新的权限范围(、、、、),添加回调,并重新发布应用。升级需要两次发布周期,因为添加回调需要活跃的WebSocket连接(桥接服务必须运行)。
SKILL_DIR/references/setup-guides.mdcardkit:card:writecardkit:card:readim:message:updateim:message.reactions:readim:message.reactions:write_onlycard.action.triggerNotes
注意事项
- Always mask secrets in output (show only last 4 characters) — users often share terminal output in bug reports, so exposed tokens would be a security incident.
- Always check for config.env before starting the daemon — without it the process crashes on startup and leaves a stale PID file that blocks future starts (requiring manual cleanup).
- The daemon runs as a background Node.js process managed by platform supervisor (launchd on macOS, setsid on Linux, WinSW/NSSM on Windows).
- Config persists at — survives across sessions.
~/.link-to-im/config.env
- 输出中始终对密钥进行掩码处理(仅显示最后4位)——用户经常在bug报告中分享终端输出,暴露token会引发安全事件。
- 启动守护进程前始终检查config.env是否存在——缺少该文件会导致进程启动时崩溃,并留下无效PID文件,阻碍后续启动(需要手动清理)。
- 守护进程作为后台Node.js进程运行,由平台管理工具托管(macOS使用launchd,Linux使用setsid,Windows使用WinSW/NSSM)。
- 配置持久化存储在中——跨会话保留。
~/.link-to-im/config.env