chatccc 0.2.300 → 0.2.302

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.agents/skills/create-chatccc-feishu-app/SKILL.md +85 -85
  2. package/.claude/skills/create-chatccc-feishu-app/SKILL.md +85 -85
  3. package/.cursor/skills/create-chatccc-feishu-app/SKILL.md +85 -85
  4. package/README.md +8 -3
  5. package/agent-prompts/claude_specific.md +45 -45
  6. package/agent-prompts/codex_specific.md +2 -2
  7. package/agent-prompts/cursor_specific.md +13 -13
  8. package/bin/cccagent.mjs +26 -26
  9. package/bin/chatccc.mjs +15 -15
  10. package/config.sample.json +7 -6
  11. package/deepccc-agent/README.md +21 -4
  12. package/deepccc-agent/os-prompts/darwin.md +8 -8
  13. package/deepccc-agent/os-prompts/linux.md +8 -8
  14. package/deepccc-agent/os-prompts/win32.md +11 -11
  15. package/deepccc-agent/package.json +68 -68
  16. package/dist/deepccc-agent/src/attachments.js +7 -5
  17. package/dist/deepccc-agent/src/cli.js +52 -7
  18. package/dist/deepccc-agent/src/completion-session.js +100 -0
  19. package/dist/deepccc-agent/src/config.js +4 -0
  20. package/dist/deepccc-agent/src/context.js +4 -1
  21. package/dist/deepccc-agent/src/decision-session.js +314 -0
  22. package/dist/deepccc-agent/src/file-tools.js +5 -0
  23. package/dist/deepccc-agent/src/index.js +41 -4
  24. package/dist/deepccc-agent/src/json-mode-fetch.js +12 -0
  25. package/dist/deepccc-agent/src/json-response.js +33 -0
  26. package/dist/deepccc-agent/src/multimodal.js +291 -0
  27. package/dist/deepccc-agent/src/progress/reducer.js +2 -0
  28. package/dist/deepccc-agent/src/web-page.js +411 -411
  29. package/dist/deepccc-agent/src/web-runtime.js +3 -0
  30. package/dist/deepccc-agent/src/web-server.js +2 -0
  31. package/dist/src/adapters/ccc-adapter.js +4 -0
  32. package/dist/src/agent-team/web/agent-team-page.js +250 -250
  33. package/dist/src/config.js +2 -0
  34. package/dist/src/engines/engine-specs.js +71 -71
  35. package/dist/src/feishu-api.js +11 -11
  36. package/dist/src/format-message.js +38 -19
  37. package/dist/src/litellm-proxy.js +15 -15
  38. package/dist/src/progress/reducer.js +2 -0
  39. package/dist/src/session.js +1 -0
  40. package/dist/src/web-ui.js +80 -66
  41. package/im-skills/feishu-skill/receive-send-file.md +65 -65
  42. package/im-skills/feishu-skill/receive-send-image.md +26 -26
  43. package/im-skills/feishu-skill/send-file.mjs +6 -6
  44. package/im-skills/feishu-skill/send-image.mjs +6 -6
  45. package/im-skills/feishu-skill/skill.md +28 -28
  46. package/im-skills/wechat-file-skill/receive-send-file.md +38 -38
  47. package/im-skills/wechat-file-skill/send-file.mjs +83 -83
  48. package/im-skills/wechat-file-skill/skill.md +10 -10
  49. package/im-skills/wechat-image-skill/skill.md +10 -10
  50. package/im-skills/wechat-video-skill/receive-send-video.md +38 -38
  51. package/im-skills/wechat-video-skill/send-video.mjs +79 -79
  52. package/im-skills/wechat-video-skill/skill.md +10 -10
  53. package/package.json +77 -77
  54. package/scripts/postinstall-sharp-check.mjs +58 -58
  55. package/scripts/self-update-helper.mjs +301 -301
@@ -484,6 +484,11 @@ export function unflattenConfig(flat) {
484
484
  result.ccc = result.ccc || {};
485
485
  result.ccc.model = val;
486
486
  }
