Skip to content

cc-connect-next v0.2.1

Choose a tag to compare

@github-actions github-actions released this 30 Aug 03:29
· 21 commits to main since this release
cdb8335

cc-connect-next v0.2.1

中文

这个稳定版让 cc-connect-next 的能力与配置真正可以被 Agent 自己理解:运行中
的 Agent 能查询与当前版本、项目和会话一致的能力清单,配置说明也由可执行契约
统一生成。飞书话题隔离同时细化为三种明确模式,Bridge 投递、会话切换、Claude
Code 长连接和 Codex App 会话标题等路径也完成收口。

变化

  • Agent 可以查询当前运行态到底能做什么。 新的只读 Agent Capability
    Manifest 统一描述配置、Agent-facing CLI 工具、内置和自定义聊天命令、Skills,
    以及当前 Agent、会话和平台的可选能力。每一项都包含参数、调用权限、只读属性、
    写入或外部副作用、退化行为、可用状态与原因。Agent 可通过
    cc-connect-next capabilities --search "关键词" 查询与当前版本和项目匹配的
    结果;Management API、Web 命令面板和 Agent brief 使用同一事实源。
  • 配置目录升级为可执行契约。 所有公开 TOML、环境变量和持久启动参数都声明
    精确位置、类型、必填或条件关系、省略默认值、推荐预设、枚举或数值边界、单位、
    生效方式、敏感性和可解析示例。cc-connect-next config capabilities 支持自然
    语言搜索、精确 key、Agent/平台过滤以及 Markdown/JSON 输出;中英文参考文档和
    Web 设置常量由同一契约生成。动态 Agent/平台配置现在会在构造适配器之前验证,
    不再静默忽略明显的类型或必填错误。
  • 飞书/Lark 话题隔离变成三个明确范围。 thread_isolation = "off" 保留
    旧的用户/频道会话;"topics_only" 只隔离飞书事件中真实存在 thread_id
    的话题,普通群消息仍留在群主会话;"topic_per_message" 保留此前每条顶层
    群消息都建立话题的行为。新 Starter 和推荐飞书配置写入 "topics_only"
    即使 reply_to_trigger = false,真实话题的回复也不会泄漏回群主会话。
  • Bridge 重复消息与持久定时投递更安全。 非空 msg_id 现在按 adapter、
    project 和 session 做短窗口幂等,连接替换后重复帧也会在进入 Engine/FIFO 前
    丢弃。Cron/Timer 在创建、更新、启用和手动触发前验证目标是否支持持久主动投递;
    依赖浏览器在线连接的 Web/Bridge session 会明确拒绝,而不是先显示 triggered
    再在连接消失后丢失消息。
  • 飞书身份发现失败时安全拒绝。 mention-gated 的飞书/Lark WebSocket 项目若
    启动时无法解析机器人 open_id,会进入可观测的降级状态并拒绝无法可靠过滤的
    群消息;后台恢复成功后自动解除。Webhook、私聊和显式 group_reply_all 行为
    保持不变。
  • 会话连续性得到修复。 Claude Code 不再传入会让当前 CLI 每轮退出的
    --replay-user-messages,原生 /compact 等命令可以继续进入存活会话。显式
    /switch、Management API 或 Bridge 选择旧会话后,第一条消息不会再被
    reset_on_idle_mins 立即旋转到新会话。
  • 回复底部现在包含本轮真实耗时。 开启 reply_footer 时,普通消息、rich
    card 和原生流式卡片会显示模型、推理强度与处理时间;排队等待和仅用于展示的
    卡片停留时间不会被算入本轮处理耗时。
  • Codex App 新会话拥有可读标题。 app-server 在 fresh thread 创建后、首轮
    开始前,用真实用户请求生成安全的简短标题,并支持可配置来源前缀。显式 /name
    会同步到兼容的在线 Codex 会话;可选 session_title_model 使用隔离的本地临时
    Codex 进程,失败时安全回退,不影响用户回合。
  • 移除没有消费者的 session context/usage telemetry。 Codex 不再在每轮后
    扫描 rollout 文件,也不再在 app-server 会话启动时额外请求 session 级 rate
    limit。Manifest 会如实说明 session context usage 不可读;Agent 级 /usage
    配额查询保持不变。面向 Go 嵌入方的 ContextUsageReporterContextUsage
    类型随这条无消费者链路一并删除。
  • 特权命令的权限契约一致。 /timer addexec 的延迟 shell 注册现在和
    /cron addexec/commands addexec 一样要求 admin_from;Manifest 会同时
    显示权限与副作用,避免 Agent 把可发现误解为可直接执行。

默认值与升级须知

  • 现有 TOML 无需迁移。省略飞书 thread_isolation 仍等价于 "off";旧
    false 映射 "off",旧 true 映射 "topic_per_message"。希望只隔离真实
    话题时请显式使用 "topics_only"
  • fresh Starter 现在显式写入 Codex mode = "yolo",会跳过审批并取消 sandbox
    限制;推荐飞书配置仍包含 group_reply_all = true。把机器人加入共享群前,请按
    需要改回 mode = "default",并设置 allow_from / allow_chat,或关闭
    group_reply_all。手写旧配置省略 mode 时仍使用兼容 fallback。
  • reply_footer 的内置默认值现在是 true;若不希望现有会话出现模型、推理强度
    和耗时状态行,请在全局 [display] 或项目级 [projects.display] 显式设置
    reply_footer = false
  • 直接嵌入 Go 包且实现或引用 ContextUsageReporter / ContextUsage 的下游代码
    需要删除对应编译期依赖。普通 CLI、daemon、配置和 /usage 用户不受影响。
  • 持久 Cron/Timer 如果目标是连接期 Web/Bridge session,升级后会在写入时明确
    拒绝;请改用能够重建主动投递上下文的平台目标。

