Skip to content

Feature/onnx fix - #359

Closed
Bosheng0422 wants to merge 13 commits into
mainfrom
feature/onnx-fix
Closed

Feature/onnx fix#359
Bosheng0422 wants to merge 13 commits into
mainfrom
feature/onnx-fix

Conversation

@Bosheng0422

Copy link
Copy Markdown
Collaborator

Summary

Target branch

  • Base is develop (feature / fix — default)
  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Refactor / chore
  • Release / hotfix

Test plan

  • make all passes locally
  • Added/updated tests

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

github-actions Bot and others added 13 commits August 15, 2026 04:34
…nual

chore: sync develop onto main after manual
The create-form name pattern rejected CJK and other non-ASCII input,
while source mode (and the recording workflow, which derives names
from user titles) accepted them - the backend slug validator only
rejects path-hostile names. Octop targets non-technical users, so the
name field should not force ASCII slug conventions.

- Replace the ASCII whitelist with a blacklist: reject only
  filesystem-hostile characters (/ \ : * ? " < > |, control chars),
  a leading dot, empty names, and names over 64 chars
- Apply the same check to source-mode creation (frontmatter name),
  aligning both editor modes
- Skip the check on edit: updateSkill keeps the existing slug, so
  legacy skills with odd names stay editable
- Update zh/en namePattern copy and the placeholder examples
The MediaOffloadMiddleware writes a '[image offloaded: sha=… path=… size=…B
mime=…; use read_file to retrieve bytes]' placeholder text block into
LangGraph checkpoint state on every turn after the first one. That text is
meant for the LLM to read_file the bytes back, not for the dashboard UI —
after leaving and re-entering a chat, the user's image showed this internal
text underneath it.

On history serialization, strip the offload placeholder and the LLM-only
'User sent an image.' sentinel for user messages that carry an image in
octop_inbound_attachments (the original image is rendered from there). The
user's own caption is preserved. Pure-image user messages keep their entry
(with empty content) so the dashboard still renders the attachment.
#293)

Editing an expert's 页面配置 (welcome message + quick-start cards) and
clicking 保存 surfaced "此专家未启用" (AGENT_NOT_RUNNING) on every save
after the first. Two failures combined to cause it:

1. PATCH /agents/{aid} schedules a background harness reload
   (arebuild_agent = aremove_agent + slow acreate_agent compile, often
   2-5s on Windows). During that window the agent is absent from the
   harness registry, but the DB row still says 'running'.
2. The manifest write was placed BEFORE the PATCH, so the first save
   landed before the reload started and worked. But every subsequent
   save (re-opening the drawer, expanding 页面配置, editing, saving
   again) hit the reload window from the previous PATCH — and
   require_running_workspace raised AGENT_NOT_RUNNING. The
   'manifest before PATCH' ordering alone only protects the within-save
   race, not the cross-save one.

Reproduction (live server, ENPKA2, 10 rapid saves with the WIP order):
2/10 manifest writes succeeded; 8/10 failed with AGENT_NOT_RUNNING.
First save after a 3s wait: 10/10 succeeded — confirms the reload
window is the cause.

Fix:
- Add writeManifestWithRetry (10 × 500ms = up to 5s, retries only on
  AGENT_NOT_RUNNING). Re-running for 5s is well within typical reload
  windows; the manifest is best-effort.
- Wrap the manifest write in its own try/catch. On failure show a
  warning toast (yellow, with i18n key experts.manifestWriteFailed) so
  the user knows, but never block the PATCH — the agent's main config
  must always save. The drawer still closes and the success toast still
  fires after the PATCH.

Scope of the change:
- New: WelcomeConfig.tsx (the 页面配置 editor, used by EditAgentDrawer).
- New: index.module.less styles for WelcomeConfig.
- Modified: EditAgentDrawer.tsx (render the new collapse section, save
  the manifest with retry, fall back to a warning).
- New i18n keys: experts.pageConfigTitle / welcomeMessageTitle /
  welcomeMessagePlaceholder / quickPromptsTitle / addQuickPrompt /
  quickPromptTitle(Placeholder) / quickPromptDescription(Placeholder) /
  quickPromptContent(Placeholder) / quickPromptColor / quickPromptIcon /
  quickPromptPreview / noQuickPrompts / noIcon / manifestWriteFailed
  in both zh.json and en.json; also backfilled experts.patchFailed in
  zh.json (was missing).

Out of scope (pre-existing, surfaced during review):
- WelcomeConfig's useImperativeHandle has no deps array — works
  correctly via closure but recreates the handle each render.
- loadConfig() runs on mount; a click on 保存 during the load would
  write the empty initial state to manifest.json. Not addressed here.

Verified: end-to-end against the live server, agent ENPKA2 and S35JZD,
after a 3s settle the 2nd save succeeds on retry attempt 2 (~25ms after
the first failed attempt), and 5 rapid back-to-back saves all land
without surfacing a red error to the user.