487
+ else if (key === "CHATCCC_CCC_VISION_MODEL") {
488
+ if (!result.ccc)
489
+ result.ccc = {};
490
+ result.ccc.visionModel = val;
491
+ }
487
492
  else if (key === "CHATCCC_CCC_SUB_MODEL") {
488
493
  result.ccc = result.ccc || {};
489
494
  result.ccc.subModel = val;
@@ -692,9 +697,9 @@ header{background:#0f172a;color:#fff;padding:16px 24px;display:flex;align-items:
692
697
  header h1{font-size:20px;font-weight:600}
693
698
  header .badge{font-size:13px;padding:4px 12px;border-radius:12px;font-weight:500}
694
699
  .header-actions{display:flex;align-items:center;gap:12px}
695
- .agent-team-entry,.deepccc-web-entry{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:linear-gradient(135deg,#6366f1,#8b5cf6 55%,#d946ef);color:#fff;text-decoration:none;font-size:14px;font-weight:700;letter-spacing:.01em;box-shadow:0 8px 24px rgba(99,102,241,.38);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
696
- .deepccc-web-entry{background:linear-gradient(135deg,#171a23,#413a76);box-shadow:0 8px 24px rgba(42,38,78,.38)}
697
- .agent-team-entry:hover,.deepccc-web-entry:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(139,92,246,.52);filter:saturate(1.16)}
700
+ .agent-team-entry,.deepccc-web-entry{display:inline-flex;align-items:center;gap:8px;padding:9px 16px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:linear-gradient(135deg,#6366f1,#8b5cf6 55%,#d946ef);color:#fff;text-decoration:none;font-size:14px;font-weight:700;letter-spacing:.01em;box-shadow:0 8px 24px rgba(99,102,241,.38);transition:transform .18s ease,box-shadow .18s ease,filter .18s ease}
701
+ .deepccc-web-entry{background:linear-gradient(135deg,#171a23,#413a76);box-shadow:0 8px 24px rgba(42,38,78,.38)}
702
+ .agent-team-entry:hover,.deepccc-web-entry:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(139,92,246,.52);filter:saturate(1.16)}
698
703
  .agent-team-entry:focus-visible{outline:3px solid rgba(196,181,253,.65);outline-offset:3px}
699
704
  .agent-team-entry .agent-team-icon{font-size:16px;line-height:1}
700
705
  .badge-running{background:#16a34a;color:#fff}
@@ -770,15 +775,15 @@ header .badge{font-size:13px;padding:4px 12px;border-radius:12px;font-weight:500
770
775
  @keyframes slideIn{from{transform:translateX(100%);opacity:0}to{transform:translateX(0);opacity:1}}
771
776
  .spinner{display:inline-block;width:14px;height:14px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%;animation:spin .6s linear infinite}
772
777
  @keyframes spin{to{transform:rotate(360deg)}}
773
- @media(max-width:520px){header{padding:12px 14px}.header-actions{gap:8px}.agent-team-entry,.deepccc-web-entry{padding:8px 11px;font-size:13px}header .badge{padding:4px 8px}.deepccc-web-entry span:last-child{display:none}}
778
+ @media(max-width:520px){header{padding:12px 14px}.header-actions{gap:8px}.agent-team-entry,.deepccc-web-entry{padding:8px 11px;font-size:13px}header .badge{padding:4px 8px}.deepccc-web-entry span:last-child{display:none}}
774
779
  </style>
775
780
  </head>
776
781
  <body>
777
782
  <header>
778
783
  <h1>ChatCCC</h1>
779
- <div class="header-actions">
780
- <button type="button" class="deepccc-web-entry" onclick="openDeepCccWeb()"><span aria-hidden="true">D</span><span>DeepCCC Web</span></button>
781
- <a href="/agent-team" class="agent-team-entry"><span class="agent-team-icon" aria-hidden="true">✦</span>Agent Team <span aria-hidden="true">→</span></a>
784
+ <div class="header-actions">
785
+ <button type="button" class="deepccc-web-entry" onclick="openDeepCccWeb()"><span aria-hidden="true">D</span><span>DeepCCC Web</span></button>
786
+ <a href="/agent-team" class="agent-team-entry"><span class="agent-team-icon" aria-hidden="true">✦</span>Agent Team <span aria-hidden="true">→</span></a>
782
787
  <span id="header-badge" class="badge badge-stopped">未启动</span>
783
788
  </div>
784
789
  </header>
@@ -917,8 +922,12 @@ header .badge{font-size:13px;padding:4px 12px;border-radius:12px;font-weight:500
917
922
  </div>
918
923
  <div class="form-group">
919
924
  <label>子模型(选填)</label>
920
- <input type="text" id="field-CHATCCC_CCC_SUB_MODEL" placeholder="留空跟随主模型;用于压缩摘要、子代理任务等轻量环节">
921
- </div>
925
+ <input type="text" id="field-CHATCCC_CCC_SUB_MODEL" placeholder="留空跟随主模型;用于压缩摘要、子代理任务等轻量环节">
926
+ </div>
927
+ <div class="form-group">
928
+ <label>图片模型(选填)</label>
929
+ <input type="text" id="field-CHATCCC_CCC_VISION_MODEL" placeholder="例如 deepseek-flash;留空跟随 DeepCCC 设置,未配置则由主模型直接看图">
930
+ </div>
922
931
  <div class="form-group">
923
932
  <label>备选模型(选填)</label>
924
933
  <input type="text" id="field-CHATCCC_CCC_ALTERNATIVE_MODEL" placeholder="加入 /model 列表,便于会话内切换">
@@ -941,25 +950,25 @@ header .badge{font-size:13px;padding:4px 12px;border-radius:12px;font-weight:500
941
950
  </select>
942
951
  <div class="hint">开启时追加 DeepCCC 共同作者,不替换你的 Git Author。</div>
943
952
  </div>
944
- <div class="form-group">
945
- <label>Effort(推理强度,选填)</label>
946
- <select id="field-CHATCCC_CCC_EFFORT">
947
- <option value="">跟随 DeepCCC 内核配置(默认)</option>
948
- <option value="none">none - 直接作答,最省 token</option>
953
+ <div class="form-group">
954
+ <label>Effort(推理强度,选填)</label>
955
+ <select id="field-CHATCCC_CCC_EFFORT">
956
+ <option value="">跟随 DeepCCC 内核配置(默认)</option>
957
+ <option value="none">none - 直接作答,最省 token</option>
949
958
  <option value="minimal">minimal</option>
950
959
  <option value="low">low</option>
951
960
  <option value="medium">medium</option>
952
961
  <option value="high">high</option>
953
962
  <option value="xhigh">xhigh</option>
954
- <option value="max">max - 最强推理</option>
955
- </select>
956
- <div class="hint">留空时读取 ~/.deepccc/config.json 或 DEEPCCC_EFFORT;DeepCCC 也留空时使用模型服务端默认值。</div>
957
- </div>
958
- <div class="form-group">
959
- <label>最大输出 Token(选填)</label>
960
- <input type="number" id="field-CHATCCC_CCC_MAX_OUTPUT_TOKENS" min="1" step="1" placeholder="留空跟随 DeepCCC 内核配置">
961
- <div class="hint">限制主对话单次输出长度。留空时读取 ~/.deepccc/config.json 或 DEEPCCC_MAX_OUTPUT_TOKENS;DeepCCC 也未配置时使用模型服务端默认值。</div>
962
- </div>
963
+ <option value="max">max - 最强推理</option>
964
+ </select>
965
+ <div class="hint">留空时读取 ~/.deepccc/config.json 或 DEEPCCC_EFFORT;DeepCCC 也留空时使用模型服务端默认值。</div>
966
+ </div>
967
+ <div class="form-group">
968
+ <label>最大输出 Token(选填)</label>
969
+ <input type="number" id="field-CHATCCC_CCC_MAX_OUTPUT_TOKENS" min="1" step="1" placeholder="留空跟随 DeepCCC 内核配置">
970
+ <div class="hint">限制主对话单次输出长度。留空时读取 ~/.deepccc/config.json 或 DEEPCCC_MAX_OUTPUT_TOKENS;DeepCCC 也未配置时使用模型服务端默认值。</div>
971
+ </div>
963
972
  <div class="form-group">
964
973
  <label>上下文窗口(模型最大上下文)</label>
965
974
  <select id="field-CHATCCC_CCC_CONTEXT_WINDOW" onchange="onContextWindowPresetChange('field-', this.value)">
@@ -1292,12 +1301,13 @@ header .badge{font-size:13px;padding:4px 12px;border-radius:12px;font-weight:500
1292
1301
  <div class="config-row"><span class="key">API Key</span><span class="val" id="cfg-CCC_API_KEY">-</span></div>
1293
1302
  <div class="config-row"><span class="key">Base URL</span><span class="val" id="cfg-CCC_BASE_URL">-</span></div>
1294
1303
  <div class="config-row"><span class="key">API 协议</span><span class="val" id="cfg-CCC_PROVIDER">-</span></div>
1295
- <div class="config-row"><span class="key">模型</span><span class="val" id="cfg-CCC_MODEL">-</span></div>
1304
+ <div class="config-row"><span class="key">模型</span><span class="val" id="cfg-CCC_MODEL">-</span></div>
1296
1305
  <div class="config-row"><span class="key">子模型</span><span class="val" id="cfg-CCC_SUB_MODEL">-</span></div>
1297
- <div class="config-row"><span class="key">备选模型</span><span class="val" id="cfg-CCC_ALTERNATIVE_MODEL">-</span></div>
1298
- <div class="config-row"><span class="key">Effort</span><span class="val" id="cfg-CCC_EFFORT">-</span></div>
1299
- <div class="config-row"><span class="key">最大输出 Token</span><span class="val" id="cfg-CCC_MAX_OUTPUT_TOKENS">-</span></div>
1300
- <div class="config-row"><span class="key">Git 共同作者</span><span class="val" id="cfg-CCC_GIT_COAUTHOR">-</span></div>
1306
+ <div class="config-row"><span class="key">图片模型</span><span class="val" id="cfg-CCC_VISION_MODEL">-</span></div>
1307
+ <div class="config-row"><span class="key">备选模型</span><span class="val" id="cfg-CCC_ALTERNATIVE_MODEL">-</span></div>
1308
+ <div class="config-row"><span class="key">Effort</span><span class="val" id="cfg-CCC_EFFORT">-</span></div>
1309
+ <div class="config-row"><span class="key">最大输出 Token</span><span class="val" id="cfg-CCC_MAX_OUTPUT_TOKENS">-</span></div>
1310
+ <div class="config-row"><span class="key">Git 共同作者</span><span class="val" id="cfg-CCC_GIT_COAUTHOR">-</span></div>
1301
1311
  <label class="agent-default-row" style="margin-top:10px"><input type="checkbox" id="dash-default-ccc" onchange="setDashboardDefaultAgent('ccc', this.checked)"> 设为默认 Agent</label>
1302
1312
  <div class="hint" style="margin-top:6px;line-height:1.6">备选模型仅加入 /model 人工切换列表;保存后下一条消息或下个新会话生效。</div>
1303
1313
  <button class="btn btn-outline" style="margin-top:8px" onclick="editSection('ccc')">编辑</button>
@@ -1348,7 +1358,7 @@ const AGENT_FIELDS = {
1348
1358
  claude: ['CHATCCC_ANTHROPIC_MODEL','CHATCCC_ANTHROPIC_SUBAGENT_MODEL','CHATCCC_ANTHROPIC_EFFORT','CHATCCC_ANTHROPIC_API_KEY','CHATCCC_ANTHROPIC_BASE_URL','CHATCCC_ANTHROPIC_MAX_TURN'],
1349
1359
  cursor: ['CHATCCC_CURSOR_PATH','CHATCCC_CURSOR_MODEL','CHATCCC_CURSOR_ALTERNATIVE_MODEL','CHATCCC_CURSOR_AVATAR_BATTERY_MODE','CHATCCC_CURSOR_ON_DEMAND_MONTHLY_BUDGET'],
1350
1360
  codex: ['CHATCCC_CODEX_PATH','CHATCCC_CODEX_MODEL','CHATCCC_CODEX_ALTERNATIVE_MODEL','CHATCCC_CODEX_EFFORT','CHATCCC_CODEX_FAST_MODE'],
1351
- ccc: ['CHATCCC_CCC_API_KEY','CHATCCC_CCC_BASE_URL','CHATCCC_CCC_MODEL','CHATCCC_CCC_SUB_MODEL','CHATCCC_CCC_ALTERNATIVE_MODEL','CHATCCC_CCC_EFFORT','CHATCCC_CCC_MAX_OUTPUT_TOKENS','CHATCCC_CCC_PROVIDER','CHATCCC_CCC_GIT_COAUTHOR','CHATCCC_CCC_CONTEXT_WINDOW'],
1361
+ ccc: ['CHATCCC_CCC_API_KEY','CHATCCC_CCC_BASE_URL','CHATCCC_CCC_MODEL','CHATCCC_CCC_SUB_MODEL','CHATCCC_CCC_VISION_MODEL','CHATCCC_CCC_ALTERNATIVE_MODEL','CHATCCC_CCC_EFFORT','CHATCCC_CCC_MAX_OUTPUT_TOKENS','CHATCCC_CCC_PROVIDER','CHATCCC_CCC_GIT_COAUTHOR','CHATCCC_CCC_CONTEXT_WINDOW'],
1352
1362
  dsh: ['CHATCCC_DSH_API_KEY','CHATCCC_DSH_BASE_URL','CHATCCC_DSH_MODEL','CHATCCC_DSH_SUB_MODEL','CHATCCC_DSH_ALTERNATIVE_MODEL','CHATCCC_DSH_PROVIDER','CHATCCC_DSH_MAX_TOKENS']
1353
1363
  };
1354
1364
  const FEISHU_FIELDS = ['CHATCCC_APP_ID','CHATCCC_APP_SECRET'];
@@ -1743,10 +1753,11 @@ function renderStep2() {
1743
1753
  var coAuthorField = document.getElementById('field-CHATCCC_CCC_GIT_COAUTHOR');
1744
1754
  if (coAuthorField) coAuthorField.value = c.ccc.gitCoAuthor == null ? 'inherit' : (c.ccc.gitCoAuthor ? 'enabled' : 'disabled');
1745
1755
  prefillNested('field-CHATCCC_CCC_MODEL', c.ccc.model);
1746
- prefillNested('field-CHATCCC_CCC_SUB_MODEL', c.ccc.subModel);
1756
+ prefillNested('field-CHATCCC_CCC_SUB_MODEL', c.ccc.subModel);
1757
+ prefillNested('field-CHATCCC_CCC_VISION_MODEL', c.ccc.visionModel);
1747
1758
  prefillNested('field-CHATCCC_CCC_ALTERNATIVE_MODEL', c.ccc.alternativeModel);
1748
- prefillNested('field-CHATCCC_CCC_EFFORT', c.ccc.effort);
1749
- prefillNested('field-CHATCCC_CCC_MAX_OUTPUT_TOKENS', c.ccc.maxOutputTokens);
1759
+ prefillNested('field-CHATCCC_CCC_EFFORT', c.ccc.effort);
1760
+ prefillNested('field-CHATCCC_CCC_MAX_OUTPUT_TOKENS', c.ccc.maxOutputTokens);
1750
1761
  prefillContextWindow('field-', c.ccc.contextWindow);
1751
1762
  }
1752
1763
  if (c.dsh) {
@@ -1952,10 +1963,11 @@ function renderStep3() {
1952
1963
  lines.push('<div class="config-row"><span class="key">API Key</span><span class="val">' + (vars.CHATCCC_CCC_API_KEY ? '***已设置***' : '(留空)') + '</span></div>');
1953
1964
  lines.push('<div class="config-row"><span class="key">Base URL</span><span class="val">' + (vars.CHATCCC_CCC_BASE_URL || '(留空)') + '</span></div>');
1954
1965
  lines.push('<div class="config-row"><span class="key">模型</span><span class="val">' + (vars.CHATCCC_CCC_MODEL || '(留空)') + '</span></div>');
1955
- lines.push('<div class="config-row"><span class="key">子模型</span><span class="val">' + (vars.CHATCCC_CCC_SUB_MODEL || '(留空,跟随主模型)') + '</span></div>');
1966
+ lines.push('<div class="config-row"><span class="key">子模型</span><span class="val">' + (vars.CHATCCC_CCC_SUB_MODEL || '(留空,跟随主模型)') + '</span></div>');
1967
+ lines.push('<div class="config-row"><span class="key">图片模型</span><span class="val">' + (vars.CHATCCC_CCC_VISION_MODEL || '(跟随 DeepCCC)') + '</span></div>');
1956
1968
  lines.push('<div class="config-row"><span class="key">备选模型</span><span class="val">' + (vars.CHATCCC_CCC_ALTERNATIVE_MODEL || '(留空)') + '</span></div>');
1957
- lines.push('<div class="config-row"><span class="key">Effort</span><span class="val">' + (vars.CHATCCC_CCC_EFFORT || '(留空)') + '</span></div>');
1958
- lines.push('<div class="config-row"><span class="key">最大输出 Token</span><span class="val">' + (vars.CHATCCC_CCC_MAX_OUTPUT_TOKENS || '(跟随 DeepCCC)') + '</span></div>');
1969
+ lines.push('<div class="config-row"><span class="key">Effort</span><span class="val">' + (vars.CHATCCC_CCC_EFFORT || '(留空)') + '</span></div>');
1970
+ lines.push('<div class="config-row"><span class="key">最大输出 Token</span><span class="val">' + (vars.CHATCCC_CCC_MAX_OUTPUT_TOKENS || '(跟随 DeepCCC)') + '</span></div>');
1959
1971
  lines.push('<div class="config-row"><span class="key">上下文窗口</span><span class="val">' + contextWindowTokensLabel(vars.CHATCCC_CCC_CONTEXT_WINDOW || 1048576) + '</span></div>');
1960
1972
  } else if (t === 'dsh') {
1961
1973
  lines.push('<h4 style="margin:10px 0 4px;color:#334155">DeepSeek Harness</h4>');
@@ -2184,13 +2196,14 @@ function updateDashboardUI() {
2184
2196
  document.getElementById('cfg-CCC_API_KEY').textContent = (c.ccc && c.ccc.DEEPSEEK_API_KEY) ? '***已设置***' : '(留空)';
2185
2197
  document.getElementById('cfg-CCC_BASE_URL').textContent = (c.ccc && c.ccc.DEEPSEEK_BASE_URL) || '(留空)';
2186
2198
  document.getElementById('cfg-CCC_PROVIDER').textContent = (c.ccc && c.ccc.provider) ? c.ccc.provider : '(跟随 DeepCCC 内核配置)';
2187
- document.getElementById('cfg-CCC_MODEL').textContent = (c.ccc && c.ccc.model) || '(留空)';
2199
+ document.getElementById('cfg-CCC_MODEL').textContent = (c.ccc && c.ccc.model) || '(留空)';
2188
2200
  document.getElementById('cfg-CCC_SUB_MODEL').textContent = (c.ccc && c.ccc.subModel) || '(留空,跟随主模型)';
2189
- document.getElementById('cfg-CCC_ALTERNATIVE_MODEL').textContent = (c.ccc && c.ccc.alternativeModel) || '(留空)';
2190
- document.getElementById('cfg-CCC_EFFORT').textContent = (c.ccc && c.ccc.effort) || '(跟随 DeepCCC 内核配置)';
2191
- document.getElementById('cfg-CCC_MAX_OUTPUT_TOKENS').textContent = c.ccc && c.ccc.maxOutputTokens
2192
- ? String(c.ccc.maxOutputTokens)
2193
- : '(跟随 DeepCCC 内核配置)';
2201
+ document.getElementById('cfg-CCC_VISION_MODEL').textContent = (c.ccc && c.ccc.visionModel) || '(跟随 DeepCCC)';
2202
+ document.getElementById('cfg-CCC_ALTERNATIVE_MODEL').textContent = (c.ccc && c.ccc.alternativeModel) || '(留空)';
2203
+ document.getElementById('cfg-CCC_EFFORT').textContent = (c.ccc && c.ccc.effort) || '(跟随 DeepCCC 内核配置)';
2204
+ document.getElementById('cfg-CCC_MAX_OUTPUT_TOKENS').textContent = c.ccc && c.ccc.maxOutputTokens
2205
+ ? String(c.ccc.maxOutputTokens)
2206
+ : '(跟随 DeepCCC 内核配置)';
2194
2207
  document.getElementById('cfg-CCC_GIT_COAUTHOR').textContent = !c.ccc || c.ccc.gitCoAuthor == null
2195
2208
  ? '跟随 DeepCCC 全局设置(缺省开启)'
2196
2209
  : (c.ccc.gitCoAuthor ? '强制开启' : '强制关闭');
@@ -2279,7 +2292,7 @@ function editSection(section) {
2279
2292
  'CHATCCC_CCC_API_KEY': 'API Key', 'CHATCCC_CCC_BASE_URL': 'Base URL',
2280
2293
  'CHATCCC_CCC_PROVIDER': 'API 协议(选填)',
2281
2294
  'CHATCCC_CCC_GIT_COAUTHOR': 'Git 提交共同作者',
2282
- 'CHATCCC_CCC_MODEL': '模型', 'CHATCCC_CCC_SUB_MODEL': '子模型', 'CHATCCC_CCC_ALTERNATIVE_MODEL': '备选模型', 'CHATCCC_CCC_EFFORT': 'Effort', 'CHATCCC_CCC_MAX_OUTPUT_TOKENS': '最大输出 Token', 'CHATCCC_CCC_CONTEXT_WINDOW': '上下文窗口',
2295
+ 'CHATCCC_CCC_MODEL': '模型', 'CHATCCC_CCC_SUB_MODEL': '子模型', 'CHATCCC_CCC_VISION_MODEL': '图片模型', 'CHATCCC_CCC_ALTERNATIVE_MODEL': '备选模型', 'CHATCCC_CCC_EFFORT': 'Effort', 'CHATCCC_CCC_MAX_OUTPUT_TOKENS': '最大输出 Token', 'CHATCCC_CCC_CONTEXT_WINDOW': '上下文窗口',
2283
2296
  'CHATCCC_DSH_API_KEY': 'API Key', 'CHATCCC_DSH_BASE_URL': 'Base URL', 'CHATCCC_DSH_MODEL': '模型', 'CHATCCC_DSH_SUB_MODEL': '子模型', 'CHATCCC_DSH_ALTERNATIVE_MODEL': '备选模型', 'CHATCCC_DSH_PROVIDER': 'Provider 路由', 'CHATCCC_DSH_MAX_TOKENS': '单次最大输出 Tokens'
2284
2297
  };
2285
2298
  var hintMap = {
@@ -2287,9 +2300,9 @@ function editSection(section) {
2287
2300
  'CHATCCC_CHROME_DEVTOOLS_ENABLED': '依赖:本机 Google Chrome;ChatGPT 订阅到期查询需要在该 CDP Chrome 中登录 ChatGPT。',
2288
2301
  'CHATCCC_CHROME_DEVTOOLS_PORT': '默认 15166,健康检查端点为 http://127.0.0.1:15166/json/version。',
2289
2302
  'CHATCCC_CHROME_DEVTOOLS_PATH': '选填。留空时自动探测 Google Chrome。',
2290
- 'CHATCCC_CCC_PROVIDER': '与 Base URL 强相关:OpenAI 兼容端点选 openai;Anthropic Messages 端点选 anthropic。留空 = 跟随 DeepCCC 内核配置(~/.deepccc/config.json 或 DEEPCCC_PROVIDER),改动需重启 ChatCCC 生效。',
2291
- 'CHATCCC_CCC_EFFORT': '留空 = 跟随 DeepCCC 内核配置(~/.deepccc/config.json 或 DEEPCCC_EFFORT);内核也留空时使用模型服务端默认值。',
2292
- 'CHATCCC_CCC_MAX_OUTPUT_TOKENS': '正整数;留空 = 跟随 DeepCCC 内核配置(~/.deepccc/config.json 或 DEEPCCC_MAX_OUTPUT_TOKENS);内核也未配置时使用模型服务端默认值。',
2303
+ 'CHATCCC_CCC_PROVIDER': '与 Base URL 强相关:OpenAI 兼容端点选 openai;Anthropic Messages 端点选 anthropic。留空 = 跟随 DeepCCC 内核配置(~/.deepccc/config.json 或 DEEPCCC_PROVIDER),改动需重启 ChatCCC 生效。',
2304
+ 'CHATCCC_CCC_EFFORT': '留空 = 跟随 DeepCCC 内核配置(~/.deepccc/config.json 或 DEEPCCC_EFFORT);内核也留空时使用模型服务端默认值。',
2305
+ 'CHATCCC_CCC_MAX_OUTPUT_TOKENS': '正整数;留空 = 跟随 DeepCCC 内核配置(~/.deepccc/config.json 或 DEEPCCC_MAX_OUTPUT_TOKENS);内核也未配置时使用模型服务端默认值。',
2293
2306
  'CHATCCC_CCC_GIT_COAUTHOR': '跟随全局时读取 ~/.deepccc/config.json 的 git.coAuthor.enabled(缺省为开启)。强制选项只影响 ChatCCC 内置 CCC Agent。',
2294
2307
  'CHATCCC_CCC_CONTEXT_WINDOW': '压缩阈值自动 = 窗口 × 80%(超出即把较早消息压缩为摘要)。⚠️ 超过模型/服务端实际上限时请求会被 API 直接拒绝(context length exceeded),实际窗口以模型与所用服务端为准(如 litellm 代理的 max_input_tokens);单位 k = 1024 tokens,1M = 1,048,576 tokens。',
2295
2308
  'CHATCCC_CCC_SUB_MODEL': '用于 DeepCCC 内部轻量环节(上下文压缩摘要生成、task 子代理任务)。留空 = 跟随主模型;改动需重启 ChatCCC 生效。'
@@ -2337,10 +2350,11 @@ function editSection(section) {
2337
2350
  else if (key === 'CHATCCC_CCC_PROVIDER') val = state.config.ccc.provider || '';
2338
2351
  else if (key === 'CHATCCC_CCC_GIT_COAUTHOR') val = state.config.ccc.gitCoAuthor == null ? 'inherit' : (state.config.ccc.gitCoAuthor ? 'enabled' : 'disabled');
2339
2352
  else if (key === 'CHATCCC_CCC_MODEL') val = state.config.ccc.model || '';
2340
- else if (key === 'CHATCCC_CCC_SUB_MODEL') val = state.config.ccc.subModel || '';
2353
+ else if (key === 'CHATCCC_CCC_SUB_MODEL') val = state.config.ccc.subModel || '';
2354
+ else if (key === 'CHATCCC_CCC_VISION_MODEL') val = state.config.ccc.visionModel || '';
2341
2355
  else if (key === 'CHATCCC_CCC_ALTERNATIVE_MODEL') val = state.config.ccc.alternativeModel || '';
2342
- else if (key === 'CHATCCC_CCC_EFFORT') val = state.config.ccc.effort || '';
2343
- else if (key === 'CHATCCC_CCC_MAX_OUTPUT_TOKENS') val = state.config.ccc.maxOutputTokens || '';
2356
+ else if (key === 'CHATCCC_CCC_EFFORT') val = state.config.ccc.effort || '';
2357
+ else if (key === 'CHATCCC_CCC_MAX_OUTPUT_TOKENS') val = state.config.ccc.maxOutputTokens || '';
2344
2358
  else if (key === 'CHATCCC_CCC_CONTEXT_WINDOW') val = state.config.ccc.contextWindow || '1048576';
2345
2359
  } else if (section === 'dsh' && state.config.dsh) {
2346
2360
  if (key === 'CHATCCC_DSH_API_KEY') val = state.config.dsh.apiKey || '';
@@ -2405,15 +2419,15 @@ function editSection(section) {
2405
2419
  var rowId = key === 'CHATCCC_CURSOR_ON_DEMAND_MONTHLY_BUDGET'
2406
2420
  ? ' id="edit-cursor-on-demand-budget-row"'
2407
2421
  : (section === 'chromeDevtools' && key !== 'CHATCCC_CHROME_DEVTOOLS_ENABLED' ? ' id="edit-row-' + key + '"' : '');
2408
- var isNumber = key === 'CHATCCC_CURSOR_ON_DEMAND_MONTHLY_BUDGET' || key === 'CHATCCC_CHROME_DEVTOOLS_PORT' || key === 'CHATCCC_CCC_MAX_OUTPUT_TOKENS';
2422
+ var isNumber = key === 'CHATCCC_CURSOR_ON_DEMAND_MONTHLY_BUDGET' || key === 'CHATCCC_CHROME_DEVTOOLS_PORT' || key === 'CHATCCC_CCC_MAX_OUTPUT_TOKENS';
2409
2423
  var inputType = isNumber ? 'number' : (isSecret ? 'password' : 'text');
2410
2424
  var attrs = key === 'CHATCCC_CURSOR_ON_DEMAND_MONTHLY_BUDGET'
2411
2425
  ? ' min="1" step="1"'
2412
- : key === 'CHATCCC_CHROME_DEVTOOLS_PORT'
2413
- ? ' min="1" max="65535" step="1" placeholder="15166"'
2414
- : key === 'CHATCCC_CCC_MAX_OUTPUT_TOKENS'
2415
- ? ' min="1" step="1" placeholder="留空跟随 DeepCCC 内核配置"'
2416
- : '';
2426
+ : key === 'CHATCCC_CHROME_DEVTOOLS_PORT'
2427
+ ? ' min="1" max="65535" step="1" placeholder="15166"'
2428
+ : key === 'CHATCCC_CCC_MAX_OUTPUT_TOKENS'
2429
+ ? ' min="1" step="1" placeholder="留空跟随 DeepCCC 内核配置"'
2430
+ : '';
2417
2431
  html += '<div class="form-group"' + rowId + '><label>' + (labelMap[key] || key) + '</label>';
2418
2432
  html += '<input type="' + inputType + '" id="edit-' + key + '"' + attrs + ' value="' + String(val).replace(/"/g,'&quot;') + '">';
2419
2433
  if (hintMap[key]) html += '<div class="hint" style="margin-top:6px;line-height:1.5">' + hintMap[key] + '</div>';
@@ -2595,18 +2609,18 @@ function installEngine(engineId) {
2595
2609
  });
2596
2610
  }
2597
2611
 
2598
- // ---- Start ----
2599
- async function openDeepCccWeb() {
2600
- try {
2601
- var result = await api('/api/deepccc-web/start', 'POST');
2602
- if (!result.ok) throw new Error(result.error || '启动失败');
2603
- window.open(result.url, '_blank', 'noopener');
2604
- } catch (error) {
2605
- toast('DeepCCC Web 启动失败: ' + String(error), 'error');
2606
- }
2607
- }
2608
-
2609
- init();
2612
+ // ---- Start ----
2613
+ async function openDeepCccWeb() {
2614
+ try {
2615
+ var result = await api('/api/deepccc-web/start', 'POST');
2616
+ if (!result.ok) throw new Error(result.error || '启动失败');
2617
+ window.open(result.url, '_blank', 'noopener');
2618
+ } catch (error) {
2619
+ toast('DeepCCC Web 启动失败: ' + String(error), 'error');
2620
+ }
2621
+ }
2622
+
2623
+ init();
2610
2624
 
2611
2625
  // 页面刷新后从持久化任务文件恢复每一步的安装进度。
2612
2626
  setTimeout(function(){ engineRefreshStatus('claude'); engineRefreshStatus('dsh'); }, 300);
@@ -1,65 +1,65 @@
1
- # Sending & Downloading Files/Videos
2
-
3
- ## Send Files or Videos
4
-
5
- Videos are sent as regular files (not media), which looks cleaner in Feishu.
6
-
7
- **Use the node script below. Do NOT use curl or raw HTTP — the script correctly handles errors and exits non-zero on failure.**
8
-
9
- ### Script
10
-
11
- ```bash
12
- node "{{send_file_script}}" --url "{{send_file_url}}" --session-id "{{session_id}}" --grant "{{agent_capability_grant}}" --path "<absolute file path>" --caption "<optional caption>"
13
- ```
14
-
15
- ### Rules
16
-
17
- - Use the node script above — never curl or raw HTTP.
18
- - Save or choose a local file first.
19
- - Use an absolute local path.
20
- - Use only the session ID and capability grant shown above; they are a bound pair.
21
- - Max file size: 30MB.
22
- - Supported formats: .mp4 .mov .avi .mkv .webm .flv .mp3 .wav .ogg .aac .m4a .pdf .doc .docx .xls .xlsx .csv .ppt .pptx .txt .zip .tar .gz.
23
- - Only send a file/video when the user asked for one or when it materially helps the answer.
24
- - **If the script fails (non-zero exit), read stderr for the error. Do NOT retry with the same path. Either fix the problem (wrong extension, missing file, etc.) or tell the user what the error was. Never retry more than once.**
25
-
26
- ### Video Compression (when file > 30MB)
27
-
28
- If the video exceeds 30MB, compress it with ffmpeg before sending.
29
-
30
- **Ensure ffmpeg is available** (install if missing):
31
-
32
- | OS | Install command |
33
- |----|----------------|
34
- | macOS | `brew install ffmpeg` |
35
- | Linux (Debian/Ubuntu) | `sudo apt install ffmpeg` |
36
- | Linux (RHEL/Fedora) | `sudo dnf install ffmpeg` |
37
- | Windows | `winget install Gyan.FFmpeg` |
38
-
39
- **Two-pass compression** (target ~28MB for 30s video, adjust `b:v` for other durations):
40
-
41
- ```bash
42
- ffmpeg -y -i "<input>" -c:v libx264 -b:v <bitrate>k -pass 1 -f mp4 NUL
43
- ffmpeg -y -i "<input>" -c:v libx264 -b:v <bitrate>k -pass 2 -c:a aac -b:a 128k "<output>"
44
- ```
45
-
46
- Bitrate formula: `bitrate = 28 × 8 × 1000 ÷ duration_seconds - 128` (target ~28MB, safe under 30MB).
47
- On Windows replace `NUL` with `NUL` (same); on Linux/macOS use `/dev/null`.
48
-
49
- If the compressed file still exceeds 30MB, explain to the user that automatic compression wasn't enough and suggest they manually trim or re-encode the source.
50
-
51
- ## Download Files or Videos
52
-
53
- When the user sends a file or video to the bot, the message contains `message_id` and `file_key`. Download it with:
54
-
55
- ```bash
56
- node "{{download_video_script}}" --message-id <message_id> --file-key <file_key> --name <file_name>
57
- ```
58
-
59
- If only `chat_id` and `file_key` are available:
60
-
61
- ```bash
62
- node "{{download_video_script}}" --chat-id <chat_id> --file-key <file_key> --name <file_name>
63
- ```
64
-
65
- Downloads are saved under `~/.chatccc/videos/downloads/`.
1
+ # Sending & Downloading Files/Videos
2
+
3
+ ## Send Files or Videos
4
+
5
+ Videos are sent as regular files (not media), which looks cleaner in Feishu.
6
+
7
+ **Use the node script below. Do NOT use curl or raw HTTP — the script correctly handles errors and exits non-zero on failure.**
8
+
9
+ ### Script
10
+
11
+ ```bash
12
+ node "{{send_file_script}}" --url "{{send_file_url}}" --session-id "{{session_id}}" --grant "{{agent_capability_grant}}" --path "<absolute file path>" --caption "<optional caption>"
13
+ ```
14
+
15
+ ### Rules
16
+
17
+ - Use the node script above — never curl or raw HTTP.
18
+ - Save or choose a local file first.
19
+ - Use an absolute local path.
20
+ - Use only the session ID and capability grant shown above; they are a bound pair.
21
+ - Max file size: 30MB.
22
+ - Supported formats: .mp4 .mov .avi .mkv .webm .flv .mp3 .wav .ogg .aac .m4a .pdf .doc .docx .xls .xlsx .csv .ppt .pptx .txt .zip .tar .gz.
23
+ - Only send a file/video when the user asked for one or when it materially helps the answer.
24
+ - **If the script fails (non-zero exit), read stderr for the error. Do NOT retry with the same path. Either fix the problem (wrong extension, missing file, etc.) or tell the user what the error was. Never retry more than once.**
25
+
26
+ ### Video Compression (when file > 30MB)
27
+
28
+ If the video exceeds 30MB, compress it with ffmpeg before sending.
29
+
30
+ **Ensure ffmpeg is available** (install if missing):
31
+
32
+ | OS | Install command |
33
+ |----|----------------|
34
+ | macOS | `brew install ffmpeg` |
35
+ | Linux (Debian/Ubuntu) | `sudo apt install ffmpeg` |
36
+ | Linux (RHEL/Fedora) | `sudo dnf install ffmpeg` |
37
+ | Windows | `winget install Gyan.FFmpeg` |
38
+
39
+ **Two-pass compression** (target ~28MB for 30s video, adjust `b:v` for other durations):
40
+
41
+ ```bash
42
+ ffmpeg -y -i "<input>" -c:v libx264 -b:v <bitrate>k -pass 1 -f mp4 NUL
43
+ ffmpeg -y -i "<input>" -c:v libx264 -b:v <bitrate>k -pass 2 -c:a aac -b:a 128k "<output>"
44
+ ```
45
+
46
+ Bitrate formula: `bitrate = 28 × 8 × 1000 ÷ duration_seconds - 128` (target ~28MB, safe under 30MB).
47
+ On Windows replace `NUL` with `NUL` (same); on Linux/macOS use `/dev/null`.
48
+
49
+ If the compressed file still exceeds 30MB, explain to the user that automatic compression wasn't enough and suggest they manually trim or re-encode the source.
50
+
51
+ ## Download Files or Videos
52
+
53
+ When the user sends a file or video to the bot, the message contains `message_id` and `file_key`. Download it with:
54
+
55
+ ```bash
56
+ node "{{download_video_script}}" --message-id <message_id> --file-key <file_key> --name <file_name>
57
+ ```
58
+
59
+ If only `chat_id` and `file_key` are available:
60
+
61
+ ```bash
62
+ node "{{download_video_script}}" --chat-id <chat_id> --file-key <file_key> --name <file_name>
63
+ ```
64
+
65
+ Downloads are saved under `~/.chatccc/videos/downloads/`.
@@ -1,26 +1,26 @@
1
- # Sending & Receiving Images
2
-
3
- ## Send Images
4
-
5
- **Use the node script below. Do NOT use curl or raw HTTP — the script correctly handles errors and exits non-zero on failure.**
6
-
7
- ### Script
8
-
9
- ```bash
10
- node "{{send_image_script}}" --url "{{send_image_url}}" --session-id "{{session_id}}" --grant "{{agent_capability_grant}}" --path "<absolute image path>" --caption "<optional caption>"
11
- ```
12
-
13
- ### Rules
14
-
15
- - Use the node script above — never curl or raw HTTP.
16
- - Save or choose a local image file first.
17
- - Use an absolute local path.
18
- - Use only the session ID and capability grant shown above; they are a bound pair.
19
- - Supported formats: .png, .jpg, .jpeg, .webp, .gif, .bmp.
20
- - Max image size: 10MB.
21
- - Only send an image when the user asked for one or when it materially helps the answer.
22
- - **If the script fails (non-zero exit), read stderr for the error. Do NOT retry with the same path. Either fix the problem (wrong extension, missing file, etc.) or tell the user what the error was. Never retry more than once.**
23
-
24
- ## Receive Images
25
-
26
- Images sent to the bot are automatically downloaded to `~/.chatccc/images/downloads/`. The message contains an `image_key` that maps to the cached file.
1
+ # Sending & Receiving Images
2
+
3
+ ## Send Images
4
+
5
+ **Use the node script below. Do NOT use curl or raw HTTP — the script correctly handles errors and exits non-zero on failure.**
6
+
7
+ ### Script
8
+
9
+ ```bash
10
+ node "{{send_image_script}}" --url "{{send_image_url}}" --session-id "{{session_id}}" --grant "{{agent_capability_grant}}" --path "<absolute image path>" --caption "<optional caption>"
11
+ ```
12
+
13
+ ### Rules
14
+
15
+ - Use the node script above — never curl or raw HTTP.
16
+ - Save or choose a local image file first.
17
+ - Use an absolute local path.
18
+ - Use only the session ID and capability grant shown above; they are a bound pair.
19
+ - Supported formats: .png, .jpg, .jpeg, .webp, .gif, .bmp.
20
+ - Max image size: 10MB.
21
+ - Only send an image when the user asked for one or when it materially helps the answer.
22
+ - **If the script fails (non-zero exit), read stderr for the error. Do NOT retry with the same path. Either fix the problem (wrong extension, missing file, etc.) or tell the user what the error was. Never retry more than once.**
23
+
24
+ ## Receive Images
25
+
26
+ Images sent to the bot are automatically downloaded to `~/.chatccc/images/downloads/`. The message contains an `image_key` that maps to the cached file.
@@ -14,23 +14,23 @@ function parseArgs(argv) {
14
14
 
15
15
  function usage() {
16
16
  console.error(`Usage:
17
- node ${basename(process.argv[1])} --url <url> --session-id <session_id> --grant <session_grant> --path <absolute file path> [--caption <text>]`);
17
+ node ${basename(process.argv[1])} --url <url> --session-id <session_id> --grant <session_grant> --path <absolute file path> [--caption <text>]`);
18
18
  }
19
19
 
20
20
  async function main() {
21
21
  const args = parseArgs(process.argv.slice(2));
22
22
  const url = args.url || process.env.CHATCCC_SEND_FILE_URL;
23
- const sessionId = args["session-id"] || args.session_id || process.env.CHATCCC_SESSION_ID;
24
- const grant = args.grant || process.env.CHATCCC_AGENT_CAPABILITY_GRANT;
23
+ const sessionId = args["session-id"] || args.session_id || process.env.CHATCCC_SESSION_ID;
24
+ const grant = args.grant || process.env.CHATCCC_AGENT_CAPABILITY_GRANT;
25
25
  const path = args.path;
26
26
  const caption = args.caption || "";
27
27
 
28
- if (!url || !sessionId || !grant || !path) {
28
+ if (!url || !sessionId || !grant || !path) {
29
29
  usage();
30
30
  process.exit(1);
31
31
  }
32
32
 
33
- const body = Buffer.from(JSON.stringify({ session_id: sessionId, grant, path, caption }), "utf8");
33
+ const body = Buffer.from(JSON.stringify({ session_id: sessionId, grant, path, caption }), "utf8");
34
34
  const response = await fetch(url, {
35
35
  method: "POST",
36
36
  headers: {
@@ -49,4 +49,4 @@ async function main() {
49
49
  main().catch((err) => {
50
50
  console.error(err instanceof Error ? err.message : String(err));
51
51
  process.exit(1);
52
- });
52
+ });
@@ -14,23 +14,23 @@ function parseArgs(argv) {
14
14
 
15
15
  function usage() {
16
16
  console.error(`Usage:
17
- node ${basename(process.argv[1])} --url <url> --session-id <session_id> --grant <session_grant> --path <absolute image path> [--caption <text>]`);
17
+ node ${basename(process.argv[1])} --url <url> --session-id <session_id> --grant <session_grant> --path <absolute image path> [--caption <text>]`);
18
18
  }
19
19
 
20
20
  async function main() {
21
21
  const args = parseArgs(process.argv.slice(2));
22
22
  const url = args.url || process.env.CHATCCC_SEND_IMAGE_URL;
23
- const sessionId = args["session-id"] || args.session_id || process.env.CHATCCC_SESSION_ID;
24
- const grant = args.grant || process.env.CHATCCC_AGENT_CAPABILITY_GRANT;
23
+ const sessionId = args["session-id"] || args.session_id || process.env.CHATCCC_SESSION_ID;
24
+ const grant = args.grant || process.env.CHATCCC_AGENT_CAPABILITY_GRANT;
25
25
  const path = args.path;
26
26
  const caption = args.caption || "";
27
27
 
28
- if (!url || !sessionId || !grant || !path) {
28
+ if (!url || !sessionId || !grant || !path) {
29
29
  usage();
30
30
  process.exit(1);
31
31
  }
32
32
 
33
- const body = Buffer.from(JSON.stringify({ session_id: sessionId, grant, path, caption }), "utf8");
33
+ const body = Buffer.from(JSON.stringify({ session_id: sessionId, grant, path, caption }), "utf8");
34
34
  const response = await fetch(url, {
35
35
  method: "POST",
36
36
  headers: {
@@ -49,4 +49,4 @@ async function main() {
49
49
  main().catch((err) => {
50
50
  console.error(err instanceof Error ? err.message : String(err));
51
51
  process.exit(1);
52
- });
52
+ });
@@ -1,28 +1,28 @@
1
- ---
2
- name: feishu-skill
3
- description: Feishu IM local skills for sending images, files, videos, and for creating new sessions or switching working directories.
4
- ---
5
-
6
- Current working directory: {{cwd}}
7
- Your session id: {{session_id}}
8
- Your session capability grant: {{agent_capability_grant}}
9
- Your Feishu open_id: {{open_id}}
10
-
11
- Use local endpoints instead of calling Feishu Open Platform directly.
12
-
13
- - **Send images**: POST `{{send_image_url}}` with `{"session_id":"{{session_id}}","grant":"{{agent_capability_grant}}","path":"<absolute path>","caption":"<optional>"}` — read `{{im_skills_cache_dir}}/feishu-skill/receive-send-image.md`
14
- - **Send files/videos**: POST `{{send_file_url}}` with `{"session_id":"{{session_id}}","grant":"{{agent_capability_grant}}","path":"<absolute path>","caption":"<optional>"}` — read `{{im_skills_cache_dir}}/feishu-skill/receive-send-file.md`
15
- - **Create a new session (新建会话)**: POST `{{delegate_task_url}}` with `{"tool":"claude|cursor|codex|ccc|dsh","cwd":"<absolute path>","open_id":"{{open_id}}","prompt":"<optional first task>"}`. This creates a new Feishu group and session, and only adds you (the requester). `tool` and `prompt` are optional; omit `prompt` to just create the session without a first task.
16
- - **Set default working directory (cd / 切换目录)**: POST `{{set_cwd_url}}` with `{"session_id":"{{session_id}}","dir":"<absolute path>"}`. This sets the default directory for future new sessions only; it does not change the current session.
17
-
18
- How to map user requests to these endpoints:
19
-
20
- - "新建会话 / 开个新会话 / 换个新会话" → create a new session (no prompt). Use `cwd` = your current working directory ({{cwd}}) unless the user names a directory.
21
- - "在 <目录> 新建会话(做 <任务>)" → create a new session with `cwd` = that directory, and set `prompt` to the task if one was given.
22
- - "cd 到 <目录> / 切换到 <目录> / 去 <目录> 干活" → judge intent:
23
- - if the user wants to start working there now (a fresh conversation in that directory) → create a new session with `cwd` = that directory.
24
- - if the user only wants to change the default directory for future sessions → call set-cwd.
25
- - when ambiguous, prefer creating a new session (the more common intent for "切换到").
26
- - Directory names may be fuzzy or relative; resolve them to an absolute local path (using your file tools) before calling either endpoint.
27
- - `open_id` must always be passed as exactly {{open_id}}; do not invent it.
28
- - The capability grant is bound to this session. Never reuse a grant with another session ID.
1
+ ---
2
+ name: feishu-skill
3
+ description: Feishu IM local skills for sending images, files, videos, and for creating new sessions or switching working directories.
4
+ ---
5
+
6
+ Current working directory: {{cwd}}
7
+ Your session id: {{session_id}}
8
+ Your session capability grant: {{agent_capability_grant}}
9
+ Your Feishu open_id: {{open_id}}
10
+
11
+ Use local endpoints instead of calling Feishu Open Platform directly.
12
+
13
+ - **Send images**: POST `{{send_image_url}}` with `{"session_id":"{{session_id}}","grant":"{{agent_capability_grant}}","path":"<absolute path>","caption":"<optional>"}` — read `{{im_skills_cache_dir}}/feishu-skill/receive-send-image.md`
14
+ - **Send files/videos**: POST `{{send_file_url}}` with `{"session_id":"{{session_id}}","grant":"{{agent_capability_grant}}","path":"<absolute path>","caption":"<optional>"}` — read `{{im_skills_cache_dir}}/feishu-skill/receive-send-file.md`
15
+ - **Create a new session (新建会话)**: POST `{{delegate_task_url}}` with `{"tool":"claude|cursor|codex|ccc|dsh","cwd":"<absolute path>","open_id":"{{open_id}}","prompt":"<optional first task>"}`. This creates a new Feishu group and session, and only adds you (the requester). `tool` and `prompt` are optional; omit `prompt` to just create the session without a first task.
16
+ - **Set default working directory (cd / 切换目录)**: POST `{{set_cwd_url}}` with `{"session_id":"{{session_id}}","dir":"<absolute path>"}`. This sets the default directory for future new sessions only; it does not change the current session.
17
+
18
+ How to map user requests to these endpoints:
19
+
20
+ - "新建会话 / 开个新会话 / 换个新会话" → create a new session (no prompt). Use `cwd` = your current working directory ({{cwd}}) unless the user names a directory.
21
+ - "在 <目录> 新建会话(做 <任务>)" → create a new session with `cwd` = that directory, and set `prompt` to the task if one was given.
22
+ - "cd 到 <目录> / 切换到 <目录> / 去 <目录> 干活" → judge intent:
23
+ - if the user wants to start working there now (a fresh conversation in that directory) → create a new session with `cwd` = that directory.
24
+ - if the user only wants to change the default directory for future sessions → call set-cwd.
25
+ - when ambiguous, prefer creating a new session (the more common intent for "切换到").
26
+ - Directory names may be fuzzy or relative; resolve them to an absolute local path (using your file tools) before calling either endpoint.
27
+ - `open_id` must always be passed as exactly {{open_id}}; do not invent it.
28
+ - The capability grant is bound to this session. Never reuse a grant with another session ID.