升级

cc-connect-next update
#
npm install -g cc-connect-next

English

This stable release makes cc-connect-next self-describing to the Agent that is
actually running: capabilities are queryable for the current version, project,
and session, while configuration documentation is generated from an executable
contract. Feishu topic isolation now has three explicit scopes, and Bridge
delivery, session switching, Claude Code continuity, and Codex App titles are
more predictable.

Changes

  • Agents can query what the current runtime can actually do. The new
    read-only Agent Capability Manifest unifies configuration, Agent-facing CLI
    tools, built-in and custom chat commands, Skills, and optional capabilities
    of the active Agent, session, and platform. Every entry includes parameters,
    caller permission, read-only status, write or external side effects,
    fallback behavior, availability, and its reason. Agents can search the
    version- and project-matched result with
    cc-connect-next capabilities --search "keywords"; the Management API, Web
    command palette, and Agent brief consume the same source of truth.
  • The configuration catalog is now an executable contract. Every public
    TOML option, environment override, and persistent startup flag declares its
    exact location, type, requirement or condition, omitted default, recommended
    presets, enum or numeric bounds, units, apply mode, sensitivity, and a
    parseable example. cc-connect-next config capabilities supports natural
    language search, exact keys, Agent/platform filters, and Markdown or JSON;
    bilingual references and Web settings constants are generated from that same
    contract. Dynamic Agent/platform options are validated before adapter
    construction instead of silently accepting obvious type or requirement
    errors.
  • Feishu/Lark topic isolation has three explicit scopes.
    thread_isolation = "off" keeps the legacy user/channel session;
    "topics_only" isolates only real topics whose events contain a thread_id
    while ordinary group messages stay in the main chat; and
    "topic_per_message" preserves the previous behavior that promotes every
    top-level group message into its own topic. New Starter and recommended
    Feishu profiles write "topics_only". Real-topic replies remain in their
    topic even when reply_to_trigger = false.
  • Bridge duplicates and persistent scheduled delivery fail safely. A
    non-empty msg_id is now a short-window idempotency key scoped by adapter,
    project, and session, including across adapter connection replacement. Cron
    and Timer validate durable delivery before create, update, enable, or manual
    trigger; browser-connection-scoped Web/Bridge sessions are rejected clearly
    instead of appearing triggered and losing delivery after disconnect.
  • Feishu identity discovery fails closed for mention-gated groups. If a
    Feishu/Lark WebSocket project cannot resolve the bot open_id at startup, it
    enters an observable degraded state and rejects group traffic it cannot
    filter reliably. A background supervisor restores normal handling after
    recovery. Webhooks, private chats, and explicit group_reply_all behavior
    are unchanged.
  • Session continuity is fixed. Claude Code no longer receives
    --replay-user-messages, which made current CLI processes exit after each
    turn and prevented native commands such as /compact from reaching the live
    session. After explicit selection through /switch, the Management API, or
    Bridge, the first message in an old conversation is no longer immediately
    rotated by reset_on_idle_mins.
  • The reply footer includes real turn duration. When reply_footer is
    enabled, plain replies, rich cards, and native streaming cards show model,
    reasoning effort, and processing time. Queue wait and presentation-only card
    dwell are excluded from the turn duration.
  • Fresh Codex App sessions receive readable titles. The app-server derives
    a safe concise title from the real user request after fresh thread creation
    and before the first turn, with a configurable source prefix. Explicit
    /name changes sync to compatible live Codex sessions. Optional
    session_title_model generation runs in an isolated local ephemeral Codex
    process and falls back without affecting the user turn.
  • Unused session context/usage telemetry is removed. Codex no longer scans
    rollout files after every turn or performs an extra session-level rate-limit
    request during app-server startup. The Manifest truthfully marks session
    context usage unreadable; Agent-level /usage quota reporting is unchanged.
    The exported Go ContextUsageReporter interface and ContextUsage type were
    removed with this consumer-free path.
  • Privileged command registration has one permission contract. Delayed
    shell registration through /timer addexec now requires admin_from, just
    like /cron addexec and /commands addexec. The Manifest exposes both the
    permission and the side effect, so discoverability is not mistaken for
    authorization.

Defaults and upgrade notes

  • Existing TOML does not require migration. Omitting Feishu
    thread_isolation still means "off"; legacy false maps to "off", and
    legacy true maps to "topic_per_message". Use "topics_only" explicitly
    when only real topics should be isolated.
  • Fresh Starter configs now write Codex mode = "yolo", which bypasses
    approvals and sandbox restrictions; the recommended Feishu profile still
    includes group_reply_all = true. Before adding the bot to a shared group,
    consider restoring mode = "default", setting allow_from / allow_chat,
    or disabling group_reply_all. Hand-written legacy configs that omit mode
    retain the compatibility fallback.
  • The built-in reply_footer default is now true. Set
    reply_footer = false under global [display] or per-project
    [projects.display] to keep the model, effort, and elapsed-time line hidden.
  • Downstream Go embedders that referenced or implemented
    ContextUsageReporter / ContextUsage must remove that compile-time
    dependency. Ordinary CLI, daemon, configuration, and /usage users are not
    affected.
  • Persisted Cron/Timer jobs targeting connection-scoped Web/Bridge sessions are
    now rejected at write time. Choose a platform target that can reconstruct
    proactive delivery context.

Upgrade

cc-connect-next update
# or
npm install -g cc-connect-next