feat(plugins): 平台工具网关 P1 fork 腿——三能力插件迁入+网关客户端(hc-352) - #49
Merged
Conversation
DESKTOP-CLOUD-CAPABILITY-PARITY-PD P1 fork 腿(D1/D2/D3):
- 迁入 apexnodes-douyin-tools / apexnodes-social-tools / apexnodes-video-tools
(bundled 插件 plugins/<name>/,随 tarball/镜像分发;工具名/参数面不变,agent 无感)
- 新增 plugins/apexnodes_gateway.py 统一网关客户端:base=TOOLS_GATEWAY_BASE,
桌面无 env 时由 config.yaml 托管 custom_providers 条目推公网 base;
鉴权 Bearer Agent key(TOOLS_GATEWAY_KEY>API_SERVER_KEY>MODEL_API_KEY>托管条目
api_key);X-Capability-Version=runtime 版本;401/402/429/503 全显式降级文案,
429 有限退避。模块头即 /tools/v1 契约表(asr/transcribe +
social/{platform}/{action} + social/batch/* + video/generate),供云腿并行对齐
- PD §8 大媒体:转写走本地 ffmpeg 抽音轨(16k 单声道)后 multipart 上传;
social download 网关只出直链/元数据,媒体本端自取
- TOOLS_GATEWAY_DISABLED=1(或零网关配置)回退迁移前 master 直连路径(云端一键回退)
- 产出类依赖收编 pyproject(file-export extra 进 [all]):python-docx/XlsxWriter/
python-pptx/weasyprint/pydyf,版本对齐云镜像 bake 行;ddgs/dingtalk-stream 云端专属不搬
- cli-config.yaml.example plugins.enabled 增补三插件(apex-overlay 同款先例)
- 桌面形态冒烟测试 30 项:vendor env 全空+仅网关 base/key 下 14 工具注册成功、
mock httpx 断言 URL/鉴权头/版本头、错误映射、回退通道、桌面托管 key 解析
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
karlligamesvc-spec
force-pushed
the
feat/plugins-gateway-p1
branch
from
July 5, 2026 09:23
24d70f0 to
18fa39c
Compare
This was referenced Jul 5, 2026
karlligamesvc-spec
added a commit
that referenced
this pull request
Jul 5, 2026
… 腿) (#53) runtime 双装配线合一的 fork 腿:把云镜像 build 时的 4 个 in-place patch (scripts/patch_native_agent_*.py)以 overlay seam 方式落进 fork,并把云 专属依赖收进 fork 依赖链——云镜像即可直接从本 fork 构建,上游更新只 维护 fork 一处。全部零 in-place:上游文件 byte-for-byte 不动。 4 个新 seam(apex_overlay/,经 plugins/apex-overlay boot 时 apply): - web_tools_extract:web_extract 注册项 check_fn 换能力门 (仅 exa/parallel/firecrawl/tavily 可用时暴露;ddgs 等搜索-only 后端 不再让模型调 web_extract 卡到飞书超时)。改 registry 已注册项, 不动 tools/web_tools.py。 - stt_no_lazy_install:HERMES_MANAGED_RUNTIME 门控下 _try_lazy_install_stt 恒 False(hc-254 托管 768MB 容器防 OOM;桌面不设该 env=保上游语义)。 ★非冗余:HERMES_DISABLE_LAZY_INSTALLS=1 只封 base venv,托管容器有 /opt/data durable target 时 lazy_deps 仍会装——本 seam 才是真保证。 - first_turn_ack:混合 seam——config(cli-config display.platforms 5 个 CN-IM 平台)+ resolve_display_setting 包装(tier 默认值+bool 归一)+ GatewayRunner._handle_message_with_agent 包装(fresh turn 首个 model call 前发「收到,处理中」ack,同 hc-214 kill-switch/冷却语义)。 - cn_im_messages:hc-228/hc-340 汉化表原样搬入;改钉 4 个 choke point (_prepare_gateway_status_message / _deliver_platform_notice / _handle_message 返回值 / BasePlatformAdapter._send_with_retry,全部 平台门控 CN-IM only)。比原 patch 覆盖更宽:_handle_message 返回值 包装连 /moa、v0.18 /goal「/ wait」新措辞一并覆盖。 依赖收编(原云镜像单独 bake 行 → fork): - pyproject 新 [cloud-search] extra(ddgs,独立 extra 桌面源装不拉); - Dockerfile uv sync 加 --extra cloud-search --extra dingtalk (dingtalk-stream==0.24.3 module-load 可导入,hc-213); - Dockerfile apt 补 WeasyPrint 运行库 7 件(libcairo2/libglib2.0-0/ libpango-1.0-0/libpangocairo-1.0-0/libgdk-pixbuf-2.0-0/ shared-mime-info/fonts-noto-cjk); - ARG/ENV HERMES_MANAGED_RUNTIME(云 build 传 1,桌面不传)。 file-export 五库已在 #49 随 [all] 进,不重复。 测试:tests/apex_overlay/ 新 4 个 seam-test(钉每个被 patch 符号的存在 +签名,upstream 挪动=CI 响亮红)+ 行为断言;全目录 95 passed(含新 48)。 uv lock 同步(仅 ddgs+fake-useragent+primp)。 云腿(build 脚本改从 fork 构建+守卫+镜像 parity 自检)见 hermes-cloud PR NousResearch#484。 Co-authored-by: Karl <karl@KarldeMacBook-Pro.local> Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 5, 2026
karlligamesvc-spec
added a commit
that referenced
this pull request
Jul 5, 2026
pin 自动跟 fork main HEAD(write-build-stamp git rev-parse): - 网关插件腿 #49 / v0.18 技能重分级 #50 / 装配线 fork 腿 #53 - 三平台自媒体 playbook:公众号 #51 / 小红书 #54 / 抖音 #55 0.16.1→0.16.2 = 首次真机验壳自更新(electron-updater feed 已就位)。 Co-authored-by: Karl <karl@KarldeMacBook-Pro.local> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
能力一致 PD(hermes-cloud NousResearch#470)P1 fork 腿:三能力插件(douyin/social/video)迁入 plugins/(bundled 四源装载第 1 源)+ plugins/apexnodes_gateway.py 网关客户端(key 解析链:TOOLS_GATEWAY_KEY > API_SERVER_KEY > MODEL_API_KEY > 桌面 config 托管条目)+ ffmpeg 抽音轨 multipart + TOOLS_GATEWAY_DISABLED=1 回退直连。+30 测试,uv.lock 重锁。
合并前置(hc-352 收口票,勿先合):
🤖 Generated with Claude Code