{
  "canonical_name": "chenhg5/cc-connect",
  "compilation_id": "pack_fbd69995d2c64d709ddbcd1a85340670",
  "created_at": "2026-05-19T05:13:37.703691+00:00",
  "created_by": "project-pack-compiler",
  "feedback": {
    "carrier_selection_notes": [
      "viable_asset_types=skill, recipe, host_instruction, eval, preflight",
      "recommended_asset_types=skill, recipe, host_instruction, eval, preflight"
    ],
    "evidence_delta": {
      "confirmed_claims": [
        "identity_anchor_present",
        "capability_and_host_targets_present",
        "install_path_declared_or_better"
      ],
      "missing_required_fields": [],
      "must_verify_forwarded": [
        "Run or inspect `npm install -g cc-connect` in an isolated environment.",
        "Confirm the project exposes the claimed capability to at least one target host."
      ],
      "quickstart_execution_scope": "allowlisted_sandbox_smoke",
      "sandbox_command": "npm install -g cc-connect",
      "sandbox_container_image": "node:22-slim",
      "sandbox_execution_backend": "docker",
      "sandbox_planner_decision": "deterministic_isolated_install",
      "sandbox_validation_id": "sbx_b997710c029b4815a79327e563008204"
    },
    "feedback_event_type": "project_pack_compilation_feedback",
    "learning_candidate_reasons": [],
    "template_gaps": []
  },
  "identity": {
    "canonical_id": "project_25aeb0a43cc9a41559eac95fef2f52ee",
    "canonical_name": "chenhg5/cc-connect",
    "homepage_url": null,
    "license": "unknown",
    "repo_url": "https://github.com/chenhg5/cc-connect",
    "slug": "cc-connect",
    "source_packet_id": "phit_87032e92ec214f0fb86cc3419369ac73",
    "source_validation_id": "dval_8f0580deba58437fb38beeba6aed26ac"
  },
  "merchandising": {
    "best_for": "需要软件开发与交付能力，并使用 claude的用户",
    "github_forks": 832,
    "github_stars": 9032,
    "one_liner_en": "Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.",
    "one_liner_zh": "Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.",
    "primary_category": {
      "category_id": "software-development",
      "confidence": "high",
      "name_en": "Software Development",
      "name_zh": "软件开发与交付",
      "reason": "matched_keywords:code, coding, git"
    },
    "target_user": "使用 claude, claude_code, cursor 等宿主 AI 的用户",
    "title_en": "cc-connect",
    "title_zh": "cc-connect 能力包",
    "visible_tags": [
      {
        "label_en": "Browser Agents",
        "label_zh": "浏览器 Agent",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "product_domain-browser-agents",
        "type": "product_domain"
      },
      {
        "label_en": "Web Task Automation",
        "label_zh": "网页任务自动化",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "user_job-web-task-automation",
        "type": "user_job"
      },
      {
        "label_en": "Natural-language Web Actions",
        "label_zh": "自然语言网页操作",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "core_capability-natural-language-web-actions",
        "type": "core_capability"
      },
      {
        "label_en": "Checkpoint Resume",
        "label_zh": "断点恢复流程",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "workflow_pattern-checkpoint-resume",
        "type": "workflow_pattern"
      },
      {
        "label_en": "Evaluation Suite",
        "label_zh": "评测体系",
        "source": "repo_evidence_project_characteristics",
        "tag_id": "selection_signal-evaluation-suite",
        "type": "selection_signal"
      }
    ]
  },
  "packet_id": "phit_87032e92ec214f0fb86cc3419369ac73",
  "page_model": {
    "artifacts": {
      "artifact_slug": "cc-connect",
      "files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json",
        "REPO_INSPECTION.md",
        "CAPABILITY_CONTRACT.json",
        "EVIDENCE_INDEX.json",
        "CLAIM_GRAPH.json"
      ],
      "required_files": [
        "PROJECT_PACK.json",
        "QUICK_START.md",
        "PROMPT_PREVIEW.md",
        "HUMAN_MANUAL.md",
        "AI_CONTEXT_PACK.md",
        "BOUNDARY_RISK_CARD.md",
        "PITFALL_LOG.md",
        "REPO_INSPECTION.json"
      ]
    },
    "detail": {
      "capability_source": "Project Hit Packet + DownstreamValidationResult",
      "commands": [
        {
          "command": "npm install -g cc-connect",
          "label": "Node.js / npm · 官方安装入口",
          "source": "https://github.com/chenhg5/cc-connect#readme",
          "verified": true
        }
      ],
      "display_tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "断点恢复流程",
        "评测体系"
      ],
      "eyebrow": "软件开发与交付",
      "glance": [
        {
          "body": "判断自己是不是目标用户。",
          "label": "最适合谁",
          "value": "需要软件开发与交付能力，并使用 claude的用户"
        },
        {
          "body": "先理解能力边界，再决定是否继续。",
          "label": "核心价值",
          "value": "Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms."
        },
        {
          "body": "未完成验证前保持审慎。",
          "label": "继续前",
          "value": "publish to Doramagic.ai project surfaces"
        }
      ],
      "guardrail_source": "Boundary & Risk Card",
      "guardrails": [
        {
          "body": "Prompt Preview 只展示流程，不证明项目已安装或运行。",
          "label": "Check 1",
          "value": "不要把试用当真实运行"
        },
        {
          "body": "claude, claude_code, cursor",
          "label": "Check 2",
          "value": "确认宿主兼容"
        },
        {
          "body": "publish to Doramagic.ai project surfaces",
          "label": "Check 3",
          "value": "先隔离验证"
        }
      ],
      "mode": "skill, recipe, host_instruction, eval, preflight",
      "pitfall_log": {
        "items": [
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug]",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_c85c0f8f48ac44c7a855066b2bfc3939 | https://github.com/chenhg5/cc-connect/issues/933 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[Bug]",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_bbbf45839e1043e2afdedf3f1d87b55b | https://github.com/chenhg5/cc-connect/issues/1058 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Feature] Preserve full interactive card schema on inbound",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_f50380a7aef54548ac053b1127a2916e | https://github.com/chenhg5/cc-connect/issues/936 | 来源类型 github_issue 暴露的待验证使用条件。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[Feature] Preserve full interactive card schema on inbound",
            "user_impact": "可能影响升级、迁移或版本选择。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安装相关的待验证问题：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`",
            "category": "安装坑",
            "evidence": [
              "community_evidence:github | cevd_3a818efa6ddf479aae0f026d1f06d491 | https://github.com/chenhg5/cc-connect/issues/960 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_7b001c45ac3449abaee3dd365bc4cc74 | https://github.com/chenhg5/cc-connect/issues/972 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：WeChat ilink (weixin): image content is empty, not passed to agent",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_17d4c5f39a5745c5bdfbc88cdac32056 | https://github.com/chenhg5/cc-connect/issues/1057 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：WeChat ilink (weixin): image content is empty, not passed to agent",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions",
            "category": "配置坑",
            "evidence": [
              "community_evidence:github | cevd_6136e384578b499ca63299322032211a | https://github.com/chenhg5/cc-connect/issues/966 | 来源类型 github_issue 暴露的待验证使用条件。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions",
            "user_impact": "可能增加新用户试用和生产接入成本。"
          },
          {
            "body": "Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions",
            "category": "安全/权限坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_d8aeb38642d53571d47292761cca7247 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions",
              "failure_mode_cluster:github_issue | fmev_105e57f4097e09e9e5c522a568ff4991 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions"
            ],
            "severity": "high",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions. Context: Observed during installation or first-run setup.",
            "title": "失败模式：security_permissions: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions",
            "user_impact": "Developers may expose sensitive permissions or credentials: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions"
          },
          {
            "body": "Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志",
            "category": "安全/权限坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_9f56ecf6ad99707575ffe84fc2c10e1b | https://github.com/chenhg5/cc-connect/issues/1054 | [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志"
            ],
            "severity": "high",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志. Context: Observed when using linux",
            "title": "失败模式：security_permissions: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root...",
            "user_impact": "Developers may expose sensitive permissions or credentials: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Feature Request: 终端与 IM 双通道统一会话管理",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_befa8b4f1c7f4ef483d6d8b38ba06ba4 | https://github.com/chenhg5/cc-connect/issues/968 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：Feature Request: 终端与 IM 双通道统一会话管理",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_c632e470b2d04852abae801be4d2aba2 | https://github.com/chenhg5/cc-connect/issues/1054 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          },
          {
            "body": "GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] codex mode修改YOLO模式无效",
            "category": "安全/权限坑",
            "evidence": [
              "community_evidence:github | cevd_ce58ad66fc4e4d2ea6f0bb4a43527cd0 | https://github.com/chenhg5/cc-connect/issues/233 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。"
            ],
            "severity": "high",
            "suggested_check": "来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。",
            "title": "来源证据：[Bug] codex mode修改YOLO模式无效",
            "user_impact": "可能影响授权、密钥配置或安全边界。"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: [Bug]",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_555d98ac56e7850b1c49e5892d2b6c48 | https://github.com/chenhg5/cc-connect/issues/933 | [Bug]"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: [Bug]. Context: Observed when using node, windows",
            "title": "失败模式：installation: [Bug]",
            "user_impact": "Developers may fail before the first successful local run: [Bug]"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: [Bug] codex mode修改YOLO模式无效",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_59a6433bec9f3dcf0981efd11a046df3 | https://github.com/chenhg5/cc-connect/issues/233 | [Bug] codex mode修改YOLO模式无效"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: [Bug] codex mode修改YOLO模式无效. Context: Observed when using macos",
            "title": "失败模式：installation: [Bug] codex mode修改YOLO模式无效",
            "user_impact": "Developers may fail before the first successful local run: [Bug] codex mode修改YOLO模式无效"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: [Bug] cursorSession error: unknown option '--trust",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_279592e262a8c9114ffed9bcd68ca683 | https://github.com/chenhg5/cc-connect/issues/923 | [Bug] cursorSession error: unknown option '--trust"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cursorSession error: unknown option '--trust. Context: Observed when using node, macos",
            "title": "失败模式：installation: [Bug] cursorSession error: unknown option '--trust",
            "user_impact": "Developers may fail before the first successful local run: [Bug] cursorSession error: unknown option '--trust"
          },
          {
            "body": "Developers should check this installation risk before relying on the project: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`",
            "category": "安装坑",
            "evidence": [
              "failure_mode_cluster:github_issue | fmev_2ab77150cf90931385fb7741956a1f53 | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`",
              "failure_mode_cluster:github_issue | fmev_5c45b25a78af1b25aea75c4cad91e50a | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`"
            ],
            "severity": "medium",
            "suggested_check": "Before packaging this project, run the relevant install/config/quickstart check for: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`. Context: Observed when using node, linux",
            "title": "失败模式：installation: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`",
            "user_impact": "Developers may fail before the first successful local run: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`"
          }
        ],
        "source": "ProjectPitfallLog + ProjectHitPacket + validation + community signals",
        "summary": "发现 39 个潜在踩坑项，其中 12 个为 high/blocking；最高优先级：安装坑 - 来源证据：[Bug]。",
        "title": "踩坑日志"
      },
      "snapshot": {
        "contributors": 103,
        "forks": 832,
        "license": "unknown",
        "note": "站点快照，非实时质量证明；用于开工前背景判断。",
        "stars": 9032
      },
      "source_url": "https://github.com/chenhg5/cc-connect",
      "steps": [
        {
          "body": "不安装项目，先体验能力节奏。",
          "code": "preview",
          "title": "先试 Prompt"
        },
        {
          "body": "理解输入、输出、失败模式和边界。",
          "code": "manual",
          "title": "读说明书"
        },
        {
          "body": "把上下文交给宿主 AI 继续工作。",
          "code": "context",
          "title": "带给 AI"
        },
        {
          "body": "进入主力环境前先完成安装入口与风险边界验证。",
          "code": "verify",
          "title": "沙箱验证"
        }
      ],
      "subtitle": "Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.",
      "title": "cc-connect 能力包",
      "trial_prompt": "# cc-connect - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for chenhg5/cc-connect.\n\nProject:\n- Name: cc-connect\n- Repository: https://github.com/chenhg5/cc-connect\n- Summary: Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.\n- Host target: claude, claude_code, cursor\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. page-introduction: Introduction to cc-connect. Produce one small intermediate artifact and wait for confirmation.\n2. page-quickstart: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.\n3. page-architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.\n4. page-core-components: Core Components. Produce one small intermediate artifact and wait for confirmation.\n5. page-agent-integrations: Agent Integrations. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/chenhg5/cc-connect\n- https://github.com/chenhg5/cc-connect#readme\n- README.md\n- docs/bridge-protocol.md\n- INSTALL.md\n- config.example.toml\n- cmd/cc-connect/main.go\n- core/bridge.go\n- core/engine.go\n- core/relay.go\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "voices": [
        {
          "body": "来源平台：github。github/github_issue: [Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题（https://github.com/chenhg5/cc-connect/issues/1058）；github/github_issue: WeChat ilink (weixin): image content is empty, not passed to agent（https://github.com/chenhg5/cc-connect/issues/1057）；github/github_issue: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新（https://github.com/chenhg5/cc-connect/issues/1054）；github/github_issue: [Bug] codex mode修改YOLO模式无效（https://github.com/chenhg5/cc-connect/issues/233）；github/github_issue: [Bug] cc-connect send uses default socket path in custom data_dir agent （https://github.com/chenhg5/cc-connect/issues/966）；github/github_issue: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`（https://github.com/chenhg5/cc-connect/issues/960）；github/github_issue: [Bug] cursorSession error: unknown option '--trust（https://github.com/chenhg5/cc-connect/issues/923）；github/github_issue: [Feature] Preserve full interactive card schema on inbound（https://github.com/chenhg5/cc-connect/issues/936）；github/github_issue: [Bug]（https://github.com/chenhg5/cc-connect/issues/933）；github/github_issue: Feishu: all messages permanently ignored as 'old message after restart' （https://github.com/chenhg5/cc-connect/issues/972）；github/github_issue: Feature Request: 终端与 IM 双通道统一会话管理（https://github.com/chenhg5/cc-connect/issues/968）；github/github_issue: [Bug] cc-connect send uses default socket path in custom data_dir agent （https://github.com/chenhg5/cc-connect/issues/966）。这些是项目级外部声音，不作为单独质量证明。",
          "items": [
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题",
              "url": "https://github.com/chenhg5/cc-connect/issues/1058"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "WeChat ilink (weixin): image content is empty, not passed to agent",
              "url": "https://github.com/chenhg5/cc-connect/issues/1057"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新",
              "url": "https://github.com/chenhg5/cc-connect/issues/1054"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug] codex mode修改YOLO模式无效",
              "url": "https://github.com/chenhg5/cc-connect/issues/233"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug] cc-connect send uses default socket path in custom data_dir agent ",
              "url": "https://github.com/chenhg5/cc-connect/issues/966"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`",
              "url": "https://github.com/chenhg5/cc-connect/issues/960"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug] cursorSession error: unknown option '--trust",
              "url": "https://github.com/chenhg5/cc-connect/issues/923"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Feature] Preserve full interactive card schema on inbound",
              "url": "https://github.com/chenhg5/cc-connect/issues/936"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug]",
              "url": "https://github.com/chenhg5/cc-connect/issues/933"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Feishu: all messages permanently ignored as 'old message after restart' ",
              "url": "https://github.com/chenhg5/cc-connect/issues/972"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "Feature Request: 终端与 IM 双通道统一会话管理",
              "url": "https://github.com/chenhg5/cc-connect/issues/968"
            },
            {
              "kind": "github_issue",
              "source": "github",
              "title": "[Bug] cc-connect send uses default socket path in custom data_dir agent ",
              "url": "https://github.com/chenhg5/cc-connect/issues/966"
            }
          ],
          "status": "已收录 12 条来源",
          "title": "社区讨论"
        }
      ]
    },
    "homepage_card": {
      "category": "软件开发与交付",
      "desc": "Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.",
      "effort": "安装已验证",
      "forks": 832,
      "icon": "code",
      "name": "cc-connect 能力包",
      "risk": "可发布",
      "slug": "cc-connect",
      "stars": 9032,
      "tags": [
        "浏览器 Agent",
        "网页任务自动化",
        "自然语言网页操作",
        "断点恢复流程",
        "评测体系"
      ],
      "thumb": "gray",
      "type": "Skill Pack"
    },
    "manual": {
      "markdown": "# https://github.com/chenhg5/cc-connect 项目说明书\n\n生成时间：2026-05-15 11:55:32 UTC\n\n## 目录\n\n- [Introduction to cc-connect](#page-introduction)\n- [Quick Start Guide](#page-quickstart)\n- [System Architecture](#page-architecture)\n- [Core Components](#page-core-components)\n- [Agent Integrations](#page-agent-integrations)\n- [Platform Integrations](#page-platform-integrations)\n- [Configuration Guide](#page-configuration)\n- [Session Management](#page-session-management)\n- [Web UI Administration](#page-web-ui)\n- [Deployment and Operations](#page-deployment)\n\n<a id='page-introduction'></a>\n\n## Introduction to cc-connect\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Quick Start Guide](#page-quickstart)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [npm/README.md](https://github.com/chenhg5/cc-connect/blob/main/npm/README.md)\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n- [web/src/pages/Projects/ProjectList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectList.tsx)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n</details>\n\n# Introduction to cc-connect\n\ncc-connect is a bridge service that connects local AI coding agents to messaging platforms, enabling developers to interact with their AI development assistants from anywhere through popular chat applications.\n\n## Overview\n\ncc-connect acts as a middleware layer between AI coding agents and messaging platforms. It allows developers to leverage the power of AI coding tools like Claude Code, Cursor, Codex, Gemini CLI, and iFlow from messaging applications such as Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, and WeChat Work.\n\n资料来源：[npm/README.md:1-12]()\n\n## Architecture\n\ncc-connect consists of three main components:\n\n| Component | Description | Technology |\n|-----------|-------------|------------|\n| Backend Service | Core bridge service that manages connections and message routing | Go |\n| Web Admin UI | Browser-based dashboard for configuration and monitoring | React/TypeScript |\n| NPM Package | CLI tool for installation and management | Node.js |\n\nThe backend service runs as a daemon process and maintains persistent connections to both the local AI coding agent and the configured messaging platforms.\n\n资料来源：[INSTALL.md:1-50]()\n\n## Supported AI Agents\n\ncc-connect integrates with multiple AI coding agents through a unified agent interface:\n\n| Agent | Type Identifier | Description |\n|-------|-----------------|-------------|\n| Claude Code | `claudecode` | Anthropic's CLI tool for Claude |\n| Codex | `codex` | OpenAI's coding agent |\n| Cursor | `cursor` | Cursor AI editor |\n| Gemini CLI | `gemini` | Google's Gemini CLI |\n| iFlow | `iflow` | iFlow AI platform |\n| Qoder | `qoder` | Qoder coding assistant |\n| OpenCode | `opencode` | Open code editing agent |\n\n资料来源：[INSTALL.md:60-75]()\n\n## Supported Messaging Platforms\n\nThe service supports integration with multiple enterprise and consumer messaging platforms:\n\n- **Feishu/Lark** - ByteDance's enterprise communication platform\n- **DingTalk** - Alibaba's enterprise messaging tool\n- **Slack** - Popular team collaboration platform\n- **Telegram** - Cloud-based instant messaging\n- **Discord** - Community and gaming communication\n- **LINE** - Japanese messaging application\n- **WeChat Work** - Tencent's enterprise WeChat variant\n\n资料来源：[npm/README.md:3]()\n\n## Project Management\n\ncc-connect organizes work through projects, where each project links a code folder to one or more messaging platforms.\n\n```toml\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"  # or \"codex\", \"cursor\", \"gemini\", \"qoder\", \"opencode\", \"iflow\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n资料来源：[INSTALL.md:30-45]()\n\n## Configuration\n\n### Configuration File Locations\n\ncc-connect searches for configuration in this order:\n\n| Priority | Location | Notes |\n|----------|----------|-------|\n| 1 | `-config <path>` flag | Explicit path specification |\n| 2 | `./config.toml` | Current directory |\n| 3 | `~/.cc-connect/config.toml` | Global user directory (recommended) |\n\nIf no config file exists, running `cc-connect` will auto-create a starter template at `~/.cc-connect/config.toml`.\n\n资料来源：[INSTALL.md:8-18]()\n\n### Global Settings\n\n| Setting | Values | Default | Description |\n|---------|--------|---------|-------------|\n| `language` | `\"en\"`, `\"zh\"`, `\"\"` | `\"\"` (auto-detect) | UI and message language |\n| `log.level` | `\"debug\"`, `\"info\"`, `\"warn\"`, `\"error\"` | `\"info\"` | Logging verbosity |\n\n## Web Interface\n\nThe web admin interface provides a graphical dashboard for managing all cc-connect functionality:\n\n### Sessions Management\n\nThe sessions feature displays active chat sessions with real-time status indicators:\n\n- Live session badges showing active connections\n- Last message preview with role indicators\n- Session switching and creation capabilities\n\n资料来源：[web/src/pages/Sessions/SessionList.tsx:10-30]()\n\n### Bridge Status Monitoring\n\nThe interface displays connection status between cc-connect and the configured messaging platforms:\n\n| Status | Indicator | Description |\n|--------|-----------|-------------|\n| Connected | Green indicator | Bridge active and operational |\n| Connecting | Spinner animation | Connection in progress |\n| Disconnected | Warning icon | Bridge connection lost |\n\n资料来源：[web/src/pages/Chat/ChatView.tsx:1-25]()\n\n### Provider Management\n\nProviders define the messaging platform connections. Each provider can have multiple models and agent types associated with it.\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:1-30]()\n\n## API Client\n\nThe web interface communicates with the backend through a RESTful API client:\n\n```typescript\nget<T>(path: string, params?: Record<string, string>)\npost<T>(path: string, body?: any)\nput<T>(path: string, body?: any)\npatch<T>(path: string, body?: any)\ndelete<T>(path: string)\nasync raw(path: string): Promise<string>\n```\n\nThe client supports JWT Bearer token authentication and handles unauthorized access with automatic callback notification.\n\n资料来源：[web/src/api/client.ts:1-50]()\n\n## Internationalization\n\ncc-connect supports multiple languages for its user interface and messages:\n\n| Language | Code | Status |\n|----------|------|--------|\n| English | `en` | Primary |\n| Chinese (Simplified) | `zh` | Supported |\n| Chinese (Traditional) | `zh-TW` | Supported |\n| Japanese | `ja` | Supported |\n| Spanish | `es` | Supported |\n\n资料来源：[core/i18n.go:1-50]()\n\n## Installation Methods\n\n### Package Managers\n\n| Platform | Command |\n|----------|---------|\n| macOS (Homebrew) | `brew install cc-connect` |\n| npm | `npm install -g cc-connect` |\n\n### Manual Installation\n\n1. Download the binary from GitHub Releases\n2. Make it executable: `chmod +x cc-connect`\n3. Move to PATH: `sudo mv cc-connect /usr/local/bin/`\n\n### Build from Source\n\nRequires Go 1.22+:\n\n```bash\ngit clone https://github.com/chenhg5/cc-connect.git\ncd cc-connect\nmake build\n```\n\n资料来源：[INSTALL.md:80-110]()\n\n## Daemon Management\n\ncc-connect can run as a background service managed by the operating system:\n\n| Command | Description |\n|---------|-------------|\n| `cc-connect daemon install` | Install as system service |\n| `cc-connect daemon start` | Start the service |\n| `cc-connect daemon stop` | Stop the service |\n| `cc-connect daemon restart` | Restart the service |\n| `cc-connect daemon status` | Check service status |\n| `cc-connect daemon logs` | View service logs |\n\nOn Linux, this uses systemd user services. On macOS, it uses launchd LaunchAgents. On Windows, it creates a Task Scheduler task.\n\n资料来源：[INSTALL.md:150-175]()\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[User on Messaging Platform] -->|Sends Message| B[Messaging Platform API]\n    B -->|Routes Message| C[cc-connect Bridge]\n    C -->|Processes & Formats| D[Local AI Agent]\n    D -->|AI Response| C\n    C -->|Formats Response| B\n    B -->|Delivers Message| A\n    \n    E[Web Admin UI] -->|Configuration| C\n    F[config.toml] -->|Settings| C\n```\n\n## Skills System\n\ncc-connect supports an extensible skills system that allows AI agents to gain additional capabilities:\n\n- **Recommended Skills** - Curated skill presets that can be downloaded\n- **Custom Skills** - User-defined skills for specific workflows\n- **Skill Presets** - Pre-configured skill collections with metadata\n\nSkills include metadata such as:\n- Display name and description\n- Version information\n- Pricing model\n- Author attribution\n- Source URL and provider information\n\n资料来源：[web/src/pages/Skills/SkillList.tsx:1-100]()\n\n## Summary\n\ncc-connect provides a unified bridge between local AI coding agents and enterprise messaging platforms, enabling developers to:\n\n- Access AI coding assistance from any messaging platform\n- Manage multiple projects with different AI agents\n- Configure flexible provider settings\n- Monitor connections through a web-based dashboard\n- Extend capabilities through a skills system\n\nThe architecture prioritizes reliability with automatic reconnection, comprehensive logging, and daemon-based operation for continuous availability.\n\n---\n\n<a id='page-quickstart'></a>\n\n## Quick Start Guide\n\n### 相关页面\n\n相关主题：[Introduction to cc-connect](#page-introduction), [Configuration Guide](#page-configuration), [Deployment and Operations](#page-deployment)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [config.example.toml](https://github.com/chenhg5/cc-connect/blob/main/config.example.toml)\n- [cmd/cc-connect/main.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/main.go)\n- [cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n</details>\n\n# Quick Start Guide\n\ncc-connect is a bridge service that connects local AI coding agents (Claude Code, Codex, Cursor, Gemini CLI, etc.) with messaging platforms (Feishu, Telegram, Discord, Slack, etc.). This enables natural language interaction with AI coding agents through familiar chat interfaces.\n\n## Prerequisites\n\nBefore installing cc-connect, ensure your environment meets these requirements:\n\n| Requirement | Version/Details |\n|-------------|-----------------|\n| Go (for source build) | 1.22+ |\n| Node.js (for Claude Code agent) | Latest stable |\n| npm | Latest stable |\n| Supported OS | Linux, macOS, Windows |\n| Network | Outbound access to messaging platform APIs |\n\nYou must also install at least one supported AI coding agent:\n\n```bash\n# Claude Code\nnpm install -g @anthropic-ai/claude-code\n\n# Codex\nnpm install -g @openai/codex\n\n# Gemini CLI\nnpm install -g @google/gemini-cli\n\n# iFlow CLI\nnpm install -g @iflow-ai/if\n```\n\n## Installation Methods\n\n### Option A: Homebrew (macOS/Linux)\n\n```bash\nbrew tap chenhg5/tap\nbrew install cc-connect\n```\n\n### Option B: Download Binary\n\nDownload pre-built binaries from [GitHub Releases](https://github.com/chenhg5/cc-connect/releases):\n\n| Platform | Artifact Pattern |\n|----------|------------------|\n| Linux amd64 | `cc-connect-<version>-linux-amd64` |\n| macOS amd64 | `cc-connect-<version>-darwin-amd64` |\n| macOS ARM64 | `cc-connect-<version>-darwin-arm64` |\n| Windows | `cc-connect-<version>-windows-amd64.exe` |\n\n```bash\ncurl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64\nchmod +x cc-connect\nsudo mv cc-connect /usr/local/bin/\n```\n\nOn macOS, remove the quarantine attribute:\n```bash\nxattr -d com.apple.quarantine cc-connect\n```\n\n### Option C: Build from Source\n\n```bash\ngit clone https://github.com/chenhg5/cc-connect.git\ncd cc-connect\nmake build\n```\n\n资料来源：[INSTALL.md:1-80]()\n\n## Configuration\n\n### Config File Location\n\ncc-connect searches for configuration in this order:\n\n1. `-config <path>` flag (explicit path)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\n资料来源：[INSTALL.md:10-15]()\n\n### Create Starter Config\n\nThe easiest method is to let cc-connect auto-generate a starter config:\n\n```bash\n# Run once - creates ~/.cc-connect/config.toml automatically\ncc-connect\n```\n\nOr manually create from the example:\n\n```bash\nmkdir -p ~/.cc-connect\ncp config.example.toml ~/.cc-connect/config.toml\n```\n\n### Configuration Structure\n\n```toml\n# Optional global settings\n# language = \"en\"  # \"en\", \"zh\", or \"\" (auto-detect)\n\n[log]\nlevel = \"info\"  # debug, info, warn, error\n\n# Each [[projects]] entry connects one code folder to one or more messaging platforms\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"  # or \"codex\", \"cursor\", \"gemini\", \"qoder\", \"opencode\", \"iflow\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"  # \"default\", \"acceptEdits\", \"plan\", \"yolo\"\n\n[[projects.platforms]]\ntype = \"feishu\"  # or \"telegram\", \"discord\", \"slack\", \"dingtalk\", etc.\n\n[projects.platforms.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxx\"\n```\n\n资料来源：[INSTALL.md:30-60]()\n\n### Agent Permission Modes\n\n| Mode | Behavior |\n|------|----------|\n| `default` | Standard permission model - agent asks before actions |\n| `acceptEdits` | Accepts all edit suggestions automatically |\n| `plan` | Only plans, does not execute |\n| `bypassPermissions` | Bypasses all permission checks (yolo mode) |\n| `dontAsk` | Never prompts for confirmation |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:1-30]()\n\n## Running the Application\n\n### Basic Startup\n\n```bash\n# Run with config.toml in current directory\ncc-connect\n\n# Or specify config path\ncc-connect -config /path/to/config.toml\n\n# Check version\ncc-connect --version\n```\n\nExpected output:\n```\nlevel=INFO msg=\"platform started\" project=my-project platform=feishu\nlevel=INFO msg=\"engine started\" project=my-project agent=claudecode platforms=1\nlevel=INFO msg=\"cc-connect is running\" projects=1\n```\n\n### Claude Code Session Note\n\nIf running inside a Claude Code session, you must unset the `CLAUDECODE` environment variable before starting:\n\n```bash\nunset CLAUDECODE && cc-connect\n```\n\nAlternatively, open a separate terminal to run cc-connect.\n\n资料来源：[INSTALL.md:75-90]()\n\n## Chat Commands\n\nOnce running, use these slash commands on your configured messaging platform:\n\n| Command | Description |\n|---------|-------------|\n| `/new [name]` | Start a new session |\n| `/list` | List agent sessions |\n| `/switch <id>` | Resume an existing session |\n| `/current` | Show current active session |\n| `/history [n]` | Show last n messages (default 10) |\n| `/reasoning [level]` | View/switch reasoning effort (Codex) |\n| `/mode [name]` | View/switch permission mode |\n| `/quiet` | Toggle thinking/tool progress messages |\n| `/allow <tool>` | Pre-allow a tool (next session) |\n\n资料来源：[INSTALL.md:95-110]()\n\n## Scheduled Tasks (Cron)\n\nCreate automated tasks that run through the agent or execute shell commands directly.\n\n### Add a Scheduled Task\n\n```bash\ncc-connect cron add --cron \"<min> <hour> <day> <month> <weekday>\" --prompt \"<task description>\" --desc \"<short label>\"\n```\n\n### Cron Expression Format\n\n| Field | Allowed Values |\n|-------|----------------|\n| Minute | 0-59 or * |\n| Hour | 0-23 or * |\n| Day | 1-31 or * |\n| Month | 1-12 or * |\n| Weekday | 0-6 (0=Sunday) or * |\n\n### Examples\n\n```bash\n# Run every day at 6am through the agent\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Collect GitHub trending repos and send a summary\" --desc \"Daily GitHub Trending\"\n\n# Run every Monday at 9am\ncc-connect cron add --cron \"0 9 * * 1\" --prompt \"Generate a weekly project status report\" --desc \"Weekly Report\"\n\n# Run every 30 minutes with direct shell command\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --desc \"Disk usage check\"\n```\n\n### Additional Cron Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--project <name>` | Target project | Auto-detected from CC_PROJECT env |\n| `--session-key <key>` | Target session | Auto-detected from CC_SESSION_KEY env |\n| `--session-mode <mode>` | `reuse` (default) or `new-per-run` | reuse |\n| `--timeout-mins <n>` | Max minutes per run (0=no limit) | 30 |\n| `--data-dir <path>` | Data directory | ~/.cc-connect |\n\n资料来源：[cmd/cc-connect/cron.go:1-50]()\n\n## Multi-Project Setup\n\nA single cc-connect process can manage multiple projects, each with its own agent, work directory, and platforms:\n\n```toml\n[[projects]]\nname = \"backend\"\n[projects.agent]\ntype = \"claudecode\"\n[projects.agent.options]\nwork_dir = \"/path/to/backend\"\nmode = \"default\"\n[[projects.platforms]]\ntype = \"feishu\"\n[projects.platforms.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxx\"\n\n[[projects]]\nname = \"frontend\"\n[projects.agent]\ntype = \"codex\"\n[projects.agent.options]\nwork_dir = \"/path/to/frontend\"\nmode = \"full-auto\"\n[[projects.platforms]]\ntype = \"telegram\"\n[projects.platforms.options]\ntoken = \"xxx\"\n\n[[projects]]\nname = \"design-system\"\n[projects.agent]\ntype = \"cursor\"\n[projects.agent.options]\nwork_dir = \"/path/to/design-system\"\nmode = \"force\"\n[[projects.platforms]]\ntype = \"discord\"\n[projects.platforms.options]\ntoken = \"xxx\"\n```\n\n资料来源：[INSTALL.md:150-180]()\n\n## Running as a Background Service\n\n### Install the Daemon\n\n```bash\ncc-connect daemon install --config ~/.cc-connect/config.toml\n```\n\nOr specify the work directory containing `config.toml`:\n\n```bash\ncc-connect daemon install --work-dir ~/.cc-connect\n```\n\n### Service Control Commands\n\n```bash\ncc-connect daemon start\ncc-connect daemon stop\ncc-connect daemon restart\ncc-connect daemon status\n```\n\n### View Logs\n\n```bash\ncc-connect daemon logs           # tail current log\ncc-connect daemon logs -f         # follow (like tail -f)\ncc-connect daemon logs -n 100     # last 100 lines\ncc-connect daemon logs --log-file /path/to/log  # custom log file\n```\n\nLogs auto-rotate at the configured max size and keep one backup.\n\nOn Windows, this creates a Task Scheduler task that runs at user logon.\n\n资料来源：[INSTALL.md:190-220]()\n\n## Agent Integration\n\n### Claude Code\n\nClaude Code handles cc-connect integration automatically via `--append-system-prompt` - no extra setup needed.\n\n### Other Agents\n\nFor Codex, Cursor Agent, Qoder CLI, Gemini CLI, OpenCode, or iFlow CLI, add instructions to the agent's project-level instruction file:\n\n| Agent | File Location |\n|-------|---------------|\n| Codex | `AGENTS.md` |\n| Cursor Agent | `.cursorrules` |\n| Qoder CLI | `AGENTS.md` |\n| Gemini CLI | `GEMINI.md` |\n| OpenCode | `OPENCODE.md` |\n| iFlow CLI | `IFLOW.md` |\n\nCreate/edit the file in your project's `work_dir` with cc-connect integration instructions. The agent will automatically use `cc-connect cron add` commands when scheduling tasks.\n\n> **Tip:** Add these files to `.gitignore` if you don't want cc-connect instructions committed to version control.\n\n资料来源：[AGENTS.md:1-30]()\n\n## Web UI\n\nThe cc-connect web interface provides a visual dashboard for managing projects. Access it at:\n\n```\nhttp://localhost:18792\n```\n\nThe web UI allows you to:\n- View and manage projects\n- Configure platforms\n- Manage provider settings\n- View and manage agent sessions\n- Configure and monitor skills\n\n资料来源：[web/index.html:1-15]()\n\n## Upgrade Instructions\n\n### Package Manager Users\n\n```bash\nbrew upgrade cc-connect\n```\n\n### Binary Users\n\n```bash\n# Download new binary\ncurl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64\nchmod +x cc-connect\nsudo mv cc-connect /usr/local/bin/\n```\n\n### Source Users\n\n```bash\ncd cc-connect\ngit pull\nmake build\n```\n\nAfter upgrading, restart the running cc-connect process.\n\n资料来源：[INSTALL.md:85-100]()\n\n## Verification Checklist\n\nBefore going to production, verify:\n\n- [ ] Build passes: `go build ./...`\n- [ ] Tests pass: `go test ./...`\n- [ ] Configuration file is valid TOML\n- [ ] Agent is installed and accessible from PATH\n- [ ] Platform credentials are configured correctly\n- [ ] Network connectivity to platform APIs works\n- [ ] Web UI is accessible\n- [ ] Basic chat commands work (`/new`, `/list`, `/history`)\n\n资料来源：[AGENTS.md:1-10]()\n\n---\n\n<a id='page-architecture'></a>\n\n## System Architecture\n\n### 相关页面\n\n相关主题：[Core Components](#page-core-components), [Agent Integrations](#page-agent-integrations), [Platform Integrations](#page-platform-integrations)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [core/bridge.go](https://github.com/chenhg5/cc-connect/blob/main/core/bridge.go)\n- [core/engine.go](https://github.com/chenhg5/cc-connect/blob/main/core/engine.go)\n- [core/relay.go](https://github.com/chenhg5/cc-connect/blob/main/core/relay.go)\n- [web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n- [web/src/pages/Chat/ChatView.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Chat/ChatView.tsx)\n- [web/src/pages/Sessions/SessionChat.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Sessions/SessionChat.tsx)\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n</details>\n\n# System Architecture\n\n## Overview\n\ncc-connect is a bridge service that connects AI coding agents (such as Claude Code, Codex, Cursor, Gemini, Qoder, OpenCode, and iFlow) with messaging platforms (Feishu, WeChat Work, Telegram, Discord, Slack, DingTalk, WeCom, WeChat, QQ, Line, Weibo). The system acts as a bidirectional relay, translating messages between agent sessions and chat platforms in real-time.\n\n## High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Messaging Platforms\"\n        FEISHU[Feishu]\n        WECHAT[WeChat Work]\n        TELEGRAM[Telegram]\n        DISCORD[Discord]\n        SLACK[Slack]\n        DINGTALK[DingTalk]\n        WECOM[WeCom]\n        WEIXIN[WeChat]\n        QQ[QQ]\n    end\n\n    subgraph \"cc-connect Core\"\n        BRIDGE[Bridge Manager]\n        ENGINE[Engine]\n        RELAY[Relay Handler]\n        SESSION[Session Manager]\n    end\n\n    subgraph \"AI Agents\"\n        CLAUDE[Claude Code]\n        CODEX[Codex]\n        CURSOR[Cursor]\n        GEMINI[Gemini]\n        QODER[Qoder]\n        OPENCODE[OpenCode]\n        IFLOW[iFlow]\n    end\n\n    FEISHU <--> BRIDGE\n    WECHAT <--> BRIDGE\n    TELEGRAM <--> BRIDGE\n    DISCORD <--> BRIDGE\n    SLACK <--> BRIDGE\n    DINGTALK <--> BRIDGE\n    WECOM <--> BRIDGE\n    WEIXIN <--> BRIDGE\n    QQ <--> BRIDGE\n\n    BRIDGE <--> ENGINE\n    ENGINE <--> RELAY\n    ENGINE <--> SESSION\n    RELAY <--> CLAUDE\n    RELAY <--> CODEX\n    RELAY <--> CURSOR\n    RELAY <--> GEMINI\n    RELAY <--> QODER\n    RELAY <--> OPENCODE\n    RELAY <--> IFLOW\n```\n\n## Core Components\n\n### Bridge Manager\n\nThe Bridge Manager (`core/bridge.go`) is the central coordinator that maintains WebSocket connections to all configured messaging platforms. It handles:\n\n- Connection lifecycle management (connect, reconnect, disconnect)\n- Message routing between platforms and the engine\n- Bridge status monitoring for the web UI\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `Status` | `string` | Connection state: `connected`, `connecting`, `disconnected`, `error` |\n| `Platform` | `string` | Platform identifier (e.g., `feishu`, `telegram`) |\n| `SessionKey` | `string` | Associated session identifier |\n\nThe web UI displays bridge status using icons and text:\n\n```tsx\n// Connected state - ChatView.tsx:45\nbridgeStatus === 'error' ? (\n  <div className=\"flex items-center gap-2 text-amber-600\">\n    <WifiOff size={14} />\n    <span>{t('sessions.bridgeDisconnected')}</span>\n  </div>\n) : (\n  <div className=\"flex items-center gap-2 text-gray-400\">\n    <Loader2 size={14} className=\"animate-spin\" />\n    <span>{t('sessions.bridgeConnecting')}</span>\n  </div>\n)\n```\n\n### Engine\n\nThe Engine (`core/engine.go`) serves as the central processing unit that:\n\n- Manages project configurations and agent assignments\n- Coordinates message processing and response handling\n- Maintains session state across multiple concurrent conversations\n\n### Relay Handler\n\nThe Relay Handler (`core/relay.go`) acts as the message translation layer between platforms and agents:\n\n- Converts incoming platform messages to agent-readable format\n- Translates agent responses back to platform-specific formats\n- Handles multi-turn conversations and context preservation\n\n## Session Management\n\nEach project can have multiple sessions, allowing concurrent conversations. The system supports:\n\n```mermaid\ngraph LR\n    subgraph \"Project: my-project\"\n        S1[Session: session-1]\n        S2[Session: session-2]\n        S3[Session: session-3]\n    end\n\n    S1 <--> A1[Claude Code]\n    S2 <--> A2[Claude Code]\n    S3 <--> A3[Claude Code]\n```\n\nSessions are accessible via the UI drawer component:\n\n```tsx\n// ProjectList.tsx:120\n<SessionDrawer\n  open={drawerOpen}\n  onClose={() => setDrawerOpen(false)}\n  sessions={sessions}\n  currentSessionId={currentSession?.id || ''}\n  onSelect={switchToSession}\n  onNewSession={handleNewSession}\n/>\n```\n\n## Agent System\n\n### Supported Agents\n\n| Agent | Type Key | Mode Options |\n|-------|----------|--------------|\n| Claude Code | `claudecode` | `default`, `acceptEdits`, `plan`, `bypassPermissions`, `dontAsk` |\n| Codex | `codex` | Default settings with optional wire API |\n| Cursor | `cursor` | Default mode |\n| Gemini | `gemini` | Default mode |\n| Qoder | `qoder` | Default mode |\n| OpenCode | `opencode` | Default mode |\n| iFlow | `iflow` | Default mode |\n\n### Agent Configuration\n\nAgents are configured per project in `config.toml`:\n\n```toml\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n### Adding New Agents\n\nThe architecture follows a plugin pattern for extensibility. To add a new agent:\n\n1. Create `agent/newagent/newagent.go`\n2. Implement `core.Agent` and `core.AgentSession` interfaces\n3. Register in `init()`: `core.RegisterAgent(\"newagent\", factory)`\n4. Create `cmd/cc-connect/plugin_agent_newagent.go` with `//go:build` tag\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n## Platform System\n\n### Supported Platforms\n\n| Platform | Key | Configuration Method |\n|----------|-----|---------------------|\n| Feishu | `feishu` | QR code setup or manual credentials |\n| WeChat Work | `wecom` | Manual credentials |\n| Telegram | `telegram` | Manual credentials |\n| Discord | `discord` | Manual credentials |\n| Slack | `slack` | Manual credentials |\n| DingTalk | `dingtalk` | Manual credentials |\n| WeChat | `weixin` | QR code setup |\n| QQ | `qq` | Manual credentials |\n\n### Platform Setup Flow\n\n```mermaid\ngraph TD\n    A[Add Platform] --> B{Is QR Platform?}\n    B -->|Yes| C[Show QR Code]\n    B -->|No| D{Has Manual Form?}\n    D -->|Yes| E[Platform Manual Form]\n    D -->|No| F[Manual Config Hint]\n    C --> G[Complete]\n    E --> G\n    G --> H[Restart Required Modal]\n    H --> I[Restart Service]\n```\n\nPlatform setup is handled dynamically in the UI:\n\n```tsx\n// ProjectDetail.tsx:85\n(addPlatType) ? (\n  <PlatformSetupQR\n    platformType={addPlatType as 'feishu' | 'weixin'}\n    projectName={name!}\n    onComplete={() => {\n      setShowAddPlatform(false);\n      setShowRestartModal(true);\n    }}\n    onCancel={() => setAddPlatType('')}\n  />\n) : platformMeta[addPlatType] ? (\n  <PlatformManualForm\n    platformType={addPlatType}\n    projectName={name!}\n    onComplete={() => {\n      setShowAddPlatform(false);\n      setShowRestartModal(true);\n    }}\n    onCancel={() => setAddPlatType('')}\n  />\n) : (\n  <div>\n    <p>{t('setup.manualHint', 'For {{platform}}, please configure credentials in config.toml')}</p>\n  </div>\n)\n```\n\n### Adding New Platforms\n\nNew platforms follow the same plugin architecture:\n\n1. Create `platform/newplatform/newplatform.go`\n2. Implement `core.Platform` interface\n3. Register in `init()`: `core.RegisterPlatform(\"newplatform\", factory)`\n4. Add `//go:build !no_newplatform` tag in plugin file\n5. Add platform to `ALL_PLATFORMS` in Makefile\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n## Web API Client\n\nThe frontend communicates with the backend via a typed API client:\n\n```typescript\n// client.ts:25\nexport class ApiClient {\n  async request<T>(method: string, path: string, body?: any, params?: Record<string, string>): Promise<T> {\n    const h: HeadersInit = {};\n    if (this.token) h['Authorization'] = `Bearer ${this.token}`;\n    const res = await fetch(`${API_BASE}${path}`, { method, headers: h, body, params });\n    // ...\n  }\n\n  get<T>(path: string, params?: Record<string, string>) { return this.request<T>('GET', path, undefined, params); }\n  post<T>(path: string, body?: any) { return this.request<T>('POST', path, body); }\n  put<T>(path: string, body?: any) { return this.request<T>('PUT', path, body); }\n  delete<T>(path: string) { return this.request<T>('DELETE', path); }\n}\n```\n\n资料来源：[web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n\n## Provider System\n\nGlobal providers allow centralized API key management for multiple projects:\n\n```mermaid\ngraph TD\n    subgraph \"Global Providers\"\n        P1[Provider: anthropic]\n        P2[Provider: openai]\n        P3[Provider: google]\n    end\n\n    subgraph \"Projects\"\n        PRJ1[my-project]\n        PRJ2[work-project]\n        PRJ3[test-project]\n    end\n\n    P1 --> PRJ1\n    P1 --> PRJ2\n    P2 --> PRJ2\n    P2 --> PRJ3\n    P3 --> PRJ3\n```\n\nProvider configurations include base URL, default model, model lists, and thinking settings:\n\n```tsx\n// ProviderList.tsx:150\n{\n  label: t('globalProviders.form.thinking'),\n  type: 'select',\n  value: form.thinking || '',\n  options: [\n    { value: '', label: t('globalProviders.form.thinkingDefault') },\n    { value: 'enabled', label: 'enabled' },\n    { value: 'disabled', label: 'disabled' },\n  ]\n}\n```\n\n## Cron Scheduling\n\nThe system supports scheduled tasks for automated workflows:\n\n```bash\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Collect GitHub trending data\" --desc \"Daily Trending\"\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --desc \"Disk usage check\"\n```\n\nAvailable cron options:\n\n| Option | Description |\n|--------|-------------|\n| `-p, --project` | Target project name |\n| `-s, --session-key` | Target session key |\n| `-c, --cron` | Cron expression |\n| `--prompt` | Task prompt (runs through agent) |\n| `--exec` | Shell command (runs directly) |\n| `--desc` | Short description |\n| `--session-mode` | `reuse` (default) or `new-per-run` |\n| `--timeout-mins` | Max minutes per run (default: 30) |\n\n资料来源：[cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n\n## Configuration Structure\n\nThe system uses TOML configuration with the following precedence:\n\n1. `-config <path>` flag (explicit)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\n```toml\n# Optional global settings\n# language = \"en\"  # \"en\", \"zh\", or \"\" (auto-detect)\n\n[log]\nlevel = \"info\"  # debug, info, warn, error\n\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Data Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Platform as Messaging Platform\n    participant Bridge as Bridge Manager\n    participant Engine as Engine\n    participant Relay as Relay Handler\n    participant Agent as AI Agent\n\n    User->>Platform: Send message\n    Platform->>Bridge: WebSocket event\n    Bridge->>Engine: Process message\n    Engine->>Relay: Route to agent\n    Relay->>Agent: Format & forward\n    Agent->>Relay: Generate response\n    Relay->>Engine: Process response\n    Engine->>Bridge: Route response\n    Bridge->>Platform: Send reply\n    Platform->>User: Display message\n```\n\n## Extension Points\n\n### Disabling Features\n\nBuild tags allow excluding specific platforms or agents:\n\n```\nno_gemini, no_iflow, no_opencode, no_qoder, no_feishu, no_telegram,\nno_discord, no_slack, no_dingtalk, no_wecom, no_weixin, no_qq, no_line, no_weibo\n```\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n### Build Requirements\n\nThe pre-commit checklist ensures code quality:\n\n1. **Build passes**: `go build ./...`\n2. **Tests pass**: `go test ./...`\n3. **No new hardcoded platform/agent names in core**\n4. **i18n complete**: all new user-facing strings have translations\n5. **No secrets in code**: no API keys in source files\n\n---\n\n<a id='page-core-components'></a>\n\n## Core Components\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Configuration Guide](#page-configuration)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n- [cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n- [web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n</details>\n\n# Core Components\n\nThe cc-connect project is structured around a layered architecture consisting of a Go-based core backend and a React-based web interface. The core components provide the essential infrastructure for agent management, message handling, internationalization, and scheduled task execution.\n\n## Architecture Overview\n\nThe system follows a modular plugin-based architecture where core interfaces define contracts for platforms and agents.\n\n```mermaid\ngraph TD\n    A[User/CLI] --> B[Web UI or CLI]\n    B --> C[Core Backend API]\n    C --> D[Agent Plugins]\n    C --> E[Platform Plugins]\n    F[Config File] --> C\n    G[i18n] --> B\n```\n\n## Internationalization System\n\nThe internationalization (i18n) subsystem in `core/i18n.go` provides multi-language support for all user-facing messages.\n\n### Supported Languages\n\n| Language Code | Description |\n|---------------|-------------|\n| `LangEnglish` | English (default) |\n| `LangChinese` | Simplified Chinese |\n| `LangTraditionalChinese` | Traditional Chinese |\n| `LangJapanese` | Japanese |\n| `LangSpanish` | Spanish |\n\n资料来源：[core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n\n### Message Structure\n\nMessages are defined using a `MessageMap` type that maps language codes to translated strings:\n\n```go\nMsgProviderSwitchHint: {\n    LangEnglish:            \"`/provider switch <name>` to switch | `/provider clear` to reset\",\n    LangChinese:            \"`/provider switch <名称>` 切换 | `/provider clear` 清除\",\n    LangTraditionalChinese: \"`/provider switch <名稱>` 切換 | `/provider clear` 清除\",\n    LangJapanese:           \"`/provider switch <名前>` で切り替え | `/provider clear` でリセット\",\n    LangSpanish:            \"`/provider switch <nombre>` para cambiar | `/provider clear` para restablecer\",\n},\n```\n\nThe system includes messages for:\n- Provider management (switching, listing, errors)\n- Session management\n- Command execution feedback\n- Error handling\n\n资料来源：[core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n\n## API Client\n\nThe web interface communicates with the backend through `web/src/api/client.ts`, which provides a typed REST client.\n\n### ApiClient Methods\n\n| Method | Description |\n|--------|-------------|\n| `get<T>(path, params?)` | GET request with optional query parameters |\n| `post<T>(path, body?)` | POST request with JSON body |\n| `put<T>(path, body?)` | PUT request |\n| `patch<T>(path, body?)` | PATCH request |\n| `delete<T>(path)` | DELETE request |\n| `raw(path)` | Fetch raw text (non-JSON) response |\n\n资料来源：[web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n\n### Error Handling\n\n```typescript\nexport class ApiError extends Error {\n  constructor(message: string, public status: number) {\n    super(message);\n    this.name = 'ApiError';\n  }\n}\n```\n\nThe client handles:\n- JSON response parsing\n- 401 Unauthorized with callback notification\n- Generic HTTP error propagation\n\n## Agent Architecture\n\nAgents are implemented as plugins following a defined interface. The `AGENTS.md` documentation outlines the agent system design.\n\n### Adding a New Agent\n\n1. Create `agent/newagent/newagent.go`\n2. Implement `core.Agent` and `core.AgentSession` interfaces\n3. Register in `init()`: `core.RegisterAgent(\"newagent\", factory)`\n4. Create plugin file with `//go:build !no_newagent` tag\n5. Add to `ALL_AGATFORMS` in `Makefile`\n6. Add unit tests\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n### Supported Agent Types\n\nBased on the configuration structure, the following agent types are supported:\n\n| Agent Type | Description |\n|------------|-------------|\n| `claudecode` | Claude Code agent |\n| `codex` | OpenAI Codex |\n| `cursor` | Cursor AI |\n| `gemini` | Google Gemini |\n| `qoder` | Qoder agent |\n| `opencode` | OpenCode |\n| `iflow` | IFlow agent |\n\n### Agent Modes\n\n| Mode | Purpose |\n|------|---------|\n| `default` | Standard operation with user prompts |\n| `acceptEdits` | Accept edits automatically |\n| `plan` | Plan-only mode |\n| `bypassPermissions` | Bypass permission checks (yolo mode) |\n| `dontAsk` | No confirmation prompts |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n## Provider System\n\nProviders manage API credentials and configuration for LLM services. The provider system is managed through the web interface in `web/src/pages/Providers/ProviderList.tsx`.\n\n### Provider Configuration\n\nProviders include:\n- **Name**: Unique identifier\n- **Base URL**: API endpoint\n- **Model**: Default model\n- **Models**: Available models array\n- **Thinking**: Thinking mode (`enabled`, `disabled`, or default)\n- **Agent Types**: Supported agent types\n\n```typescript\ninterface GlobalProvider {\n  name: string;\n  base_url?: string;\n  model?: string;\n  models?: string[];\n  thinking?: string;\n  agent_types?: string[];\n}\n```\n\n### Thinking Configuration\n\nThe thinking setting can be configured per-provider:\n\n| Value | Behavior |\n|-------|----------|\n| `\"\"` (empty) | Use default thinking behavior |\n| `enabled` | Force thinking enabled |\n| `disabled` | Force thinking disabled |\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n\n## Scheduled Tasks (Cron)\n\nThe cron subsystem in `cmd/cc-connect/cron.go` enables scheduled task execution.\n\n### Cron Command Options\n\n| Option | Description |\n|--------|-------------|\n| `-p, --project` | Target project name |\n| `-s, --session-key` | Target session key |\n| `-c, --cron` | Cron expression (e.g., \"0 6 * * *\") |\n| `--prompt` | Task prompt (runs through agent) |\n| `--exec` | Shell command (runs directly) |\n| `--desc` | Short description |\n| `--session-mode` | `reuse` (default) or `new-per-run` |\n| `--timeout-mins` | Max minutes per run (0 = no limit, default 30) |\n| `--data-dir` | Data directory (default: ~/.cc-connect) |\n\n### Cron Expression Format\n\nStandard 5-field cron format:\n```\n<min> <hour> <day> <month> <weekday>\n```\n\n### Session Modes\n\n| Mode | Behavior |\n|------|----------|\n| `reuse` | Reuse the same agent session across runs (default) |\n| `new-per-run` | Create fresh agent session for each run |\n\n### Examples\n\n```bash\n# Daily task at 6 AM\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Collect GitHub trending data\" --desc \"Daily Trending\"\n\n# Every 30 minutes\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --desc \"Disk usage check\"\n```\n\n资料来源：[cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n\n## Project Management\n\nProjects connect code folders to messaging platforms. Each project configuration includes:\n\n```toml\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"  # or \"codex\", \"cursor\", \"gemini\", etc.\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n### Project Features\n\n| Feature | Description |\n|---------|-------------|\n| Sessions | Multiple concurrent conversation sessions |\n| Heartbeat | Periodic health checks |\n| Platform Bridge | Connection to messaging platforms |\n| Skills | Attached skill configurations |\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectList.tsx)\n\n## Skill System\n\nSkills extend agent capabilities through a plugin-like configuration system.\n\n### Skill Types\n\n- **Local Skills**: Project-specific skills defined in local directories\n- **Recommended Skills**: Preset skill configurations\n\n### Skill Configuration\n\nEach skill includes:\n- `name`: Skill identifier\n- `display_name`: Human-readable name\n- `description`: Skill purpose\n- `source`: Skill origin/path\n\n### Scan Directories\n\nProjects can define scan directories for discovering skills:\n\n```typescript\ninterface ProjectSkills {\n  project: string;\n  agent_type: string;\n  skills?: Skill[];\n  dirs?: string[];  // Scan directories\n}\n```\n\n资料来源：[web/src/pages/Skills/SkillList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Skills/SkillList.tsx)\n\n## Configuration\n\nThe system uses TOML configuration files, searching in this order:\n\n1. `-config <path>` flag (explicit path)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\nIf no config exists, `cc-connect` auto-creates a starter template at `~/.cc-connect/config.toml`.\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Web Interface Structure\n\nThe React web interface is organized by functional areas:\n\n| Path | Component | Purpose |\n|------|-----------|---------|\n| `/pages/Chat/ChatView.tsx` | ChatView | Main chat interface |\n| `/pages/Sessions/SessionList.tsx` | SessionList | Session management |\n| `/pages/Sessions/SessionChat.tsx` | SessionChat | Individual session view |\n| `/pages/Projects/ProjectList.tsx` | ProjectList | Project management |\n| `/pages/Projects/ProjectDetail.tsx` | ProjectDetail | Project configuration |\n| `/pages/Providers/ProviderList.tsx` | ProviderList | Provider management |\n| `/pages/Skills/SkillList.tsx` | SkillList | Skill management |\n\n### Bridge Connection Status\n\nThe UI displays connection status indicators:\n\n| Status | UI Treatment |\n|--------|--------------|\n| `error` | Amber warning with WifiOff icon |\n| `connecting` | Gray loading spinner with \"Connecting...\" |\n| `connected` | Hidden (normal operation) |\n\n资料来源：[web/src/pages/Chat/ChatView.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Chat/ChatView.tsx)\n\n---\n\n<a id='page-agent-integrations'></a>\n\n## Agent Integrations\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Platform Integrations](#page-platform-integrations)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [agent/claudecode/claudecode.go](https://github.com/chenhg5/cc-connect/blob/main/agent/claudecode/claudecode.go)\n- [agent/codex/codex.go](https://github.com/chenhg5/cc-connect/blob/main/agent/codex/codex.go)\n- [agent/cursor/cursor.go](https://github.com/chenhg5/cc-connect/blob/main/agent/cursor/cursor.go)\n- [agent/gemini/gemini.go](https://github.com/chenhg5/cc-connect/blob/main/agent/gemini/gemini.go)\n- [agent/kimi/kimi.go](https://github.com/chenhg5/cc-connect/blob/main/agent/kimi/kimi.go)\n- [agent/acp/agent.go](https://github.com/chenhg5/cc-connect/blob/main/agent/acp/agent.go)\n- [core/interfaces.go](https://github.com/chenhg5/cc-connect/blob/main/core/interfaces.go)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n</details>\n\n# Agent Integrations\n\n## Overview\n\nAgent Integrations in CC-Connect provide a unified abstraction layer for connecting to various AI agent backends. The system supports multiple agent providers including Claude Code, OpenAI Codex, Cursor, Gemini, and Kimi, allowing projects to utilize different AI capabilities through a consistent interface.\n\n## Architecture\n\nThe agent integration system follows a plugin-style architecture where each agent implementation conforms to a common interface defined in `core/interfaces.go`. This design enables runtime provider switching and consistent interaction patterns across all supported agents.\n\n```mermaid\ngraph TD\n    A[User/Project] --> B[CC-Connect Core]\n    B --> C[Agent Interface]\n    C --> D[Claude Code Agent]\n    C --> E[Codex Agent]\n    C --> F[Cursor Agent]\n    C --> G[Gemini Agent]\n    C --> H[Kimi Agent]\n    C --> I[ACP Agent]\n    \n    J[Provider Config] --> B\n    K[Platform Integration] --> B\n```\n\n## Supported Agent Types\n\nThe system currently supports the following agent backends:\n\n| Agent Type | Source File | Description |\n|------------|-------------|-------------|\n| claude | `agent/claudecode/claudecode.go` | Anthropic Claude Code integration |\n| codex | `agent/codex/codex.go` | OpenAI Codex integration |\n| cursor | `agent/cursor/cursor.go` | Cursor AI agent |\n| gemini | `agent/gemini/gemini.go` | Google Gemini agent |\n| kimi | `agent/kimi/kimi.go` | Kimi AI agent |\n| acp | `agent/acp/agent.go` | Custom ACP agent protocol |\n\n## Core Interface Definition\n\nEach agent must implement the `Agent` interface defined in `core/interfaces.go`. The interface specifies the contract for agent lifecycle management, message handling, and capability reporting.\n\n资料来源：[core/interfaces.go](https://github.com/chenhg5/cc-connect/blob/main/core/interfaces.go)\n\n## Agent Configuration\n\n### Agent Type Selection\n\nProjects specify their agent type through the `agent_type` field. This selection determines which agent backend will be used for processing requests.\n\n```tsx\n<select\n  value={selectedAgentType}\n  onChange={(e) => setSelectedAgentType(e.target.value)}\n>\n  {agentTypes.map(a => <option key={a} value={a}>{a}</option>)}\n</select>\n```\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n### Thinking Mode\n\nAgents support a configurable thinking mode that controls how the AI processes requests:\n\n| Mode | Description |\n|------|-------------|\n| `enabled` | Full thinking/reasoning enabled |\n| `disabled` | Thinking disabled |\n| Default (empty) | Uses provider-level or system default |\n\n```tsx\n<select value={form.thinking || ''} onChange={e => set('thinking', e.target.value)}>\n  <option value=\"\">{t('globalProviders.form.thinkingDefault')}</option>\n  <option value=\"enabled\">enabled</option>\n  <option value=\"disabled\">disabled</option>\n</select>\n```\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n\n### Permission Modes\n\nThe system supports granular permission control for agent operations:\n\n| Mode | Behavior |\n|------|----------|\n| `default` | Standard permission checks |\n| `acceptEdits` | Automatically accept code edits |\n| `plan` | Only generate execution plans |\n| `bypassPermissions` | Skip all permission checks |\n| `dontAsk` | Never prompt for confirmation |\n\n```tsx\n<select value={agentMode}>\n  <option value=\"default\">default</option>\n  <option value=\"acceptEdits\">acceptEdits (edit)</option>\n  <option value=\"plan\">plan</option>\n  <option value=\"bypassPermissions\">bypassPermissions (yolo)</option>\n  <option value=\"dontAsk\">dontAsk</option>\n</select>\n```\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n## Provider-Agent Relationship\n\nProviders define which agent types they support through the `agent_types` configuration array:\n\n```tsx\n{p.agent_types && p.agent_types.length > 0 && (\n  <div className=\"mt-2 flex flex-wrap gap-1\">\n    {p.agent_types.map(a => (\n      <Badge key={a} variant=\"info\" className=\"text-xs\">{a}</Badge>\n    ))}\n  </div>\n)}\n```\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n\n## Project Agent Assignment\n\nEach project is associated with a specific agent type and can be configured with custom agent settings:\n\n```tsx\n<div>\n  <label>{t('projects.agentType', 'Agent type')}</label>\n  <select value={selectedAgentType} onChange={(e) => setSelectedAgentType(e.target.value)}>\n    {agentTypes.map(a => <option key={a} value={a}>{a}</option>)}\n    {selectedAgentType && !agentTypes.includes(selectedAgentType) && (\n      <option value={selectedAgentType}>{selectedAgentType}</option>\n    )}\n  </select>\n  {selectedAgentType !== project.agent_type && (\n    <p className=\"text-[11px] text-amber-500\">\n      {t('projects.agentTypeChangeHint', 'Changing agent type requires restart. Incompatible providers will be removed.')}\n    </p>\n  )}\n</div>\n```\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n## Workflow: Agent Selection and Switching\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant UI as Web Interface\n    participant Core as CC-Connect Core\n    participant Provider as Provider Manager\n    participant Agent as Agent Backend\n    \n    User->>UI: Select Project\n    UI->>Core: Fetch Project Config\n    Core->>UI: Return Project with agent_type\n    User->>UI: Change Agent Type\n    UI->>Core: Update Project agent_type\n    Core->>Provider: Validate Provider Compatibility\n    Provider-->>Core: Return Compatible Providers\n    Core-->>UI: Confirm Configuration\n```\n\n## Data Flow\n\nWhen a message is processed through an agent integration:\n\n1. **Input**: User message received via platform (WeChat, Slack, etc.)\n2. **Routing**: Message routed to appropriate project based on session\n3. **Agent Selection**: Project's `agent_type` determines agent backend\n4. **Provider Selection**: Associated provider configuration loaded\n5. **Processing**: Agent backend processes request with provider credentials\n6. **Response**: Agent response returned through platform integration\n\n## Session Management\n\nSessions track the active agent context:\n\n```tsx\n<div className=\"flex items-center gap-1.5 min-w-0\">\n  <MessageSquare size={14} className={s.live ? 'text-accent shrink-0' : 'text-gray-400 shrink-0'} />\n  <span className=\"text-sm font-medium truncate\">\n    {s.name || s.user_name || s.id.slice(0, 8)}\n  </span>\n  {s.live && <Circle size={5} className=\"fill-emerald-500 text-emerald-500 shrink-0\" />}\n</div>\n```\n\n资料来源：[web/src/pages/Sessions/SessionList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Sessions/SessionList.tsx)\n\n## Configuration File Structure\n\nAgent integrations are configured through `config.toml` or via the admin interface:\n\n```toml\n[[agents]]\nname = \"my-project\"\nagent_type = \"claude\"\nthinking = \"enabled\"\n\n[[providers]]\nname = \"anthropic\"\nbase_url = \"https://api.anthropic.com\"\nmodels = [\"claude-sonnet-4-20250514\"]\n```\n\n## Best Practices\n\n1. **Provider Compatibility**: When changing agent types, verify the new type is supported by your configured provider\n2. **Permission Mode**: Use `bypassPermissions` only in controlled environments\n3. **Thinking Mode**: Enable thinking for complex reasoning tasks; disable for simple operations to reduce latency\n4. **Session Persistence**: Active sessions maintain agent context across multiple interactions\n\n---\n\n<a id='page-platform-integrations'></a>\n\n## Platform Integrations\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Agent Integrations](#page-agent-integrations)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n- [core/markdown_html_test.go](https://github.com/chenhg5/cc-connect/blob/main/core/markdown_html_test.go)\n- [web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [web/src/pages/Skills/SkillList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Skills/SkillList.tsx)\n- [web/src/pages/Sessions/SessionList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Sessions/SessionList.tsx)\n- [web/src/pages/Projects/ProjectList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectList.tsx)\n</details>\n\n# Platform Integrations\n\n## Overview\n\nPlatform Integrations in cc-connect enable AI agents to connect and communicate across multiple messaging and collaboration platforms. The system acts as a unified bridge, allowing a single AI agent to serve users on different platforms simultaneously without requiring separate deployments.\n\n## Architecture Overview\n\nThe platform integration system follows a plugin-based architecture where each messaging platform is implemented as a separate module conforming to a common `Platform` interface.\n\n```mermaid\ngraph TD\n    A[User] -->|Message| B[Platform Adapter]\n    B --> C[Core Agent]\n    C -->|Response| B\n    B -->|Deliver| A\n    \n    D[Telegram] --> B\n    E[Slack] --> B\n    F[Discord] --> B\n    G[DingTalk] --> B\n    H[WeChat] --> B\n    I[Feishu] --> B\n    J[WeCom] --> B\n    K[QQ] --> B\n    L[LINE] --> B\n    M[Weibo] --> B\n```\n\n## Supported Platforms\n\ncc-connect supports the following messaging platforms:\n\n| Platform | Connection Type | Public IP Required | Build Tag |\n|----------|----------------|-------------------|-----------|\n| Telegram | Long Polling | No | `no_telegram` |\n| Slack | Socket Mode (WebSocket) | No | `no_slack` |\n| Discord | Webhook/Long Polling | No | `no_discord` |\n| DingTalk | Webhook | Yes | `no_dingtalk` |\n| WeChat (Weixin) | Various | Varies | `no_weixin` |\n| Feishu (Lark) | Webhook | Yes | `no_feishu` |\n| WeCom | Webhook | Yes | `no_wecom` |\n| QQ | Bot Protocol | No | `no_qq` |\n| LINE | Webhook | Yes | `no_line` |\n| Weibo | Webhook | Yes | `no_weibo` |\n\n资料来源：[AGENTS.md:1]()\n\n## Platform Configuration\n\n### Configuration Structure\n\nEach platform is configured within the `[[projects.platforms]]` section of `config.toml`:\n\n```toml\n[[projects.platforms]]\ntype = \"telegram\"  # Platform type identifier\n\n[projects.platforms.options]\ntoken = \"1234567890:ABCdefGHIjklMNOpqrsTUVwxyz\"\n```\n\n### Project-Level Platform Assignment\n\nProjects can specify which platforms they utilize through the `platforms` field:\n\n```typescript\ninterface Project {\n  name: string;\n  agent_type: string;\n  platforms?: string[];  // e.g., [\"telegram\", \"slack\"]\n  heartbeat_enabled?: boolean;\n  sessions_count?: number;\n}\n```\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx:1-15]()\n\n## Adding a New Platform\n\nThe platform integration system is designed for extensibility. New platforms can be added by following this checklist:\n\n1. **Create Platform Module**: Create `platform/newplatform/newplatform.go`\n2. **Implement Interface**: Implement the `core.Platform` interface (and optional interfaces as needed)\n3. **Register Platform**: Register in `init()`: `core.RegisterPlatform(\"newplatform\", factory)`\n4. **Create Build Plugin**: Create `cmd/cc-connect/plugin_platform_newplatform.go` with `//go:build !no_newplatform` tag\n5. **Update Build System**: Add `newplatform` to `ALL_PLATFORMS` in `Makefile`\n6. **Document Configuration**: Add config example in `config.example.toml`\n7. **Add Tests**: Add unit tests for the platform module\n\n资料来源：[AGENTS.md:15-23]()\n\n## Connection Methods\n\n### Long Polling\n\nSome platforms (like Telegram) use long polling, where the client repeatedly requests new messages from the platform's API:\n\n```mermaid\nsequenceDiagram\n    Client->>Platform API: GET /updates (long poll)\n    Platform API-->>Client: Messages (or timeout)\n    Client->>Platform API: GET /updates (long poll)\n```\n\n### Webhook\n\nOther platforms require a publicly accessible webhook endpoint:\n\n```mermaid\nsequenceDiagram\n    Platform->>CC-Connect: POST /webhook/{platform}\n    CC-Connect->>Platform: 200 OK\n    CC-Connect->>Core: Process Message\n    Core-->>Platform: Response\n```\n\n## Platform-Specific Features\n\n### Telegram\n\nTelegram uses long polling, eliminating the need for a public IP address. Setup requires:\n\n1. Create a bot via @BotFather\n2. Obtain the bot token\n3. Configure in `config.toml`\n\n资料来源：[INSTALL.md:1-30]()\n\n### Slack\n\nSlack uses Socket Mode (WebSocket) for receiving events, which does not require a public IP:\n\n1. Enable Socket Mode in app settings\n2. Generate App-Level Token (`xapp-...`)\n3. Subscribe to bot events: `message.im`, `app_mention`\n4. Configure required Bot Token Scopes\n\n资料来源：[INSTALL.md:40-55]()\n\n## Build Tags and Platform Exclusion\n\nPlatform integrations can be excluded at compile time using build tags:\n\n| Tag | Platform Excluded |\n|-----|------------------|\n| `no_telegram` | Telegram |\n| `no_slack` | Slack |\n| `no_discord` | Discord |\n| `no_dingtalk` | DingTalk |\n| `no_weixin` | WeChat/Weixin |\n| `no_feishu` | Feishu/Lark |\n| `no_wecom` | WeCom |\n| `no_qq` | QQ |\n| `no_line` | LINE |\n| `no_weibo` | Weibo |\n\nBuild tags are listed in `AGENTS.md`:\n\n> `no_gemini`, `no_iflow`, `no_opencode`, `no_qoder`, `no_feishu`, `no_telegram`, `no_discord`, `no_slack`, `no_dingtalk`, `no_wecom`, `no_weixin`, `no_qq`, `no_qqbot`, `no_line`, `no_weibo`.\n\n资料来源：[AGENTS.md:1-3]()\n\n## Pre-Commit Checklist\n\nWhen adding platform integrations, ensure compliance with:\n\n1. **Build passes**: `go build ./...`\n2. **Tests pass**: `go test ./...`\n3. **No new hardcoded platform/agent names in core**: `grep` for platform names in `core/*.go`\n4. **i18n complete**: All new user-facing strings have translations for all languages\n5. **No secrets in code**: No API keys, tokens, or credentials in source files\n\n资料来源：[AGENTS.md:5-11]()\n\n## Web Interface Management\n\nThe cc-connect admin web interface (CC-Connect Admin) provides UI components for managing platform-related settings:\n\n### Project Platform Assignment\n\nProjects can be assigned multiple platforms through the web UI:\n\n```tsx\n<div className=\"flex flex-wrap gap-1.5 mb-3\">\n  <Badge variant=\"info\">{p.agent_type}</Badge>\n  {p.platforms?.slice(0, 3).map((pl) => <Badge key={pl}>{pl}</Badge>)}\n  {(p.platforms?.length ?? 0) > 3 && (\n    <Badge>+{p.platforms!.length - 3}</Badge>\n  )}\n</div>\n```\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx:1-10]()\n\n### Provider Thinking Configuration\n\nPlatform providers can have thinking modes configured per-agent:\n\n```tsx\n{p.thinking && (\n  <p className=\"mt-1.5 text-xs text-amber-600 dark:text-amber-400\">\n    thinking: {p.thinking}\n  </p>\n)}\n```\n\nSupported thinking modes:\n- `enabled` - Thinking explicitly enabled\n- `disabled` - Thinking explicitly disabled\n- `\"\"` (empty) - Use default setting\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:1-10]()\n\n## Message Processing Flow\n\n```mermaid\ngraph LR\n    A[Incoming Message] --> B[Platform Adapter]\n    B --> C{Message Type?}\n    C -->|Text| D[Parse Intent]\n    C -->|Command| E[Handle Command]\n    C -->|Media| F[Process Attachment]\n    D --> G[Agent Processing]\n    E --> G\n    F --> G\n    G --> H[Response Generation]\n    H --> I[Markdown Rendering]\n    I --> J[HTML Sanitization]\n    J --> K[Platform Delivery]\n    K --> L[End User]\n```\n\n## Internationalization\n\nAll platform-related user-facing messages support multiple languages:\n\n| Language | Code |\n|----------|------|\n| English | `en` |\n| Chinese (Simplified) | `zh` |\n| Chinese (Traditional) | `zh-TW` |\n| Japanese | `ja` |\n| Spanish | `es` |\n\nProvider-related messages include:\n\n- `MsgProviderSwitchHint`: Command hints for switching providers\n- `MsgProviderNotFound`: Error when provider doesn't exist\n- `MsgProviderSwitched`: Confirmation when provider changes\n\n资料来源：[core/i18n.go:1-30]()\n\n## Session Management\n\nSessions are tracked per-platform with metadata:\n\n```typescript\ninterface Session {\n  id: string;\n  name?: string;\n  user_name?: string;\n  live?: boolean;\n  updated_at?: string;\n  created_at?: string;\n  last_message?: {\n    role: 'user' | 'bot';\n    content: string;\n  };\n}\n```\n\n资料来源：[web/src/pages/Sessions/SessionList.tsx:1-20]()\n\n## Markdown to HTML Rendering\n\nPlatform integrations utilize the `MarkdownToSimpleHTML` function for rendering agent responses:\n\n```go\nfunc MarkdownToSimpleHTML(md string) string\n```\n\nFeatures supported:\n- Code blocks with language syntax (`<pre><code class=\"language-go\">`)\n- Links (`<a href=\"...\">`)\n- Headings converted to bold (`<b>`)\n- Blockquotes (`<blockquote>`)\n- HTML escaping for special characters (`&lt;`, `&gt;`, `&amp;`)\n\n资料来源：[core/markdown_html_test.go:1-40]()\n\n## Summary\n\nPlatform Integrations in cc-connect provide a unified, extensible system for connecting AI agents to multiple messaging platforms. The architecture emphasizes:\n\n- **Modularity**: Each platform is a separate plugin\n- **Flexibility**: Multiple connection methods (webhook, long polling, WebSocket)\n- **Security**: Build tags allow excluding platforms\n- **Internationalization**: Full multi-language support\n- **Web Management**: Admin UI for platform configuration\n\n---\n\n<a id='page-configuration'></a>\n\n## Configuration Guide\n\n### 相关页面\n\n相关主题：[Session Management](#page-session-management), [Web UI Administration](#page-web-ui)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [config/config.go](https://github.com/chenhg5/cc-connect/blob/main/config/config.go)\n- [config.example.toml](https://github.com/chenhg5/cc-connect/blob/main/config.example.toml)\n- [core/provider_presets.go](https://github.com/chenhg5/cc-connect/blob/main/core/provider_presets.go)\n- [core/skill_presets.go](https://github.com/chenhg5/cc-connect/blob/main/core/skill_presets.go)\n- [web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n</details>\n\n# Configuration Guide\n\n## Overview\n\nThe cc-connect configuration system provides a flexible, multi-layered approach to managing AI provider settings, project configurations, and skill definitions. This guide covers all configuration aspects including global providers, project-specific settings, and skill presets.\n\n## Configuration Architecture\n\nThe system uses a hierarchical configuration model with three primary layers:\n\n```mermaid\ngraph TD\n    A[config.toml - Global Config] --> B[Project-level Settings]\n    B --> C[Provider Configuration]\n    C --> D[Model & API Settings]\n    \n    E[Skill Presets] -.-> B\n    F[Provider Presets] -.-> C\n```\n\n## Global Configuration\n\nGlobal settings are managed through `config.toml` located in the application root directory. This file contains default providers and system-wide settings that apply across all projects.\n\n### Provider Configuration\n\nProviders define the API endpoints and models used by agents. Each provider can be configured with multiple models and supports various agent types.\n\n| Parameter | Type | Description | Required |\n|-----------|------|-------------|----------|\n| `name` | string | Unique provider identifier | Yes |\n| `base_url` | string | API endpoint URL | Yes |\n| `model` | string | Default model name | Yes |\n| `models` | array | List of available models | No |\n| `thinking` | string | Thinking mode: `enabled`, `disabled`, or empty for default | No |\n| `agent_type` | string | Associated agent type (e.g., `codex`, `claude`) | No |\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:1-50]()\n\n### Agent Types\n\nThe system supports multiple agent types with different capability profiles:\n\n| Agent Type | Description |\n|------------|-------------|\n| `codex` | Code-focused agent with extended capabilities |\n| `claude` | Anthropic Claude-based agent |\n| `default` | Standard agent configuration |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:1-30]()\n\n### Permission Modes\n\nAgents can operate in different permission modes controlling their operational boundaries:\n\n| Mode | Description |\n|------|-------------|\n| `default` | Standard permission level |\n| `acceptEdits` | Agent can directly edit files |\n| `plan` | Agent only plans, does not execute |\n| `bypassPermissions` | YOLO mode - skips permission checks |\n| `dontAsk` | No confirmation prompts |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:30-60]()\n\n## Provider Presets\n\nProvider presets provide pre-configured settings for common AI providers, sorted by pricing tier.\n\n### Tier System\n\nPresets are organized into tiers reflecting cost and capability levels:\n\n```mermaid\ngraph LR\n    A[Tier 1 - Premium] --> B[Tier 2 - Standard]\n    B --> C[Tier 3 - Budget]\n    C --> D[Tier 4 - Free/Local]\n```\n\n| Tier | Description | Example Providers |\n|------|-------------|-------------------|\n| 1 | Premium APIs | Claude, GPT-4 |\n| 2 | Standard APIs | GPT-3.5, Gemini Pro |\n| 3 | Budget APIs | Various open-source models |\n| 4 | Free/Local | Local deployments, free tiers |\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:80-120]()\n\n### Adding Providers from Presets\n\n```typescript\ninterface ProviderPreset {\n  name: string;\n  tier: number;\n  agent_types: string[];\n  models: string[];\n  thinking?: string;\n}\n```\n\nThe preset grid displays available presets sorted by tier. Existing provider names are filtered out using `Set<string>` to prevent duplicates.\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:100-150]()\n\n## Project Configuration\n\nEach project maintains its own configuration including agent type, working directory, and platform-specific settings.\n\n### Project Settings Structure\n\n| Setting | Type | Description |\n|---------|------|-------------|\n| `name` | string | Project identifier (alphanumeric, `-`, `_`) |\n| `agent_type` | string | Agent type for this project |\n| `work_dir` | string | Working directory path |\n| `platforms` | array | Enabled platforms |\n| `heartbeat_enabled` | boolean | Heartbeat monitoring status |\n| `show_ctx_indicator` | boolean | Context usage indicator |\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx:1-50]()\n\n### Heartbeat Configuration\n\nProjects can enable heartbeat monitoring with the following settings:\n\n| Parameter | Description |\n|-----------|-------------|\n| `interval_mins` | Monitoring interval in minutes |\n| `paused` | Whether heartbeat is paused |\n| `run_count` | Total heartbeat executions |\n| `error_count` | Number of errors encountered |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:200-250]()\n\n## Skill Presets\n\nSkill presets define collections of skills organized by project type and agent capability.\n\n### Skill Preset Structure\n\n```typescript\ninterface SkillPreset {\n  project: string;        // Project type identifier\n  agent_type: string;      // Required agent type\n  dirs?: string[];         // Scan directories for skills\n  skills?: Skill[];       // Associated skills\n}\n```\n\n| Field | Description |\n|-------|-------------|\n| `project` | Project category or type name |\n| `agent_type` | Compatible agent type |\n| `dirs` | Directories to scan for skill definitions |\n| `skills` | Pre-configured skill list |\n\n资料来源：[web/src/pages/Skills/SkillList.tsx:50-100]()\n\n### Skill Structure\n\n```typescript\ninterface Skill {\n  name: string;           // Skill identifier\n  display_name?: string;  // User-friendly name\n  description?: string;  // Skill description\n  source: {\n    url?: string;         // Source URL\n    name?: string;         // Provider name\n    provider?: string;     // Provider identifier\n  };\n  author?: string;        // Skill author\n  url?: string;           // Download URL\n}\n```\n\n资料来源：[web/src/pages/Skills/SkillList.tsx:100-150]()\n\n## CLI Configuration Commands\n\nThe command-line interface provides provider management commands:\n\n| Command | Description |\n|---------|-------------|\n| `/provider list` | List all configured providers |\n| `/provider switch <name>` | Switch active provider |\n| `/provider clear` | Reset provider selection |\n| `cc-connect provider add` | Add new provider via CLI |\n\n资料来源：[core/i18n.go:1-100]()\n\n### Provider Switching\n\nWhen switching providers, the system validates provider existence and updates the active configuration:\n\n```mermaid\nsequenceDiagram\n    User->>CLI: /provider switch <name>\n    CLI->>Config: Validate provider exists\n    Config-->>CLI: Provider found\n    CLI->>Config: Update active provider\n    Config-->>User: Provider switched to <name>\n```\n\n资料来源：[core/i18n.go:100-150]()\n\n## Configuration File Example\n\n```toml\n# Global Providers Section\n[providers.openai]\nbase_url = \"https://api.openai.com/v1\"\nmodel = \"gpt-4\"\nmodels = [\"gpt-4\", \"gpt-3.5-turbo\"]\n\n[providers.claude]\nbase_url = \"https://api.anthropic.com\"\nmodel = \"claude-3-sonnet-20240229\"\nthinking = \"enabled\"\n\n# Project-specific Configuration\n[project.my-project]\nagent_type = \"claude\"\nwork_dir = \"/path/to/project\"\nplatforms = [\"github\"]\n\n# Heartbeat Configuration\n[heartbeat.my-project]\ninterval_mins = 5\n```\n\n## Platform-Specific Settings\n\nDifferent platforms may require specific configuration:\n\n| Platform | Required Settings |\n|----------|------------------|\n| `github` | Repository access, authentication token |\n| `feishu` | App ID, App Secret, verification token |\n| `telegram` | Bot token, webhook URL |\n| `discord` | Bot token, guild ID |\n| `slack` | Bot token, signing secret |\n\n资料来源：[AGENTS.md:1-50]()\n\n## Build Tags for Platform Support\n\nPlatform support is controlled via Go build tags:\n\n```makefile\nALL_PLATFORMS = gemini iflow opencode qoder feishu telegram discord slack dingtalk wecom weixin qq qqbot line weibo\n```\n\nTo exclude specific platforms:\n\n```bash\ngo build -tags \"no_gemini,no_iflow\"\n```\n\n资料来源：[AGENTS.md:50-100]()\n\n## Best Practices\n\n1. **Provider Organization**: Use provider presets as templates and customize as needed\n2. **Project Isolation**: Each project should have its own working directory\n3. **Permission Mode**: Use `plan` mode for testing, `bypassPermissions` only when necessary\n4. **Heartbeat**: Enable for long-running projects to monitor agent health\n5. **i18n**: All user-facing strings should have translations for all supported languages\n\n## Summary\n\nThe cc-connect configuration system provides a comprehensive framework for managing AI providers, projects, and skills. By understanding the hierarchical relationship between global settings, project configurations, and skill presets, administrators can effectively customize the system for various use cases and platform requirements.\n\n---\n\n<a id='page-session-management'></a>\n\n## Session Management\n\n### 相关页面\n\n相关主题：[Configuration Guide](#page-configuration), [Core Components](#page-core-components)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [core/session.go](https://github.com/chenhg5/cc-connect/blob/main/core/session.go)\n- [core/projectstate.go](https://github.com/chenhg5/cc-connect/blob/main/core/projectstate.go)\n- [core/dir_history.go](https://github.com/chenhg5/cc-connect/blob/main/core/dir_history.go)\n- [core/cron.go](https://github.com/chenhg5/cc-connect/blob/main/core/cron.go)\n- [core/command.go](https://github.com/chenhg5/cc-connect/blob/main/core/command.go)\n- [cmd/cc-connect/sessions.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/sessions.go)\n</details>\n\n# Session Management\n\n## Overview\n\nSession Management is the core system responsible for maintaining conversational state between users and AI agents in cc-connect. Each session represents a single conversation context, preserving message history, working directory state, and agent configuration across interactions. The system enables users to switch between multiple concurrent conversations while maintaining isolation of context and state per session.\n\nSessions serve as the fundamental unit of work in cc-connect, allowing agents to maintain context across multiple requests, store conversation history, and provide seamless user experience through features like session switching, history retrieval, and live session indicators.\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    User[User] -->|Chat/CLI| WebUI[Web UI / CLI]\n    WebUI -->|Bridge| Bridge[Session Bridge]\n    Bridge -->|Manage| SessionMgr[Session Manager]\n    SessionMgr -->|Persist| Store[Session Store]\n    SessionMgr -->|Agent Comm| Agent[Agent Session]\n    Agent -->|Execute| CodeAgent[Claude Code / Codex / etc]\n    \n    SessionMgr -->|State| ProjectState[Project State]\n    SessionMgr -->|History| DirHistory[Directory History]\n    SessionMgr -->|Schedule| Cron[Cron Jobs]\n    \n    subgraph Per-Session\n        S1[Session 1]\n        S2[Session 2]\n        SN[Session N]\n    end\n    \n    SessionMgr -.->|Created| S1\n    SessionMgr -.->|Created| S2\n    SessionMgr -.->|Created| SN\n```\n\n## Session Data Model\n\n### Core Session Structure\n\n```go\ntype Session struct {\n    ID              string           // Unique session identifier\n    ProjectName     string           // Associated project\n    Name            string           // Display name\n    UserName        string           // Creator identifier\n    ActiveSessionKeys []string       // Active session references\n    Live            bool             // Currently active/in-use\n    CreatedAt       time.Time        // Creation timestamp\n    UpdatedAt       time.Time        // Last modification\n    LastMessage     *HistoryEntry    // Most recent message\n    Messages        []HistoryEntry   // Full message history\n}\n```\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `id` | string | Unique session identifier (UUID) |\n| `project_name` | string | Name of associated project |\n| `name` | string | Human-readable session name |\n| `user_name` | string | Creator's identifier |\n| `live` | bool | Whether session is currently active |\n| `created_at` | timestamp | Session creation time |\n| `updated_at` | timestamp | Last activity time |\n| `last_message` | HistoryEntry | Most recent message object |\n| `messages_count` | int | Total message count |\n\n### History Entry Structure\n\nEach message in a session is stored as a `HistoryEntry`:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `role` | string | \"user\" or \"assistant\" |\n| `content` | string | Message content |\n| `timestamp` | time.Time | Message timestamp |\n| `thinking` | string | Optional reasoning content (Codex) |\n\n## Session Lifecycle\n\n### Lifecycle States\n\n```mermaid\nstateDiagram-v2\n    [*] --> Created: /new-session\n    Created --> Active: First Message\n    Active --> Active: Send Message\n    Active --> Paused: /history or Switch\n    Paused --> Active: Resume Session\n    Active --> Closed: /close or Timeout\n    Closed --> [*]: Cleanup\n    \n    Created --> Deleted: /delete\n    Active --> Deleted: /delete\n    Paused --> Deleted: /delete\n    Deleted --> [*]\n```\n\n### Session Creation\n\nSessions are created in multiple scenarios:\n\n1. **Explicit Creation**: Via `/new-session` command or CLI `cc-connect sessions new`\n2. **Automatic on First Project Use**: When a project has no existing sessions\n3. **Cron Job Sessions**: Fresh sessions created per cron run (when `session-mode: new-per-run`)\n\n### Session Persistence\n\nSessions are persisted to storage with the following behavior:\n\n- **Active Session Tracking**: `ActiveSessionKeys` array tracks currently active sessions per project\n- **Last Message Cache**: The `LastMessage` field is updated after each exchange for quick retrieval\n- **History Truncation**: When `limit > 0`, only the most recent N entries are retained (configurable per request)\n\n## Project State Management\n\nSessions are scoped to projects. The `ProjectState` interface manages this relationship:\n\n```go\ntype ProjectState interface {\n    GetActiveSessionKey(project string) string\n    SetActiveSessionKey(project, sessionKey string)\n    AddSession(project string, session Session) error\n    ListSessions(project string) ([]Session, error)\n    GetSession(project, sessionKey string) (*Session, error)\n}\n```\n\n### Project-Session Relationship\n\n| Project Setting | Session Behavior |\n|----------------|------------------|\n| `sessions_count` | Number of sessions for project |\n| `active_session_keys` | Currently active session references |\n| Per-project agent | Each session uses project's configured agent |\n\n## Session History\n\n### History Entry Format\n\nSessions store a chronological list of `HistoryEntry` objects:\n\n```go\ntype HistoryEntry struct {\n    Role      string    `json:\"role\"`\n    Content   string    `json:\"content\"`\n    Timestamp time.Time `json:\"timestamp\"`\n    Thinking  string    `json:\"thinking,omitempty\"` // Codex reasoning\n}\n```\n\n### History Retrieval Commands\n\n| Command | Description | Source |\n|---------|-------------|--------|\n| `/history [n]` | Show last n messages (default 10) | `core/command.go` |\n| `/reasoning [level]` | View/switch reasoning effort | `core/command.go` |\n| SessionDrawer | UI component for browsing history | `SessionList.tsx` |\n\n### History Display\n\nIn the web UI, session history is displayed with:\n\n- **Role Indicators**: User messages show `User` icon, assistant messages show `Bot` icon\n- **Timestamp**: Relative time display using `timeAgo()` function\n- **Message Preview**: Last 100 characters of content, newlines replaced with spaces\n- **Line Clamping**: Messages limited to 2 lines in list view\n\n## Session Switching\n\n### Switch Session Methods\n\n```mermaid\ngraph LR\n    A[User] -->|/session| B[Switch Command]\n    A -->|UI Click| C[SessionDrawer]\n    B -->|Validate| D{Valid Session?}\n    D -->|Yes| E[Set Active Session]\n    D -->|No| F[Error: Not Found]\n    E --> G[Update ProjectState]\n    G --> H[Load Session Context]\n    \n    C -->|Select| I[switchToSession]\n    I --> G\n```\n\n### Active Session Management\n\nThe system maintains a single active session per project:\n\n```go\n// ProjectState maintains active session key\nfunc (ps *projectState) GetActiveSessionKey(project string) string\nfunc (ps *projectState) SetActiveSessionKey(project, sessionKey string)\n```\n\n### Session Drawer Component\n\nThe `SessionDrawer` component in `web/src/pages/Sessions/SessionList.tsx` provides:\n\n| Feature | Description |\n|---------|-------------|\n| Session List | All sessions for current project |\n| Live Indicator | Green dot for currently active session |\n| Quick Switch | Click to switch active session |\n| New Session | Button to create fresh session |\n| Message Preview | Shows last message in each session |\n\n## Directory History Integration\n\nSessions track working directory changes via `DirHistory`:\n\n```go\ntype DirHistory struct {\n    SessionID string   // Associated session\n    Paths     []string // Ordered list of visited directories\n    Index     int      // Current position in history\n}\n```\n\n### Directory Commands\n\n| Command | Description |\n|---------|-------------|\n| `/dir <path>` | Change to specified directory |\n| `/dir reset` | Return to project's default directory |\n| `/history` | Show directory visit history |\n\nThis allows agents to maintain working context across sessions when the same session is resumed.\n\n## Scheduled Tasks (Cron) Integration\n\nSessions interact with the cron system through the `--session-mode` flag:\n\n### Session Modes\n\n| Mode | Behavior | Use Case |\n|------|----------|----------|\n| `reuse` (default) | Reuse same session across runs | Ongoing conversations |\n| `new-per-run` | Fresh agent session each run | Isolated task execution |\n\n```bash\n# Example: Daily task with reused session\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Summarize emails\" --desc \"Morning Summary\"\n\n# Example: Task requiring fresh context each run\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --session-mode new-per-run\n```\n\n### Cron Session Configuration\n\n| Parameter | Description |\n|-----------|-------------|\n| `--timeout-mins <n>` | Max minutes per run (0 = no limit, default 30) |\n| `--session-mode` | `reuse` or `new-per-run` |\n\n## CLI Session Commands\n\n### Available Commands\n\n```bash\n# List sessions for current project\ncc-connect sessions list\n\n# Create new session\ncc-connect sessions new\n\n# Switch to session\ncc-connect sessions switch <session-id>\n\n# Show session history\ncc-connect sessions history <session-id> [limit]\n\n# Delete session\ncc-connect sessions delete <session-id>\n```\n\n### Session Options (from `cmd/cc-connect/sessions.go`)\n\n| Option | Description |\n|--------|-------------|\n| `-p, --project <name>` | Target project (auto-detected from CC_PROJECT) |\n| `-s, --session-key <key>` | Target session (auto-detected from CC_SESSION_KEY) |\n\n## Bridge Communication\n\nThe web UI communicates with sessions via a bridge protocol:\n\n```mermaid\nsequenceDiagram\n    participant UI as ChatView\n    participant Bridge as Session Bridge\n    participant Session as Session Manager\n    \n    UI->>Bridge: connect(project, sessionId)\n    Bridge->>Session: Register connection\n    Session-->>Bridge: session state\n    Bridge-->>UI: bridge status: connected\n    \n    UI->>Bridge: send(message)\n    Bridge->>Session: Process message\n    Session->>Session: Update history\n    Session-->>Bridge: response\n    Bridge-->>UI: stream events\n    \n    Note over Bridge: status: \"connected\" | \"connecting\" | \"error\" | \"disconnected\"\n```\n\n### Bridge Status States\n\n| Status | Description | UI Display |\n|--------|-------------|------------|\n| `connected` | Active connection | Hidden |\n| `connecting` | Establishing connection | Spinner + \"Connecting...\" |\n| `error` | Connection failed | Warning icon + \"Disconnected\" |\n| `disconnected` | No active bridge | Warning icon + \"Disconnected\" |\n\n## Session Storage\n\n### Storage Location\n\n- **Default Directory**: `~/.cc-connect`\n- **Session Data**: Stored in project-specific storage\n- **Session Key Environment Variable**: `CC_SESSION_KEY`\n\n### Storage Schema\n\n```\n~/.cc-connect/\n├── projects/\n│   └── <project-name>/\n│       └── sessions/\n│           └── <session-id>/\n│               ├── meta.json       # Session metadata\n│               ├── messages.jsonl  # Message history\n│               └── context/        # Agent context files\n```\n\n## Agent-Specific Session Handling\n\n### Codex Agent\n\nThe Codex agent includes special session handling (`agent/codex/session.go`):\n\n```go\nfunc patchSessionSource(sessionID, codexHome string) {\n    // Rewrites session_meta line in Codex JSONL transcript\n    // Sets source=\"cli\" and originator=\"codex_cli_rs\"\n    // Makes session visible in interactive codex terminal\n}\n```\n\n### Session Context Loading\n\nCodex sessions retry context loading with:\n\n| Parameter | Value | Purpose |\n|-----------|-------|---------|\n| `codexContextUsageRetryCount` | 5 | Maximum retry attempts |\n| `codexContextUsageRetryDelay` | 1 second | Delay between retries |\n| `codexSessionCloseTimeout` | 5 seconds | Grace period for cleanup |\n\n## Best Practices\n\n1. **Session Naming**: Use descriptive names for easy identification\n2. **History Cleanup**: Periodically delete old sessions to maintain performance\n3. **Project Isolation**: Keep sessions scoped to their project for proper context\n4. **Timeout Configuration**: Set appropriate `--timeout-mins` for long-running tasks\n5. **Session Mode Selection**: Use `new-per-run` for isolated tasks, `reuse` for conversational agents\n\n## Related Commands Reference\n\n| Slash Command | Description |\n|---------------|-------------|\n| `/new-session` | Create a new session |\n| `/sessions` | List/manage sessions |\n| `/history [n]` | View message history |\n| `/session <id>` | Switch to specific session |\n| `/dir <path>` | Change working directory (session-scoped) |\n\n---\n\n<a id='page-web-ui'></a>\n\n## Web UI Administration\n\n### 相关页面\n\n相关主题：[Configuration Guide](#page-configuration), [Deployment and Operations](#page-deployment)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [web/src/App.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/App.tsx)\n- [web/src/pages/Dashboard.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Dashboard.tsx)\n- [web/src/api/index.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/index.ts)\n- [cmd/cc-connect/web.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/web.go)\n- [core/web_manager.go](https://github.com/chenhg5/cc-connect/blob/main/core/web_manager.go)\n</details>\n\n# Web UI Administration\n\nThe Web UI Administration module in cc-connect provides a comprehensive, single-page administrative interface for managing the entire platform. Built with React and TypeScript, the web interface serves as the primary control center for administrators to configure projects, manage agent providers, monitor sessions, and administer scheduled cron jobs—all without requiring command-line interaction.\n\n## Architecture Overview\n\nThe web administration system follows a client-server architecture where the React frontend communicates with the Go backend through a RESTful API. The backend serves both static assets and dynamic API endpoints, while the frontend manages routing, state, and user interactions.\n\n```mermaid\ngraph TD\n    A[Browser Client] --> B[React SPA Frontend]\n    B --> C[API Client Layer]\n    C --> D[Go Backend API]\n    D --> E[(SQLite Database)]\n    D --> F[Platform Connectors<br/>Feishu/WeChat]\n    D --> G[Agent Providers<br/>Claude/Codex/Gemini]\n    \n    B --> H[Dashboard]\n    B --> I[Projects]\n    B --> J[Sessions]\n    B --> K[Providers]\n    B --> L[Skills]\n    B --> M[Cron Jobs]\n```\n\n## Frontend Application Structure\n\n### App Entry Point and Routing\n\nThe main application entry point (`web/src/App.tsx`) initializes the React application with routing capabilities. The application uses client-side routing to navigate between different administrative sections.\n\n**资料来源：** [web/src/App.tsx:1-50]()\n\n### Page Modules\n\nThe web interface is organized into several distinct page modules, each handling a specific domain of administrative functionality:\n\n| Module | File Path | Purpose |\n|--------|-----------|---------|\n| Dashboard | `web/src/pages/Dashboard.tsx` | System overview, status metrics, quick links |\n| Projects | `web/src/pages/Projects/ProjectList.tsx` | Project creation and management |\n| Project Detail | `web/src/pages/Projects/ProjectDetail.tsx` | Per-project settings and configuration |\n| Sessions | `web/src/pages/Sessions/SessionList.tsx` | Chat session history and management |\n| Providers | `web/src/pages/Providers/ProviderList.tsx` | Agent provider configuration |\n| Skills | `web/src/pages/Skills/SkillList.tsx` | Skill preset management |\n| Cron Jobs | `web/src/pages/Cron/CronList.tsx` | Scheduled task administration |\n\n**资料来源：** [web/src/pages/Dashboard.tsx:1-30]()\n\n## Core Features\n\n### Dashboard\n\nThe Dashboard provides an at-a-glance view of the system status. It displays key metrics including version information, uptime statistics, connected platform count, and total project count.\n\n```typescript\n// Key dashboard metrics displayed\n<StatCard label={t('dashboard.version')} value={status?.version || '-'} accent />\n<StatCard label={t('dashboard.uptime')} value={status ? formatUptime(status.uptime_seconds) : '-'} />\n<StatCard label={t('dashboard.platforms')} value={status?.connected_platforms?.length ?? 0} />\n<StatCard label={t('dashboard.projects')} value={status?.projects_count ?? 0} />\n```\n\nThe dashboard also includes a projects section with quick navigation links to the full projects list.\n\n**资料来源：** [web/src/pages/Dashboard.tsx:20-45]()\n\n### Project Management\n\nProjects are the central organizational unit in cc-connect. The project management interface allows administrators to:\n\n- Create new projects with the Add Project Wizard\n- Configure platform integrations (Feishu, WeChat)\n- Set up agent types and working directories\n- View session counts and heartbeat status\n\n#### Project List View\n\nThe project list displays all configured projects with key metadata including agent type, supported platforms, session count, and heartbeat status indicators.\n\n```typescript\n// Project card displays key information\n<Badge variant=\"info\">{p.agent_type}</Badge>\n{p.platforms?.slice(0, 3).map((pl) => <Badge key={pl}>{pl}</Badge>)}\n<span>{p.sessions_count} {t('nav.sessions').toLowerCase()}</span>\n{p.heartbeat_enabled && (\n  <span className=\"flex items-center gap-1 text-emerald-500\">\n    <Heart size={12} /> {t('heartbeat.title')}\n  </span>\n)}\n```\n\n**资料来源：** [web/src/pages/Projects/ProjectList.tsx:1-80]()\n\n#### Project Detail Settings\n\nIndividual project pages expose granular configuration options:\n\n| Setting | Description | Type |\n|---------|-------------|------|\n| Context Indicator | Show `[ctx: ~N%]` suffix on replies | Toggle |\n| Reply Footer | Append model/usage metadata to replies | Toggle |\n| Scan Directories | Directories scanned for skills | List |\n| Provider Links | Connected agent providers | Reference |\n\n**资料来源：** [web/src/pages/Projects/ProjectDetail.tsx:1-50]()\n\n#### Add Project Wizard\n\nThe wizard guides users through a multi-step setup process:\n\n1. **Name Step** - Enter project name (alphanumeric, hyphen, underscore only)\n2. **Platform Step** - Select integration platform (Feishu, WeChat, or manual setup)\n3. **QR Step** - Generate QR code for mobile platform authentication\n4. **Form Step** - Manual configuration form for advanced settings\n\n```typescript\n// Project name validation\nvalue={newProjName}\nonChange={(e) => setNewProjName(e.target.value.replace(/[^a-zA-Z0-9_-]/g, ''))}\n```\n\n**资料来源：** [web/src/pages/Projects/ProjectList.tsx:80-120]()\n\n### Session Management\n\nThe Session List view provides a chronological view of all chat sessions across projects. Each session entry shows:\n\n- Session name or ID\n- Live status indicator\n- Last activity timestamp\n- Message preview (first 100 characters)\n- Associated project and platform badges\n- Message count\n\n```typescript\n// Session display with live indicator\n<MessageSquare size={14} className={s.live ? 'text-accent shrink-0' : 'text-gray-400 shrink-0'} />\n<span className=\"text-sm font-medium text-gray-900 dark:text-white truncate\">\n  {s.name || s.user_name || s.id.slice(0, 8)}\n</span>\n{s.live && <Circle size={5} className=\"fill-emerald-500 text-emerald-500 shrink-0\" />}\n```\n\n**资料来源：** [web/src/pages/Sessions/SessionList.tsx:1-60]()\n\n### Provider Administration\n\nThe Provider Management interface allows configuration of LLM agent providers with support for both global and per-project provider assignments.\n\n#### Provider Features\n\n- **Model Selection** - Configure base URL and model identifiers\n- **Multi-Model Support** - Define model lists with default selection\n- **Thinking Control** - Enable or disable extended thinking per provider\n- **Agent Type Filtering** - Restrict providers to specific agent types\n\n#### Provider Form Configuration\n\n| Field | Description | Required |\n|-------|-------------|----------|\n| Name | Provider identifier | Yes |\n| API Key | Authentication key | Yes |\n| Base URL | Endpoint URL | No |\n| Model | Default model name | No |\n| Models | Additional model list | No |\n| Thinking | Extended thinking mode | No |\n| Agent Types | Applicable agent types | No |\n\n**资料来源：** [web/src/pages/Providers/ProviderList.tsx:1-100]()\n\n#### CC-Switch Import\n\nThe interface supports importing provider configurations from CC-Switch, enabling migration of existing setups.\n\n### Skills Management\n\nThe Skills interface manages skill presets that can be assigned to projects. Skills define capabilities and behaviors for agents, with support for:\n\n- Display name and description (with localization)\n- Source tracking (URL, provider, author)\n- Version information\n- Pricing metadata\n- Tag-based categorization\n\n#### Recommended Skills\n\nA preset grid displays available skill templates that administrators can add to their projects.\n\n### Cron Job Scheduling\n\nThe Cron List view administers scheduled tasks that execute prompts on projects at configured intervals.\n\n```typescript\n// Cron job display includes mode, project, and timing\n<Badge variant=\"outline\" className=\"text-[10px] px-1.5 py-0\">{job.mode || t('cron.modeDefault')}</Badge>\n<span className=\"font-medium w-12 shrink-0 text-gray-400\">{t('cron.project')}</span>\n<span className=\"truncate\">{job.project}</span>\n<span className=\"font-medium w-12 shrink-0 text-gray-400\">{t('cron.lastRun')}</span>\n<span>{formatTime(job.last_run)}</span>\n```\n\n**资料来源：** [web/src/pages/Cron/CronList.tsx:1-50]()\n\n## API Client Layer\n\nThe frontend communicates with the backend through an API client module (`web/src/api/index.ts`). This layer abstracts HTTP communication and provides typed interfaces for all administrative operations.\n\n### Key API Operations\n\n| Category | Operations |\n|----------|------------|\n| Projects | list, create, update, delete, get |\n| Sessions | list, get, delete, clear history |\n| Providers | list, create, update, delete |\n| Skills | list presets, add to project |\n| Cron | list, create, update, delete, trigger |\n| System | status, restart, shutdown |\n\n**资料来源：** [web/src/api/index.ts:1-100]()\n\n## Backend Server\n\n### Web Server Initialization\n\nThe Go backend initializes the web server with static file serving and API routing.\n\n**资料来源：** [cmd/cc-connect/web.go:1-50]()\n\n### Web Manager\n\nThe core web manager handles the lifecycle of the web interface, including configuration, middleware setup, and request routing.\n\n```go\n// Web server configuration structure\ntype WebConfig struct {\n    Host     string\n    Port     int\n    TLS      bool\n    CertFile string\n    KeyFile  string\n}\n```\n\n**资料来源：** [core/web_manager.go:1-80]()\n\n## Internationalization\n\nThe web interface supports multiple languages through an internationalization system defined in `core/i18n.go`. Supported languages include:\n\n- English\n- Simplified Chinese (简体中文)\n- Traditional Chinese (繁體中文)\n- Japanese (日本語)\n- Spanish (Español)\n\nThe UI automatically detects the browser language and falls back to English when translations are unavailable.\n\n## User Interface Components\n\n### Common UI Elements\n\nThe interface uses a consistent component library including:\n\n- **Card** - Container for grouped content\n- **Badge** - Status indicators and labels\n- **Button** - Action triggers with variants (primary, secondary, ghost)\n- **Modal** - Dialog overlays for forms and confirmations\n- **Input** - Form field components with validation\n- **Badge variants** - default, outline, info, success for semantic coloring\n\n### Dark Mode Support\n\nAll components support dark mode theming through CSS custom properties and Tailwind dark variants:\n\n```typescript\n// Example dark mode styling pattern\nclassName=\"text-gray-900 dark:text-white bg-white dark:bg-white/[0.02]\"\nclassName=\"border-gray-200 dark:border-white/[0.06]\"\n```\n\n## Configuration and State Management\n\nThe frontend uses React hooks for state management with several key patterns:\n\n1. **Server State** - Data fetched from the API (projects, sessions, providers)\n2. **UI State** - Local component state (modals, forms, selections)\n3. **Preferences** - User settings like language and theme\n\n### Key State Hooks\n\n| Hook | Purpose |\n|------|---------|\n| `useProjects` | Fetch and cache project list |\n| `useProviders` | Manage provider configurations |\n| `useSessions` | Session listing and filtering |\n| `useStatus` | System status polling |\n\n## Security Considerations\n\nThe web interface handles sensitive operations including:\n\n- API key management for provider configurations\n- Project authentication credentials\n- Session data access\n\nAll sensitive fields use password input types with visibility toggles:\n\n```typescript\n<Input\n  type={showKey ? 'text' : 'password'}\n  value={form.api_key || ''}\n  placeholder=\"sk-...\"\n/>\n<button onClick={() => setShowKey(!showKey)}>\n  {showKey ? <EyeOff size={16} /> : <Eye size={16} />}\n</button>\n```\n\n**资料来源：** [web/src/pages/Providers/ProviderList.tsx:150-180]()\n\n## Data Flow Diagram\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant ReactApp\n    participant API\n    participant GoBackend\n    participant Database\n\n    User->>ReactApp: Navigate to Projects\n    ReactApp->>API: GET /api/projects\n    API->>GoBackend: HTTP Request\n    GoBackend->>Database: Query projects\n    Database->>GoBackend: Project records\n    GoBackend->>API: JSON response\n    API->>ReactApp: Project list data\n    ReactApp->>User: Render ProjectList\n```\n\n## Conclusion\n\nThe Web UI Administration module provides a complete, production-ready administrative interface for cc-connect. Its modular design separates concerns across page components, while the typed API client ensures reliable communication with the backend. The support for dark mode, internationalization, and responsive design makes it suitable for deployment in varied operational environments.\n\n---\n\n<a id='page-deployment'></a>\n\n## Deployment and Operations\n\n### 相关页面\n\n相关主题：[Quick Start Guide](#page-quickstart)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cmd/cc-connect/update.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/update.go)\n- [cmd/cc-connect/daemon.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/daemon.go)\n- [daemon/manager.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/manager.go)\n- [daemon/systemd.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/systemd.go)\n- [core/runas.go](https://github.com/chenhg5/cc-connect/blob/main/core/runas.go)\n- [core/updater.go](https://github.com/chenhg5/cc-connect/blob/main/core/updater.go)\n</details>\n\n# Deployment and Operations\n\nThis page covers the operational aspects of cc-connect, including installation, daemon management, service configuration, and system-level integration.\n\n## Overview\n\ncc-connect is a bridge application that connects local AI coding agents to messaging platforms. It supports multiple deployment scenarios ranging from manual binary execution to automated system service management across Linux (systemd), macOS (launchd), and Windows (Task Scheduler).\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Installation Methods\n\ncc-connect offers four primary installation approaches depending on your environment and requirements.\n\n### Package Manager Installation\n\n**macOS (Homebrew):**\n```bash\nbrew install cc-connect\n```\n\n**Linux (Homebrew):**\n```bash\nbrew install cc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n### Pre-built Binary Download\n\nDownload platform-specific binaries from the [GitHub Releases](https://github.com/chenhg5/cc-connect/releases) page.\n\n| Platform | Architecture | Artifact Pattern |\n|----------|-------------|------------------|\n| Linux | amd64 | `cc-connect-<version>-linux-amd64` |\n| macOS | amd64 | `cc-connect-<version>-darwin-amd64` |\n| macOS | ARM64 | `cc-connect-<version>-darwin-arm64` |\n| Windows | amd64 | `cc-connect-<version>-windows-amd64.exe` |\n\n**Installation Example (Linux):**\n```bash\ncurl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64\nchmod +x cc-connect\nsudo mv cc-connect /usr/local/bin/\n```\n\n**macOS Quarantine Removal:**\n```bash\nxattr -d com.apple.quarantine cc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n### Build from Source\n\nBuilding from source requires Go 1.22 or later.\n\n```bash\ngit clone https://github.com/chenhg5/cc-connect.git\ncd cc-connect\nmake build\n# Binary output: ./cc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Configuration File Management\n\ncc-connect searches for configuration files in the following order:\n\n1. `-config <path>` flag (explicit path)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\nIf no configuration file exists, running `cc-connect` will automatically create a starter template at `~/.cc-connect/config.toml`.\n\n### Manual Configuration Setup\n\n```bash\nmkdir -p ~/.cc-connect\n# Option 1: Copy example from cloned repo\ncp config.example.toml ~/.cc-connect/config.toml\n# Option 2: Run cc-connect once to auto-generate\ncc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Daemon Management\n\nThe daemon subsystem provides persistent background operation with automatic startup on system boot.\n\n### Installing the Daemon\n\n**Basic Installation:**\n```bash\ncc-connect daemon install --config ~/.cc-connect/config.toml\n```\n\n**Using Work Directory:**\n```bash\ncc-connect daemon install --work-dir ~/.cc-connect\n```\n\n**Installation Options:**\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--config PATH` | Path to config file | `~/.cc-connect/config.toml` |\n| `--log-file PATH` | Custom log file location | Auto-generated |\n| `--log-max-size N` | Max log size in MB | Configured value |\n| `--work-dir DIR` | Directory containing config.toml | `~/.cc-connect` |\n| `--force` | Overwrite existing unit | false |\n\n资料来源：[cmd/cc-connect/daemon.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/daemon.go)\n\n### Daemon Lifecycle Commands\n\n```bash\ncc-connect daemon start      # Start the service\ncc-connect daemon stop       # Stop the service\ncc-connect daemon restart    # Restart the service\ncc-connect daemon status      # Check current status\n```\n\n### Platform-Specific Implementation\n\nThe daemon manager delegates to platform-specific implementations:\n\n- **Linux:** Creates a systemd user service 资料来源：[daemon/systemd.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/systemd.go)\n- **macOS:** Creates a LaunchAgent plist\n- **Windows:** Creates a Task Scheduler task named `cc-connect`\n\n```mermaid\ngraph TD\n    A[cc-connect daemon install] --> B{Platform Detection}\n    B -->|Linux| C[systemd User Service]\n    B -->|macOS| D[LaunchAgent Plist]\n    B -->|Windows| E[Task Scheduler Task]\n    C --> F[Auto-start on login]\n    D --> F\n    E --> G[Run at user logon]\n```\n\n资料来源：[daemon/manager.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/manager.go)\n\n## Log Management\n\n### Viewing Logs\n\n```bash\ncc-connect daemon logs              # Display current log\ncc-connect daemon logs -f           # Follow mode (tail -f equivalent)\ncc-connect daemon logs -n 100       # Show last 100 lines\ncc-connect daemon logs --log-file /path/to/log  # Custom log file\n```\n\n### Log Rotation\n\nLogs automatically rotate when they reach the configured maximum size. The system maintains one backup of the previous log file.\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Update Management\n\n### Update Command\n\nThe update subsystem handles binary updates with signature verification.\n\n```bash\ncc-connect update [options]\n```\n\n**Update Options:**\n\n| Flag | Description |\n|------|-------------|\n| `--channel <name>` | Update channel (stable/beta) |\n| `--file <path>` | Install from local file |\n| `--data-dir <path>` | Data directory for update metadata |\n\n### Update Process Flow\n\n```mermaid\ngraph TD\n    A[cc-connect update] --> B[Check Update Channel]\n    B --> C{Fetch Latest Version}\n    C -->|Version Available| D[Download Binary]\n    C -->|Up to Date| E[Exit: Already current]\n    D --> F{Verify Signature}\n    F -->|Valid| G[Replace Binary]\n    F -->|Invalid| H[Abort Update]\n    G --> I[Restart Service]\n```\n\n资料来源：[cmd/cc-connect/update.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/update.go)\n\n### Manual Update for Package Managers\n\n**Homebrew:**\n```bash\nbrew upgrade cc-connect\n```\n\n**Source Users:**\n```bash\ncd cc-connect\ngit pull\nmake build\n```\n\nAfter upgrading, restart the running cc-connect process to apply changes.\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Process Execution Model\n\n### Privilege Escalation\n\nThe `runas` module handles process execution with appropriate privileges:\n\n```mermaid\ngraph LR\n    A[Main Process] -->|Non-elevated| B[User Context]\n    A -->|Elevated tasks| C[runas Module]\n    C -->|sudo/elevation| D[Privileged Execution]\n```\n\nThe module supports:\n- Running commands with elevated privileges when required\n- Managing user context for different operation modes\n\n资料来源：[core/runas.go](https://github.com/chenhg5/cc-connect/blob/main/core/runas.go)\n\n## Operational Best Practices\n\n### Recommended Setup\n\n1. **Use Global Config Location:** Store configuration at `~/.cc-connect/config.toml` for consistent access across terminal sessions.\n\n2. **Install as System Service:** Use `daemon install` for production deployments to ensure automatic restart on system reboot.\n\n3. **Configure Log Rotation:** Set appropriate `--log-max-size` value based on expected message volume.\n\n4. **Monitor Log Output:** Regularly check `cc-connect daemon logs` for operational insights and error tracking.\n\n### Configuration Structure\n\nA typical multi-project production configuration:\n\n```toml\n[log]\nlevel = \"info\"\n\n[[projects]]\nname = \"backend\"\n[projects.agent]\ntype = \"claudecode\"\n[projects.agent.options]\nwork_dir = \"/path/to/backend\"\nmode = \"default\"\n\n[[projects.platforms]]\ntype = \"feishu\"\n[projects.platforms.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxx\"\n```\n\n### Health Monitoring\n\nThe daemon status command provides current service state:\n\n```bash\ncc-connect daemon status\n```\n\nThis reports whether the service is running, and if applicable, the uptime and last activity timestamp.\n\n## Windows-Specific Considerations\n\nOn Windows, `daemon install` creates a Task Scheduler task that:\n- Runs at user logon\n- Starts immediately after installation\n- Is named `cc-connect` in the Task Scheduler\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：chenhg5/cc-connect\n\n摘要：发现 39 个潜在踩坑项，其中 12 个为 high/blocking；最高优先级：安装坑 - 来源证据：[Bug]。\n\n## 1. 安装坑 · 来源证据：[Bug]\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug]\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c85c0f8f48ac44c7a855066b2bfc3939 | https://github.com/chenhg5/cc-connect/issues/933 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 2. 安装坑 · 来源证据：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_bbbf45839e1043e2afdedf3f1d87b55b | https://github.com/chenhg5/cc-connect/issues/1058 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 3. 安装坑 · 来源证据：[Feature] Preserve full interactive card schema on inbound\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Feature] Preserve full interactive card schema on inbound\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f50380a7aef54548ac053b1127a2916e | https://github.com/chenhg5/cc-connect/issues/936 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 4. 安装坑 · 来源证据：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3a818efa6ddf479aae0f026d1f06d491 | https://github.com/chenhg5/cc-connect/issues/960 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 5. 配置坑 · 来源证据：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_7b001c45ac3449abaee3dd365bc4cc74 | https://github.com/chenhg5/cc-connect/issues/972 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 6. 配置坑 · 来源证据：WeChat ilink (weixin): image content is empty, not passed to agent\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：WeChat ilink (weixin): image content is empty, not passed to agent\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_17d4c5f39a5745c5bdfbc88cdac32056 | https://github.com/chenhg5/cc-connect/issues/1057 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 7. 配置坑 · 来源证据：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6136e384578b499ca63299322032211a | https://github.com/chenhg5/cc-connect/issues/966 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 8. 安全/权限坑 · 失败模式：security_permissions: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 对用户的影响：Developers may expose sensitive permissions or credentials: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions. Context: Observed during installation or first-run setup.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/chenhg5/cc-connect/issues/966\n- 证据：failure_mode_cluster:github_issue | fmev_d8aeb38642d53571d47292761cca7247 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions, failure_mode_cluster:github_issue | fmev_105e57f4097e09e9e5c522a568ff4991 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n## 9. 安全/权限坑 · 失败模式：security_permissions: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root...\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 对用户的影响：Developers may expose sensitive permissions or credentials: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志. Context: Observed when using linux\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/chenhg5/cc-connect/issues/1054\n- 证据：failure_mode_cluster:github_issue | fmev_9f56ecf6ad99707575ffe84fc2c10e1b | https://github.com/chenhg5/cc-connect/issues/1054 | [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n\n## 10. 安全/权限坑 · 来源证据：Feature Request: 终端与 IM 双通道统一会话管理\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Feature Request: 终端与 IM 双通道统一会话管理\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_befa8b4f1c7f4ef483d6d8b38ba06ba4 | https://github.com/chenhg5/cc-connect/issues/968 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 11. 安全/权限坑 · 来源证据：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c632e470b2d04852abae801be4d2aba2 | https://github.com/chenhg5/cc-connect/issues/1054 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 12. 安全/权限坑 · 来源证据：[Bug] codex mode修改YOLO模式无效\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] codex mode修改YOLO模式无效\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ce58ad66fc4e4d2ea6f0bb4a43527cd0 | https://github.com/chenhg5/cc-connect/issues/233 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n\n## 13. 安装坑 · 失败模式：installation: [Bug]\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug]\n- 对用户的影响：Developers may fail before the first successful local run: [Bug]\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug]. Context: Observed when using node, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_555d98ac56e7850b1c49e5892d2b6c48 | https://github.com/chenhg5/cc-connect/issues/933 | [Bug]\n\n## 14. 安装坑 · 失败模式：installation: [Bug] codex mode修改YOLO模式无效\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug] codex mode修改YOLO模式无效\n- 对用户的影响：Developers may fail before the first successful local run: [Bug] codex mode修改YOLO模式无效\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] codex mode修改YOLO模式无效. Context: Observed when using macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_59a6433bec9f3dcf0981efd11a046df3 | https://github.com/chenhg5/cc-connect/issues/233 | [Bug] codex mode修改YOLO模式无效\n\n## 15. 安装坑 · 失败模式：installation: [Bug] cursorSession error: unknown option '--trust\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug] cursorSession error: unknown option '--trust\n- 对用户的影响：Developers may fail before the first successful local run: [Bug] cursorSession error: unknown option '--trust\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cursorSession error: unknown option '--trust. Context: Observed when using node, macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_279592e262a8c9114ffed9bcd68ca683 | https://github.com/chenhg5/cc-connect/issues/923 | [Bug] cursorSession error: unknown option '--trust\n\n## 16. 安装坑 · 失败模式：installation: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 对用户的影响：Developers may fail before the first successful local run: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`. Context: Observed when using node, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_2ab77150cf90931385fb7741956a1f53 | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`, failure_mode_cluster:github_issue | fmev_5c45b25a78af1b25aea75c4cad91e50a | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n## 17. 安装坑 · 失败模式：installation: v1.3.0\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v1.3.0\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.0\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0. Context: Observed when using node, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_a2ead0f4920aaffbc2c58e566c82e8e8 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.0 | v1.3.0\n\n## 18. 安装坑 · 失败模式：installation: v1.3.3-beta.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v1.3.3-beta.1\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.3-beta.1\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3-beta.1. Context: Observed when using node\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_2967bcebc65cc66231ca2bcd62e03f6f | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.1 | v1.3.3-beta.1\n\n## 19. 安装坑 · 失败模式：installation: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 对用户的影响：Developers may fail before the first successful local run: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险. Context: Observed during installation or first-run setup.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_f2c109d868a32136d97c513f8ac192bb | https://github.com/chenhg5/cc-connect/issues/967 | 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n## 20. 安装坑 · 来源证据：v1.3.3-beta.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.3.3-beta.1\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5eb39ef63cf14e56aff580db738dcd9f | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.1 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 21. 安装坑 · 来源证据：生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_574cca97359b4bc1a8a8fa968ab758cb | https://github.com/chenhg5/cc-connect/issues/967 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 22. 配置坑 · 可能修改宿主 AI 配置\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n- 防护动作：涉及宿主配置目录时必须给回滚路径，不能只给安装命令。\n- 证据：capability.host_targets | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | host_targets=claude, claude_code, cursor\n\n## 23. 配置坑 · 失败模式：configuration: Feature Request: 终端与 IM 双通道统一会话管理\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Feature Request: 终端与 IM 双通道统一会话管理\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Feature Request: 终端与 IM 双通道统一会话管理\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feature Request: 终端与 IM 双通道统一会话管理. Context: Observed when using windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_eb8a9f26e9a7250936e6075aa04d1f9f | https://github.com/chenhg5/cc-connect/issues/968 | Feature Request: 终端与 IM 双通道统一会话管理\n\n## 24. 配置坑 · 失败模式：configuration: Feishu: all messages permanently ignored as 'old message after restart' after every daemon re...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2). Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_d77b163febfec4d4e69e2e4e32f620a1 | https://github.com/chenhg5/cc-connect/issues/972 | Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n## 25. 配置坑 · 失败模式：configuration: [Feature] Preserve full interactive card schema on inbound\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: [Feature] Preserve full interactive card schema on inbound\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: [Feature] Preserve full interactive card schema on inbound\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Feature] Preserve full interactive card schema on inbound. Context: Observed when using python\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_bc874b9a16a67215d86b2e2342c2ce30 | https://github.com/chenhg5/cc-connect/issues/936 | [Feature] Preserve full interactive card schema on inbound\n\n## 26. 配置坑 · 失败模式：configuration: v1.3.0-rc.5\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.0-rc.5\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.0-rc.5\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0-rc.5. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_742c16dbbbfed9286198088ba0f05c07 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.0-rc.5 | v1.3.0-rc.5\n\n## 27. 配置坑 · 失败模式：configuration: v1.3.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.1\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.1\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.1. Context: Observed during version upgrade or migration.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_af9571ceb2092a140a16c2cfbe490ca1 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.1 | v1.3.1\n\n## 28. 配置坑 · 失败模式：configuration: v1.3.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.2\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.2\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.2. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_a2bd7f299418ec4b6c3fe49f42c6e933 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.2 | v1.3.2\n\n## 29. 配置坑 · 失败模式：configuration: v1.3.3-beta.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.3-beta.2\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.3-beta.2\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3-beta.2. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_6d397fcba273f6fa44d3976dd8c91a69 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.2 | v1.3.3-beta.2\n\n## 30. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | README/documentation is current enough for a first validation pass.\n\n## 31. 运行坑 · 来源证据：出现网络波动后，一直显示这个retrying，只能手动重启吗？\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：出现网络波动后，一直显示这个retrying，只能手动重启吗？\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8d8f7103758f4f46bffd9b411c81bbf6 | https://github.com/chenhg5/cc-connect/issues/102 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 32. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | last_activity_observed missing\n\n## 33. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | no_demo; severity=medium\n\n## 34. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | no_demo; severity=medium\n\n## 35. 安全/权限坑 · 来源证据：[Bug] cursorSession error: unknown option '--trust\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cursorSession error: unknown option '--trust\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_d9323b9200ff491e8c6f408880565e86 | https://github.com/chenhg5/cc-connect/issues/923 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 36. 安全/权限坑 · 来源证据：v1.3.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：v1.3.2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_2245b50ba3e94323b2228f6ed5b2b73e | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 37. 安全/权限坑 · 来源证据：v1.3.3-beta.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：v1.3.3-beta.2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4665651336a6450db47e6262a8926c7b | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 38. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | issue_or_pr_quality=unknown\n\n## 39. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | release_recency=unknown\n\n<!-- canonical_name: chenhg5/cc-connect; human_manual_source: deepwiki_human_wiki -->\n",
      "markdown_key": "cc-connect",
      "pages": "draft",
      "source_refs": [
        {
          "evidence_id": "github_repo:1168978399",
          "kind": "repo",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/chenhg5/cc-connect"
        },
        {
          "evidence_id": "art_a199d1b215944de8806db9761711312d",
          "kind": "docs",
          "supports_claim_ids": [
            "claim_identity",
            "claim_distribution",
            "claim_capability"
          ],
          "url": "https://github.com/chenhg5/cc-connect#readme"
        }
      ],
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "cc-connect 说明书",
      "toc": [
        "https://github.com/chenhg5/cc-connect 项目说明书",
        "目录",
        "Introduction to cc-connect",
        "Overview",
        "Architecture",
        "Supported AI Agents",
        "Supported Messaging Platforms",
        "Project Management",
        "Doramagic 踩坑日志"
      ]
    }
  },
  "quality_gate": {
    "blocking_gaps": [],
    "category_confidence": "medium",
    "compile_status": "ready_for_review",
    "five_assets_present": true,
    "install_sandbox_verified": true,
    "missing_evidence": [],
    "next_action": "publish to Doramagic.ai project surfaces",
    "prompt_preview_boundary_ok": true,
    "publish_status": "publishable",
    "quick_start_verified": true,
    "repo_clone_verified": true,
    "repo_commit": "405cb109e8b7c8cdda39b2cfa60add65315d05fb",
    "repo_inspection_error": null,
    "repo_inspection_files": [
      "README.md",
      "docs/slack.md",
      "docs/qq.md",
      "docs/discord.md",
      "docs/usage.zh-CN.md",
      "docs/management-api.zh-CN.md",
      "docs/feishu.md",
      "docs/management-api.md",
      "docs/weibo.md",
      "docs/max-webhook.md",
      "docs/slack-feature-inventory.md",
      "docs/wecom.md",
      "docs/weixin.md",
      "docs/usage.md",
      "docs/telegram.md",
      "docs/bridge-protocol.zh-CN.md",
      "docs/slack-app-manifest.json",
      "docs/wps-xiezuo.md",
      "docs/dingtalk.md",
      "docs/bridge-protocol.md",
      "docs/qqbot.md",
      "docs/plans/2026-03-23-acp-adapter-design.md",
      "docs/plans/2026-03-12-usage.md",
      "docs/plans/2026-03-24-integration-tests.md",
      "docs/plans/2026-03-11-feishu-delete-card.md",
      "docs/plans/2026-03-13-session-resilience-design.md",
      "docs/plans/2026-03-12-usage-design.md",
      "docs/plans/2026-03-12-multi-workspace-plan.md",
      "docs/plans/2026-03-13-session-resilience-plan.md",
      "docs/plans/2026-03-12-multi-workspace-plan.md.tasks.json",
      "docs/plans/2026-03-12-multi-workspace-design.md",
      "docs/plans/2026-03-13-session-resilience-plan.md.tasks.json",
      "docs/plans/2026-03-11-delete-batch.md",
      "docs/plans/2026-03-11-feishu-delete-card-design.md",
      "docs/images/sponsors/README.md"
    ],
    "repo_inspection_verified": true,
    "review_reasons": [],
    "tag_count_ok": true,
    "unsupported_claims": []
  },
  "schema_version": "0.1",
  "user_assets": {
    "ai_context_pack": {
      "asset_id": "ai_context_pack",
      "filename": "AI_CONTEXT_PACK.md",
      "markdown": "# cc-connect - Doramagic AI Context Pack\n\n> 定位：安装前体验与判断资产。它帮助宿主 AI 有一个好的开始，但不代表已经安装、执行或验证目标项目。\n\n## 充分原则\n\n- **充分原则，不是压缩原则**：AI Context Pack 应该充分到让宿主 AI 在开工前理解项目价值、能力边界、使用入口、风险和证据来源；它可以分层组织，但不以最短摘要为目标。\n- **压缩策略**：只压缩噪声和重复内容，不压缩会影响判断和开工质量的上下文。\n\n## 给宿主 AI 的使用方式\n\n你正在读取 Doramagic 为 cc-connect 编译的 AI Context Pack。请把它当作开工前上下文：帮助用户理解适合谁、能做什么、如何开始、哪些必须安装后验证、风险在哪里。不要声称你已经安装、运行或执行了目标项目。\n\n## Claim 消费规则\n\n- **事实来源**：Repo Evidence + Claim/Evidence Graph；Human Wiki 只提供显著性、术语和叙事结构。\n- **事实最低状态**：`supported`\n- `supported`：可以作为项目事实使用，但回答中必须引用 claim_id 和证据路径。\n- `weak`：只能作为低置信度线索，必须要求用户继续核实。\n- `inferred`：只能用于风险提示或待确认问题，不能包装成项目事实。\n- `unverified`：不得作为事实使用，应明确说证据不足。\n- `contradicted`：必须展示冲突来源，不得替用户强行选择一个版本。\n\n## 它最适合谁\n\n- **正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**：README 或插件配置提到多个宿主 AI。 证据：`README.md` Claim：`clm_0002` supported 0.86\n\n## 它能做什么\n\n- **命令行启动或安装流程**（需要安装后验证）：项目文档中存在可执行命令，真实使用需要在本地或宿主环境中运行这些命令。 证据：`README.md` Claim：`clm_0001` supported 0.86\n\n## 怎么开始\n\n- `npm install -g cc-connect` 证据：`README.md` Claim：`clm_0003` supported 0.86\n- `curl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64` 证据：`README.md` Claim：`clm_0004` supported 0.86\n- `git clone https://github.com/chenhg5/cc-connect.git` 证据：`README.md` Claim：`clm_0005` supported 0.86\n\n## 继续前判断卡\n\n- **当前建议**：先做角色匹配试用\n- **为什么**：这个项目更像角色库，核心风险是选错角色或把角色文案当执行能力；先用 Prompt Preview 试角色匹配，再决定是否沙盒导入。\n\n### 30 秒判断\n\n- **现在怎么做**：先做角色匹配试用\n- **最小安全下一步**：先用 Prompt Preview 试角色匹配；满意后再隔离导入\n- **先别相信**：角色质量和任务匹配不能直接相信。\n- **继续会触碰**：角色选择偏差、命令执行、宿主 AI 配置\n\n### 现在可以相信\n\n- **适合人群线索：正在使用 Claude/Codex/Cursor/Gemini 等宿主 AI 的开发者**（supported）：有 supported claim 或项目证据支撑，但仍不等于真实安装效果。 证据：`README.md` Claim：`clm_0002` supported 0.86\n- **能力存在：命令行启动或安装流程**（supported）：可以相信项目包含这类能力线索；是否适合你的具体任务仍要试用或安装后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86\n- **存在 Quick Start / 安装命令线索**（supported）：可以相信项目文档出现过启动或安装入口；不要因此直接在主力环境运行。 证据：`README.md` Claim：`clm_0003` supported 0.86\n\n### 现在还不能相信\n\n- **角色质量和任务匹配不能直接相信。**（unverified）：角色库证明有很多角色，不证明每个角色都适合你的具体任务，也不证明角色能产生高质量结果。\n- **不能把角色文案当成真实执行能力。**（unverified）：安装前只能判断角色描述和任务画像是否匹配，不能证明它能在宿主 AI 里完成任务。\n- **真实输出质量不能在安装前相信。**（unverified）：Prompt Preview 只能展示引导方式，不能证明真实项目中的结果质量。\n- **宿主 AI 版本兼容性不能在安装前相信。**（unverified）：Claude、Cursor、Codex、Gemini 等宿主加载规则和版本差异必须在真实环境验证。\n- **不会污染现有宿主 AI 行为，不能直接相信。**（inferred）：Skill、plugin、AGENTS/CLAUDE/GEMINI 指令可能改变宿主 AI 的默认行为。 证据：`AGENTS.md`, `CLAUDE.md`\n- **可安全回滚不能默认相信。**（unverified）：除非项目明确提供卸载和恢复说明，否则必须先在隔离环境验证。\n- **真实安装后是否与用户当前宿主 AI 版本兼容？**（unverified）：兼容性只能通过实际宿主环境验证。\n- **项目输出质量是否满足用户具体任务？**（unverified）：安装前预览只能展示流程和边界，不能替代真实评测。\n\n### 继续会触碰什么\n\n- **角色选择偏差**：用户对任务应该由哪个专家角色处理的判断。 原因：选错角色会让 AI 从错误专业视角回答，浪费时间或误导决策。\n- **命令执行**：包管理器、网络下载、本地插件目录、项目配置或用户主目录。 原因：运行第一条命令就可能产生环境改动；必须先判断是否值得跑。 证据：`README.md`\n- **宿主 AI 配置**：Claude/Codex/Cursor/Gemini/OpenCode 等宿主的 plugin、Skill 或规则加载配置。 原因：宿主配置会改变 AI 后续工作方式，可能和用户已有规则冲突。 证据：`AGENTS.md`, `CLAUDE.md`\n- **本地环境或项目文件**：安装结果、插件缓存、项目配置或本地依赖目录。 原因：安装前无法证明写入范围和回滚方式，需要隔离验证。 证据：`README.md`\n- **宿主 AI 上下文**：AI Context Pack、Prompt Preview、Skill 路由、风险规则和项目事实。 原因：导入上下文会影响宿主 AI 后续判断，必须避免把未验证项包装成事实。\n\n### 最小安全下一步\n\n- **先跑 Prompt Preview**：先用交互式试用验证任务画像和角色匹配，不要先导入整套角色库。（适用：任何项目都适用，尤其是输出质量未知时。）\n- **只在隔离目录或测试账号试装**：避免安装命令污染主力宿主 AI、真实项目或用户主目录。（适用：存在命令执行、插件配置或本地写入线索时。）\n- **先备份宿主 AI 配置**：Skill、plugin、规则文件可能改变 Claude/Cursor/Codex 的默认行为。（适用：存在插件 manifest、Skill 或宿主规则入口时。）\n- **安装后只验证一个最小任务**：先验证加载、兼容、输出质量和回滚，再决定是否深用。（适用：准备从试用进入真实工作流时。）\n\n### 退出方式\n\n- **保留安装前状态**：记录原始宿主配置和项目状态，后续才能判断是否可恢复。\n- **准备移除宿主 plugin / Skill / 规则入口**：如果试装后行为异常，可以把宿主 AI 恢复到试装前状态。\n- **保留原始角色选择记录**：如果输出偏题，可以回到任务画像阶段重新选择角色，而不是继续沿着错误角色推进。\n- **记录安装命令和写入路径**：没有明确卸载说明时，至少要知道哪些目录或配置需要手动清理。\n- **如果没有回滚路径，不进入主力环境**：不可回滚是继续前阻断项，不应靠信任或运气继续。\n\n## 哪些只能预览\n\n- 解释项目适合谁和能做什么\n- 基于项目文档演示典型对话流程\n- 帮助用户判断是否值得安装或继续研究\n\n## 哪些必须安装后验证\n\n- 真实安装 Skill、插件或 CLI\n- 执行脚本、修改本地文件或访问外部服务\n- 验证真实输出质量、性能和兼容性\n\n## 边界与风险判断卡\n\n- **把安装前预览误认为真实运行**：用户可能高估项目已经完成的配置、权限和兼容性验证。 处理方式：明确区分 prompt_preview_can_do 与 runtime_required。 Claim：`clm_0006` inferred 0.45\n- **命令执行会修改本地环境**：安装命令可能写入用户主目录、宿主插件目录或项目配置。 处理方式：先在隔离环境或测试账号中运行。 证据：`README.md` Claim：`clm_0007` supported 0.86\n- **待确认**：真实安装后是否与用户当前宿主 AI 版本兼容？。原因：兼容性只能通过实际宿主环境验证。\n- **待确认**：项目输出质量是否满足用户具体任务？。原因：安装前预览只能展示流程和边界，不能替代真实评测。\n- **待确认**：安装命令是否需要网络、权限或全局写入？。原因：这影响企业环境和个人环境的安装风险。\n\n## 开工前工作上下文\n\n### 加载顺序\n\n- 先读取 how_to_use.host_ai_instruction，建立安装前判断资产的边界。\n- 读取 claim_graph_summary，确认事实来自 Claim/Evidence Graph，而不是 Human Wiki 叙事。\n- 再读取 intended_users、capabilities 和 quick_start_candidates，判断用户是否匹配。\n- 需要执行具体任务时，优先查 role_skill_index，再查 evidence_index。\n- 遇到真实安装、文件修改、网络访问、性能或兼容性问题时，转入 risk_card 和 boundaries.runtime_required。\n\n### 任务路由\n\n- **命令行启动或安装流程**：先说明这是安装后验证能力，再给出安装前检查清单。 边界：必须真实安装或运行后验证。 证据：`README.md` Claim：`clm_0001` supported 0.86\n\n### 上下文规模\n\n- 文件总数：440\n- 重要文件覆盖：40/440\n- 证据索引条目：80\n- 角色 / Skill 条目：38\n\n### 证据不足时的处理\n\n- **missing_evidence**：说明证据不足，要求用户提供目标文件、README 段落或安装后验证记录；不要补全事实。\n- **out_of_scope_request**：说明该任务超出当前 AI Context Pack 证据范围，并建议用户先查看 Human Manual 或真实安装后验证。\n- **runtime_request**：给出安装前检查清单和命令来源，但不要替用户执行命令或声称已执行。\n- **source_conflict**：同时展示冲突来源，标记为待核实，不要强行选择一个版本。\n\n## Prompt Recipes\n\n### 适配判断\n\n- 目标：判断这个项目是否适合用户当前任务。\n- 预期输出：适配结论、关键理由、证据引用、安装前可预览内容、必须安装后验证内容、下一步建议。\n\n```text\n请基于 cc-connect 的 AI Context Pack，先问我 3 个必要问题，然后判断它是否适合我的任务。回答必须包含：适合谁、能做什么、不能做什么、是否值得安装、证据来自哪里。所有项目事实必须引用 evidence_refs、source_paths 或 claim_id。\n```\n\n### 安装前体验\n\n- 目标：让用户在安装前感受核心工作流，同时避免把预览包装成真实能力或营销承诺。\n- 预期输出：一段带边界标签的体验剧本、安装后验证清单和谨慎建议；不含真实运行承诺或强营销表述。\n\n```text\n请把 cc-connect 当作安装前体验资产，而不是已安装工具或真实运行环境。\n\n请严格输出四段：\n1. 先问我 3 个必要问题。\n2. 给出一段“体验剧本”：用 [安装前可预览]、[必须安装后验证]、[证据不足] 三种标签展示它可能如何引导工作流。\n3. 给出安装后验证清单：列出哪些能力只有真实安装、真实宿主加载、真实项目运行后才能确认。\n4. 给出谨慎建议：只能说“值得继续研究/试装”“先补充信息后再判断”或“不建议继续”，不得替项目背书。\n\n硬性边界：\n- 不要声称已经安装、运行、执行测试、修改文件或产生真实结果。\n- 不要写“自动适配”“确保通过”“完美适配”“强烈建议安装”等承诺性表达。\n- 如果描述安装后的工作方式，必须使用“如果安装成功且宿主正确加载 Skill，它可能会……”这种条件句。\n- 体验剧本只能写成“示例台词/假设流程”：使用“可能会询问/可能会建议/可能会展示”，不要写“已写入、已生成、已通过、正在运行、正在生成”。\n- Prompt Preview 不负责给安装命令；如用户准备试装，只能提示先阅读 Quick Start 和 Risk Card，并在隔离环境验证。\n- 所有项目事实必须来自 supported claim、evidence_refs 或 source_paths；inferred/unverified 只能作风险或待确认项。\n\n```\n\n### 角色 / Skill 选择\n\n- 目标：从项目里的角色或 Skill 中挑选最匹配的资产。\n- 预期输出：候选角色或 Skill 列表，每项包含适用场景、证据路径、风险边界和是否需要安装后验证。\n\n```text\n请读取 role_skill_index，根据我的目标任务推荐 3-5 个最相关的角色或 Skill。每个推荐都要说明适用场景、可能输出、风险边界和 evidence_refs。\n```\n\n### 风险预检\n\n- 目标：安装或引入前识别环境、权限、规则冲突和质量风险。\n- 预期输出：环境、权限、依赖、许可、宿主冲突、质量风险和未知项的检查清单。\n\n```text\n请基于 risk_card、boundaries 和 quick_start_candidates，给我一份安装前风险预检清单。不要替我执行命令，只说明我应该检查什么、为什么检查、失败会有什么影响。\n```\n\n### 宿主 AI 开工指令\n\n- 目标：把项目上下文转成一次对话开始前的宿主 AI 指令。\n- 预期输出：一段边界明确、证据引用明确、适合复制给宿主 AI 的开工前指令。\n\n```text\n请基于 cc-connect 的 AI Context Pack，生成一段我可以粘贴给宿主 AI 的开工前指令。这段指令必须遵守 not_runtime=true，不能声称项目已经安装、运行或产生真实结果。\n```\n\n\n## 角色 / Skill 索引\n\n- 共索引 38 个角色 / Skill / 项目文档条目。\n\n- **Sponsors Images**（project_doc）：This directory contains sponsor logos for the README sponsor section. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/images/sponsors/README.md`\n- **CC-Connect Development Guide**（project_doc）：CC-Connect is a bridge that connects AI coding agents Claude Code, Codex, Gemini CLI, Cursor, etc. with messaging platforms Feishu/Lark, Telegram, Discord, Slack, DingTalk, WeChat Work, QQ, LINE . Users interact with their coding agent through their preferred messaging app. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`AGENTS.md`\n- **CC-Connect Development Guide**（project_doc）：CC-Connect is a bridge that connects AI coding agents Claude Code, Codex, Gemini CLI, Cursor, etc. with messaging platforms Feishu/Lark, Telegram, Discord, Slack, DingTalk, WeChat Work, QQ, LINE . Users interact with their coding agent through their preferred messaging app. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CLAUDE.md`\n- **❤️ Sponsor**（project_doc）：Want to appear here? Contact: chg80333@gmail.com WeChat: mongorz 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.md`\n- **cc-connect**（project_doc）：Bridge local AI coding agents Claude Code, Cursor, Gemini CLI, Codex to messaging platforms Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work . 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`npm/README.md`\n- **Contributing to cc-connect**（project_doc）：中文 为-cc-connect-做贡献 English contributing-to-cc-connect 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CONTRIBUTING.md`\n- **Bridge Platform Protocol Specification**（project_doc）：Bridge Platform Protocol Specification 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/bridge-protocol.md`\n- **Bridge 平台协议规范**（project_doc）：Bridge 协议允许使用 任何编程语言 编写的外部平台适配器在运行时通过 WebSocket 动态接入 cc-connect，无需编写 Go 代码或重新编译二进制文件。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/bridge-protocol.zh-CN.md`\n- **钉钉 DingTalk 接入指南**（project_doc）：本文档介绍如何将 cc-connect 接入钉钉，让你可以通过钉钉机器人远程调用 Claude Code。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/dingtalk.md`\n- **Discord Setup Guide**（project_doc）：This guide walks you through connecting cc-connect to Discord, so you can chat with your local Claude Code via a Discord bot. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/discord.md`\n- **飞书 Feishu/Lark 接入指南**（project_doc）：本文档介绍如何将 cc-connect 接入飞书，让你可以通过飞书机器人远程调用 Claude Code。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/feishu.md`\n- **cc-connect Management API Specification**（project_doc）：cc-connect Management API Specification 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/management-api.md`\n- **cc-connect 管理 API 规范**（project_doc）：版本： 1.0-draft 状态： 草案 — 实现前可能变更 最后更新： 2026-03-10 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/management-api.zh-CN.md`\n- **MAX bot deployment guide**（project_doc）：The MAX platform adapter platform/max supports two delivery modes: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/max-webhook.md`\n- **QQ 平台接入指南 / QQ Platform Setup Guide**（project_doc）：QQ 平台接入指南 / QQ Platform Setup Guide 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/qq.md`\n- **QQ Bot 官方平台接入指南 / QQ Bot Official Platform Setup Guide**（project_doc）：QQ Bot 官方平台接入指南 / QQ Bot Official Platform Setup Guide 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/qqbot.md`\n- **Slack Platform Feature Inventory**（project_doc）：What Existed Before Our Work on main 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/slack-feature-inventory.md`\n- **Slack Setup Guide**（project_doc）：This guide walks you through connecting cc-connect to Slack, so you can chat with your local Claude Code via a Slack bot. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/slack.md`\n- **Telegram Setup Guide**（project_doc）：This guide walks you through connecting cc-connect to Telegram, so you can chat with your local Claude Code via a Telegram bot. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/telegram.md`\n- **Usage Guide**（project_doc）：Complete guide to using cc-connect features. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/usage.md`\n- **使用指南**（project_doc）：- 会话管理 会话管理 - 权限模式 权限模式 - API Provider 管理 api-provider-管理 - 模型选择 模型选择 - 工作目录切换（ /dir 、 /cd ） 工作目录切换dircd - 引用查看（ /show ） 引用查看show - 飞书配置 CLI 飞书配置-cli - 微信个人号配置 CLI 微信个人号配置-cli - Claude Code Router 集成 claude-code-router-集成 - 语音消息（语音转文字） 语音消息语音转文字 - 语音回复（文字转语音） 语音回复文字转语音 - 图片与文件回传 图片与文件回传 - 定时任务 Cron 定时任务-cron - 多机器人中继 多机器人中继 - 守护进程模式 守护进程模式 - 多工作区模式 多工作区模式 - Web 管理后台（Beta） web-管理后台beta - Bridge — 外部适配器接入（Beta） bridge… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/usage.zh-CN.md`\n- **企业微信 WeChat Work 接入指南**（project_doc）：本文档介绍如何将 cc-connect 接入企业微信，让你可以通过企业微信（甚至个人微信）远程调用 Claude Code。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/wecom.md`\n- **微博私信接入指南**（project_doc）：本文档介绍如何将 cc-connect 接入微博私信，让你可以通过微博私信远程调用 AI 编程 Agent。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/weibo.md`\n- **微信个人号（Weixin / ilink）接入指南**（project_doc）：本文档说明如何通过 cc-connect 接入 微信个人号 侧的对话能力。底层使用腾讯 ilink 机器人 HTTP 网关 （与 OpenClaw 插件 openclaw-weixin 同类接口： getUpdates 长轮询 + sendMessage 下发）。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/weixin.md`\n- **Delete Batch Implementation Plan**（project_doc）：For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-11-delete-batch.md`\n- **Feishu Delete Card Design**（project_doc）：Goal: Let Feishu users enter /delete with no arguments to open a card-based multi-select delete flow, while keeping explicit delete arguments such as /delete 1,2,3 working as direct command execution. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-11-feishu-delete-card-design.md`\n- **Feishu Delete Card Implementation Plan**（project_doc）：Feishu Delete Card Implementation Plan 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-11-feishu-delete-card.md`\n- **Multi-Workspace Feature Design**（project_doc）：Enable a single cc-connect bot one Slack token to serve multiple workspaces, with the channel determining which Claude Code working directory and session to use. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-12-multi-workspace-design.md`\n- **Multi-Workspace Implementation Plan**（project_doc）：Multi-Workspace Implementation Plan 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-12-multi-workspace-plan.md`\n- **Usage Command Design**（project_doc）：Goal: Add a built-in /usage command that reports model/account quota usage, starting with Codex running under ChatGPT OAuth, while keeping the retrieval path generic so other agents can plug in later. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-12-usage-design.md`\n- **Usage Command Implementation Plan**（project_doc）：For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-12-usage.md`\n- **Session Resilience Design**（project_doc）：Date: 2026-03-13 Status: Approved Branch: feat/multi-workspace 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-13-session-resilience-design.md`\n- **Session Resilience Implementation Plan**（project_doc）：Session Resilience Implementation Plan 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-13-session-resilience-plan.md`\n- **ACP 适配层设计（草案）**（project_doc）：本文描述在 cc-connect 中增加 Agent Client Protocol（ACP） 适配的可行方案，目标是让 已实现 ACP Agent 端 的上游进程（见 官方 Agents 列表 https://agentclientprotocol.com/get-started/agents ）能通过 统一协议 接入现有 core.Engine ，减少为每个 CLI 单独维护解析逻辑的成本。 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-23-acp-adapter-design.md`\n- **Integration Test Plan**（project_doc）：Integration tests verify real agent-platform interactions using actual agent binaries with a mock platform. Tests are gated by //go:build integration and excluded from normal CI. Run with: 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`docs/plans/2026-03-24-integration-tests.md`\n- **Changelog**（project_doc）：Beta release with Slack Assistant API, DingTalk improvements, MAX platform webhook mode, and numerous platform fixes. No breaking changes. 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`CHANGELOG.md`\n- **❤️ 赞助**（project_doc）：想在这里展示？联系：chg80333@gmail.com 微信：mongorz 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`README.zh-CN.md`\n- **v1.2.2-beta.3 — 2026-03-19**（project_doc）：Features - Multi-user mode - per-user rate limits, ACL, and audit logging 150 - ImageSender - unified image sending for 6 platforms 222 - MiniMax M2.7 - upgraded from M2.5 with 1M context 211 - /whoami - display user ID for ACL configuration - /btw - inject messages into busy sessions 138 - /dir - runtime work directory switching - Cron muting - mute/unmute cron jobs - Interrupt support - send Ctrl+C to agent sessio… 激活提示：当用户需要理解项目结构、安装方式或边界时参考。 证据：`changelogs/v1.2.2-beta.3.md`\n\n## 证据索引\n\n- 共索引 80 条证据。\n\n- **Sponsors Images**（documentation）：This directory contains sponsor logos for the README sponsor section. 证据：`docs/images/sponsors/README.md`\n- **CC-Connect Development Guide**（documentation）：CC-Connect is a bridge that connects AI coding agents Claude Code, Codex, Gemini CLI, Cursor, etc. with messaging platforms Feishu/Lark, Telegram, Discord, Slack, DingTalk, WeChat Work, QQ, LINE . Users interact with their coding agent through their preferred messaging app. 证据：`AGENTS.md`\n- **CC-Connect Development Guide**（documentation）：CC-Connect is a bridge that connects AI coding agents Claude Code, Codex, Gemini CLI, Cursor, etc. with messaging platforms Feishu/Lark, Telegram, Discord, Slack, DingTalk, WeChat Work, QQ, LINE . Users interact with their coding agent through their preferred messaging app. 证据：`CLAUDE.md`\n- **❤️ Sponsor**（documentation）：Want to appear here? Contact: chg80333@gmail.com WeChat: mongorz 证据：`README.md`\n- **cc-connect**（documentation）：Bridge local AI coding agents Claude Code, Cursor, Gemini CLI, Codex to messaging platforms Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work . 证据：`npm/README.md`\n- **Package**（package_manifest）：{ \"name\": \"cc-connect\", \"version\": \"1.3.3-beta.2\", \"description\": \"Bridge local AI coding agents Claude Code, Cursor, Gemini CLI to messaging platforms Feishu, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work \", \"keywords\": \"claude-code\", \"ai-coding\", \"feishu\", \"dingtalk\", \"slack\", \"telegram\", \"discord\", \"line\", \"wechat-work\", \"chatbot\", \"bridge\" , \"homepage\": \"https://github.com/chenhg5/cc-connect\", \"repository\": { \"type\": \"git\", \"url\": \"https://github.com/chenhg5/cc-connect.git\" }, \"license\": \"MIT\", \"author\": \"chenhg5\", \"bin\": { \"cc-connect\": \"run.js\" }, \"scripts\": { \"postinstall\": \"node install.js\" }, \"files\": \"install.js\", \"run.js\", \"README.md\" } 证据：`npm/package.json`\n- **Package**（package_manifest）：{ \"name\": \"cc-connect-web\", \"version\": \"0.1.0\", \"private\": true, \"type\": \"module\", \"scripts\": { \"dev\": \"vite\", \"build\": \"tsc -b && vite build\", \"preview\": \"vite preview\" }, \"dependencies\": { \"@tailwindcss/typography\": \"^0.5.19\", \"clsx\": \"^2.1.1\", \"highlight.js\": \"^11.11.1\", \"i18next\": \"^25.1.2\", \"lucide-react\": \"^0.487.0\", \"qrcode.react\": \"^4.2.0\", \"react\": \"^19.1.0\", \"react-dom\": \"^19.1.0\", \"react-i18next\": \"^15.5.1\", \"react-markdown\": \"^10.1.0\", \"react-router-dom\": \"^7.5.0\", \"rehype-highlight\": \"^7.0.2\", \"remark-gfm\": \"^4.0.1\", \"zustand\": \"^5.0.5\" }, \"devDependencies\": { \"@types/react\": \"^19.1.2\", \"@types/react-dom\": \"^19.1.2\", \"@vitejs/plugin-react\": \"^4.4.1\", \"autoprefixer\": \"^10.4.21\",… 证据：`web/package.json`\n- **Contributing to cc-connect**（documentation）：中文 为-cc-connect-做贡献 English contributing-to-cc-connect 证据：`CONTRIBUTING.md`\n- **Bridge Platform Protocol Specification**（documentation）：Bridge Platform Protocol Specification 证据：`docs/bridge-protocol.md`\n- **Bridge 平台协议规范**（documentation）：Bridge 协议允许使用 任何编程语言 编写的外部平台适配器在运行时通过 WebSocket 动态接入 cc-connect，无需编写 Go 代码或重新编译二进制文件。 证据：`docs/bridge-protocol.zh-CN.md`\n- **钉钉 DingTalk 接入指南**（documentation）：本文档介绍如何将 cc-connect 接入钉钉，让你可以通过钉钉机器人远程调用 Claude Code。 证据：`docs/dingtalk.md`\n- **Discord Setup Guide**（documentation）：This guide walks you through connecting cc-connect to Discord, so you can chat with your local Claude Code via a Discord bot. 证据：`docs/discord.md`\n- **飞书 Feishu/Lark 接入指南**（documentation）：本文档介绍如何将 cc-connect 接入飞书，让你可以通过飞书机器人远程调用 Claude Code。 证据：`docs/feishu.md`\n- **cc-connect Management API Specification**（documentation）：cc-connect Management API Specification 证据：`docs/management-api.md`\n- **cc-connect 管理 API 规范**（documentation）：版本： 1.0-draft 状态： 草案 — 实现前可能变更 最后更新： 2026-03-10 证据：`docs/management-api.zh-CN.md`\n- **MAX bot deployment guide**（documentation）：The MAX platform adapter platform/max supports two delivery modes: 证据：`docs/max-webhook.md`\n- **QQ 平台接入指南 / QQ Platform Setup Guide**（documentation）：QQ 平台接入指南 / QQ Platform Setup Guide 证据：`docs/qq.md`\n- **QQ Bot 官方平台接入指南 / QQ Bot Official Platform Setup Guide**（documentation）：QQ Bot 官方平台接入指南 / QQ Bot Official Platform Setup Guide 证据：`docs/qqbot.md`\n- **Slack Platform Feature Inventory**（documentation）：What Existed Before Our Work on main 证据：`docs/slack-feature-inventory.md`\n- **Slack Setup Guide**（documentation）：This guide walks you through connecting cc-connect to Slack, so you can chat with your local Claude Code via a Slack bot. 证据：`docs/slack.md`\n- **Telegram Setup Guide**（documentation）：This guide walks you through connecting cc-connect to Telegram, so you can chat with your local Claude Code via a Telegram bot. 证据：`docs/telegram.md`\n- **Usage Guide**（documentation）：Complete guide to using cc-connect features. 证据：`docs/usage.md`\n- **使用指南**（documentation）：- 会话管理 会话管理 - 权限模式 权限模式 - API Provider 管理 api-provider-管理 - 模型选择 模型选择 - 工作目录切换（ /dir 、 /cd ） 工作目录切换dircd - 引用查看（ /show ） 引用查看show - 飞书配置 CLI 飞书配置-cli - 微信个人号配置 CLI 微信个人号配置-cli - Claude Code Router 集成 claude-code-router-集成 - 语音消息（语音转文字） 语音消息语音转文字 - 语音回复（文字转语音） 语音回复文字转语音 - 图片与文件回传 图片与文件回传 - 定时任务 Cron 定时任务-cron - 多机器人中继 多机器人中继 - 守护进程模式 守护进程模式 - 多工作区模式 多工作区模式 - Web 管理后台（Beta） web-管理后台beta - Bridge — 外部适配器接入（Beta） bridge--外部适配器接入beta - 配置参考 配置参考 证据：`docs/usage.zh-CN.md`\n- **企业微信 WeChat Work 接入指南**（documentation）：本文档介绍如何将 cc-connect 接入企业微信，让你可以通过企业微信（甚至个人微信）远程调用 Claude Code。 证据：`docs/wecom.md`\n- **微博私信接入指南**（documentation）：本文档介绍如何将 cc-connect 接入微博私信，让你可以通过微博私信远程调用 AI 编程 Agent。 证据：`docs/weibo.md`\n- **微信个人号（Weixin / ilink）接入指南**（documentation）：本文档说明如何通过 cc-connect 接入 微信个人号 侧的对话能力。底层使用腾讯 ilink 机器人 HTTP 网关 （与 OpenClaw 插件 openclaw-weixin 同类接口： getUpdates 长轮询 + sendMessage 下发）。 证据：`docs/weixin.md`\n- **Delete Batch Implementation Plan**（documentation）：For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. 证据：`docs/plans/2026-03-11-delete-batch.md`\n- **Feishu Delete Card Design**（documentation）：Goal: Let Feishu users enter /delete with no arguments to open a card-based multi-select delete flow, while keeping explicit delete arguments such as /delete 1,2,3 working as direct command execution. 证据：`docs/plans/2026-03-11-feishu-delete-card-design.md`\n- **Feishu Delete Card Implementation Plan**（documentation）：Feishu Delete Card Implementation Plan 证据：`docs/plans/2026-03-11-feishu-delete-card.md`\n- **Multi-Workspace Feature Design**（documentation）：Enable a single cc-connect bot one Slack token to serve multiple workspaces, with the channel determining which Claude Code working directory and session to use. 证据：`docs/plans/2026-03-12-multi-workspace-design.md`\n- **Multi-Workspace Implementation Plan**（documentation）：Multi-Workspace Implementation Plan 证据：`docs/plans/2026-03-12-multi-workspace-plan.md`\n- **Usage Command Design**（documentation）：Goal: Add a built-in /usage command that reports model/account quota usage, starting with Codex running under ChatGPT OAuth, while keeping the retrieval path generic so other agents can plug in later. 证据：`docs/plans/2026-03-12-usage-design.md`\n- **Usage Command Implementation Plan**（documentation）：For Claude: REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task. 证据：`docs/plans/2026-03-12-usage.md`\n- **Session Resilience Design**（documentation）：Date: 2026-03-13 Status: Approved Branch: feat/multi-workspace 证据：`docs/plans/2026-03-13-session-resilience-design.md`\n- **Session Resilience Implementation Plan**（documentation）：Session Resilience Implementation Plan 证据：`docs/plans/2026-03-13-session-resilience-plan.md`\n- **ACP 适配层设计（草案）**（documentation）：本文描述在 cc-connect 中增加 Agent Client Protocol（ACP） 适配的可行方案，目标是让 已实现 ACP Agent 端 的上游进程（见 官方 Agents 列表 https://agentclientprotocol.com/get-started/agents ）能通过 统一协议 接入现有 core.Engine ，减少为每个 CLI 单独维护解析逻辑的成本。 证据：`docs/plans/2026-03-23-acp-adapter-design.md`\n- **Integration Test Plan**（documentation）：Integration tests verify real agent-platform interactions using actual agent binaries with a mock platform. Tests are gated by //go:build integration and excluded from normal CI. Run with: 证据：`docs/plans/2026-03-24-integration-tests.md`\n- **Changelog**（documentation）：Beta release with Slack Assistant API, DingTalk improvements, MAX platform webhook mode, and numerous platform fixes. No breaking changes. 证据：`CHANGELOG.md`\n- **❤️ 赞助**（documentation）：想在这里展示？联系：chg80333@gmail.com 微信：mongorz 证据：`README.zh-CN.md`\n- **v1.2.2-beta.3 — 2026-03-19**（documentation）：Features - Multi-user mode - per-user rate limits, ACL, and audit logging 150 - ImageSender - unified image sending for 6 platforms 222 - MiniMax M2.7 - upgraded from M2.5 with 1M context 211 - /whoami - display user ID for ACL configuration - /btw - inject messages into busy sessions 138 - /dir - runtime work directory switching - Cron muting - mute/unmute cron jobs - Interrupt support - send Ctrl+C to agent sessions 198 - CORS support - Bridge API cross-origin requests 196 - Message queuing - queue when agent is busy instead of dropping - QQ Bot Markdown - full Markdown support 172 - models config - per-provider model selection via alias 200 证据：`changelogs/v1.2.2-beta.3.md`\n- **Settings.Local**（structured_config）：{ \"permissions\": { \"allow\": \"Bash git add: \", \"Bash git commit -m ': \" } } 证据：`.claude/settings.local.json`\n- **Slack App Manifest**（structured_config）：{ \" metadata\": { \"major version\": 2, \"minor version\": 1 }, \"display information\": { \"name\": \"CC-Connect\", \"description\": \"Bridge between AI coding agents and Slack\", \"background color\": \" 1a1a2e\" }, \"features\": { \"bot user\": { \"display name\": \"CC-Connect\", \"always online\": true }, \"slash commands\": { \"command\": \"/ps\", \"description\": \"Send a P.S. to the running task\", \"usage hint\": \" message \", \"should escape\": false }, { \"command\": \"/new\", \"description\": \"Start a new session\", \"usage hint\": \" name \", \"should escape\": false }, { \"command\": \"/list\", \"description\": \"List agent sessions\", \"should escape\": false }, { \"command\": \"/switch\", \"description\": \"Resume a session by its list number\", \"us… 证据：`docs/slack-app-manifest.json`\n- **Provider Presets**（structured_config）：{ \"version\": 2, \"updated at\": \"2026-04-21\", \"providers\": { \"name\": \"minimax\", \"display name\": \"MiniMax\", \"invite url\": \"https://platform.minimax.io/subscribe/token-plan?code=lqYrKBvjke&source=link\", \"description\": \"Next-gen LLM with 1M context window, strong SWE performance 56.2% SWE-Pro . Exclusive 12% off Token Plan for cc-connect users!\", \"description zh\": \"新一代大模型，支持 1M 超长上下文，软件工程能力突出（SWE-Pro 56.2%）。cc-connect 用户专享 Token 套餐 88 折！\", \"features\": \"1M Context\", \"Extended Thinking\", \"SWE-Pro 56.2%\" , \"tier\": 1, \"website\": \"https://platform.minimax.io\", \"agents\": { \"claudecode\": { \"base url\": \"https://api.minimax.io/anthropic\", \"model\": \"MiniMax-M2.7\", \"models\": \"MiniMax-M2.7\", \"MiniMax-M2.7-h… 证据：`provider-presets.json`\n- **Skill Presets**（structured_config）：{ \"version\": 1, \"updated at\": \"2026-04-18\", \"skills\": { \"name\": \"find-skills\", \"display name\": \"Find Skills\", \"description\": \"Discover and install specialized agent skills from the open ecosystem when users need extended capabilities\", \"description zh\": \"从开放技能生态中发现和安装专业 Agent 技能，帮助用户扩展 AI 代理能力\", \"version\": \"1.0.0\", \"author\": \"vercel-labs\", \"url\": \"https://skills.sh/vercel-labs/skills/find-skills\", \"tags\": \"skills\", \"ecosystem\", \"discovery\" , \"featured\": true, \"source\": { \"provider\": \"skills.sh\", \"name\": \"Skills.sh\", \"url\": \"https://skills.sh\" }, \"pricing\": { \"type\": \"free\" } } } 证据：`skill-presets.json`\n- **.Pnpmrc**（structured_config）：{\"onlyBuiltDependencies\": \"esbuild\" } 证据：`web/.pnpmrc.json`\n- **Tsconfig**（structured_config）：{ \"compilerOptions\": { \"target\": \"ES2020\", \"useDefineForClassFields\": true, \"lib\": \"ES2020\", \"DOM\", \"DOM.Iterable\" , \"module\": \"ESNext\", \"skipLibCheck\": true, \"moduleResolution\": \"bundler\", \"allowImportingTsExtensions\": true, \"isolatedModules\": true, \"moduleDetection\": \"force\", \"noEmit\": true, \"jsx\": \"react-jsx\", \"strict\": true, \"noUnusedLocals\": false, \"noUnusedParameters\": false, \"noFallthroughCasesInSwitch\": true, \"forceConsistentCasingInFileNames\": true, \"baseUrl\": \".\", \"paths\": { \"@/ \": \"src/ \" } }, \"include\": \"src\", \"vite-env.d.ts\" } 证据：`web/tsconfig.json`\n- **2026 03 12 Multi Workspace Plan.Md.Tasks**（structured_config）：{ \"planPath\": \"docs/plans/2026-03-12-multi-workspace-plan.md\", \"tasks\": {\"id\": 1, \"subject\": \"Task 1: Add config fields\", \"status\": \"pending\"}, {\"id\": 2, \"subject\": \"Task 2: Workspace binding persistence\", \"status\": \"pending\", \"blockedBy\": 1 }, {\"id\": 3, \"subject\": \"Task 3: Workspace state and idle reaper\", \"status\": \"pending\", \"blockedBy\": 1 }, {\"id\": 4, \"subject\": \"Task 4: Channel name resolution in Slack platform\", \"status\": \"pending\"}, {\"id\": 5, \"subject\": \"Task 5: Engine multi-workspace fields and constructor\", \"status\": \"pending\", \"blockedBy\": 2, 3 }, {\"id\": 6, \"subject\": \"Task 6: Workspace resolution logic\", \"status\": \"pending\", \"blockedBy\": 4, 5 }, {\"id\": 7, \"subject\": \"Task 7: Init… 证据：`docs/plans/2026-03-12-multi-workspace-plan.md.tasks.json`\n- **2026 03 13 Session Resilience Plan.Md.Tasks**（structured_config）：{ \"planPath\": \"docs/plans/2026-03-13-session-resilience-plan.md\", \"tasks\": {\"id\": 7, \"subject\": \"Task 1: Add normalizeWorkspacePath helper\", \"status\": \"pending\"}, {\"id\": 8, \"subject\": \"Task 2: Apply path normalization at entry points\", \"status\": \"pending\", \"blockedBy\": 7 }, {\"id\": 9, \"subject\": \"Task 3: Add token usage fields to Event and parse in session\", \"status\": \"pending\"}, {\"id\": 10, \"subject\": \"Task 4: Track context % on interactiveState and append to messages\", \"status\": \"pending\", \"blockedBy\": 9 }, {\"id\": 11, \"subject\": \"Task 5: Add system prompt instruction for self-reporting\", \"status\": \"pending\"}, {\"id\": 12, \"subject\": \"Task 6: Add dual-track context logging\", \"status\": \"pending… 证据：`docs/plans/2026-03-13-session-resilience-plan.md.tasks.json`\n- **En**（structured_config）：{ \"nav\": { \"dashboard\": \"Dashboard\", \"projects\": \"Projects\", \"providers\": \"Providers\", \"sessions\": \"Sessions\", \"chat\": \"Chat\", \"cron\": \"Cron\", \"bridge\": \"Bridge\", \"skills\": \"Skills\", \"system\": \"System\" }, \"dashboard\": { \"title\": \"Dashboard\", \"version\": \"Version\", \"uptime\": \"Uptime\", \"platforms\": \"Platforms\", \"projects\": \"Projects\", \"bridgeAdapters\": \"Bridge adapters\", \"noData\": \"No data available\", \"recentSessions\": \"Recent sessions\" }, \"projects\": { \"title\": \"Projects\", \"name\": \"Name\", \"agent\": \"Agent\", \"platforms\": \"Platforms\", \"sessions\": \"Sessions\", \"heartbeat\": \"Heartbeat\", \"settings\": \"Settings\", \"quiet\": \"Quiet mode\", \"language\": \"Language\", \"adminFrom\": \"Admin from\", \"disabledComman… 证据：`web/src/i18n/locales/en.json`\n- **Es**（structured_config）：{ \"nav\": { \"dashboard\": \"Panel\", \"projects\": \"Proyectos\", \"providers\": \"Proveedores\", \"sessions\": \"Sesiones\", \"chat\": \"Chat\", \"cron\": \"Cron\", \"bridge\": \"Puente\", \"skills\": \"Habilidades\", \"system\": \"Sistema\" }, \"dashboard\": { \"title\": \"Panel\", \"version\": \"Versión\", \"uptime\": \"Tiempo activo\", \"platforms\": \"Plataformas\", \"projects\": \"Proyectos\", \"bridgeAdapters\": \"Adaptadores de puente\", \"noData\": \"No hay datos disponibles\", \"recentSessions\": \"Sesiones recientes\" }, \"projects\": { \"title\": \"Proyectos\", \"name\": \"Nombre\", \"agent\": \"Agente\", \"platforms\": \"Plataformas\", \"sessions\": \"Sesiones\", \"heartbeat\": \"Latido\", \"settings\": \"Ajustes\", \"quiet\": \"Modo silencioso\", \"language\": \"Idioma\", \"adminFrom… 证据：`web/src/i18n/locales/es.json`\n- **Ja**（structured_config）：{ \"nav\": { \"dashboard\": \"ダッシュボード\", \"projects\": \"プロジェクト\", \"providers\": \"プロバイダー\", \"sessions\": \"セッション\", \"chat\": \"チャット\", \"cron\": \"Cron\", \"bridge\": \"ブリッジ\", \"skills\": \"スキル\", \"system\": \"システム\" }, \"dashboard\": { \"title\": \"ダッシュボード\", \"version\": \"バージョン\", \"uptime\": \"稼働時間\", \"platforms\": \"プラットフォーム\", \"projects\": \"プロジェクト\", \"bridgeAdapters\": \"ブリッジアダプター\", \"noData\": \"データがありません\", \"recentSessions\": \"最近のセッション\" }, \"projects\": { \"title\": \"プロジェクト\", \"name\": \"名前\", \"agent\": \"エージェント\", \"platforms\": \"プラットフォーム\", \"sessions\": \"セッション\", \"heartbeat\": \"ハートビート\", \"settings\": \"設定\", \"quiet\": \"サイレントモード\", \"language\": \"言語\", \"adminFrom\": \"管理元\", \"disabledCommands\": \"無効化したコマンド\", \"save\": \"保存\", \"detail\": \"詳細\", \"noProjects\": \"プロジェクトが設定されていませ… 证据：`web/src/i18n/locales/ja.json`\n- **Zh Tw**（structured_config）：{ \"nav\": { \"dashboard\": \"總覽\", \"projects\": \"專案\", \"providers\": \"服務商\", \"sessions\": \"工作階段\", \"chat\": \"對話\", \"cron\": \"排程工作\", \"bridge\": \"橋接\", \"skills\": \"技能\", \"system\": \"系統\" }, \"dashboard\": { \"title\": \"總覽\", \"version\": \"版本\", \"uptime\": \"運作時間\", \"platforms\": \"平台\", \"projects\": \"專案\", \"bridgeAdapters\": \"橋接介接器\", \"noData\": \"尚無資料\", \"recentSessions\": \"最近會話\" }, \"projects\": { \"title\": \"專案\", \"name\": \"名稱\", \"agent\": \"智慧代理\", \"platforms\": \"平台\", \"sessions\": \"工作階段\", \"heartbeat\": \"心跳\", \"settings\": \"設定\", \"quiet\": \"靜音模式\", \"language\": \"語言\", \"adminFrom\": \"管理來源\", \"disabledCommands\": \"已停用指令\", \"save\": \"儲存\", \"detail\": \"詳細資料\", \"noProjects\": \"尚未設定專案\", \"workDir\": \"工作目錄\", \"agentType\": \"Agent 類型\", \"agentTypeChangeHint\": \"切換 Agent 類型… 证据：`web/src/i18n/locales/zh-TW.json`\n- **Zh**（structured_config）：{ \"nav\": { \"dashboard\": \"概览\", \"projects\": \"项目\", \"providers\": \"服务商\", \"sessions\": \"会话\", \"chat\": \"对话\", \"cron\": \"定时任务\", \"bridge\": \"桥接\", \"skills\": \"技能\", \"system\": \"系统\" }, \"dashboard\": { \"title\": \"概览\", \"version\": \"版本\", \"uptime\": \"运行时间\", \"platforms\": \"平台\", \"projects\": \"项目\", \"bridgeAdapters\": \"桥接适配器\", \"noData\": \"暂无数据\", \"recentSessions\": \"最近会话\" }, \"projects\": { \"title\": \"项目\", \"name\": \"名称\", \"agent\": \"智能体\", \"platforms\": \"平台\", \"sessions\": \"会话\", \"heartbeat\": \"心跳\", \"settings\": \"设置\", \"quiet\": \"静默模式\", \"language\": \"语言\", \"adminFrom\": \"管理来源\", \"disabledCommands\": \"已禁用命令\", \"save\": \"保存\", \"detail\": \"详情\", \"noProjects\": \"尚未配置项目\", \"workDir\": \"工作目录\", \"agentType\": \"Agent 类型\", \"agentTypeChangeHint\": \"切换 Agent 类型需要重启，不兼… 证据：`web/src/i18n/locales/zh.json`\n- **These are supported funding model platforms**（source_file）：These are supported funding model platforms 证据：`.github/FUNDING.yml`\n- **============================================================================**（source_file）：============================================================================ Binary outputs ============================================================================ /cc-connect cc-connect.bak- .exe .exe~ .dll .so .dylib .test .out .old 证据：`.gitignore`\n- **.Golangci**（source_file）：linters: enable: - errcheck - gosimple - govet - ineffassign - staticcheck - unused 证据：`.golangci.yml`\n- **---------------------------------------------------------------------------**（source_file）：APP := cc-connect MODULE := github.com/chenhg5/cc-connect CMD := ./cmd/cc-connect DIST := dist 证据：`Makefile`\n- **Config**（source_file）：import \"fmt\" \"log/slog\" \"os\" \"path/filepath\" \"reflect\" \"regexp\" \"runtime\" \"strconv\" \"strings\" \"sync\" 证据：`config/config.go`\n- **Very important - do not lose this!**（source_file）：import \"os\" \"path/filepath\" \"runtime\" \"strings\" \"testing\" 证据：`config/config_test.go`\n- **Api**（source_file）：import \"encoding/json\" \"fmt\" \"io\" \"log/slog\" \"net\" \"net/http\" \"os\" \"path/filepath\" \"sync\" \"time\" 证据：`core/api.go`\n- 其余 20 条证据见 `AI_CONTEXT_PACK.json` 或 `EVIDENCE_INDEX.json`。\n\n## 宿主 AI 必须遵守的规则\n\n- **把本资产当作开工前上下文，而不是运行环境。**：AI Context Pack 只包含证据化项目理解，不包含目标项目的可执行状态。 证据：`docs/images/sponsors/README.md`, `AGENTS.md`, `CLAUDE.md`\n- **回答用户时区分可预览内容与必须安装后才能验证的内容。**：安装前体验的消费者价值来自降低误装和误判，而不是伪装成真实运行。 证据：`docs/images/sponsors/README.md`, `AGENTS.md`, `CLAUDE.md`\n\n## 用户开工前应该回答的问题\n\n- 你准备在哪个宿主 AI 或本地环境中使用它？\n- 你只是想先体验工作流，还是准备真实安装？\n- 你最在意的是安装成本、输出质量、还是和现有规则的冲突？\n\n## 验收标准\n\n- 所有能力声明都能回指到 evidence_refs 中的文件路径。\n- AI_CONTEXT_PACK.md 没有把预览包装成真实运行。\n- 用户能在 3 分钟内看懂适合谁、能做什么、如何开始和风险边界。\n\n---\n\n## Doramagic Context Augmentation\n\n下面内容用于强化 Repomix/AI Context Pack 主体。Human Manual 只提供阅读骨架；踩坑日志会被转成宿主 AI 必须遵守的工作约束。\n\n## Human Manual 骨架\n\n使用规则：这里只是项目阅读路线和显著性信号，不是事实权威。具体事实仍必须回到 repo evidence / Claim Graph。\n\n宿主 AI 硬性规则：\n- 不得把页标题、章节顺序、摘要或 importance 当作项目事实证据。\n- 解释 Human Manual 骨架时，必须明确说它只是阅读路线/显著性信号。\n- 能力、安装、兼容性、运行状态和风险判断必须引用 repo evidence、source path 或 Claim Graph。\n\n- **Introduction to cc-connect**：importance `high`\n  - source_paths: README.md, docs/bridge-protocol.md\n- **Quick Start Guide**：importance `high`\n  - source_paths: INSTALL.md, config.example.toml, cmd/cc-connect/main.go\n- **System Architecture**：importance `high`\n  - source_paths: core/bridge.go, core/engine.go, core/relay.go, docs/images/connector.png\n- **Core Components**：importance `high`\n  - source_paths: core/bridge_capabilities.go, core/provider.go, core/ratelimit.go, core/markdown.go, core/workspace_state.go\n- **Agent Integrations**：importance `high`\n  - source_paths: agent/claudecode/claudecode.go, agent/codex/codex.go, agent/cursor/cursor.go, agent/gemini/gemini.go, agent/kimi/kimi.go\n- **Platform Integrations**：importance `high`\n  - source_paths: platform/feishu/feishu.go, platform/telegram/telegram.go, platform/slack/slack.go, platform/discord/discord.go, platform/dingtalk/dingtalk.go\n- **Configuration Guide**：importance `high`\n  - source_paths: config/config.go, config.example.toml, core/provider_presets.go, core/skill_presets.go\n- **Session Management**：importance `high`\n  - source_paths: core/session.go, core/projectstate.go, core/dir_history.go, core/cron.go, core/command.go\n\n## Repo Inspection Evidence / 源码检查证据\n\n- repo_clone_verified: true\n- repo_inspection_verified: true\n- repo_commit: `405cb109e8b7c8cdda39b2cfa60add65315d05fb`\n- inspected_files: `README.md`, `docs/slack.md`, `docs/qq.md`, `docs/discord.md`, `docs/usage.zh-CN.md`, `docs/management-api.zh-CN.md`, `docs/feishu.md`, `docs/management-api.md`, `docs/weibo.md`, `docs/max-webhook.md`, `docs/slack-feature-inventory.md`, `docs/wecom.md`, `docs/weixin.md`, `docs/usage.md`, `docs/telegram.md`, `docs/bridge-protocol.zh-CN.md`, `docs/slack-app-manifest.json`, `docs/wps-xiezuo.md`, `docs/dingtalk.md`, `docs/bridge-protocol.md`\n\n宿主 AI 硬性规则：\n- 没有 repo_clone_verified=true 时，不得声称已经读过源码。\n- 没有 repo_inspection_verified=true 时，不得把 README/docs/package 文件判断写成事实。\n- 没有 quick_start_verified=true 时，不得声称 Quick Start 已跑通。\n\n## Doramagic Pitfall Constraints / 踩坑约束\n\n这些规则来自 Doramagic 发现、验证或编译过程中的项目专属坑点。宿主 AI 必须把它们当作工作约束，而不是普通说明文字。\n\n### Constraint 1: 来源证据：[Bug]\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug]\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_c85c0f8f48ac44c7a855066b2bfc3939 | https://github.com/chenhg5/cc-connect/issues/933 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 2: 来源证据：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_bbbf45839e1043e2afdedf3f1d87b55b | https://github.com/chenhg5/cc-connect/issues/1058 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 3: 来源证据：[Feature] Preserve full interactive card schema on inbound\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Feature] Preserve full interactive card schema on inbound\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能影响升级、迁移或版本选择。\n- Evidence: community_evidence:github | cevd_f50380a7aef54548ac053b1127a2916e | https://github.com/chenhg5/cc-connect/issues/936 | 来源类型 github_issue 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 4: 来源证据：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- Trigger: GitHub 社区证据显示该项目存在一个安装相关的待验证问题：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_3a818efa6ddf479aae0f026d1f06d491 | https://github.com/chenhg5/cc-connect/issues/960 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 5: 来源证据：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_7b001c45ac3449abaee3dd365bc4cc74 | https://github.com/chenhg5/cc-connect/issues/972 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 6: 来源证据：WeChat ilink (weixin): image content is empty, not passed to agent\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：WeChat ilink (weixin): image content is empty, not passed to agent\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_17d4c5f39a5745c5bdfbc88cdac32056 | https://github.com/chenhg5/cc-connect/issues/1057 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 7: 来源证据：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- Trigger: GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能增加新用户试用和生产接入成本。\n- Evidence: community_evidence:github | cevd_6136e384578b499ca63299322032211a | https://github.com/chenhg5/cc-connect/issues/966 | 来源类型 github_issue 暴露的待验证使用条件。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 8: 失败模式：security_permissions: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- Trigger: Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions. Context: Observed during installation or first-run setup.\n- Why it matters: Developers may expose sensitive permissions or credentials: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- Evidence: failure_mode_cluster:github_issue | fmev_d8aeb38642d53571d47292761cca7247 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions, failure_mode_cluster:github_issue | fmev_105e57f4097e09e9e5c522a568ff4991 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 9: 失败模式：security_permissions: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root...\n\n- Trigger: Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- Host AI rule: Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志. Context: Observed when using linux\n- Why it matters: Developers may expose sensitive permissions or credentials: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- Evidence: failure_mode_cluster:github_issue | fmev_9f56ecf6ad99707575ffe84fc2c10e1b | https://github.com/chenhg5/cc-connect/issues/1054 | [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n\n### Constraint 10: 来源证据：Feature Request: 终端与 IM 双通道统一会话管理\n\n- Trigger: GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Feature Request: 终端与 IM 双通道统一会话管理\n- Host AI rule: 来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- Why it matters: 可能影响授权、密钥配置或安全边界。\n- Evidence: community_evidence:github | cevd_befa8b4f1c7f4ef483d6d8b38ba06ba4 | https://github.com/chenhg5/cc-connect/issues/968 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n- Hard boundary: 不要把这个坑点包装成已解决、已验证或可忽略，除非后续验证证据明确证明它已经关闭。\n",
      "summary": "给宿主 AI 的上下文和工作边界。",
      "title": "AI Context Pack / 带给我的 AI"
    },
    "boundary_risk_card": {
      "asset_id": "boundary_risk_card",
      "filename": "BOUNDARY_RISK_CARD.md",
      "markdown": "# Boundary & Risk Card / 安装前决策卡\n\n项目：chenhg5/cc-connect\n\n## Doramagic 试用结论\n\n当前结论：可以进入发布前推荐检查；首次使用仍应从最小权限、临时目录和可回滚配置开始。\n\n## 用户现在可以做\n\n- 可以先阅读 Human Manual，理解项目目的和主要工作流。\n- 可以复制 Prompt Preview 做安装前体验；这只验证交互感，不代表真实运行。\n- 可以把官方 Quick Start 命令放到隔离环境中验证，不要直接进主力环境。\n\n## 现在不要做\n\n- 不要把 Prompt Preview 当成项目实际运行结果。\n- 不要把 metadata-only validation 当成沙箱安装验证。\n- 不要把未验证能力写成“已支持、已跑通、可放心安装”。\n- 不要在首次试用时交出生产数据、私人文件、真实密钥或主力配置目录。\n\n## 安装前检查\n\n- 宿主 AI 是否匹配：claude, claude_code, cursor\n- 官方安装入口状态：已发现官方入口\n- 是否在临时目录、临时宿主或容器中验证：必须是\n- 是否能回滚配置改动：必须能\n- 是否需要 API Key、网络访问、读写文件或修改宿主配置：未确认前按高风险处理\n- 是否记录了安装命令、实际输出和失败日志：必须记录\n\n## 当前阻塞项\n\n- 无阻塞项。\n\n## 项目专属踩坑\n\n- 来源证据：[Bug]（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：[Feature] Preserve full interactive card schema on inbound（high）：可能影响升级、迁移或版本选择。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 来源证据：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)（high）：可能增加新用户试用和生产接入成本。 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n\n## 风险与权限提示\n\n- no_demo: medium\n\n## 证据缺口\n\n- 暂未发现结构化证据缺口。\n",
      "summary": "安装、权限、验证和推荐前风险。",
      "title": "Boundary & Risk Card / 边界与风险卡"
    },
    "human_manual": {
      "asset_id": "human_manual",
      "filename": "HUMAN_MANUAL.md",
      "markdown": "# https://github.com/chenhg5/cc-connect 项目说明书\n\n生成时间：2026-05-15 11:55:32 UTC\n\n## 目录\n\n- [Introduction to cc-connect](#page-introduction)\n- [Quick Start Guide](#page-quickstart)\n- [System Architecture](#page-architecture)\n- [Core Components](#page-core-components)\n- [Agent Integrations](#page-agent-integrations)\n- [Platform Integrations](#page-platform-integrations)\n- [Configuration Guide](#page-configuration)\n- [Session Management](#page-session-management)\n- [Web UI Administration](#page-web-ui)\n- [Deployment and Operations](#page-deployment)\n\n<a id='page-introduction'></a>\n\n## Introduction to cc-connect\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Quick Start Guide](#page-quickstart)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [npm/README.md](https://github.com/chenhg5/cc-connect/blob/main/npm/README.md)\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n- [web/src/pages/Projects/ProjectList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectList.tsx)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n</details>\n\n# Introduction to cc-connect\n\ncc-connect is a bridge service that connects local AI coding agents to messaging platforms, enabling developers to interact with their AI development assistants from anywhere through popular chat applications.\n\n## Overview\n\ncc-connect acts as a middleware layer between AI coding agents and messaging platforms. It allows developers to leverage the power of AI coding tools like Claude Code, Cursor, Codex, Gemini CLI, and iFlow from messaging applications such as Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, and WeChat Work.\n\n资料来源：[npm/README.md:1-12]()\n\n## Architecture\n\ncc-connect consists of three main components:\n\n| Component | Description | Technology |\n|-----------|-------------|------------|\n| Backend Service | Core bridge service that manages connections and message routing | Go |\n| Web Admin UI | Browser-based dashboard for configuration and monitoring | React/TypeScript |\n| NPM Package | CLI tool for installation and management | Node.js |\n\nThe backend service runs as a daemon process and maintains persistent connections to both the local AI coding agent and the configured messaging platforms.\n\n资料来源：[INSTALL.md:1-50]()\n\n## Supported AI Agents\n\ncc-connect integrates with multiple AI coding agents through a unified agent interface:\n\n| Agent | Type Identifier | Description |\n|-------|-----------------|-------------|\n| Claude Code | `claudecode` | Anthropic's CLI tool for Claude |\n| Codex | `codex` | OpenAI's coding agent |\n| Cursor | `cursor` | Cursor AI editor |\n| Gemini CLI | `gemini` | Google's Gemini CLI |\n| iFlow | `iflow` | iFlow AI platform |\n| Qoder | `qoder` | Qoder coding assistant |\n| OpenCode | `opencode` | Open code editing agent |\n\n资料来源：[INSTALL.md:60-75]()\n\n## Supported Messaging Platforms\n\nThe service supports integration with multiple enterprise and consumer messaging platforms:\n\n- **Feishu/Lark** - ByteDance's enterprise communication platform\n- **DingTalk** - Alibaba's enterprise messaging tool\n- **Slack** - Popular team collaboration platform\n- **Telegram** - Cloud-based instant messaging\n- **Discord** - Community and gaming communication\n- **LINE** - Japanese messaging application\n- **WeChat Work** - Tencent's enterprise WeChat variant\n\n资料来源：[npm/README.md:3]()\n\n## Project Management\n\ncc-connect organizes work through projects, where each project links a code folder to one or more messaging platforms.\n\n```toml\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"  # or \"codex\", \"cursor\", \"gemini\", \"qoder\", \"opencode\", \"iflow\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n资料来源：[INSTALL.md:30-45]()\n\n## Configuration\n\n### Configuration File Locations\n\ncc-connect searches for configuration in this order:\n\n| Priority | Location | Notes |\n|----------|----------|-------|\n| 1 | `-config <path>` flag | Explicit path specification |\n| 2 | `./config.toml` | Current directory |\n| 3 | `~/.cc-connect/config.toml` | Global user directory (recommended) |\n\nIf no config file exists, running `cc-connect` will auto-create a starter template at `~/.cc-connect/config.toml`.\n\n资料来源：[INSTALL.md:8-18]()\n\n### Global Settings\n\n| Setting | Values | Default | Description |\n|---------|--------|---------|-------------|\n| `language` | `\"en\"`, `\"zh\"`, `\"\"` | `\"\"` (auto-detect) | UI and message language |\n| `log.level` | `\"debug\"`, `\"info\"`, `\"warn\"`, `\"error\"` | `\"info\"` | Logging verbosity |\n\n## Web Interface\n\nThe web admin interface provides a graphical dashboard for managing all cc-connect functionality:\n\n### Sessions Management\n\nThe sessions feature displays active chat sessions with real-time status indicators:\n\n- Live session badges showing active connections\n- Last message preview with role indicators\n- Session switching and creation capabilities\n\n资料来源：[web/src/pages/Sessions/SessionList.tsx:10-30]()\n\n### Bridge Status Monitoring\n\nThe interface displays connection status between cc-connect and the configured messaging platforms:\n\n| Status | Indicator | Description |\n|--------|-----------|-------------|\n| Connected | Green indicator | Bridge active and operational |\n| Connecting | Spinner animation | Connection in progress |\n| Disconnected | Warning icon | Bridge connection lost |\n\n资料来源：[web/src/pages/Chat/ChatView.tsx:1-25]()\n\n### Provider Management\n\nProviders define the messaging platform connections. Each provider can have multiple models and agent types associated with it.\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:1-30]()\n\n## API Client\n\nThe web interface communicates with the backend through a RESTful API client:\n\n```typescript\nget<T>(path: string, params?: Record<string, string>)\npost<T>(path: string, body?: any)\nput<T>(path: string, body?: any)\npatch<T>(path: string, body?: any)\ndelete<T>(path: string)\nasync raw(path: string): Promise<string>\n```\n\nThe client supports JWT Bearer token authentication and handles unauthorized access with automatic callback notification.\n\n资料来源：[web/src/api/client.ts:1-50]()\n\n## Internationalization\n\ncc-connect supports multiple languages for its user interface and messages:\n\n| Language | Code | Status |\n|----------|------|--------|\n| English | `en` | Primary |\n| Chinese (Simplified) | `zh` | Supported |\n| Chinese (Traditional) | `zh-TW` | Supported |\n| Japanese | `ja` | Supported |\n| Spanish | `es` | Supported |\n\n资料来源：[core/i18n.go:1-50]()\n\n## Installation Methods\n\n### Package Managers\n\n| Platform | Command |\n|----------|---------|\n| macOS (Homebrew) | `brew install cc-connect` |\n| npm | `npm install -g cc-connect` |\n\n### Manual Installation\n\n1. Download the binary from GitHub Releases\n2. Make it executable: `chmod +x cc-connect`\n3. Move to PATH: `sudo mv cc-connect /usr/local/bin/`\n\n### Build from Source\n\nRequires Go 1.22+:\n\n```bash\ngit clone https://github.com/chenhg5/cc-connect.git\ncd cc-connect\nmake build\n```\n\n资料来源：[INSTALL.md:80-110]()\n\n## Daemon Management\n\ncc-connect can run as a background service managed by the operating system:\n\n| Command | Description |\n|---------|-------------|\n| `cc-connect daemon install` | Install as system service |\n| `cc-connect daemon start` | Start the service |\n| `cc-connect daemon stop` | Stop the service |\n| `cc-connect daemon restart` | Restart the service |\n| `cc-connect daemon status` | Check service status |\n| `cc-connect daemon logs` | View service logs |\n\nOn Linux, this uses systemd user services. On macOS, it uses launchd LaunchAgents. On Windows, it creates a Task Scheduler task.\n\n资料来源：[INSTALL.md:150-175]()\n\n## Workflow Diagram\n\n```mermaid\ngraph TD\n    A[User on Messaging Platform] -->|Sends Message| B[Messaging Platform API]\n    B -->|Routes Message| C[cc-connect Bridge]\n    C -->|Processes & Formats| D[Local AI Agent]\n    D -->|AI Response| C\n    C -->|Formats Response| B\n    B -->|Delivers Message| A\n    \n    E[Web Admin UI] -->|Configuration| C\n    F[config.toml] -->|Settings| C\n```\n\n## Skills System\n\ncc-connect supports an extensible skills system that allows AI agents to gain additional capabilities:\n\n- **Recommended Skills** - Curated skill presets that can be downloaded\n- **Custom Skills** - User-defined skills for specific workflows\n- **Skill Presets** - Pre-configured skill collections with metadata\n\nSkills include metadata such as:\n- Display name and description\n- Version information\n- Pricing model\n- Author attribution\n- Source URL and provider information\n\n资料来源：[web/src/pages/Skills/SkillList.tsx:1-100]()\n\n## Summary\n\ncc-connect provides a unified bridge between local AI coding agents and enterprise messaging platforms, enabling developers to:\n\n- Access AI coding assistance from any messaging platform\n- Manage multiple projects with different AI agents\n- Configure flexible provider settings\n- Monitor connections through a web-based dashboard\n- Extend capabilities through a skills system\n\nThe architecture prioritizes reliability with automatic reconnection, comprehensive logging, and daemon-based operation for continuous availability.\n\n---\n\n<a id='page-quickstart'></a>\n\n## Quick Start Guide\n\n### 相关页面\n\n相关主题：[Introduction to cc-connect](#page-introduction), [Configuration Guide](#page-configuration), [Deployment and Operations](#page-deployment)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [config.example.toml](https://github.com/chenhg5/cc-connect/blob/main/config.example.toml)\n- [cmd/cc-connect/main.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/main.go)\n- [cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n</details>\n\n# Quick Start Guide\n\ncc-connect is a bridge service that connects local AI coding agents (Claude Code, Codex, Cursor, Gemini CLI, etc.) with messaging platforms (Feishu, Telegram, Discord, Slack, etc.). This enables natural language interaction with AI coding agents through familiar chat interfaces.\n\n## Prerequisites\n\nBefore installing cc-connect, ensure your environment meets these requirements:\n\n| Requirement | Version/Details |\n|-------------|-----------------|\n| Go (for source build) | 1.22+ |\n| Node.js (for Claude Code agent) | Latest stable |\n| npm | Latest stable |\n| Supported OS | Linux, macOS, Windows |\n| Network | Outbound access to messaging platform APIs |\n\nYou must also install at least one supported AI coding agent:\n\n```bash\n# Claude Code\nnpm install -g @anthropic-ai/claude-code\n\n# Codex\nnpm install -g @openai/codex\n\n# Gemini CLI\nnpm install -g @google/gemini-cli\n\n# iFlow CLI\nnpm install -g @iflow-ai/if\n```\n\n## Installation Methods\n\n### Option A: Homebrew (macOS/Linux)\n\n```bash\nbrew tap chenhg5/tap\nbrew install cc-connect\n```\n\n### Option B: Download Binary\n\nDownload pre-built binaries from [GitHub Releases](https://github.com/chenhg5/cc-connect/releases):\n\n| Platform | Artifact Pattern |\n|----------|------------------|\n| Linux amd64 | `cc-connect-<version>-linux-amd64` |\n| macOS amd64 | `cc-connect-<version>-darwin-amd64` |\n| macOS ARM64 | `cc-connect-<version>-darwin-arm64` |\n| Windows | `cc-connect-<version>-windows-amd64.exe` |\n\n```bash\ncurl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64\nchmod +x cc-connect\nsudo mv cc-connect /usr/local/bin/\n```\n\nOn macOS, remove the quarantine attribute:\n```bash\nxattr -d com.apple.quarantine cc-connect\n```\n\n### Option C: Build from Source\n\n```bash\ngit clone https://github.com/chenhg5/cc-connect.git\ncd cc-connect\nmake build\n```\n\n资料来源：[INSTALL.md:1-80]()\n\n## Configuration\n\n### Config File Location\n\ncc-connect searches for configuration in this order:\n\n1. `-config <path>` flag (explicit path)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\n资料来源：[INSTALL.md:10-15]()\n\n### Create Starter Config\n\nThe easiest method is to let cc-connect auto-generate a starter config:\n\n```bash\n# Run once - creates ~/.cc-connect/config.toml automatically\ncc-connect\n```\n\nOr manually create from the example:\n\n```bash\nmkdir -p ~/.cc-connect\ncp config.example.toml ~/.cc-connect/config.toml\n```\n\n### Configuration Structure\n\n```toml\n# Optional global settings\n# language = \"en\"  # \"en\", \"zh\", or \"\" (auto-detect)\n\n[log]\nlevel = \"info\"  # debug, info, warn, error\n\n# Each [[projects]] entry connects one code folder to one or more messaging platforms\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"  # or \"codex\", \"cursor\", \"gemini\", \"qoder\", \"opencode\", \"iflow\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"  # \"default\", \"acceptEdits\", \"plan\", \"yolo\"\n\n[[projects.platforms]]\ntype = \"feishu\"  # or \"telegram\", \"discord\", \"slack\", \"dingtalk\", etc.\n\n[projects.platforms.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxx\"\n```\n\n资料来源：[INSTALL.md:30-60]()\n\n### Agent Permission Modes\n\n| Mode | Behavior |\n|------|----------|\n| `default` | Standard permission model - agent asks before actions |\n| `acceptEdits` | Accepts all edit suggestions automatically |\n| `plan` | Only plans, does not execute |\n| `bypassPermissions` | Bypasses all permission checks (yolo mode) |\n| `dontAsk` | Never prompts for confirmation |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:1-30]()\n\n## Running the Application\n\n### Basic Startup\n\n```bash\n# Run with config.toml in current directory\ncc-connect\n\n# Or specify config path\ncc-connect -config /path/to/config.toml\n\n# Check version\ncc-connect --version\n```\n\nExpected output:\n```\nlevel=INFO msg=\"platform started\" project=my-project platform=feishu\nlevel=INFO msg=\"engine started\" project=my-project agent=claudecode platforms=1\nlevel=INFO msg=\"cc-connect is running\" projects=1\n```\n\n### Claude Code Session Note\n\nIf running inside a Claude Code session, you must unset the `CLAUDECODE` environment variable before starting:\n\n```bash\nunset CLAUDECODE && cc-connect\n```\n\nAlternatively, open a separate terminal to run cc-connect.\n\n资料来源：[INSTALL.md:75-90]()\n\n## Chat Commands\n\nOnce running, use these slash commands on your configured messaging platform:\n\n| Command | Description |\n|---------|-------------|\n| `/new [name]` | Start a new session |\n| `/list` | List agent sessions |\n| `/switch <id>` | Resume an existing session |\n| `/current` | Show current active session |\n| `/history [n]` | Show last n messages (default 10) |\n| `/reasoning [level]` | View/switch reasoning effort (Codex) |\n| `/mode [name]` | View/switch permission mode |\n| `/quiet` | Toggle thinking/tool progress messages |\n| `/allow <tool>` | Pre-allow a tool (next session) |\n\n资料来源：[INSTALL.md:95-110]()\n\n## Scheduled Tasks (Cron)\n\nCreate automated tasks that run through the agent or execute shell commands directly.\n\n### Add a Scheduled Task\n\n```bash\ncc-connect cron add --cron \"<min> <hour> <day> <month> <weekday>\" --prompt \"<task description>\" --desc \"<short label>\"\n```\n\n### Cron Expression Format\n\n| Field | Allowed Values |\n|-------|----------------|\n| Minute | 0-59 or * |\n| Hour | 0-23 or * |\n| Day | 1-31 or * |\n| Month | 1-12 or * |\n| Weekday | 0-6 (0=Sunday) or * |\n\n### Examples\n\n```bash\n# Run every day at 6am through the agent\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Collect GitHub trending repos and send a summary\" --desc \"Daily GitHub Trending\"\n\n# Run every Monday at 9am\ncc-connect cron add --cron \"0 9 * * 1\" --prompt \"Generate a weekly project status report\" --desc \"Weekly Report\"\n\n# Run every 30 minutes with direct shell command\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --desc \"Disk usage check\"\n```\n\n### Additional Cron Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `--project <name>` | Target project | Auto-detected from CC_PROJECT env |\n| `--session-key <key>` | Target session | Auto-detected from CC_SESSION_KEY env |\n| `--session-mode <mode>` | `reuse` (default) or `new-per-run` | reuse |\n| `--timeout-mins <n>` | Max minutes per run (0=no limit) | 30 |\n| `--data-dir <path>` | Data directory | ~/.cc-connect |\n\n资料来源：[cmd/cc-connect/cron.go:1-50]()\n\n## Multi-Project Setup\n\nA single cc-connect process can manage multiple projects, each with its own agent, work directory, and platforms:\n\n```toml\n[[projects]]\nname = \"backend\"\n[projects.agent]\ntype = \"claudecode\"\n[projects.agent.options]\nwork_dir = \"/path/to/backend\"\nmode = \"default\"\n[[projects.platforms]]\ntype = \"feishu\"\n[projects.platforms.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxx\"\n\n[[projects]]\nname = \"frontend\"\n[projects.agent]\ntype = \"codex\"\n[projects.agent.options]\nwork_dir = \"/path/to/frontend\"\nmode = \"full-auto\"\n[[projects.platforms]]\ntype = \"telegram\"\n[projects.platforms.options]\ntoken = \"xxx\"\n\n[[projects]]\nname = \"design-system\"\n[projects.agent]\ntype = \"cursor\"\n[projects.agent.options]\nwork_dir = \"/path/to/design-system\"\nmode = \"force\"\n[[projects.platforms]]\ntype = \"discord\"\n[projects.platforms.options]\ntoken = \"xxx\"\n```\n\n资料来源：[INSTALL.md:150-180]()\n\n## Running as a Background Service\n\n### Install the Daemon\n\n```bash\ncc-connect daemon install --config ~/.cc-connect/config.toml\n```\n\nOr specify the work directory containing `config.toml`:\n\n```bash\ncc-connect daemon install --work-dir ~/.cc-connect\n```\n\n### Service Control Commands\n\n```bash\ncc-connect daemon start\ncc-connect daemon stop\ncc-connect daemon restart\ncc-connect daemon status\n```\n\n### View Logs\n\n```bash\ncc-connect daemon logs           # tail current log\ncc-connect daemon logs -f         # follow (like tail -f)\ncc-connect daemon logs -n 100     # last 100 lines\ncc-connect daemon logs --log-file /path/to/log  # custom log file\n```\n\nLogs auto-rotate at the configured max size and keep one backup.\n\nOn Windows, this creates a Task Scheduler task that runs at user logon.\n\n资料来源：[INSTALL.md:190-220]()\n\n## Agent Integration\n\n### Claude Code\n\nClaude Code handles cc-connect integration automatically via `--append-system-prompt` - no extra setup needed.\n\n### Other Agents\n\nFor Codex, Cursor Agent, Qoder CLI, Gemini CLI, OpenCode, or iFlow CLI, add instructions to the agent's project-level instruction file:\n\n| Agent | File Location |\n|-------|---------------|\n| Codex | `AGENTS.md` |\n| Cursor Agent | `.cursorrules` |\n| Qoder CLI | `AGENTS.md` |\n| Gemini CLI | `GEMINI.md` |\n| OpenCode | `OPENCODE.md` |\n| iFlow CLI | `IFLOW.md` |\n\nCreate/edit the file in your project's `work_dir` with cc-connect integration instructions. The agent will automatically use `cc-connect cron add` commands when scheduling tasks.\n\n> **Tip:** Add these files to `.gitignore` if you don't want cc-connect instructions committed to version control.\n\n资料来源：[AGENTS.md:1-30]()\n\n## Web UI\n\nThe cc-connect web interface provides a visual dashboard for managing projects. Access it at:\n\n```\nhttp://localhost:18792\n```\n\nThe web UI allows you to:\n- View and manage projects\n- Configure platforms\n- Manage provider settings\n- View and manage agent sessions\n- Configure and monitor skills\n\n资料来源：[web/index.html:1-15]()\n\n## Upgrade Instructions\n\n### Package Manager Users\n\n```bash\nbrew upgrade cc-connect\n```\n\n### Binary Users\n\n```bash\n# Download new binary\ncurl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64\nchmod +x cc-connect\nsudo mv cc-connect /usr/local/bin/\n```\n\n### Source Users\n\n```bash\ncd cc-connect\ngit pull\nmake build\n```\n\nAfter upgrading, restart the running cc-connect process.\n\n资料来源：[INSTALL.md:85-100]()\n\n## Verification Checklist\n\nBefore going to production, verify:\n\n- [ ] Build passes: `go build ./...`\n- [ ] Tests pass: `go test ./...`\n- [ ] Configuration file is valid TOML\n- [ ] Agent is installed and accessible from PATH\n- [ ] Platform credentials are configured correctly\n- [ ] Network connectivity to platform APIs works\n- [ ] Web UI is accessible\n- [ ] Basic chat commands work (`/new`, `/list`, `/history`)\n\n资料来源：[AGENTS.md:1-10]()\n\n---\n\n<a id='page-architecture'></a>\n\n## System Architecture\n\n### 相关页面\n\n相关主题：[Core Components](#page-core-components), [Agent Integrations](#page-agent-integrations), [Platform Integrations](#page-platform-integrations)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [core/bridge.go](https://github.com/chenhg5/cc-connect/blob/main/core/bridge.go)\n- [core/engine.go](https://github.com/chenhg5/cc-connect/blob/main/core/engine.go)\n- [core/relay.go](https://github.com/chenhg5/cc-connect/blob/main/core/relay.go)\n- [web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n- [web/src/pages/Chat/ChatView.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Chat/ChatView.tsx)\n- [web/src/pages/Sessions/SessionChat.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Sessions/SessionChat.tsx)\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n</details>\n\n# System Architecture\n\n## Overview\n\ncc-connect is a bridge service that connects AI coding agents (such as Claude Code, Codex, Cursor, Gemini, Qoder, OpenCode, and iFlow) with messaging platforms (Feishu, WeChat Work, Telegram, Discord, Slack, DingTalk, WeCom, WeChat, QQ, Line, Weibo). The system acts as a bidirectional relay, translating messages between agent sessions and chat platforms in real-time.\n\n## High-Level Architecture\n\n```mermaid\ngraph TD\n    subgraph \"Messaging Platforms\"\n        FEISHU[Feishu]\n        WECHAT[WeChat Work]\n        TELEGRAM[Telegram]\n        DISCORD[Discord]\n        SLACK[Slack]\n        DINGTALK[DingTalk]\n        WECOM[WeCom]\n        WEIXIN[WeChat]\n        QQ[QQ]\n    end\n\n    subgraph \"cc-connect Core\"\n        BRIDGE[Bridge Manager]\n        ENGINE[Engine]\n        RELAY[Relay Handler]\n        SESSION[Session Manager]\n    end\n\n    subgraph \"AI Agents\"\n        CLAUDE[Claude Code]\n        CODEX[Codex]\n        CURSOR[Cursor]\n        GEMINI[Gemini]\n        QODER[Qoder]\n        OPENCODE[OpenCode]\n        IFLOW[iFlow]\n    end\n\n    FEISHU <--> BRIDGE\n    WECHAT <--> BRIDGE\n    TELEGRAM <--> BRIDGE\n    DISCORD <--> BRIDGE\n    SLACK <--> BRIDGE\n    DINGTALK <--> BRIDGE\n    WECOM <--> BRIDGE\n    WEIXIN <--> BRIDGE\n    QQ <--> BRIDGE\n\n    BRIDGE <--> ENGINE\n    ENGINE <--> RELAY\n    ENGINE <--> SESSION\n    RELAY <--> CLAUDE\n    RELAY <--> CODEX\n    RELAY <--> CURSOR\n    RELAY <--> GEMINI\n    RELAY <--> QODER\n    RELAY <--> OPENCODE\n    RELAY <--> IFLOW\n```\n\n## Core Components\n\n### Bridge Manager\n\nThe Bridge Manager (`core/bridge.go`) is the central coordinator that maintains WebSocket connections to all configured messaging platforms. It handles:\n\n- Connection lifecycle management (connect, reconnect, disconnect)\n- Message routing between platforms and the engine\n- Bridge status monitoring for the web UI\n\n| Property | Type | Description |\n|----------|------|-------------|\n| `Status` | `string` | Connection state: `connected`, `connecting`, `disconnected`, `error` |\n| `Platform` | `string` | Platform identifier (e.g., `feishu`, `telegram`) |\n| `SessionKey` | `string` | Associated session identifier |\n\nThe web UI displays bridge status using icons and text:\n\n```tsx\n// Connected state - ChatView.tsx:45\nbridgeStatus === 'error' ? (\n  <div className=\"flex items-center gap-2 text-amber-600\">\n    <WifiOff size={14} />\n    <span>{t('sessions.bridgeDisconnected')}</span>\n  </div>\n) : (\n  <div className=\"flex items-center gap-2 text-gray-400\">\n    <Loader2 size={14} className=\"animate-spin\" />\n    <span>{t('sessions.bridgeConnecting')}</span>\n  </div>\n)\n```\n\n### Engine\n\nThe Engine (`core/engine.go`) serves as the central processing unit that:\n\n- Manages project configurations and agent assignments\n- Coordinates message processing and response handling\n- Maintains session state across multiple concurrent conversations\n\n### Relay Handler\n\nThe Relay Handler (`core/relay.go`) acts as the message translation layer between platforms and agents:\n\n- Converts incoming platform messages to agent-readable format\n- Translates agent responses back to platform-specific formats\n- Handles multi-turn conversations and context preservation\n\n## Session Management\n\nEach project can have multiple sessions, allowing concurrent conversations. The system supports:\n\n```mermaid\ngraph LR\n    subgraph \"Project: my-project\"\n        S1[Session: session-1]\n        S2[Session: session-2]\n        S3[Session: session-3]\n    end\n\n    S1 <--> A1[Claude Code]\n    S2 <--> A2[Claude Code]\n    S3 <--> A3[Claude Code]\n```\n\nSessions are accessible via the UI drawer component:\n\n```tsx\n// ProjectList.tsx:120\n<SessionDrawer\n  open={drawerOpen}\n  onClose={() => setDrawerOpen(false)}\n  sessions={sessions}\n  currentSessionId={currentSession?.id || ''}\n  onSelect={switchToSession}\n  onNewSession={handleNewSession}\n/>\n```\n\n## Agent System\n\n### Supported Agents\n\n| Agent | Type Key | Mode Options |\n|-------|----------|--------------|\n| Claude Code | `claudecode` | `default`, `acceptEdits`, `plan`, `bypassPermissions`, `dontAsk` |\n| Codex | `codex` | Default settings with optional wire API |\n| Cursor | `cursor` | Default mode |\n| Gemini | `gemini` | Default mode |\n| Qoder | `qoder` | Default mode |\n| OpenCode | `opencode` | Default mode |\n| iFlow | `iflow` | Default mode |\n\n### Agent Configuration\n\nAgents are configured per project in `config.toml`:\n\n```toml\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n### Adding New Agents\n\nThe architecture follows a plugin pattern for extensibility. To add a new agent:\n\n1. Create `agent/newagent/newagent.go`\n2. Implement `core.Agent` and `core.AgentSession` interfaces\n3. Register in `init()`: `core.RegisterAgent(\"newagent\", factory)`\n4. Create `cmd/cc-connect/plugin_agent_newagent.go` with `//go:build` tag\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n## Platform System\n\n### Supported Platforms\n\n| Platform | Key | Configuration Method |\n|----------|-----|---------------------|\n| Feishu | `feishu` | QR code setup or manual credentials |\n| WeChat Work | `wecom` | Manual credentials |\n| Telegram | `telegram` | Manual credentials |\n| Discord | `discord` | Manual credentials |\n| Slack | `slack` | Manual credentials |\n| DingTalk | `dingtalk` | Manual credentials |\n| WeChat | `weixin` | QR code setup |\n| QQ | `qq` | Manual credentials |\n\n### Platform Setup Flow\n\n```mermaid\ngraph TD\n    A[Add Platform] --> B{Is QR Platform?}\n    B -->|Yes| C[Show QR Code]\n    B -->|No| D{Has Manual Form?}\n    D -->|Yes| E[Platform Manual Form]\n    D -->|No| F[Manual Config Hint]\n    C --> G[Complete]\n    E --> G\n    G --> H[Restart Required Modal]\n    H --> I[Restart Service]\n```\n\nPlatform setup is handled dynamically in the UI:\n\n```tsx\n// ProjectDetail.tsx:85\n(addPlatType) ? (\n  <PlatformSetupQR\n    platformType={addPlatType as 'feishu' | 'weixin'}\n    projectName={name!}\n    onComplete={() => {\n      setShowAddPlatform(false);\n      setShowRestartModal(true);\n    }}\n    onCancel={() => setAddPlatType('')}\n  />\n) : platformMeta[addPlatType] ? (\n  <PlatformManualForm\n    platformType={addPlatType}\n    projectName={name!}\n    onComplete={() => {\n      setShowAddPlatform(false);\n      setShowRestartModal(true);\n    }}\n    onCancel={() => setAddPlatType('')}\n  />\n) : (\n  <div>\n    <p>{t('setup.manualHint', 'For {{platform}}, please configure credentials in config.toml')}</p>\n  </div>\n)\n```\n\n### Adding New Platforms\n\nNew platforms follow the same plugin architecture:\n\n1. Create `platform/newplatform/newplatform.go`\n2. Implement `core.Platform` interface\n3. Register in `init()`: `core.RegisterPlatform(\"newplatform\", factory)`\n4. Add `//go:build !no_newplatform` tag in plugin file\n5. Add platform to `ALL_PLATFORMS` in Makefile\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n## Web API Client\n\nThe frontend communicates with the backend via a typed API client:\n\n```typescript\n// client.ts:25\nexport class ApiClient {\n  async request<T>(method: string, path: string, body?: any, params?: Record<string, string>): Promise<T> {\n    const h: HeadersInit = {};\n    if (this.token) h['Authorization'] = `Bearer ${this.token}`;\n    const res = await fetch(`${API_BASE}${path}`, { method, headers: h, body, params });\n    // ...\n  }\n\n  get<T>(path: string, params?: Record<string, string>) { return this.request<T>('GET', path, undefined, params); }\n  post<T>(path: string, body?: any) { return this.request<T>('POST', path, body); }\n  put<T>(path: string, body?: any) { return this.request<T>('PUT', path, body); }\n  delete<T>(path: string) { return this.request<T>('DELETE', path); }\n}\n```\n\n资料来源：[web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n\n## Provider System\n\nGlobal providers allow centralized API key management for multiple projects:\n\n```mermaid\ngraph TD\n    subgraph \"Global Providers\"\n        P1[Provider: anthropic]\n        P2[Provider: openai]\n        P3[Provider: google]\n    end\n\n    subgraph \"Projects\"\n        PRJ1[my-project]\n        PRJ2[work-project]\n        PRJ3[test-project]\n    end\n\n    P1 --> PRJ1\n    P1 --> PRJ2\n    P2 --> PRJ2\n    P2 --> PRJ3\n    P3 --> PRJ3\n```\n\nProvider configurations include base URL, default model, model lists, and thinking settings:\n\n```tsx\n// ProviderList.tsx:150\n{\n  label: t('globalProviders.form.thinking'),\n  type: 'select',\n  value: form.thinking || '',\n  options: [\n    { value: '', label: t('globalProviders.form.thinkingDefault') },\n    { value: 'enabled', label: 'enabled' },\n    { value: 'disabled', label: 'disabled' },\n  ]\n}\n```\n\n## Cron Scheduling\n\nThe system supports scheduled tasks for automated workflows:\n\n```bash\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Collect GitHub trending data\" --desc \"Daily Trending\"\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --desc \"Disk usage check\"\n```\n\nAvailable cron options:\n\n| Option | Description |\n|--------|-------------|\n| `-p, --project` | Target project name |\n| `-s, --session-key` | Target session key |\n| `-c, --cron` | Cron expression |\n| `--prompt` | Task prompt (runs through agent) |\n| `--exec` | Shell command (runs directly) |\n| `--desc` | Short description |\n| `--session-mode` | `reuse` (default) or `new-per-run` |\n| `--timeout-mins` | Max minutes per run (default: 30) |\n\n资料来源：[cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n\n## Configuration Structure\n\nThe system uses TOML configuration with the following precedence:\n\n1. `-config <path>` flag (explicit)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\n```toml\n# Optional global settings\n# language = \"en\"  # \"en\", \"zh\", or \"\" (auto-detect)\n\n[log]\nlevel = \"info\"  # debug, info, warn, error\n\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Data Flow\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant Platform as Messaging Platform\n    participant Bridge as Bridge Manager\n    participant Engine as Engine\n    participant Relay as Relay Handler\n    participant Agent as AI Agent\n\n    User->>Platform: Send message\n    Platform->>Bridge: WebSocket event\n    Bridge->>Engine: Process message\n    Engine->>Relay: Route to agent\n    Relay->>Agent: Format & forward\n    Agent->>Relay: Generate response\n    Relay->>Engine: Process response\n    Engine->>Bridge: Route response\n    Bridge->>Platform: Send reply\n    Platform->>User: Display message\n```\n\n## Extension Points\n\n### Disabling Features\n\nBuild tags allow excluding specific platforms or agents:\n\n```\nno_gemini, no_iflow, no_opencode, no_qoder, no_feishu, no_telegram,\nno_discord, no_slack, no_dingtalk, no_wecom, no_weixin, no_qq, no_line, no_weibo\n```\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n### Build Requirements\n\nThe pre-commit checklist ensures code quality:\n\n1. **Build passes**: `go build ./...`\n2. **Tests pass**: `go test ./...`\n3. **No new hardcoded platform/agent names in core**\n4. **i18n complete**: all new user-facing strings have translations\n5. **No secrets in code**: no API keys in source files\n\n---\n\n<a id='page-core-components'></a>\n\n## Core Components\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Configuration Guide](#page-configuration)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n- [cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n- [web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n</details>\n\n# Core Components\n\nThe cc-connect project is structured around a layered architecture consisting of a Go-based core backend and a React-based web interface. The core components provide the essential infrastructure for agent management, message handling, internationalization, and scheduled task execution.\n\n## Architecture Overview\n\nThe system follows a modular plugin-based architecture where core interfaces define contracts for platforms and agents.\n\n```mermaid\ngraph TD\n    A[User/CLI] --> B[Web UI or CLI]\n    B --> C[Core Backend API]\n    C --> D[Agent Plugins]\n    C --> E[Platform Plugins]\n    F[Config File] --> C\n    G[i18n] --> B\n```\n\n## Internationalization System\n\nThe internationalization (i18n) subsystem in `core/i18n.go` provides multi-language support for all user-facing messages.\n\n### Supported Languages\n\n| Language Code | Description |\n|---------------|-------------|\n| `LangEnglish` | English (default) |\n| `LangChinese` | Simplified Chinese |\n| `LangTraditionalChinese` | Traditional Chinese |\n| `LangJapanese` | Japanese |\n| `LangSpanish` | Spanish |\n\n资料来源：[core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n\n### Message Structure\n\nMessages are defined using a `MessageMap` type that maps language codes to translated strings:\n\n```go\nMsgProviderSwitchHint: {\n    LangEnglish:            \"`/provider switch <name>` to switch | `/provider clear` to reset\",\n    LangChinese:            \"`/provider switch <名称>` 切换 | `/provider clear` 清除\",\n    LangTraditionalChinese: \"`/provider switch <名稱>` 切換 | `/provider clear` 清除\",\n    LangJapanese:           \"`/provider switch <名前>` で切り替え | `/provider clear` でリセット\",\n    LangSpanish:            \"`/provider switch <nombre>` para cambiar | `/provider clear` para restablecer\",\n},\n```\n\nThe system includes messages for:\n- Provider management (switching, listing, errors)\n- Session management\n- Command execution feedback\n- Error handling\n\n资料来源：[core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n\n## API Client\n\nThe web interface communicates with the backend through `web/src/api/client.ts`, which provides a typed REST client.\n\n### ApiClient Methods\n\n| Method | Description |\n|--------|-------------|\n| `get<T>(path, params?)` | GET request with optional query parameters |\n| `post<T>(path, body?)` | POST request with JSON body |\n| `put<T>(path, body?)` | PUT request |\n| `patch<T>(path, body?)` | PATCH request |\n| `delete<T>(path)` | DELETE request |\n| `raw(path)` | Fetch raw text (non-JSON) response |\n\n资料来源：[web/src/api/client.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/client.ts)\n\n### Error Handling\n\n```typescript\nexport class ApiError extends Error {\n  constructor(message: string, public status: number) {\n    super(message);\n    this.name = 'ApiError';\n  }\n}\n```\n\nThe client handles:\n- JSON response parsing\n- 401 Unauthorized with callback notification\n- Generic HTTP error propagation\n\n## Agent Architecture\n\nAgents are implemented as plugins following a defined interface. The `AGENTS.md` documentation outlines the agent system design.\n\n### Adding a New Agent\n\n1. Create `agent/newagent/newagent.go`\n2. Implement `core.Agent` and `core.AgentSession` interfaces\n3. Register in `init()`: `core.RegisterAgent(\"newagent\", factory)`\n4. Create plugin file with `//go:build !no_newagent` tag\n5. Add to `ALL_AGATFORMS` in `Makefile`\n6. Add unit tests\n\n资料来源：[AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n\n### Supported Agent Types\n\nBased on the configuration structure, the following agent types are supported:\n\n| Agent Type | Description |\n|------------|-------------|\n| `claudecode` | Claude Code agent |\n| `codex` | OpenAI Codex |\n| `cursor` | Cursor AI |\n| `gemini` | Google Gemini |\n| `qoder` | Qoder agent |\n| `opencode` | OpenCode |\n| `iflow` | IFlow agent |\n\n### Agent Modes\n\n| Mode | Purpose |\n|------|---------|\n| `default` | Standard operation with user prompts |\n| `acceptEdits` | Accept edits automatically |\n| `plan` | Plan-only mode |\n| `bypassPermissions` | Bypass permission checks (yolo mode) |\n| `dontAsk` | No confirmation prompts |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n## Provider System\n\nProviders manage API credentials and configuration for LLM services. The provider system is managed through the web interface in `web/src/pages/Providers/ProviderList.tsx`.\n\n### Provider Configuration\n\nProviders include:\n- **Name**: Unique identifier\n- **Base URL**: API endpoint\n- **Model**: Default model\n- **Models**: Available models array\n- **Thinking**: Thinking mode (`enabled`, `disabled`, or default)\n- **Agent Types**: Supported agent types\n\n```typescript\ninterface GlobalProvider {\n  name: string;\n  base_url?: string;\n  model?: string;\n  models?: string[];\n  thinking?: string;\n  agent_types?: string[];\n}\n```\n\n### Thinking Configuration\n\nThe thinking setting can be configured per-provider:\n\n| Value | Behavior |\n|-------|----------|\n| `\"\"` (empty) | Use default thinking behavior |\n| `enabled` | Force thinking enabled |\n| `disabled` | Force thinking disabled |\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n\n## Scheduled Tasks (Cron)\n\nThe cron subsystem in `cmd/cc-connect/cron.go` enables scheduled task execution.\n\n### Cron Command Options\n\n| Option | Description |\n|--------|-------------|\n| `-p, --project` | Target project name |\n| `-s, --session-key` | Target session key |\n| `-c, --cron` | Cron expression (e.g., \"0 6 * * *\") |\n| `--prompt` | Task prompt (runs through agent) |\n| `--exec` | Shell command (runs directly) |\n| `--desc` | Short description |\n| `--session-mode` | `reuse` (default) or `new-per-run` |\n| `--timeout-mins` | Max minutes per run (0 = no limit, default 30) |\n| `--data-dir` | Data directory (default: ~/.cc-connect) |\n\n### Cron Expression Format\n\nStandard 5-field cron format:\n```\n<min> <hour> <day> <month> <weekday>\n```\n\n### Session Modes\n\n| Mode | Behavior |\n|------|----------|\n| `reuse` | Reuse the same agent session across runs (default) |\n| `new-per-run` | Create fresh agent session for each run |\n\n### Examples\n\n```bash\n# Daily task at 6 AM\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Collect GitHub trending data\" --desc \"Daily Trending\"\n\n# Every 30 minutes\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --desc \"Disk usage check\"\n```\n\n资料来源：[cmd/cc-connect/cron.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/cron.go)\n\n## Project Management\n\nProjects connect code folders to messaging platforms. Each project configuration includes:\n\n```toml\n[[projects]]\nname = \"my-project\"\n\n[projects.agent]\ntype = \"claudecode\"  # or \"codex\", \"cursor\", \"gemini\", etc.\n\n[projects.agent.options]\nwork_dir = \"/absolute/path/to/your/project\"\nmode = \"default\"\n```\n\n### Project Features\n\n| Feature | Description |\n|---------|-------------|\n| Sessions | Multiple concurrent conversation sessions |\n| Heartbeat | Periodic health checks |\n| Platform Bridge | Connection to messaging platforms |\n| Skills | Attached skill configurations |\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectList.tsx)\n\n## Skill System\n\nSkills extend agent capabilities through a plugin-like configuration system.\n\n### Skill Types\n\n- **Local Skills**: Project-specific skills defined in local directories\n- **Recommended Skills**: Preset skill configurations\n\n### Skill Configuration\n\nEach skill includes:\n- `name`: Skill identifier\n- `display_name`: Human-readable name\n- `description`: Skill purpose\n- `source`: Skill origin/path\n\n### Scan Directories\n\nProjects can define scan directories for discovering skills:\n\n```typescript\ninterface ProjectSkills {\n  project: string;\n  agent_type: string;\n  skills?: Skill[];\n  dirs?: string[];  // Scan directories\n}\n```\n\n资料来源：[web/src/pages/Skills/SkillList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Skills/SkillList.tsx)\n\n## Configuration\n\nThe system uses TOML configuration files, searching in this order:\n\n1. `-config <path>` flag (explicit path)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\nIf no config exists, `cc-connect` auto-creates a starter template at `~/.cc-connect/config.toml`.\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Web Interface Structure\n\nThe React web interface is organized by functional areas:\n\n| Path | Component | Purpose |\n|------|-----------|---------|\n| `/pages/Chat/ChatView.tsx` | ChatView | Main chat interface |\n| `/pages/Sessions/SessionList.tsx` | SessionList | Session management |\n| `/pages/Sessions/SessionChat.tsx` | SessionChat | Individual session view |\n| `/pages/Projects/ProjectList.tsx` | ProjectList | Project management |\n| `/pages/Projects/ProjectDetail.tsx` | ProjectDetail | Project configuration |\n| `/pages/Providers/ProviderList.tsx` | ProviderList | Provider management |\n| `/pages/Skills/SkillList.tsx` | SkillList | Skill management |\n\n### Bridge Connection Status\n\nThe UI displays connection status indicators:\n\n| Status | UI Treatment |\n|--------|--------------|\n| `error` | Amber warning with WifiOff icon |\n| `connecting` | Gray loading spinner with \"Connecting...\" |\n| `connected` | Hidden (normal operation) |\n\n资料来源：[web/src/pages/Chat/ChatView.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Chat/ChatView.tsx)\n\n---\n\n<a id='page-agent-integrations'></a>\n\n## Agent Integrations\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Platform Integrations](#page-platform-integrations)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [agent/claudecode/claudecode.go](https://github.com/chenhg5/cc-connect/blob/main/agent/claudecode/claudecode.go)\n- [agent/codex/codex.go](https://github.com/chenhg5/cc-connect/blob/main/agent/codex/codex.go)\n- [agent/cursor/cursor.go](https://github.com/chenhg5/cc-connect/blob/main/agent/cursor/cursor.go)\n- [agent/gemini/gemini.go](https://github.com/chenhg5/cc-connect/blob/main/agent/gemini/gemini.go)\n- [agent/kimi/kimi.go](https://github.com/chenhg5/cc-connect/blob/main/agent/kimi/kimi.go)\n- [agent/acp/agent.go](https://github.com/chenhg5/cc-connect/blob/main/agent/acp/agent.go)\n- [core/interfaces.go](https://github.com/chenhg5/cc-connect/blob/main/core/interfaces.go)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n</details>\n\n# Agent Integrations\n\n## Overview\n\nAgent Integrations in CC-Connect provide a unified abstraction layer for connecting to various AI agent backends. The system supports multiple agent providers including Claude Code, OpenAI Codex, Cursor, Gemini, and Kimi, allowing projects to utilize different AI capabilities through a consistent interface.\n\n## Architecture\n\nThe agent integration system follows a plugin-style architecture where each agent implementation conforms to a common interface defined in `core/interfaces.go`. This design enables runtime provider switching and consistent interaction patterns across all supported agents.\n\n```mermaid\ngraph TD\n    A[User/Project] --> B[CC-Connect Core]\n    B --> C[Agent Interface]\n    C --> D[Claude Code Agent]\n    C --> E[Codex Agent]\n    C --> F[Cursor Agent]\n    C --> G[Gemini Agent]\n    C --> H[Kimi Agent]\n    C --> I[ACP Agent]\n    \n    J[Provider Config] --> B\n    K[Platform Integration] --> B\n```\n\n## Supported Agent Types\n\nThe system currently supports the following agent backends:\n\n| Agent Type | Source File | Description |\n|------------|-------------|-------------|\n| claude | `agent/claudecode/claudecode.go` | Anthropic Claude Code integration |\n| codex | `agent/codex/codex.go` | OpenAI Codex integration |\n| cursor | `agent/cursor/cursor.go` | Cursor AI agent |\n| gemini | `agent/gemini/gemini.go` | Google Gemini agent |\n| kimi | `agent/kimi/kimi.go` | Kimi AI agent |\n| acp | `agent/acp/agent.go` | Custom ACP agent protocol |\n\n## Core Interface Definition\n\nEach agent must implement the `Agent` interface defined in `core/interfaces.go`. The interface specifies the contract for agent lifecycle management, message handling, and capability reporting.\n\n资料来源：[core/interfaces.go](https://github.com/chenhg5/cc-connect/blob/main/core/interfaces.go)\n\n## Agent Configuration\n\n### Agent Type Selection\n\nProjects specify their agent type through the `agent_type` field. This selection determines which agent backend will be used for processing requests.\n\n```tsx\n<select\n  value={selectedAgentType}\n  onChange={(e) => setSelectedAgentType(e.target.value)}\n>\n  {agentTypes.map(a => <option key={a} value={a}>{a}</option>)}\n</select>\n```\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n### Thinking Mode\n\nAgents support a configurable thinking mode that controls how the AI processes requests:\n\n| Mode | Description |\n|------|-------------|\n| `enabled` | Full thinking/reasoning enabled |\n| `disabled` | Thinking disabled |\n| Default (empty) | Uses provider-level or system default |\n\n```tsx\n<select value={form.thinking || ''} onChange={e => set('thinking', e.target.value)}>\n  <option value=\"\">{t('globalProviders.form.thinkingDefault')}</option>\n  <option value=\"enabled\">enabled</option>\n  <option value=\"disabled\">disabled</option>\n</select>\n```\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n\n### Permission Modes\n\nThe system supports granular permission control for agent operations:\n\n| Mode | Behavior |\n|------|----------|\n| `default` | Standard permission checks |\n| `acceptEdits` | Automatically accept code edits |\n| `plan` | Only generate execution plans |\n| `bypassPermissions` | Skip all permission checks |\n| `dontAsk` | Never prompt for confirmation |\n\n```tsx\n<select value={agentMode}>\n  <option value=\"default\">default</option>\n  <option value=\"acceptEdits\">acceptEdits (edit)</option>\n  <option value=\"plan\">plan</option>\n  <option value=\"bypassPermissions\">bypassPermissions (yolo)</option>\n  <option value=\"dontAsk\">dontAsk</option>\n</select>\n```\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n## Provider-Agent Relationship\n\nProviders define which agent types they support through the `agent_types` configuration array:\n\n```tsx\n{p.agent_types && p.agent_types.length > 0 && (\n  <div className=\"mt-2 flex flex-wrap gap-1\">\n    {p.agent_types.map(a => (\n      <Badge key={a} variant=\"info\" className=\"text-xs\">{a}</Badge>\n    ))}\n  </div>\n)}\n```\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n\n## Project Agent Assignment\n\nEach project is associated with a specific agent type and can be configured with custom agent settings:\n\n```tsx\n<div>\n  <label>{t('projects.agentType', 'Agent type')}</label>\n  <select value={selectedAgentType} onChange={(e) => setSelectedAgentType(e.target.value)}>\n    {agentTypes.map(a => <option key={a} value={a}>{a}</option>)}\n    {selectedAgentType && !agentTypes.includes(selectedAgentType) && (\n      <option value={selectedAgentType}>{selectedAgentType}</option>\n    )}\n  </select>\n  {selectedAgentType !== project.agent_type && (\n    <p className=\"text-[11px] text-amber-500\">\n      {t('projects.agentTypeChangeHint', 'Changing agent type requires restart. Incompatible providers will be removed.')}\n    </p>\n  )}\n</div>\n```\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n\n## Workflow: Agent Selection and Switching\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant UI as Web Interface\n    participant Core as CC-Connect Core\n    participant Provider as Provider Manager\n    participant Agent as Agent Backend\n    \n    User->>UI: Select Project\n    UI->>Core: Fetch Project Config\n    Core->>UI: Return Project with agent_type\n    User->>UI: Change Agent Type\n    UI->>Core: Update Project agent_type\n    Core->>Provider: Validate Provider Compatibility\n    Provider-->>Core: Return Compatible Providers\n    Core-->>UI: Confirm Configuration\n```\n\n## Data Flow\n\nWhen a message is processed through an agent integration:\n\n1. **Input**: User message received via platform (WeChat, Slack, etc.)\n2. **Routing**: Message routed to appropriate project based on session\n3. **Agent Selection**: Project's `agent_type` determines agent backend\n4. **Provider Selection**: Associated provider configuration loaded\n5. **Processing**: Agent backend processes request with provider credentials\n6. **Response**: Agent response returned through platform integration\n\n## Session Management\n\nSessions track the active agent context:\n\n```tsx\n<div className=\"flex items-center gap-1.5 min-w-0\">\n  <MessageSquare size={14} className={s.live ? 'text-accent shrink-0' : 'text-gray-400 shrink-0'} />\n  <span className=\"text-sm font-medium truncate\">\n    {s.name || s.user_name || s.id.slice(0, 8)}\n  </span>\n  {s.live && <Circle size={5} className=\"fill-emerald-500 text-emerald-500 shrink-0\" />}\n</div>\n```\n\n资料来源：[web/src/pages/Sessions/SessionList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Sessions/SessionList.tsx)\n\n## Configuration File Structure\n\nAgent integrations are configured through `config.toml` or via the admin interface:\n\n```toml\n[[agents]]\nname = \"my-project\"\nagent_type = \"claude\"\nthinking = \"enabled\"\n\n[[providers]]\nname = \"anthropic\"\nbase_url = \"https://api.anthropic.com\"\nmodels = [\"claude-sonnet-4-20250514\"]\n```\n\n## Best Practices\n\n1. **Provider Compatibility**: When changing agent types, verify the new type is supported by your configured provider\n2. **Permission Mode**: Use `bypassPermissions` only in controlled environments\n3. **Thinking Mode**: Enable thinking for complex reasoning tasks; disable for simple operations to reduce latency\n4. **Session Persistence**: Active sessions maintain agent context across multiple interactions\n\n---\n\n<a id='page-platform-integrations'></a>\n\n## Platform Integrations\n\n### 相关页面\n\n相关主题：[System Architecture](#page-architecture), [Agent Integrations](#page-agent-integrations)\n\n<details>\n<summary>Relevant Source Files</summary>\n\n以下源码文件用于生成本页说明：\n\n- [AGENTS.md](https://github.com/chenhg5/cc-connect/blob/main/AGENTS.md)\n- [INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n- [core/markdown_html_test.go](https://github.com/chenhg5/cc-connect/blob/main/core/markdown_html_test.go)\n- [web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [web/src/pages/Skills/SkillList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Skills/SkillList.tsx)\n- [web/src/pages/Sessions/SessionList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Sessions/SessionList.tsx)\n- [web/src/pages/Projects/ProjectList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectList.tsx)\n</details>\n\n# Platform Integrations\n\n## Overview\n\nPlatform Integrations in cc-connect enable AI agents to connect and communicate across multiple messaging and collaboration platforms. The system acts as a unified bridge, allowing a single AI agent to serve users on different platforms simultaneously without requiring separate deployments.\n\n## Architecture Overview\n\nThe platform integration system follows a plugin-based architecture where each messaging platform is implemented as a separate module conforming to a common `Platform` interface.\n\n```mermaid\ngraph TD\n    A[User] -->|Message| B[Platform Adapter]\n    B --> C[Core Agent]\n    C -->|Response| B\n    B -->|Deliver| A\n    \n    D[Telegram] --> B\n    E[Slack] --> B\n    F[Discord] --> B\n    G[DingTalk] --> B\n    H[WeChat] --> B\n    I[Feishu] --> B\n    J[WeCom] --> B\n    K[QQ] --> B\n    L[LINE] --> B\n    M[Weibo] --> B\n```\n\n## Supported Platforms\n\ncc-connect supports the following messaging platforms:\n\n| Platform | Connection Type | Public IP Required | Build Tag |\n|----------|----------------|-------------------|-----------|\n| Telegram | Long Polling | No | `no_telegram` |\n| Slack | Socket Mode (WebSocket) | No | `no_slack` |\n| Discord | Webhook/Long Polling | No | `no_discord` |\n| DingTalk | Webhook | Yes | `no_dingtalk` |\n| WeChat (Weixin) | Various | Varies | `no_weixin` |\n| Feishu (Lark) | Webhook | Yes | `no_feishu` |\n| WeCom | Webhook | Yes | `no_wecom` |\n| QQ | Bot Protocol | No | `no_qq` |\n| LINE | Webhook | Yes | `no_line` |\n| Weibo | Webhook | Yes | `no_weibo` |\n\n资料来源：[AGENTS.md:1]()\n\n## Platform Configuration\n\n### Configuration Structure\n\nEach platform is configured within the `[[projects.platforms]]` section of `config.toml`:\n\n```toml\n[[projects.platforms]]\ntype = \"telegram\"  # Platform type identifier\n\n[projects.platforms.options]\ntoken = \"1234567890:ABCdefGHIjklMNOpqrsTUVwxyz\"\n```\n\n### Project-Level Platform Assignment\n\nProjects can specify which platforms they utilize through the `platforms` field:\n\n```typescript\ninterface Project {\n  name: string;\n  agent_type: string;\n  platforms?: string[];  // e.g., [\"telegram\", \"slack\"]\n  heartbeat_enabled?: boolean;\n  sessions_count?: number;\n}\n```\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx:1-15]()\n\n## Adding a New Platform\n\nThe platform integration system is designed for extensibility. New platforms can be added by following this checklist:\n\n1. **Create Platform Module**: Create `platform/newplatform/newplatform.go`\n2. **Implement Interface**: Implement the `core.Platform` interface (and optional interfaces as needed)\n3. **Register Platform**: Register in `init()`: `core.RegisterPlatform(\"newplatform\", factory)`\n4. **Create Build Plugin**: Create `cmd/cc-connect/plugin_platform_newplatform.go` with `//go:build !no_newplatform` tag\n5. **Update Build System**: Add `newplatform` to `ALL_PLATFORMS` in `Makefile`\n6. **Document Configuration**: Add config example in `config.example.toml`\n7. **Add Tests**: Add unit tests for the platform module\n\n资料来源：[AGENTS.md:15-23]()\n\n## Connection Methods\n\n### Long Polling\n\nSome platforms (like Telegram) use long polling, where the client repeatedly requests new messages from the platform's API:\n\n```mermaid\nsequenceDiagram\n    Client->>Platform API: GET /updates (long poll)\n    Platform API-->>Client: Messages (or timeout)\n    Client->>Platform API: GET /updates (long poll)\n```\n\n### Webhook\n\nOther platforms require a publicly accessible webhook endpoint:\n\n```mermaid\nsequenceDiagram\n    Platform->>CC-Connect: POST /webhook/{platform}\n    CC-Connect->>Platform: 200 OK\n    CC-Connect->>Core: Process Message\n    Core-->>Platform: Response\n```\n\n## Platform-Specific Features\n\n### Telegram\n\nTelegram uses long polling, eliminating the need for a public IP address. Setup requires:\n\n1. Create a bot via @BotFather\n2. Obtain the bot token\n3. Configure in `config.toml`\n\n资料来源：[INSTALL.md:1-30]()\n\n### Slack\n\nSlack uses Socket Mode (WebSocket) for receiving events, which does not require a public IP:\n\n1. Enable Socket Mode in app settings\n2. Generate App-Level Token (`xapp-...`)\n3. Subscribe to bot events: `message.im`, `app_mention`\n4. Configure required Bot Token Scopes\n\n资料来源：[INSTALL.md:40-55]()\n\n## Build Tags and Platform Exclusion\n\nPlatform integrations can be excluded at compile time using build tags:\n\n| Tag | Platform Excluded |\n|-----|------------------|\n| `no_telegram` | Telegram |\n| `no_slack` | Slack |\n| `no_discord` | Discord |\n| `no_dingtalk` | DingTalk |\n| `no_weixin` | WeChat/Weixin |\n| `no_feishu` | Feishu/Lark |\n| `no_wecom` | WeCom |\n| `no_qq` | QQ |\n| `no_line` | LINE |\n| `no_weibo` | Weibo |\n\nBuild tags are listed in `AGENTS.md`:\n\n> `no_gemini`, `no_iflow`, `no_opencode`, `no_qoder`, `no_feishu`, `no_telegram`, `no_discord`, `no_slack`, `no_dingtalk`, `no_wecom`, `no_weixin`, `no_qq`, `no_qqbot`, `no_line`, `no_weibo`.\n\n资料来源：[AGENTS.md:1-3]()\n\n## Pre-Commit Checklist\n\nWhen adding platform integrations, ensure compliance with:\n\n1. **Build passes**: `go build ./...`\n2. **Tests pass**: `go test ./...`\n3. **No new hardcoded platform/agent names in core**: `grep` for platform names in `core/*.go`\n4. **i18n complete**: All new user-facing strings have translations for all languages\n5. **No secrets in code**: No API keys, tokens, or credentials in source files\n\n资料来源：[AGENTS.md:5-11]()\n\n## Web Interface Management\n\nThe cc-connect admin web interface (CC-Connect Admin) provides UI components for managing platform-related settings:\n\n### Project Platform Assignment\n\nProjects can be assigned multiple platforms through the web UI:\n\n```tsx\n<div className=\"flex flex-wrap gap-1.5 mb-3\">\n  <Badge variant=\"info\">{p.agent_type}</Badge>\n  {p.platforms?.slice(0, 3).map((pl) => <Badge key={pl}>{pl}</Badge>)}\n  {(p.platforms?.length ?? 0) > 3 && (\n    <Badge>+{p.platforms!.length - 3}</Badge>\n  )}\n</div>\n```\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx:1-10]()\n\n### Provider Thinking Configuration\n\nPlatform providers can have thinking modes configured per-agent:\n\n```tsx\n{p.thinking && (\n  <p className=\"mt-1.5 text-xs text-amber-600 dark:text-amber-400\">\n    thinking: {p.thinking}\n  </p>\n)}\n```\n\nSupported thinking modes:\n- `enabled` - Thinking explicitly enabled\n- `disabled` - Thinking explicitly disabled\n- `\"\"` (empty) - Use default setting\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:1-10]()\n\n## Message Processing Flow\n\n```mermaid\ngraph LR\n    A[Incoming Message] --> B[Platform Adapter]\n    B --> C{Message Type?}\n    C -->|Text| D[Parse Intent]\n    C -->|Command| E[Handle Command]\n    C -->|Media| F[Process Attachment]\n    D --> G[Agent Processing]\n    E --> G\n    F --> G\n    G --> H[Response Generation]\n    H --> I[Markdown Rendering]\n    I --> J[HTML Sanitization]\n    J --> K[Platform Delivery]\n    K --> L[End User]\n```\n\n## Internationalization\n\nAll platform-related user-facing messages support multiple languages:\n\n| Language | Code |\n|----------|------|\n| English | `en` |\n| Chinese (Simplified) | `zh` |\n| Chinese (Traditional) | `zh-TW` |\n| Japanese | `ja` |\n| Spanish | `es` |\n\nProvider-related messages include:\n\n- `MsgProviderSwitchHint`: Command hints for switching providers\n- `MsgProviderNotFound`: Error when provider doesn't exist\n- `MsgProviderSwitched`: Confirmation when provider changes\n\n资料来源：[core/i18n.go:1-30]()\n\n## Session Management\n\nSessions are tracked per-platform with metadata:\n\n```typescript\ninterface Session {\n  id: string;\n  name?: string;\n  user_name?: string;\n  live?: boolean;\n  updated_at?: string;\n  created_at?: string;\n  last_message?: {\n    role: 'user' | 'bot';\n    content: string;\n  };\n}\n```\n\n资料来源：[web/src/pages/Sessions/SessionList.tsx:1-20]()\n\n## Markdown to HTML Rendering\n\nPlatform integrations utilize the `MarkdownToSimpleHTML` function for rendering agent responses:\n\n```go\nfunc MarkdownToSimpleHTML(md string) string\n```\n\nFeatures supported:\n- Code blocks with language syntax (`<pre><code class=\"language-go\">`)\n- Links (`<a href=\"...\">`)\n- Headings converted to bold (`<b>`)\n- Blockquotes (`<blockquote>`)\n- HTML escaping for special characters (`&lt;`, `&gt;`, `&amp;`)\n\n资料来源：[core/markdown_html_test.go:1-40]()\n\n## Summary\n\nPlatform Integrations in cc-connect provide a unified, extensible system for connecting AI agents to multiple messaging platforms. The architecture emphasizes:\n\n- **Modularity**: Each platform is a separate plugin\n- **Flexibility**: Multiple connection methods (webhook, long polling, WebSocket)\n- **Security**: Build tags allow excluding platforms\n- **Internationalization**: Full multi-language support\n- **Web Management**: Admin UI for platform configuration\n\n---\n\n<a id='page-configuration'></a>\n\n## Configuration Guide\n\n### 相关页面\n\n相关主题：[Session Management](#page-session-management), [Web UI Administration](#page-web-ui)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [config/config.go](https://github.com/chenhg5/cc-connect/blob/main/config/config.go)\n- [config.example.toml](https://github.com/chenhg5/cc-connect/blob/main/config.example.toml)\n- [core/provider_presets.go](https://github.com/chenhg5/cc-connect/blob/main/core/provider_presets.go)\n- [core/skill_presets.go](https://github.com/chenhg5/cc-connect/blob/main/core/skill_presets.go)\n- [web/src/pages/Projects/ProjectDetail.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Projects/ProjectDetail.tsx)\n- [web/src/pages/Providers/ProviderList.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Providers/ProviderList.tsx)\n- [core/i18n.go](https://github.com/chenhg5/cc-connect/blob/main/core/i18n.go)\n</details>\n\n# Configuration Guide\n\n## Overview\n\nThe cc-connect configuration system provides a flexible, multi-layered approach to managing AI provider settings, project configurations, and skill definitions. This guide covers all configuration aspects including global providers, project-specific settings, and skill presets.\n\n## Configuration Architecture\n\nThe system uses a hierarchical configuration model with three primary layers:\n\n```mermaid\ngraph TD\n    A[config.toml - Global Config] --> B[Project-level Settings]\n    B --> C[Provider Configuration]\n    C --> D[Model & API Settings]\n    \n    E[Skill Presets] -.-> B\n    F[Provider Presets] -.-> C\n```\n\n## Global Configuration\n\nGlobal settings are managed through `config.toml` located in the application root directory. This file contains default providers and system-wide settings that apply across all projects.\n\n### Provider Configuration\n\nProviders define the API endpoints and models used by agents. Each provider can be configured with multiple models and supports various agent types.\n\n| Parameter | Type | Description | Required |\n|-----------|------|-------------|----------|\n| `name` | string | Unique provider identifier | Yes |\n| `base_url` | string | API endpoint URL | Yes |\n| `model` | string | Default model name | Yes |\n| `models` | array | List of available models | No |\n| `thinking` | string | Thinking mode: `enabled`, `disabled`, or empty for default | No |\n| `agent_type` | string | Associated agent type (e.g., `codex`, `claude`) | No |\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:1-50]()\n\n### Agent Types\n\nThe system supports multiple agent types with different capability profiles:\n\n| Agent Type | Description |\n|------------|-------------|\n| `codex` | Code-focused agent with extended capabilities |\n| `claude` | Anthropic Claude-based agent |\n| `default` | Standard agent configuration |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:1-30]()\n\n### Permission Modes\n\nAgents can operate in different permission modes controlling their operational boundaries:\n\n| Mode | Description |\n|------|-------------|\n| `default` | Standard permission level |\n| `acceptEdits` | Agent can directly edit files |\n| `plan` | Agent only plans, does not execute |\n| `bypassPermissions` | YOLO mode - skips permission checks |\n| `dontAsk` | No confirmation prompts |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:30-60]()\n\n## Provider Presets\n\nProvider presets provide pre-configured settings for common AI providers, sorted by pricing tier.\n\n### Tier System\n\nPresets are organized into tiers reflecting cost and capability levels:\n\n```mermaid\ngraph LR\n    A[Tier 1 - Premium] --> B[Tier 2 - Standard]\n    B --> C[Tier 3 - Budget]\n    C --> D[Tier 4 - Free/Local]\n```\n\n| Tier | Description | Example Providers |\n|------|-------------|-------------------|\n| 1 | Premium APIs | Claude, GPT-4 |\n| 2 | Standard APIs | GPT-3.5, Gemini Pro |\n| 3 | Budget APIs | Various open-source models |\n| 4 | Free/Local | Local deployments, free tiers |\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:80-120]()\n\n### Adding Providers from Presets\n\n```typescript\ninterface ProviderPreset {\n  name: string;\n  tier: number;\n  agent_types: string[];\n  models: string[];\n  thinking?: string;\n}\n```\n\nThe preset grid displays available presets sorted by tier. Existing provider names are filtered out using `Set<string>` to prevent duplicates.\n\n资料来源：[web/src/pages/Providers/ProviderList.tsx:100-150]()\n\n## Project Configuration\n\nEach project maintains its own configuration including agent type, working directory, and platform-specific settings.\n\n### Project Settings Structure\n\n| Setting | Type | Description |\n|---------|------|-------------|\n| `name` | string | Project identifier (alphanumeric, `-`, `_`) |\n| `agent_type` | string | Agent type for this project |\n| `work_dir` | string | Working directory path |\n| `platforms` | array | Enabled platforms |\n| `heartbeat_enabled` | boolean | Heartbeat monitoring status |\n| `show_ctx_indicator` | boolean | Context usage indicator |\n\n资料来源：[web/src/pages/Projects/ProjectList.tsx:1-50]()\n\n### Heartbeat Configuration\n\nProjects can enable heartbeat monitoring with the following settings:\n\n| Parameter | Description |\n|-----------|-------------|\n| `interval_mins` | Monitoring interval in minutes |\n| `paused` | Whether heartbeat is paused |\n| `run_count` | Total heartbeat executions |\n| `error_count` | Number of errors encountered |\n\n资料来源：[web/src/pages/Projects/ProjectDetail.tsx:200-250]()\n\n## Skill Presets\n\nSkill presets define collections of skills organized by project type and agent capability.\n\n### Skill Preset Structure\n\n```typescript\ninterface SkillPreset {\n  project: string;        // Project type identifier\n  agent_type: string;      // Required agent type\n  dirs?: string[];         // Scan directories for skills\n  skills?: Skill[];       // Associated skills\n}\n```\n\n| Field | Description |\n|-------|-------------|\n| `project` | Project category or type name |\n| `agent_type` | Compatible agent type |\n| `dirs` | Directories to scan for skill definitions |\n| `skills` | Pre-configured skill list |\n\n资料来源：[web/src/pages/Skills/SkillList.tsx:50-100]()\n\n### Skill Structure\n\n```typescript\ninterface Skill {\n  name: string;           // Skill identifier\n  display_name?: string;  // User-friendly name\n  description?: string;  // Skill description\n  source: {\n    url?: string;         // Source URL\n    name?: string;         // Provider name\n    provider?: string;     // Provider identifier\n  };\n  author?: string;        // Skill author\n  url?: string;           // Download URL\n}\n```\n\n资料来源：[web/src/pages/Skills/SkillList.tsx:100-150]()\n\n## CLI Configuration Commands\n\nThe command-line interface provides provider management commands:\n\n| Command | Description |\n|---------|-------------|\n| `/provider list` | List all configured providers |\n| `/provider switch <name>` | Switch active provider |\n| `/provider clear` | Reset provider selection |\n| `cc-connect provider add` | Add new provider via CLI |\n\n资料来源：[core/i18n.go:1-100]()\n\n### Provider Switching\n\nWhen switching providers, the system validates provider existence and updates the active configuration:\n\n```mermaid\nsequenceDiagram\n    User->>CLI: /provider switch <name>\n    CLI->>Config: Validate provider exists\n    Config-->>CLI: Provider found\n    CLI->>Config: Update active provider\n    Config-->>User: Provider switched to <name>\n```\n\n资料来源：[core/i18n.go:100-150]()\n\n## Configuration File Example\n\n```toml\n# Global Providers Section\n[providers.openai]\nbase_url = \"https://api.openai.com/v1\"\nmodel = \"gpt-4\"\nmodels = [\"gpt-4\", \"gpt-3.5-turbo\"]\n\n[providers.claude]\nbase_url = \"https://api.anthropic.com\"\nmodel = \"claude-3-sonnet-20240229\"\nthinking = \"enabled\"\n\n# Project-specific Configuration\n[project.my-project]\nagent_type = \"claude\"\nwork_dir = \"/path/to/project\"\nplatforms = [\"github\"]\n\n# Heartbeat Configuration\n[heartbeat.my-project]\ninterval_mins = 5\n```\n\n## Platform-Specific Settings\n\nDifferent platforms may require specific configuration:\n\n| Platform | Required Settings |\n|----------|------------------|\n| `github` | Repository access, authentication token |\n| `feishu` | App ID, App Secret, verification token |\n| `telegram` | Bot token, webhook URL |\n| `discord` | Bot token, guild ID |\n| `slack` | Bot token, signing secret |\n\n资料来源：[AGENTS.md:1-50]()\n\n## Build Tags for Platform Support\n\nPlatform support is controlled via Go build tags:\n\n```makefile\nALL_PLATFORMS = gemini iflow opencode qoder feishu telegram discord slack dingtalk wecom weixin qq qqbot line weibo\n```\n\nTo exclude specific platforms:\n\n```bash\ngo build -tags \"no_gemini,no_iflow\"\n```\n\n资料来源：[AGENTS.md:50-100]()\n\n## Best Practices\n\n1. **Provider Organization**: Use provider presets as templates and customize as needed\n2. **Project Isolation**: Each project should have its own working directory\n3. **Permission Mode**: Use `plan` mode for testing, `bypassPermissions` only when necessary\n4. **Heartbeat**: Enable for long-running projects to monitor agent health\n5. **i18n**: All user-facing strings should have translations for all supported languages\n\n## Summary\n\nThe cc-connect configuration system provides a comprehensive framework for managing AI providers, projects, and skills. By understanding the hierarchical relationship between global settings, project configurations, and skill presets, administrators can effectively customize the system for various use cases and platform requirements.\n\n---\n\n<a id='page-session-management'></a>\n\n## Session Management\n\n### 相关页面\n\n相关主题：[Configuration Guide](#page-configuration), [Core Components](#page-core-components)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [core/session.go](https://github.com/chenhg5/cc-connect/blob/main/core/session.go)\n- [core/projectstate.go](https://github.com/chenhg5/cc-connect/blob/main/core/projectstate.go)\n- [core/dir_history.go](https://github.com/chenhg5/cc-connect/blob/main/core/dir_history.go)\n- [core/cron.go](https://github.com/chenhg5/cc-connect/blob/main/core/cron.go)\n- [core/command.go](https://github.com/chenhg5/cc-connect/blob/main/core/command.go)\n- [cmd/cc-connect/sessions.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/sessions.go)\n</details>\n\n# Session Management\n\n## Overview\n\nSession Management is the core system responsible for maintaining conversational state between users and AI agents in cc-connect. Each session represents a single conversation context, preserving message history, working directory state, and agent configuration across interactions. The system enables users to switch between multiple concurrent conversations while maintaining isolation of context and state per session.\n\nSessions serve as the fundamental unit of work in cc-connect, allowing agents to maintain context across multiple requests, store conversation history, and provide seamless user experience through features like session switching, history retrieval, and live session indicators.\n\n## Architecture Overview\n\n```mermaid\ngraph TD\n    User[User] -->|Chat/CLI| WebUI[Web UI / CLI]\n    WebUI -->|Bridge| Bridge[Session Bridge]\n    Bridge -->|Manage| SessionMgr[Session Manager]\n    SessionMgr -->|Persist| Store[Session Store]\n    SessionMgr -->|Agent Comm| Agent[Agent Session]\n    Agent -->|Execute| CodeAgent[Claude Code / Codex / etc]\n    \n    SessionMgr -->|State| ProjectState[Project State]\n    SessionMgr -->|History| DirHistory[Directory History]\n    SessionMgr -->|Schedule| Cron[Cron Jobs]\n    \n    subgraph Per-Session\n        S1[Session 1]\n        S2[Session 2]\n        SN[Session N]\n    end\n    \n    SessionMgr -.->|Created| S1\n    SessionMgr -.->|Created| S2\n    SessionMgr -.->|Created| SN\n```\n\n## Session Data Model\n\n### Core Session Structure\n\n```go\ntype Session struct {\n    ID              string           // Unique session identifier\n    ProjectName     string           // Associated project\n    Name            string           // Display name\n    UserName        string           // Creator identifier\n    ActiveSessionKeys []string       // Active session references\n    Live            bool             // Currently active/in-use\n    CreatedAt       time.Time        // Creation timestamp\n    UpdatedAt       time.Time        // Last modification\n    LastMessage     *HistoryEntry    // Most recent message\n    Messages        []HistoryEntry   // Full message history\n}\n```\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `id` | string | Unique session identifier (UUID) |\n| `project_name` | string | Name of associated project |\n| `name` | string | Human-readable session name |\n| `user_name` | string | Creator's identifier |\n| `live` | bool | Whether session is currently active |\n| `created_at` | timestamp | Session creation time |\n| `updated_at` | timestamp | Last activity time |\n| `last_message` | HistoryEntry | Most recent message object |\n| `messages_count` | int | Total message count |\n\n### History Entry Structure\n\nEach message in a session is stored as a `HistoryEntry`:\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `role` | string | \"user\" or \"assistant\" |\n| `content` | string | Message content |\n| `timestamp` | time.Time | Message timestamp |\n| `thinking` | string | Optional reasoning content (Codex) |\n\n## Session Lifecycle\n\n### Lifecycle States\n\n```mermaid\nstateDiagram-v2\n    [*] --> Created: /new-session\n    Created --> Active: First Message\n    Active --> Active: Send Message\n    Active --> Paused: /history or Switch\n    Paused --> Active: Resume Session\n    Active --> Closed: /close or Timeout\n    Closed --> [*]: Cleanup\n    \n    Created --> Deleted: /delete\n    Active --> Deleted: /delete\n    Paused --> Deleted: /delete\n    Deleted --> [*]\n```\n\n### Session Creation\n\nSessions are created in multiple scenarios:\n\n1. **Explicit Creation**: Via `/new-session` command or CLI `cc-connect sessions new`\n2. **Automatic on First Project Use**: When a project has no existing sessions\n3. **Cron Job Sessions**: Fresh sessions created per cron run (when `session-mode: new-per-run`)\n\n### Session Persistence\n\nSessions are persisted to storage with the following behavior:\n\n- **Active Session Tracking**: `ActiveSessionKeys` array tracks currently active sessions per project\n- **Last Message Cache**: The `LastMessage` field is updated after each exchange for quick retrieval\n- **History Truncation**: When `limit > 0`, only the most recent N entries are retained (configurable per request)\n\n## Project State Management\n\nSessions are scoped to projects. The `ProjectState` interface manages this relationship:\n\n```go\ntype ProjectState interface {\n    GetActiveSessionKey(project string) string\n    SetActiveSessionKey(project, sessionKey string)\n    AddSession(project string, session Session) error\n    ListSessions(project string) ([]Session, error)\n    GetSession(project, sessionKey string) (*Session, error)\n}\n```\n\n### Project-Session Relationship\n\n| Project Setting | Session Behavior |\n|----------------|------------------|\n| `sessions_count` | Number of sessions for project |\n| `active_session_keys` | Currently active session references |\n| Per-project agent | Each session uses project's configured agent |\n\n## Session History\n\n### History Entry Format\n\nSessions store a chronological list of `HistoryEntry` objects:\n\n```go\ntype HistoryEntry struct {\n    Role      string    `json:\"role\"`\n    Content   string    `json:\"content\"`\n    Timestamp time.Time `json:\"timestamp\"`\n    Thinking  string    `json:\"thinking,omitempty\"` // Codex reasoning\n}\n```\n\n### History Retrieval Commands\n\n| Command | Description | Source |\n|---------|-------------|--------|\n| `/history [n]` | Show last n messages (default 10) | `core/command.go` |\n| `/reasoning [level]` | View/switch reasoning effort | `core/command.go` |\n| SessionDrawer | UI component for browsing history | `SessionList.tsx` |\n\n### History Display\n\nIn the web UI, session history is displayed with:\n\n- **Role Indicators**: User messages show `User` icon, assistant messages show `Bot` icon\n- **Timestamp**: Relative time display using `timeAgo()` function\n- **Message Preview**: Last 100 characters of content, newlines replaced with spaces\n- **Line Clamping**: Messages limited to 2 lines in list view\n\n## Session Switching\n\n### Switch Session Methods\n\n```mermaid\ngraph LR\n    A[User] -->|/session| B[Switch Command]\n    A -->|UI Click| C[SessionDrawer]\n    B -->|Validate| D{Valid Session?}\n    D -->|Yes| E[Set Active Session]\n    D -->|No| F[Error: Not Found]\n    E --> G[Update ProjectState]\n    G --> H[Load Session Context]\n    \n    C -->|Select| I[switchToSession]\n    I --> G\n```\n\n### Active Session Management\n\nThe system maintains a single active session per project:\n\n```go\n// ProjectState maintains active session key\nfunc (ps *projectState) GetActiveSessionKey(project string) string\nfunc (ps *projectState) SetActiveSessionKey(project, sessionKey string)\n```\n\n### Session Drawer Component\n\nThe `SessionDrawer` component in `web/src/pages/Sessions/SessionList.tsx` provides:\n\n| Feature | Description |\n|---------|-------------|\n| Session List | All sessions for current project |\n| Live Indicator | Green dot for currently active session |\n| Quick Switch | Click to switch active session |\n| New Session | Button to create fresh session |\n| Message Preview | Shows last message in each session |\n\n## Directory History Integration\n\nSessions track working directory changes via `DirHistory`:\n\n```go\ntype DirHistory struct {\n    SessionID string   // Associated session\n    Paths     []string // Ordered list of visited directories\n    Index     int      // Current position in history\n}\n```\n\n### Directory Commands\n\n| Command | Description |\n|---------|-------------|\n| `/dir <path>` | Change to specified directory |\n| `/dir reset` | Return to project's default directory |\n| `/history` | Show directory visit history |\n\nThis allows agents to maintain working context across sessions when the same session is resumed.\n\n## Scheduled Tasks (Cron) Integration\n\nSessions interact with the cron system through the `--session-mode` flag:\n\n### Session Modes\n\n| Mode | Behavior | Use Case |\n|------|----------|----------|\n| `reuse` (default) | Reuse same session across runs | Ongoing conversations |\n| `new-per-run` | Fresh agent session each run | Isolated task execution |\n\n```bash\n# Example: Daily task with reused session\ncc-connect cron add --cron \"0 6 * * *\" --prompt \"Summarize emails\" --desc \"Morning Summary\"\n\n# Example: Task requiring fresh context each run\ncc-connect cron add --cron \"*/30 * * * *\" --exec \"df -h\" --session-mode new-per-run\n```\n\n### Cron Session Configuration\n\n| Parameter | Description |\n|-----------|-------------|\n| `--timeout-mins <n>` | Max minutes per run (0 = no limit, default 30) |\n| `--session-mode` | `reuse` or `new-per-run` |\n\n## CLI Session Commands\n\n### Available Commands\n\n```bash\n# List sessions for current project\ncc-connect sessions list\n\n# Create new session\ncc-connect sessions new\n\n# Switch to session\ncc-connect sessions switch <session-id>\n\n# Show session history\ncc-connect sessions history <session-id> [limit]\n\n# Delete session\ncc-connect sessions delete <session-id>\n```\n\n### Session Options (from `cmd/cc-connect/sessions.go`)\n\n| Option | Description |\n|--------|-------------|\n| `-p, --project <name>` | Target project (auto-detected from CC_PROJECT) |\n| `-s, --session-key <key>` | Target session (auto-detected from CC_SESSION_KEY) |\n\n## Bridge Communication\n\nThe web UI communicates with sessions via a bridge protocol:\n\n```mermaid\nsequenceDiagram\n    participant UI as ChatView\n    participant Bridge as Session Bridge\n    participant Session as Session Manager\n    \n    UI->>Bridge: connect(project, sessionId)\n    Bridge->>Session: Register connection\n    Session-->>Bridge: session state\n    Bridge-->>UI: bridge status: connected\n    \n    UI->>Bridge: send(message)\n    Bridge->>Session: Process message\n    Session->>Session: Update history\n    Session-->>Bridge: response\n    Bridge-->>UI: stream events\n    \n    Note over Bridge: status: \"connected\" | \"connecting\" | \"error\" | \"disconnected\"\n```\n\n### Bridge Status States\n\n| Status | Description | UI Display |\n|--------|-------------|------------|\n| `connected` | Active connection | Hidden |\n| `connecting` | Establishing connection | Spinner + \"Connecting...\" |\n| `error` | Connection failed | Warning icon + \"Disconnected\" |\n| `disconnected` | No active bridge | Warning icon + \"Disconnected\" |\n\n## Session Storage\n\n### Storage Location\n\n- **Default Directory**: `~/.cc-connect`\n- **Session Data**: Stored in project-specific storage\n- **Session Key Environment Variable**: `CC_SESSION_KEY`\n\n### Storage Schema\n\n```\n~/.cc-connect/\n├── projects/\n│   └── <project-name>/\n│       └── sessions/\n│           └── <session-id>/\n│               ├── meta.json       # Session metadata\n│               ├── messages.jsonl  # Message history\n│               └── context/        # Agent context files\n```\n\n## Agent-Specific Session Handling\n\n### Codex Agent\n\nThe Codex agent includes special session handling (`agent/codex/session.go`):\n\n```go\nfunc patchSessionSource(sessionID, codexHome string) {\n    // Rewrites session_meta line in Codex JSONL transcript\n    // Sets source=\"cli\" and originator=\"codex_cli_rs\"\n    // Makes session visible in interactive codex terminal\n}\n```\n\n### Session Context Loading\n\nCodex sessions retry context loading with:\n\n| Parameter | Value | Purpose |\n|-----------|-------|---------|\n| `codexContextUsageRetryCount` | 5 | Maximum retry attempts |\n| `codexContextUsageRetryDelay` | 1 second | Delay between retries |\n| `codexSessionCloseTimeout` | 5 seconds | Grace period for cleanup |\n\n## Best Practices\n\n1. **Session Naming**: Use descriptive names for easy identification\n2. **History Cleanup**: Periodically delete old sessions to maintain performance\n3. **Project Isolation**: Keep sessions scoped to their project for proper context\n4. **Timeout Configuration**: Set appropriate `--timeout-mins` for long-running tasks\n5. **Session Mode Selection**: Use `new-per-run` for isolated tasks, `reuse` for conversational agents\n\n## Related Commands Reference\n\n| Slash Command | Description |\n|---------------|-------------|\n| `/new-session` | Create a new session |\n| `/sessions` | List/manage sessions |\n| `/history [n]` | View message history |\n| `/session <id>` | Switch to specific session |\n| `/dir <path>` | Change working directory (session-scoped) |\n\n---\n\n<a id='page-web-ui'></a>\n\n## Web UI Administration\n\n### 相关页面\n\n相关主题：[Configuration Guide](#page-configuration), [Deployment and Operations](#page-deployment)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [web/src/App.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/App.tsx)\n- [web/src/pages/Dashboard.tsx](https://github.com/chenhg5/cc-connect/blob/main/web/src/pages/Dashboard.tsx)\n- [web/src/api/index.ts](https://github.com/chenhg5/cc-connect/blob/main/web/src/api/index.ts)\n- [cmd/cc-connect/web.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/web.go)\n- [core/web_manager.go](https://github.com/chenhg5/cc-connect/blob/main/core/web_manager.go)\n</details>\n\n# Web UI Administration\n\nThe Web UI Administration module in cc-connect provides a comprehensive, single-page administrative interface for managing the entire platform. Built with React and TypeScript, the web interface serves as the primary control center for administrators to configure projects, manage agent providers, monitor sessions, and administer scheduled cron jobs—all without requiring command-line interaction.\n\n## Architecture Overview\n\nThe web administration system follows a client-server architecture where the React frontend communicates with the Go backend through a RESTful API. The backend serves both static assets and dynamic API endpoints, while the frontend manages routing, state, and user interactions.\n\n```mermaid\ngraph TD\n    A[Browser Client] --> B[React SPA Frontend]\n    B --> C[API Client Layer]\n    C --> D[Go Backend API]\n    D --> E[(SQLite Database)]\n    D --> F[Platform Connectors<br/>Feishu/WeChat]\n    D --> G[Agent Providers<br/>Claude/Codex/Gemini]\n    \n    B --> H[Dashboard]\n    B --> I[Projects]\n    B --> J[Sessions]\n    B --> K[Providers]\n    B --> L[Skills]\n    B --> M[Cron Jobs]\n```\n\n## Frontend Application Structure\n\n### App Entry Point and Routing\n\nThe main application entry point (`web/src/App.tsx`) initializes the React application with routing capabilities. The application uses client-side routing to navigate between different administrative sections.\n\n**资料来源：** [web/src/App.tsx:1-50]()\n\n### Page Modules\n\nThe web interface is organized into several distinct page modules, each handling a specific domain of administrative functionality:\n\n| Module | File Path | Purpose |\n|--------|-----------|---------|\n| Dashboard | `web/src/pages/Dashboard.tsx` | System overview, status metrics, quick links |\n| Projects | `web/src/pages/Projects/ProjectList.tsx` | Project creation and management |\n| Project Detail | `web/src/pages/Projects/ProjectDetail.tsx` | Per-project settings and configuration |\n| Sessions | `web/src/pages/Sessions/SessionList.tsx` | Chat session history and management |\n| Providers | `web/src/pages/Providers/ProviderList.tsx` | Agent provider configuration |\n| Skills | `web/src/pages/Skills/SkillList.tsx` | Skill preset management |\n| Cron Jobs | `web/src/pages/Cron/CronList.tsx` | Scheduled task administration |\n\n**资料来源：** [web/src/pages/Dashboard.tsx:1-30]()\n\n## Core Features\n\n### Dashboard\n\nThe Dashboard provides an at-a-glance view of the system status. It displays key metrics including version information, uptime statistics, connected platform count, and total project count.\n\n```typescript\n// Key dashboard metrics displayed\n<StatCard label={t('dashboard.version')} value={status?.version || '-'} accent />\n<StatCard label={t('dashboard.uptime')} value={status ? formatUptime(status.uptime_seconds) : '-'} />\n<StatCard label={t('dashboard.platforms')} value={status?.connected_platforms?.length ?? 0} />\n<StatCard label={t('dashboard.projects')} value={status?.projects_count ?? 0} />\n```\n\nThe dashboard also includes a projects section with quick navigation links to the full projects list.\n\n**资料来源：** [web/src/pages/Dashboard.tsx:20-45]()\n\n### Project Management\n\nProjects are the central organizational unit in cc-connect. The project management interface allows administrators to:\n\n- Create new projects with the Add Project Wizard\n- Configure platform integrations (Feishu, WeChat)\n- Set up agent types and working directories\n- View session counts and heartbeat status\n\n#### Project List View\n\nThe project list displays all configured projects with key metadata including agent type, supported platforms, session count, and heartbeat status indicators.\n\n```typescript\n// Project card displays key information\n<Badge variant=\"info\">{p.agent_type}</Badge>\n{p.platforms?.slice(0, 3).map((pl) => <Badge key={pl}>{pl}</Badge>)}\n<span>{p.sessions_count} {t('nav.sessions').toLowerCase()}</span>\n{p.heartbeat_enabled && (\n  <span className=\"flex items-center gap-1 text-emerald-500\">\n    <Heart size={12} /> {t('heartbeat.title')}\n  </span>\n)}\n```\n\n**资料来源：** [web/src/pages/Projects/ProjectList.tsx:1-80]()\n\n#### Project Detail Settings\n\nIndividual project pages expose granular configuration options:\n\n| Setting | Description | Type |\n|---------|-------------|------|\n| Context Indicator | Show `[ctx: ~N%]` suffix on replies | Toggle |\n| Reply Footer | Append model/usage metadata to replies | Toggle |\n| Scan Directories | Directories scanned for skills | List |\n| Provider Links | Connected agent providers | Reference |\n\n**资料来源：** [web/src/pages/Projects/ProjectDetail.tsx:1-50]()\n\n#### Add Project Wizard\n\nThe wizard guides users through a multi-step setup process:\n\n1. **Name Step** - Enter project name (alphanumeric, hyphen, underscore only)\n2. **Platform Step** - Select integration platform (Feishu, WeChat, or manual setup)\n3. **QR Step** - Generate QR code for mobile platform authentication\n4. **Form Step** - Manual configuration form for advanced settings\n\n```typescript\n// Project name validation\nvalue={newProjName}\nonChange={(e) => setNewProjName(e.target.value.replace(/[^a-zA-Z0-9_-]/g, ''))}\n```\n\n**资料来源：** [web/src/pages/Projects/ProjectList.tsx:80-120]()\n\n### Session Management\n\nThe Session List view provides a chronological view of all chat sessions across projects. Each session entry shows:\n\n- Session name or ID\n- Live status indicator\n- Last activity timestamp\n- Message preview (first 100 characters)\n- Associated project and platform badges\n- Message count\n\n```typescript\n// Session display with live indicator\n<MessageSquare size={14} className={s.live ? 'text-accent shrink-0' : 'text-gray-400 shrink-0'} />\n<span className=\"text-sm font-medium text-gray-900 dark:text-white truncate\">\n  {s.name || s.user_name || s.id.slice(0, 8)}\n</span>\n{s.live && <Circle size={5} className=\"fill-emerald-500 text-emerald-500 shrink-0\" />}\n```\n\n**资料来源：** [web/src/pages/Sessions/SessionList.tsx:1-60]()\n\n### Provider Administration\n\nThe Provider Management interface allows configuration of LLM agent providers with support for both global and per-project provider assignments.\n\n#### Provider Features\n\n- **Model Selection** - Configure base URL and model identifiers\n- **Multi-Model Support** - Define model lists with default selection\n- **Thinking Control** - Enable or disable extended thinking per provider\n- **Agent Type Filtering** - Restrict providers to specific agent types\n\n#### Provider Form Configuration\n\n| Field | Description | Required |\n|-------|-------------|----------|\n| Name | Provider identifier | Yes |\n| API Key | Authentication key | Yes |\n| Base URL | Endpoint URL | No |\n| Model | Default model name | No |\n| Models | Additional model list | No |\n| Thinking | Extended thinking mode | No |\n| Agent Types | Applicable agent types | No |\n\n**资料来源：** [web/src/pages/Providers/ProviderList.tsx:1-100]()\n\n#### CC-Switch Import\n\nThe interface supports importing provider configurations from CC-Switch, enabling migration of existing setups.\n\n### Skills Management\n\nThe Skills interface manages skill presets that can be assigned to projects. Skills define capabilities and behaviors for agents, with support for:\n\n- Display name and description (with localization)\n- Source tracking (URL, provider, author)\n- Version information\n- Pricing metadata\n- Tag-based categorization\n\n#### Recommended Skills\n\nA preset grid displays available skill templates that administrators can add to their projects.\n\n### Cron Job Scheduling\n\nThe Cron List view administers scheduled tasks that execute prompts on projects at configured intervals.\n\n```typescript\n// Cron job display includes mode, project, and timing\n<Badge variant=\"outline\" className=\"text-[10px] px-1.5 py-0\">{job.mode || t('cron.modeDefault')}</Badge>\n<span className=\"font-medium w-12 shrink-0 text-gray-400\">{t('cron.project')}</span>\n<span className=\"truncate\">{job.project}</span>\n<span className=\"font-medium w-12 shrink-0 text-gray-400\">{t('cron.lastRun')}</span>\n<span>{formatTime(job.last_run)}</span>\n```\n\n**资料来源：** [web/src/pages/Cron/CronList.tsx:1-50]()\n\n## API Client Layer\n\nThe frontend communicates with the backend through an API client module (`web/src/api/index.ts`). This layer abstracts HTTP communication and provides typed interfaces for all administrative operations.\n\n### Key API Operations\n\n| Category | Operations |\n|----------|------------|\n| Projects | list, create, update, delete, get |\n| Sessions | list, get, delete, clear history |\n| Providers | list, create, update, delete |\n| Skills | list presets, add to project |\n| Cron | list, create, update, delete, trigger |\n| System | status, restart, shutdown |\n\n**资料来源：** [web/src/api/index.ts:1-100]()\n\n## Backend Server\n\n### Web Server Initialization\n\nThe Go backend initializes the web server with static file serving and API routing.\n\n**资料来源：** [cmd/cc-connect/web.go:1-50]()\n\n### Web Manager\n\nThe core web manager handles the lifecycle of the web interface, including configuration, middleware setup, and request routing.\n\n```go\n// Web server configuration structure\ntype WebConfig struct {\n    Host     string\n    Port     int\n    TLS      bool\n    CertFile string\n    KeyFile  string\n}\n```\n\n**资料来源：** [core/web_manager.go:1-80]()\n\n## Internationalization\n\nThe web interface supports multiple languages through an internationalization system defined in `core/i18n.go`. Supported languages include:\n\n- English\n- Simplified Chinese (简体中文)\n- Traditional Chinese (繁體中文)\n- Japanese (日本語)\n- Spanish (Español)\n\nThe UI automatically detects the browser language and falls back to English when translations are unavailable.\n\n## User Interface Components\n\n### Common UI Elements\n\nThe interface uses a consistent component library including:\n\n- **Card** - Container for grouped content\n- **Badge** - Status indicators and labels\n- **Button** - Action triggers with variants (primary, secondary, ghost)\n- **Modal** - Dialog overlays for forms and confirmations\n- **Input** - Form field components with validation\n- **Badge variants** - default, outline, info, success for semantic coloring\n\n### Dark Mode Support\n\nAll components support dark mode theming through CSS custom properties and Tailwind dark variants:\n\n```typescript\n// Example dark mode styling pattern\nclassName=\"text-gray-900 dark:text-white bg-white dark:bg-white/[0.02]\"\nclassName=\"border-gray-200 dark:border-white/[0.06]\"\n```\n\n## Configuration and State Management\n\nThe frontend uses React hooks for state management with several key patterns:\n\n1. **Server State** - Data fetched from the API (projects, sessions, providers)\n2. **UI State** - Local component state (modals, forms, selections)\n3. **Preferences** - User settings like language and theme\n\n### Key State Hooks\n\n| Hook | Purpose |\n|------|---------|\n| `useProjects` | Fetch and cache project list |\n| `useProviders` | Manage provider configurations |\n| `useSessions` | Session listing and filtering |\n| `useStatus` | System status polling |\n\n## Security Considerations\n\nThe web interface handles sensitive operations including:\n\n- API key management for provider configurations\n- Project authentication credentials\n- Session data access\n\nAll sensitive fields use password input types with visibility toggles:\n\n```typescript\n<Input\n  type={showKey ? 'text' : 'password'}\n  value={form.api_key || ''}\n  placeholder=\"sk-...\"\n/>\n<button onClick={() => setShowKey(!showKey)}>\n  {showKey ? <EyeOff size={16} /> : <Eye size={16} />}\n</button>\n```\n\n**资料来源：** [web/src/pages/Providers/ProviderList.tsx:150-180]()\n\n## Data Flow Diagram\n\n```mermaid\nsequenceDiagram\n    participant User\n    participant ReactApp\n    participant API\n    participant GoBackend\n    participant Database\n\n    User->>ReactApp: Navigate to Projects\n    ReactApp->>API: GET /api/projects\n    API->>GoBackend: HTTP Request\n    GoBackend->>Database: Query projects\n    Database->>GoBackend: Project records\n    GoBackend->>API: JSON response\n    API->>ReactApp: Project list data\n    ReactApp->>User: Render ProjectList\n```\n\n## Conclusion\n\nThe Web UI Administration module provides a complete, production-ready administrative interface for cc-connect. Its modular design separates concerns across page components, while the typed API client ensures reliable communication with the backend. The support for dark mode, internationalization, and responsive design makes it suitable for deployment in varied operational environments.\n\n---\n\n<a id='page-deployment'></a>\n\n## Deployment and Operations\n\n### 相关页面\n\n相关主题：[Quick Start Guide](#page-quickstart)\n\n<details>\n<summary>相关源码文件</summary>\n\n以下源码文件用于生成本页说明：\n\n- [cmd/cc-connect/update.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/update.go)\n- [cmd/cc-connect/daemon.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/daemon.go)\n- [daemon/manager.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/manager.go)\n- [daemon/systemd.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/systemd.go)\n- [core/runas.go](https://github.com/chenhg5/cc-connect/blob/main/core/runas.go)\n- [core/updater.go](https://github.com/chenhg5/cc-connect/blob/main/core/updater.go)\n</details>\n\n# Deployment and Operations\n\nThis page covers the operational aspects of cc-connect, including installation, daemon management, service configuration, and system-level integration.\n\n## Overview\n\ncc-connect is a bridge application that connects local AI coding agents to messaging platforms. It supports multiple deployment scenarios ranging from manual binary execution to automated system service management across Linux (systemd), macOS (launchd), and Windows (Task Scheduler).\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Installation Methods\n\ncc-connect offers four primary installation approaches depending on your environment and requirements.\n\n### Package Manager Installation\n\n**macOS (Homebrew):**\n```bash\nbrew install cc-connect\n```\n\n**Linux (Homebrew):**\n```bash\nbrew install cc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n### Pre-built Binary Download\n\nDownload platform-specific binaries from the [GitHub Releases](https://github.com/chenhg5/cc-connect/releases) page.\n\n| Platform | Architecture | Artifact Pattern |\n|----------|-------------|------------------|\n| Linux | amd64 | `cc-connect-<version>-linux-amd64` |\n| macOS | amd64 | `cc-connect-<version>-darwin-amd64` |\n| macOS | ARM64 | `cc-connect-<version>-darwin-arm64` |\n| Windows | amd64 | `cc-connect-<version>-windows-amd64.exe` |\n\n**Installation Example (Linux):**\n```bash\ncurl -L -o cc-connect https://github.com/chenhg5/cc-connect/releases/latest/download/cc-connect-linux-amd64\nchmod +x cc-connect\nsudo mv cc-connect /usr/local/bin/\n```\n\n**macOS Quarantine Removal:**\n```bash\nxattr -d com.apple.quarantine cc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n### Build from Source\n\nBuilding from source requires Go 1.22 or later.\n\n```bash\ngit clone https://github.com/chenhg5/cc-connect.git\ncd cc-connect\nmake build\n# Binary output: ./cc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Configuration File Management\n\ncc-connect searches for configuration files in the following order:\n\n1. `-config <path>` flag (explicit path)\n2. `./config.toml` (current directory)\n3. `~/.cc-connect/config.toml` (global, recommended)\n\nIf no configuration file exists, running `cc-connect` will automatically create a starter template at `~/.cc-connect/config.toml`.\n\n### Manual Configuration Setup\n\n```bash\nmkdir -p ~/.cc-connect\n# Option 1: Copy example from cloned repo\ncp config.example.toml ~/.cc-connect/config.toml\n# Option 2: Run cc-connect once to auto-generate\ncc-connect\n```\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Daemon Management\n\nThe daemon subsystem provides persistent background operation with automatic startup on system boot.\n\n### Installing the Daemon\n\n**Basic Installation:**\n```bash\ncc-connect daemon install --config ~/.cc-connect/config.toml\n```\n\n**Using Work Directory:**\n```bash\ncc-connect daemon install --work-dir ~/.cc-connect\n```\n\n**Installation Options:**\n\n| Flag | Description | Default |\n|------|-------------|---------|\n| `--config PATH` | Path to config file | `~/.cc-connect/config.toml` |\n| `--log-file PATH` | Custom log file location | Auto-generated |\n| `--log-max-size N` | Max log size in MB | Configured value |\n| `--work-dir DIR` | Directory containing config.toml | `~/.cc-connect` |\n| `--force` | Overwrite existing unit | false |\n\n资料来源：[cmd/cc-connect/daemon.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/daemon.go)\n\n### Daemon Lifecycle Commands\n\n```bash\ncc-connect daemon start      # Start the service\ncc-connect daemon stop       # Stop the service\ncc-connect daemon restart    # Restart the service\ncc-connect daemon status      # Check current status\n```\n\n### Platform-Specific Implementation\n\nThe daemon manager delegates to platform-specific implementations:\n\n- **Linux:** Creates a systemd user service 资料来源：[daemon/systemd.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/systemd.go)\n- **macOS:** Creates a LaunchAgent plist\n- **Windows:** Creates a Task Scheduler task named `cc-connect`\n\n```mermaid\ngraph TD\n    A[cc-connect daemon install] --> B{Platform Detection}\n    B -->|Linux| C[systemd User Service]\n    B -->|macOS| D[LaunchAgent Plist]\n    B -->|Windows| E[Task Scheduler Task]\n    C --> F[Auto-start on login]\n    D --> F\n    E --> G[Run at user logon]\n```\n\n资料来源：[daemon/manager.go](https://github.com/chenhg5/cc-connect/blob/main/daemon/manager.go)\n\n## Log Management\n\n### Viewing Logs\n\n```bash\ncc-connect daemon logs              # Display current log\ncc-connect daemon logs -f           # Follow mode (tail -f equivalent)\ncc-connect daemon logs -n 100       # Show last 100 lines\ncc-connect daemon logs --log-file /path/to/log  # Custom log file\n```\n\n### Log Rotation\n\nLogs automatically rotate when they reach the configured maximum size. The system maintains one backup of the previous log file.\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Update Management\n\n### Update Command\n\nThe update subsystem handles binary updates with signature verification.\n\n```bash\ncc-connect update [options]\n```\n\n**Update Options:**\n\n| Flag | Description |\n|------|-------------|\n| `--channel <name>` | Update channel (stable/beta) |\n| `--file <path>` | Install from local file |\n| `--data-dir <path>` | Data directory for update metadata |\n\n### Update Process Flow\n\n```mermaid\ngraph TD\n    A[cc-connect update] --> B[Check Update Channel]\n    B --> C{Fetch Latest Version}\n    C -->|Version Available| D[Download Binary]\n    C -->|Up to Date| E[Exit: Already current]\n    D --> F{Verify Signature}\n    F -->|Valid| G[Replace Binary]\n    F -->|Invalid| H[Abort Update]\n    G --> I[Restart Service]\n```\n\n资料来源：[cmd/cc-connect/update.go](https://github.com/chenhg5/cc-connect/blob/main/cmd/cc-connect/update.go)\n\n### Manual Update for Package Managers\n\n**Homebrew:**\n```bash\nbrew upgrade cc-connect\n```\n\n**Source Users:**\n```bash\ncd cc-connect\ngit pull\nmake build\n```\n\nAfter upgrading, restart the running cc-connect process to apply changes.\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n## Process Execution Model\n\n### Privilege Escalation\n\nThe `runas` module handles process execution with appropriate privileges:\n\n```mermaid\ngraph LR\n    A[Main Process] -->|Non-elevated| B[User Context]\n    A -->|Elevated tasks| C[runas Module]\n    C -->|sudo/elevation| D[Privileged Execution]\n```\n\nThe module supports:\n- Running commands with elevated privileges when required\n- Managing user context for different operation modes\n\n资料来源：[core/runas.go](https://github.com/chenhg5/cc-connect/blob/main/core/runas.go)\n\n## Operational Best Practices\n\n### Recommended Setup\n\n1. **Use Global Config Location:** Store configuration at `~/.cc-connect/config.toml` for consistent access across terminal sessions.\n\n2. **Install as System Service:** Use `daemon install` for production deployments to ensure automatic restart on system reboot.\n\n3. **Configure Log Rotation:** Set appropriate `--log-max-size` value based on expected message volume.\n\n4. **Monitor Log Output:** Regularly check `cc-connect daemon logs` for operational insights and error tracking.\n\n### Configuration Structure\n\nA typical multi-project production configuration:\n\n```toml\n[log]\nlevel = \"info\"\n\n[[projects]]\nname = \"backend\"\n[projects.agent]\ntype = \"claudecode\"\n[projects.agent.options]\nwork_dir = \"/path/to/backend\"\nmode = \"default\"\n\n[[projects.platforms]]\ntype = \"feishu\"\n[projects.platforms.options]\napp_id = \"cli_xxx\"\napp_secret = \"xxx\"\n```\n\n### Health Monitoring\n\nThe daemon status command provides current service state:\n\n```bash\ncc-connect daemon status\n```\n\nThis reports whether the service is running, and if applicable, the uptime and last activity timestamp.\n\n## Windows-Specific Considerations\n\nOn Windows, `daemon install` creates a Task Scheduler task that:\n- Runs at user logon\n- Starts immediately after installation\n- Is named `cc-connect` in the Task Scheduler\n\n资料来源：[INSTALL.md](https://github.com/chenhg5/cc-connect/blob/main/INSTALL.md)\n\n---\n\n---\n\n## Doramagic 踩坑日志\n\n项目：chenhg5/cc-connect\n\n摘要：发现 39 个潜在踩坑项，其中 12 个为 high/blocking；最高优先级：安装坑 - 来源证据：[Bug]。\n\n## 1. 安装坑 · 来源证据：[Bug]\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug]\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c85c0f8f48ac44c7a855066b2bfc3939 | https://github.com/chenhg5/cc-connect/issues/933 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 2. 安装坑 · 来源证据：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_bbbf45839e1043e2afdedf3f1d87b55b | https://github.com/chenhg5/cc-connect/issues/1058 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 3. 安装坑 · 来源证据：[Feature] Preserve full interactive card schema on inbound\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Feature] Preserve full interactive card schema on inbound\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f50380a7aef54548ac053b1127a2916e | https://github.com/chenhg5/cc-connect/issues/936 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 4. 安装坑 · 来源证据：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3a818efa6ddf479aae0f026d1f06d491 | https://github.com/chenhg5/cc-connect/issues/960 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 5. 配置坑 · 来源证据：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_7b001c45ac3449abaee3dd365bc4cc74 | https://github.com/chenhg5/cc-connect/issues/972 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 6. 配置坑 · 来源证据：WeChat ilink (weixin): image content is empty, not passed to agent\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：WeChat ilink (weixin): image content is empty, not passed to agent\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_17d4c5f39a5745c5bdfbc88cdac32056 | https://github.com/chenhg5/cc-connect/issues/1057 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 7. 配置坑 · 来源证据：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6136e384578b499ca63299322032211a | https://github.com/chenhg5/cc-connect/issues/966 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 8. 安全/权限坑 · 失败模式：security_permissions: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 对用户的影响：Developers may expose sensitive permissions or credentials: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions. Context: Observed during installation or first-run setup.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/chenhg5/cc-connect/issues/966\n- 证据：failure_mode_cluster:github_issue | fmev_d8aeb38642d53571d47292761cca7247 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions, failure_mode_cluster:github_issue | fmev_105e57f4097e09e9e5c522a568ff4991 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n## 9. 安全/权限坑 · 失败模式：security_permissions: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root...\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 对用户的影响：Developers may expose sensitive permissions or credentials: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志. Context: Observed when using linux\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/chenhg5/cc-connect/issues/1054\n- 证据：failure_mode_cluster:github_issue | fmev_9f56ecf6ad99707575ffe84fc2c10e1b | https://github.com/chenhg5/cc-connect/issues/1054 | [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n\n## 10. 安全/权限坑 · 来源证据：Feature Request: 终端与 IM 双通道统一会话管理\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Feature Request: 终端与 IM 双通道统一会话管理\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_befa8b4f1c7f4ef483d6d8b38ba06ba4 | https://github.com/chenhg5/cc-connect/issues/968 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 11. 安全/权限坑 · 来源证据：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c632e470b2d04852abae801be4d2aba2 | https://github.com/chenhg5/cc-connect/issues/1054 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 12. 安全/权限坑 · 来源证据：[Bug] codex mode修改YOLO模式无效\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] codex mode修改YOLO模式无效\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ce58ad66fc4e4d2ea6f0bb4a43527cd0 | https://github.com/chenhg5/cc-connect/issues/233 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n\n## 13. 安装坑 · 失败模式：installation: [Bug]\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug]\n- 对用户的影响：Developers may fail before the first successful local run: [Bug]\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug]. Context: Observed when using node, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_555d98ac56e7850b1c49e5892d2b6c48 | https://github.com/chenhg5/cc-connect/issues/933 | [Bug]\n\n## 14. 安装坑 · 失败模式：installation: [Bug] codex mode修改YOLO模式无效\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug] codex mode修改YOLO模式无效\n- 对用户的影响：Developers may fail before the first successful local run: [Bug] codex mode修改YOLO模式无效\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] codex mode修改YOLO模式无效. Context: Observed when using macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_59a6433bec9f3dcf0981efd11a046df3 | https://github.com/chenhg5/cc-connect/issues/233 | [Bug] codex mode修改YOLO模式无效\n\n## 15. 安装坑 · 失败模式：installation: [Bug] cursorSession error: unknown option '--trust\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug] cursorSession error: unknown option '--trust\n- 对用户的影响：Developers may fail before the first successful local run: [Bug] cursorSession error: unknown option '--trust\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cursorSession error: unknown option '--trust. Context: Observed when using node, macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_279592e262a8c9114ffed9bcd68ca683 | https://github.com/chenhg5/cc-connect/issues/923 | [Bug] cursorSession error: unknown option '--trust\n\n## 16. 安装坑 · 失败模式：installation: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 对用户的影响：Developers may fail before the first successful local run: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`. Context: Observed when using node, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_2ab77150cf90931385fb7741956a1f53 | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`, failure_mode_cluster:github_issue | fmev_5c45b25a78af1b25aea75c4cad91e50a | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n## 17. 安装坑 · 失败模式：installation: v1.3.0\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v1.3.0\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.0\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0. Context: Observed when using node, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_a2ead0f4920aaffbc2c58e566c82e8e8 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.0 | v1.3.0\n\n## 18. 安装坑 · 失败模式：installation: v1.3.3-beta.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v1.3.3-beta.1\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.3-beta.1\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3-beta.1. Context: Observed when using node\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_2967bcebc65cc66231ca2bcd62e03f6f | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.1 | v1.3.3-beta.1\n\n## 19. 安装坑 · 失败模式：installation: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 对用户的影响：Developers may fail before the first successful local run: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险. Context: Observed during installation or first-run setup.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_f2c109d868a32136d97c513f8ac192bb | https://github.com/chenhg5/cc-connect/issues/967 | 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n## 20. 安装坑 · 来源证据：v1.3.3-beta.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.3.3-beta.1\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5eb39ef63cf14e56aff580db738dcd9f | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.1 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 21. 安装坑 · 来源证据：生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_574cca97359b4bc1a8a8fa968ab758cb | https://github.com/chenhg5/cc-connect/issues/967 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 22. 配置坑 · 可能修改宿主 AI 配置\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n- 防护动作：涉及宿主配置目录时必须给回滚路径，不能只给安装命令。\n- 证据：capability.host_targets | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | host_targets=claude, claude_code, cursor\n\n## 23. 配置坑 · 失败模式：configuration: Feature Request: 终端与 IM 双通道统一会话管理\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Feature Request: 终端与 IM 双通道统一会话管理\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Feature Request: 终端与 IM 双通道统一会话管理\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feature Request: 终端与 IM 双通道统一会话管理. Context: Observed when using windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_eb8a9f26e9a7250936e6075aa04d1f9f | https://github.com/chenhg5/cc-connect/issues/968 | Feature Request: 终端与 IM 双通道统一会话管理\n\n## 24. 配置坑 · 失败模式：configuration: Feishu: all messages permanently ignored as 'old message after restart' after every daemon re...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2). Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_d77b163febfec4d4e69e2e4e32f620a1 | https://github.com/chenhg5/cc-connect/issues/972 | Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n## 25. 配置坑 · 失败模式：configuration: [Feature] Preserve full interactive card schema on inbound\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: [Feature] Preserve full interactive card schema on inbound\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: [Feature] Preserve full interactive card schema on inbound\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Feature] Preserve full interactive card schema on inbound. Context: Observed when using python\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_bc874b9a16a67215d86b2e2342c2ce30 | https://github.com/chenhg5/cc-connect/issues/936 | [Feature] Preserve full interactive card schema on inbound\n\n## 26. 配置坑 · 失败模式：configuration: v1.3.0-rc.5\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.0-rc.5\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.0-rc.5\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0-rc.5. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_742c16dbbbfed9286198088ba0f05c07 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.0-rc.5 | v1.3.0-rc.5\n\n## 27. 配置坑 · 失败模式：configuration: v1.3.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.1\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.1\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.1. Context: Observed during version upgrade or migration.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_af9571ceb2092a140a16c2cfbe490ca1 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.1 | v1.3.1\n\n## 28. 配置坑 · 失败模式：configuration: v1.3.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.2\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.2\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.2. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_a2bd7f299418ec4b6c3fe49f42c6e933 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.2 | v1.3.2\n\n## 29. 配置坑 · 失败模式：configuration: v1.3.3-beta.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.3-beta.2\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.3-beta.2\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3-beta.2. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_6d397fcba273f6fa44d3976dd8c91a69 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.2 | v1.3.3-beta.2\n\n## 30. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | README/documentation is current enough for a first validation pass.\n\n## 31. 运行坑 · 来源证据：出现网络波动后，一直显示这个retrying，只能手动重启吗？\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：出现网络波动后，一直显示这个retrying，只能手动重启吗？\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8d8f7103758f4f46bffd9b411c81bbf6 | https://github.com/chenhg5/cc-connect/issues/102 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 32. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | last_activity_observed missing\n\n## 33. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | no_demo; severity=medium\n\n## 34. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | no_demo; severity=medium\n\n## 35. 安全/权限坑 · 来源证据：[Bug] cursorSession error: unknown option '--trust\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cursorSession error: unknown option '--trust\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_d9323b9200ff491e8c6f408880565e86 | https://github.com/chenhg5/cc-connect/issues/923 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 36. 安全/权限坑 · 来源证据：v1.3.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：v1.3.2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_2245b50ba3e94323b2228f6ed5b2b73e | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 37. 安全/权限坑 · 来源证据：v1.3.3-beta.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：v1.3.3-beta.2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4665651336a6450db47e6262a8926c7b | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 38. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | issue_or_pr_quality=unknown\n\n## 39. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | release_recency=unknown\n\n<!-- canonical_name: chenhg5/cc-connect; human_manual_source: deepwiki_human_wiki -->\n",
      "summary": "DeepWiki/Human Wiki 完整输出，末尾追加 Discovery Agent 踩坑日志。",
      "title": "Human Manual / 人类版说明书"
    },
    "pitfall_log": {
      "asset_id": "pitfall_log",
      "filename": "PITFALL_LOG.md",
      "markdown": "# Pitfall Log / 踩坑日志\n\n项目：chenhg5/cc-connect\n\n摘要：发现 39 个潜在踩坑项，其中 12 个为 high/blocking；最高优先级：安装坑 - 来源证据：[Bug]。\n\n## 1. 安装坑 · 来源证据：[Bug]\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug]\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c85c0f8f48ac44c7a855066b2bfc3939 | https://github.com/chenhg5/cc-connect/issues/933 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 2. 安装坑 · 来源证据：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Bug] cc-connect web服务商管理从 CC-Switch 导入服务商重名问题\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_bbbf45839e1043e2afdedf3f1d87b55b | https://github.com/chenhg5/cc-connect/issues/1058 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 3. 安装坑 · 来源证据：[Feature] Preserve full interactive card schema on inbound\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：[Feature] Preserve full interactive card schema on inbound\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_f50380a7aef54548ac053b1127a2916e | https://github.com/chenhg5/cc-connect/issues/936 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 4. 安装坑 · 来源证据：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_3a818efa6ddf479aae0f026d1f06d491 | https://github.com/chenhg5/cc-connect/issues/960 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 5. 配置坑 · 来源证据：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_7b001c45ac3449abaee3dd365bc4cc74 | https://github.com/chenhg5/cc-connect/issues/972 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 6. 配置坑 · 来源证据：WeChat ilink (weixin): image content is empty, not passed to agent\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：WeChat ilink (weixin): image content is empty, not passed to agent\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_17d4c5f39a5745c5bdfbc88cdac32056 | https://github.com/chenhg5/cc-connect/issues/1057 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 7. 配置坑 · 来源证据：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个配置相关的待验证问题：[Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_6136e384578b499ca63299322032211a | https://github.com/chenhg5/cc-connect/issues/966 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 8. 安全/权限坑 · 失败模式：security_permissions: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 对用户的影响：Developers may expose sensitive permissions or credentials: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect send uses default socket path in custom data_dir agent sessions. Context: Observed during installation or first-run setup.\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/chenhg5/cc-connect/issues/966\n- 证据：failure_mode_cluster:github_issue | fmev_d8aeb38642d53571d47292761cca7247 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions, failure_mode_cluster:github_issue | fmev_105e57f4097e09e9e5c522a568ff4991 | https://github.com/chenhg5/cc-connect/issues/966 | [Bug] cc-connect send uses default socket path in custom data_dir agent sessions\n\n## 9. 安全/权限坑 · 失败模式：security_permissions: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root...\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：Developers should check this security_permissions risk before relying on the project: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 对用户的影响：Developers may expose sensitive permissions or credentials: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志. Context: Observed when using linux\n- 防护动作：Do not recommend enabling privileged or credential-bearing paths until the source-backed risk is reviewed: https://github.com/chenhg5/cc-connect/issues/1054\n- 证据：failure_mode_cluster:github_issue | fmev_9f56ecf6ad99707575ffe84fc2c10e1b | https://github.com/chenhg5/cc-connect/issues/1054 | [Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n\n## 10. 安全/权限坑 · 来源证据：Feature Request: 终端与 IM 双通道统一会话管理\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：Feature Request: 终端与 IM 双通道统一会话管理\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_befa8b4f1c7f4ef483d6d8b38ba06ba4 | https://github.com/chenhg5/cc-connect/issues/968 | 来源讨论提到 windows 相关条件，需在安装/试用前复核。\n\n## 11. 安全/权限坑 · 来源证据：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cc-connect 启动 Claude Code 时使用了 --dangerously-skip-permissions，但 最新版Claude Code 不允许 root 用户使用这个标志\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_c632e470b2d04852abae801be4d2aba2 | https://github.com/chenhg5/cc-connect/issues/1054 | 来源讨论提到 linux 相关条件，需在安装/试用前复核。\n\n## 12. 安全/权限坑 · 来源证据：[Bug] codex mode修改YOLO模式无效\n\n- 严重度：high\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] codex mode修改YOLO模式无效\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源问题仍为 open，Pack Agent 需要复核是否仍影响当前版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_ce58ad66fc4e4d2ea6f0bb4a43527cd0 | https://github.com/chenhg5/cc-connect/issues/233 | 来源讨论提到 macos 相关条件，需在安装/试用前复核。\n\n## 13. 安装坑 · 失败模式：installation: [Bug]\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug]\n- 对用户的影响：Developers may fail before the first successful local run: [Bug]\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug]. Context: Observed when using node, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_555d98ac56e7850b1c49e5892d2b6c48 | https://github.com/chenhg5/cc-connect/issues/933 | [Bug]\n\n## 14. 安装坑 · 失败模式：installation: [Bug] codex mode修改YOLO模式无效\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug] codex mode修改YOLO模式无效\n- 对用户的影响：Developers may fail before the first successful local run: [Bug] codex mode修改YOLO模式无效\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] codex mode修改YOLO模式无效. Context: Observed when using macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_59a6433bec9f3dcf0981efd11a046df3 | https://github.com/chenhg5/cc-connect/issues/233 | [Bug] codex mode修改YOLO模式无效\n\n## 15. 安装坑 · 失败模式：installation: [Bug] cursorSession error: unknown option '--trust\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: [Bug] cursorSession error: unknown option '--trust\n- 对用户的影响：Developers may fail before the first successful local run: [Bug] cursorSession error: unknown option '--trust\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Bug] cursorSession error: unknown option '--trust. Context: Observed when using node, macos\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_279592e262a8c9114ffed9bcd68ca683 | https://github.com/chenhg5/cc-connect/issues/923 | [Bug] cursorSession error: unknown option '--trust\n\n## 16. 安装坑 · 失败模式：installation: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 对用户的影响：Developers may fail before the first successful local run: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`. Context: Observed when using node, linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_2ab77150cf90931385fb7741956a1f53 | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`, failure_mode_cluster:github_issue | fmev_5c45b25a78af1b25aea75c4cad91e50a | https://github.com/chenhg5/cc-connect/issues/960 | cc-connect 因 SSH 断开被 systemd 停止：需要文档化 `loginctl enable-linger`\n\n## 17. 安装坑 · 失败模式：installation: v1.3.0\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v1.3.0\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.0\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0. Context: Observed when using node, windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_a2ead0f4920aaffbc2c58e566c82e8e8 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.0 | v1.3.0\n\n## 18. 安装坑 · 失败模式：installation: v1.3.3-beta.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: v1.3.3-beta.1\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.3-beta.1\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3-beta.1. Context: Observed when using node\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_2967bcebc65cc66231ca2bcd62e03f6f | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.1 | v1.3.3-beta.1\n\n## 19. 安装坑 · 失败模式：installation: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this installation risk before relying on the project: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 对用户的影响：Developers may fail before the first successful local run: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险. Context: Observed during installation or first-run setup.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_f2c109d868a32136d97c513f8ac192bb | https://github.com/chenhg5/cc-connect/issues/967 | 生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n## 20. 安装坑 · 来源证据：v1.3.3-beta.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：v1.3.3-beta.1\n- 对用户的影响：可能影响升级、迁移或版本选择。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_5eb39ef63cf14e56aff580db738dcd9f | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.1 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 21. 安装坑 · 来源证据：生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安装相关的待验证问题：生图 app-icon 请求未稳定转发到 generate-image，且 cc-connect 存在部署漂移风险\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_574cca97359b4bc1a8a8fa968ab758cb | https://github.com/chenhg5/cc-connect/issues/967 | 来源讨论提到 node 相关条件，需在安装/试用前复核。\n\n## 22. 配置坑 · 可能修改宿主 AI 配置\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：项目面向 Claude/Cursor/Codex/Gemini/OpenCode 等宿主，或安装命令涉及用户配置目录。\n- 对用户的影响：安装可能改变本机 AI 工具行为，用户需要知道写入位置和回滚方法。\n- 建议检查：列出会写入的配置文件、目录和卸载/回滚步骤。\n- 防护动作：涉及宿主配置目录时必须给回滚路径，不能只给安装命令。\n- 证据：capability.host_targets | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | host_targets=claude, claude_code, cursor\n\n## 23. 配置坑 · 失败模式：configuration: Feature Request: 终端与 IM 双通道统一会话管理\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Feature Request: 终端与 IM 双通道统一会话管理\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Feature Request: 终端与 IM 双通道统一会话管理\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feature Request: 终端与 IM 双通道统一会话管理. Context: Observed when using windows\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_eb8a9f26e9a7250936e6075aa04d1f9f | https://github.com/chenhg5/cc-connect/issues/968 | Feature Request: 终端与 IM 双通道统一会话管理\n\n## 24. 配置坑 · 失败模式：configuration: Feishu: all messages permanently ignored as 'old message after restart' after every daemon re...\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2). Context: Observed when using linux\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_d77b163febfec4d4e69e2e4e32f620a1 | https://github.com/chenhg5/cc-connect/issues/972 | Feishu: all messages permanently ignored as 'old message after restart' after every daemon restart (v1.3.3-beta.2)\n\n## 25. 配置坑 · 失败模式：configuration: [Feature] Preserve full interactive card schema on inbound\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: [Feature] Preserve full interactive card schema on inbound\n- 对用户的影响：Developers may misconfigure credentials, environment, or host setup: [Feature] Preserve full interactive card schema on inbound\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: [Feature] Preserve full interactive card schema on inbound. Context: Observed when using python\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_issue | fmev_bc874b9a16a67215d86b2e2342c2ce30 | https://github.com/chenhg5/cc-connect/issues/936 | [Feature] Preserve full interactive card schema on inbound\n\n## 26. 配置坑 · 失败模式：configuration: v1.3.0-rc.5\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.0-rc.5\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.0-rc.5\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.0-rc.5. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_742c16dbbbfed9286198088ba0f05c07 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.0-rc.5 | v1.3.0-rc.5\n\n## 27. 配置坑 · 失败模式：configuration: v1.3.1\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.1\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.1\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.1. Context: Observed during version upgrade or migration.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_af9571ceb2092a140a16c2cfbe490ca1 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.1 | v1.3.1\n\n## 28. 配置坑 · 失败模式：configuration: v1.3.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.2\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.2\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.2. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_a2bd7f299418ec4b6c3fe49f42c6e933 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.2 | v1.3.2\n\n## 29. 配置坑 · 失败模式：configuration: v1.3.3-beta.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：Developers should check this configuration risk before relying on the project: v1.3.3-beta.2\n- 对用户的影响：Upgrade or migration may change expected behavior: v1.3.3-beta.2\n- 建议检查：Before packaging this project, run the relevant install/config/quickstart check for: v1.3.3-beta.2. Context: Source discussion did not expose a precise runtime context.\n- 防护动作：State this as source-backed community evidence, not as Doramagic reproduction.\n- 证据：failure_mode_cluster:github_release | fmev_6d397fcba273f6fa44d3976dd8c91a69 | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.2 | v1.3.3-beta.2\n\n## 30. 能力坑 · 能力判断依赖假设\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：README/documentation is current enough for a first validation pass.\n- 对用户的影响：假设不成立时，用户拿不到承诺的能力。\n- 建议检查：将假设转成下游验证清单。\n- 防护动作：假设必须转成验证项；没有验证结果前不能写成事实。\n- 证据：capability.assumptions | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | README/documentation is current enough for a first validation pass.\n\n## 31. 运行坑 · 来源证据：出现网络波动后，一直显示这个retrying，只能手动重启吗？\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个运行相关的待验证问题：出现网络波动后，一直显示这个retrying，只能手动重启吗？\n- 对用户的影响：可能增加新用户试用和生产接入成本。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_8d8f7103758f4f46bffd9b411c81bbf6 | https://github.com/chenhg5/cc-connect/issues/102 | 来源类型 github_issue 暴露的待验证使用条件。\n\n## 32. 维护坑 · 维护活跃度未知\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：未记录 last_activity_observed。\n- 对用户的影响：新项目、停更项目和活跃项目会被混在一起，推荐信任度下降。\n- 建议检查：补 GitHub 最近 commit、release、issue/PR 响应信号。\n- 防护动作：维护活跃度未知时，推荐强度不能标为高信任。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | last_activity_observed missing\n\n## 33. 安全/权限坑 · 下游验证发现风险项\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：下游已经要求复核，不能在页面中弱化。\n- 建议检查：进入安全/权限治理复核队列。\n- 防护动作：下游风险存在时必须保持 review/recommendation 降级。\n- 证据：downstream_validation.risk_items | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | no_demo; severity=medium\n\n## 34. 安全/权限坑 · 存在评分风险\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：no_demo\n- 对用户的影响：风险会影响是否适合普通用户安装。\n- 建议检查：把风险写入边界卡，并确认是否需要人工复核。\n- 防护动作：评分风险必须进入边界卡，不能只作为内部分数。\n- 证据：risks.scoring_risks | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | no_demo; severity=medium\n\n## 35. 安全/权限坑 · 来源证据：[Bug] cursorSession error: unknown option '--trust\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：[Bug] cursorSession error: unknown option '--trust\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_d9323b9200ff491e8c6f408880565e86 | https://github.com/chenhg5/cc-connect/issues/923 | 来源讨论提到 npm 相关条件，需在安装/试用前复核。\n\n## 36. 安全/权限坑 · 来源证据：v1.3.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：v1.3.2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_2245b50ba3e94323b2228f6ed5b2b73e | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 37. 安全/权限坑 · 来源证据：v1.3.3-beta.2\n\n- 严重度：medium\n- 证据强度：source_linked\n- 发现：GitHub 社区证据显示该项目存在一个安全/权限相关的待验证问题：v1.3.3-beta.2\n- 对用户的影响：可能影响授权、密钥配置或安全边界。\n- 建议检查：来源显示可能已有修复、规避或版本变化，说明书中必须标注适用版本。\n- 防护动作：不得脱离来源链接放大为确定性结论；需要标注适用版本和复核状态。\n- 证据：community_evidence:github | cevd_4665651336a6450db47e6262a8926c7b | https://github.com/chenhg5/cc-connect/releases/tag/v1.3.3-beta.2 | 来源类型 github_release 暴露的待验证使用条件。\n\n## 38. 维护坑 · issue/PR 响应质量未知\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：issue_or_pr_quality=unknown。\n- 对用户的影响：用户无法判断遇到问题后是否有人维护。\n- 建议检查：抽样最近 issue/PR，判断是否长期无人处理。\n- 防护动作：issue/PR 响应未知时，必须提示维护风险。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | issue_or_pr_quality=unknown\n\n## 39. 维护坑 · 发布节奏不明确\n\n- 严重度：low\n- 证据强度：source_linked\n- 发现：release_recency=unknown。\n- 对用户的影响：安装命令和文档可能落后于代码，用户踩坑概率升高。\n- 建议检查：确认最近 release/tag 和 README 安装命令是否一致。\n- 防护动作：发布节奏未知或过期时，安装说明必须标注可能漂移。\n- 证据：evidence.maintainer_signals | github_repo:1168978399 | https://github.com/chenhg5/cc-connect | release_recency=unknown\n",
      "summary": "用户实践前最可能遇到的身份、安装、配置、运行和安全坑。",
      "title": "Pitfall Log / 踩坑日志"
    },
    "prompt_preview": {
      "asset_id": "prompt_preview",
      "filename": "PROMPT_PREVIEW.md",
      "markdown": "# cc-connect - Prompt Preview\n\n> Copy the prompt below into your AI host before installing anything.\n> Its purpose is to let you safely feel the project's workflow, not to claim the project has already run.\n\n## Copy this prompt\n\n```text\nYou are using an independent Doramagic capability pack for chenhg5/cc-connect.\n\nProject:\n- Name: cc-connect\n- Repository: https://github.com/chenhg5/cc-connect\n- Summary: Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.\n- Host target: claude, claude_code, cursor\n\nGoal:\nHelp me evaluate this project for the following task without installing it yet: Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.\n\nBefore taking action:\n1. Restate my task, success standard, and boundary.\n2. Identify whether the next step requires tools, browser access, network access, filesystem access, credentials, package installation, or host configuration.\n3. Use only the Doramagic Project Pack, the upstream repository, and the source-linked evidence listed below.\n4. If a real command, install step, API call, file write, or host integration is required, mark it as \"requires post-install verification\" and ask for approval first.\n5. If evidence is missing, say \"evidence is missing\" instead of filling the gap.\n\nPreviewable capabilities:\n- Capability 1: Bridge local AI coding agents (Claude Code, Cursor, Gemini CLI, Codex) to messaging platforms (Feishu/Lark, DingTalk, Slack, Telegram, Discord, LINE, WeChat Work). Chat with your AI dev assistant from anywhere — no public IP required for most platforms.\n\nCapabilities that require post-install verification:\n- Capability 1: Use the source-backed project context to guide one small, checkable workflow step.\n\nCore service flow:\n1. page-introduction: Introduction to cc-connect. Produce one small intermediate artifact and wait for confirmation.\n2. page-quickstart: Quick Start Guide. Produce one small intermediate artifact and wait for confirmation.\n3. page-architecture: System Architecture. Produce one small intermediate artifact and wait for confirmation.\n4. page-core-components: Core Components. Produce one small intermediate artifact and wait for confirmation.\n5. page-agent-integrations: Agent Integrations. Produce one small intermediate artifact and wait for confirmation.\n\nSource-backed evidence to keep in mind:\n- https://github.com/chenhg5/cc-connect\n- https://github.com/chenhg5/cc-connect#readme\n- README.md\n- docs/bridge-protocol.md\n- INSTALL.md\n- config.example.toml\n- cmd/cc-connect/main.go\n- core/bridge.go\n- core/engine.go\n- core/relay.go\n\nFirst response rules:\n1. Start Step 1 only.\n2. Explain the one service action you will perform first.\n3. Ask exactly three questions about my target workflow, success standard, and sandbox boundary.\n4. Stop and wait for my answers.\n\nStep 1 follow-up protocol:\n- After I answer the first three questions, stay in Step 1.\n- Produce six parts only: clarified task, success standard, boundary conditions, two or three options, tradeoffs for each option, and one recommendation.\n- End by asking whether I confirm the recommendation.\n- Do not move to Step 2 until I explicitly confirm.\n\nConversation rules:\n- Advance one step at a time and wait for confirmation after each small artifact.\n- Write outputs as recommendations or planned checks, not as completed execution.\n- Do not claim tests passed, files changed, commands ran, APIs were called, or the project was installed.\n- If the user asks for execution, first provide the sandbox setup, expected output, rollback, and approval checkpoint.\n```\n",
      "summary": "不安装项目也能感受能力节奏的安全试用 Prompt。",
      "title": "Prompt Preview / 安装前试用 Prompt"
    },
    "quick_start": {
      "asset_id": "quick_start",
      "filename": "QUICK_START.md",
      "markdown": "# Quick Start / 官方入口\n\n项目：chenhg5/cc-connect\n\n## 官方安装入口\n\n### Node.js / npm · 官方安装入口\n\n```bash\nnpm install -g cc-connect\n```\n\n来源：https://github.com/chenhg5/cc-connect#readme\n\n## 来源\n\n- repo: https://github.com/chenhg5/cc-connect\n- docs: https://github.com/chenhg5/cc-connect#readme\n",
      "summary": "从项目官方 README 或安装文档提取的开工入口。",
      "title": "Quick Start / 官方入口"
    }
  },
  "validation_id": "dval_8f0580deba58437fb38beeba6aed26ac"
}