Co-authored-by: Georgyhongbo <georgyhongbo@users.noreply.github.com>
adjustHeight() measured the live textarea by collapsing it to height:auto on
every keystroke. That transient shrink reflows the flex layout and grows the
message-list viewport (a sibling above the composer) for a moment; browsers
clamp the list scrollTop to the larger viewport and the clamp STICKS after the
height is restored. While a reply streams, the follow-to-bottom pin then snaps
the list back down — the per-keystroke up/down jitter.

Measure content height on a detached clone instead (cloneNode + position:fixed
off-screen), so the live layout is never disturbed. Skip the write when the
target height is unchanged (<0.5px). Verified with a frame-by-frame harness:
typing-while-streaming bottom gap dropped from avg 8.6px/max 14px to 0.0/0.0.

Co-authored-by: jubaoliang <jubaoliang@gmail.com>
…APIs (#308)

Plugin tools registered with Chinese names passed straight into the
function-calling schema and failed on APIs that require
^[a-zA-Z0-9_-]{1,64}$. Rewrite illegal names to legal pinyin
transliterations (underscore fallback when pypinyin is unavailable),
dedupe collisions with _2/_3 suffixes, and keep the original name in a
[原名: ...] description prefix. Config keys and plugin-side closures
still use the original names, so routing and per-agent tool config are
unaffected.

Co-authored-by: jubaoliang <jubaoliang@gmail.com>
* feat(dashboard): custom brand color palette with color picker

Extend the 8 curated brand palettes with a 9th "custom" entry driven by
a user-chosen hex color:

- PaletteSwitcher gains a custom swatch plus a native color input
  (round swatch); picking a color switches the theme to "custom"
- The full Ant Design brand token set and all brand-tinted CSS
  variables (~30 tokens incl. bubble gradient, sidebar, row-selected,
  shadows) are derived from the single hex at runtime:
  - solid states are darkened until white text reaches WCAG AA (4.5:1)
  - dark-mode text/links are lightened until readable on #0f1117
- customColor is persisted alongside preference/palette in the shared
  `theme` localStorage key (normalized to lowercase #rrggbb; invalid
  values fall back to the default #4B74FA)
- ThemeContext injects the derived CSS block via a reusable
  <style id="octop-custom-palette"> element, refreshed on
  color/mode change; curated palettes are unchanged
- charts (TokenUsage, Memory overview) resolve the custom brand via
  brandPrimary(palette, isDark, customColor)

* fix(dashboard): unify custom color into one swatch and extend to expert colors

Address three usability issues from the first custom-color iteration:

1. Single control instead of two: the theme palette row now shows ONE
   custom swatch (rainbow conic-gradient hint). Clicking it opens the
   Ant Design ColorPicker — pick from the palette or type a hex code;
   the chosen color fills the swatch and activates the custom palette.
   The separate "custom swatch + native color input" pair is gone.

2. Smooth picker: replaced the laggy native <input type="color"> with
   antd 5 ColorPicker (palette + gradient + hex input, dark-mode aware).

3. Expert colors get the same feature: ExpertColorPicker (create/edit
   expert, subagent form) now accepts a hex value and exposes the same
   custom swatch; callers hold palette-key-or-hex strings and persist
   custom hex directly to agent config / subagent frontmatter. A small
   hex readout shows the active custom color.

Also raise workbox maximumFileSizeToCacheInBytes to 3 MiB — the antd
ColorPicker color engine pushed vendor-antd past the 2 MiB default,
which silently dropped it from the PWA precache and failed the build.

* fix(experts): keep custom expert color selected when reopening settings

The edit drawer reloaded agent details after mount and mapped the stored
color with resolveExpertPalette(), which snaps any hex to the nearest
curated swatch — so a saved custom color displayed as the closest preset
instead of the custom swatch.

Add parseStoredColor(): exact-match a curated swatch hex back to its
palette key, keep any other valid hex as-is (custom), return null for
invalid values. Both drawers and the initial state now round-trip
custom hex without snapping.
…o-activate (#331)

1. TTS providers now auto-activate after configuration when the active
   TTS is still "browser", mirroring the existing STT behavior.

2. Remove the invalid "mimo_default" voice option (not a valid MiMo
   preset voice ID). The UI defaults to 冰糖; the backend maps legacy
   "mimo_default" configs to 冰糖 so existing setups keep working.

3. MiMo TTS low-latency streaming end to end:
   - Backend: request pcm16 + stream, parse SSE audio chunks and wrap
     them in a live WAV container (24kHz PCM16LE mono)
   - Router: return audio/wav for mimo, audio/mpeg otherwise
   - Frontend: stream the response via requestStream and play chunks
     incrementally with WebAudio (WavStreamPlayer), falling back to the
     buffered blob path for non-WAV providers
* feat(experts): 内置美团生活助手专家

新增专家模板 meituan-living-assistant(领券下单找我):
- manifest.json:双语元信息、美团黄主题色、4 个快捷指令
- SOUL.md:角色人格与触发范围
- skills/meituan-deals/SKILL.md:完整流程状态机
  (意图识别 → 扫码登录 → 领券/搜索/下单,含话术模板与错误码映射)
- scripts/:run.js 统一 CLI 入口(领券/搜索/下单/定位/认证)

Octop 适配改造:
- Token 存储支持 OCTOP_AUTH_DIR 环境变量注入,实现多 Agent 凭据隔离
  (run.js / auth.py / diag_*.py,未注入时回退原默认目录)
- Python 解析优先使用 Octop 自托管 venv
  (OCTOP_PYTHON > $OCTOP_HOME/venv > /app/.venv > PATH 兜底)
- npm bin 执行位自愈:专家模板经字节流播种后自动恢复 chmod +x
- 定时领券改用 Octop 定时任务体系,替代原 crontab + state.json
- dashboard iconForName 补充 utensils / bell 图标映射

来源:CodeBuddy 插件 meituan-living-assistant v1.0.2(美团官方)

* fix(experts): gitignore 放行美团专家随包的 pt-passport 运行时

Docker 镜像(python:3.12-slim)无 Node/npm,无法在 init 时安装
mtuser-pt-passport tgz。将预装好的 node_modules 产物随专家模板分发,
并精确反排除该子树(其余 node_modules 仍被忽略,不受影响)。

* fix(experts): 美团专家登录二维码三级兜底与可复制裸链接

- run.js qrcode 命令:服务端接口失败时本地兜底(qrcode 库 PNG data URI
  → ASCII 字符画降级 → pip 自动安装重试),支付链接拦截保持不变
- 新增 qr_local.py:本地二维码生成(PNG/ASCII 双模式,JSON 输出)
- SKILL.md Step 1.2:取消 miniprogram 客户端不生成二维码的限制
  (Octop Web 控制台跑在 Linux 会被误判为 miniprogram,实际可扫码);
  登录消息模板增加裸链接行,方便复制
- run.js 帮助文本同步更新

* style(experts): 修复美团专家脚本 ruff lint 错误

- Optional[X] → X | None(UP045)、导入排序(I001)、移除未用导入(F401)
- try/except/pass → contextlib.suppress(SIM105)
- if/else → 三元表达式(SIM108)、歧义变量名 l → ln(E741)
- Qclaw_USER_ID 大小写为版本差异刻意保留,加 noqa(SIM112)
- ruff format 统一格式(含 qr_local.py)

make lint 本地全量通过:All checks passed
…ay (#326)

- Set max-width for promptCell to 280px to prevent long instructions from stretching rows.
- Change table scroll behavior to 'max-content' for improved responsiveness.
- Update task type rendering to ensure consistent display with nowrap styling.

These changes enhance the user interface by maintaining a clean layout and improving readability of task types.
…es (#332)

The upgrade progress bar and the "upgrade complete / restart required"
prompts rendered below the (default-expanded) release notes collapse,
pushing them out of the viewport with no visible cue — easy to miss.

Reorder the panel: progress / result prompts now render directly under
the action buttons (check / restart / upgrade), above the release notes.
No logic changes; the two blocks are independent (both use margin-top).
* feat: show memory slimming progress on chat and agent status

Expose memory_maintenance from the agent status API and pause send
while this agent's SQLite is being compacted.

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(deps): 刷新 uv.lock —— harness 升级 + 补齐 pyproject 已声明但未锁的依赖

diff 有 5300 余行,但实质内容变更仅 5 条,其余全部是 uv 0.8.20 的锁格式重写
(revision 1 -> 3,为每条 sdist/wheel 记录追加 upload-time 字段,约 2600 条)。
schema 的 version 字段保持为 1 未变,按 uv 文档 revision 属向后兼容变更,
旧版本 uv 读取不会报错。

实质变更:
- orcakit-harness-agent  0.9.20 -> 0.9.21
- harness-memory         0.9.5  -> 0.9.6
- harness-browser        0.7.4  -> 0.7.5   (pyproject 已要求 >=0.7.5)
- octop                  0.9.23 -> 0.9.24  (版本号跟进)
- 新增 pypinyin 依赖声明                    (pyproject 已声明 >=0.53)

后三条是在修既有问题:此前 pyproject 加入 harness-browser>=0.7.5 与 pypinyin
后未重新锁定,HEAD 上的 uv.lock 执行 uv lock --check 会失败。CI 的 make install
走 uv sync 且未加 --locked/--frozen,会在 runner 内自行重新解析,因此锁文件失配
不会让 CI 变红——这也意味着 CI 当前并未验证锁定的版本组合。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* typecheck

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@Bosheng0422 Bosheng0422 self-assigned this Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants