Commit Graph

63 Commits

Author SHA1 Message Date
john 760a1760ae fix(wechat): enforce current-turn image paths in page delivery
Memind CI / Test, build, and release guards (push) Successful in 6m58s
Materialize wechat-mp uploads into dated public/images paths during vision
preprocessing and fail closed when delivered HTML references stale workspace
images instead of the current turn allowlist.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 12:54:46 +08:00
john ef4ce12bbf fix(vision): stop read_image from poisoning text-provider sessions
Image turns already get a vision-model description injected into the prompt,
but the agent kept calling read_image to "confirm" the pictures. Those tool
results carry base64 image parts that Goose persists, so every later turn
against the text-only chat provider failed with `unknown variant image_url`
before the agent could write the page. WeChat page requests therefore fell
through to the fail-closed delivery message.

Drop read_image for the turn whenever a vision model handles the images, say
so explicitly in the injected prompt, and teach the poison scan to recognise
tool image parts so already-polluted sessions rotate instead of failing again.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 10:40:12 +08:00
john 4d12ea438b feat(billing): add dual formulas, disable 10yuan gift, retry auto-renew
Memind CI / Test, build, and release guards (push) Successful in 3m43s
Turn off the low-balance 10 CNY signup bonus while keeping the 5 CNY
registration credit, split metering into independent formula A/B scopes,
and retry expired auto-renew subscriptions after recharge or hourly worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 08:45:43 +08:00
john 67b9478155 fix(wechat): avoid image_url session poison on report follow-ups
Store image-only WeChat messages without running Agent, scrub assistant image_url history, and retry historical-image failures with text-only prompts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-15 08:21:28 +08:00
john 41f245c88a fix(wechat): rotate image_url-poisoned sessions for report follow-ups
Memind CI / Test, build, and release guards (push) Has been cancelled
Goose cannot persist historical image scrub (PUT 405), so DeepSeek rejects
image_url on the next turn. Reattach the recent report image and rotate to a
fresh session instead of treating the follow-up as a missing page source.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 21:45:02 +08:00
john 391ba0b705 feat(billing): make metering formula admin-configurable
Memind CI / Test, build, and release guards (pull_request) Failing after 1m29s
Allow margin/FX/cost-mode knobs to be overridden via h5_billing_admin_config so memind_adm can adjust DeepSeek billing without editing env.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 16:55:09 +08:00
john cdc265d7e0 fix(agent-run): tolerate goosed stdio MCP listing gaps during session reconcile.
Memind CI / Test, build, and release guards (push) Failing after 4s
Skip hot-adding stdio extensions goosed omits from /extensions, stabilize MCP
scope during session start, and wire chat intent routing into the agent-run worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 20:02:33 +08:00
john 53c5f6d9c2 fix(wechat): scrub image_url from sessions and harden vision handoff.
Memind CI / Test, build, and release guards (pull_request) Failing after 19s
Strip image_url from persisted session payloads, keep image turns scoped to the active request, and align proxy/vision/page-data paths so WeChat image history does not leak into fresh sessions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-30 10:43:24 +08:00
john 7f9453433c fix: isolate WeChat runtime delivery path 2026-07-28 09:33:25 +08:00
john 48c61a3279 fix: harden long conversation continuity
Memind CI / Test, build, and release guards (push) Successful in 1m28s
2026-07-27 21:39:34 +08:00
john 17c59fde71 fix: isolate visual tool failures from agent runs 2026-07-27 19:20:23 +08:00
john e94052ff24 mindspace: close authority boundaries 2026-07-27 15:34:35 +08:00
john 56ff170a60 fix(chat): recover session list from snapshots 2026-07-27 09:08:55 +08:00
john 8ccf2db05c feat(page-data): add validation suggestions, repair path, and thinking fixes
Memind CI / Test, build, and release guards (push) Failing after 3m18s
Map Page Data failure codes to Chinese remediation hints, trigger one-shot
goosed repair for remediable cases, and recover poisoned thinking sessions.
Route local DeepSeek through the no-think proxy via host.docker.internal so
tool rounds no longer hit reasoning_content 400; document gate and case-study
scenarios for event registration repair.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 23:01:55 +08:00
john 6b6f9ed01c fix: unblock local news page generation 2026-07-25 21:55:00 +08:00
john d87bfde501 merge: server architecture modularization 2026-07-24 19:18:14 +08:00
john 785731d98d refactor: modularize portal server and harden session recovery 2026-07-24 19:10:44 +08:00
john 1d291fd528 fix: restore page links after delayed materialization 2026-07-24 17:58:52 +08:00
john 550969bed2 fix: preserve delivered page links when auto images fail 2026-07-24 17:57:39 +08:00
john 205b5fd8be feat: add system disclosure policy gate
Memind CI / Test, build, and release guards (pull_request) Successful in 3m14s
2026-07-23 22:53:15 +08:00
john db225b784e fix(wechat): isolate stale images and page links
Memind CI / Test, build, and release guards (pull_request) Successful in 2m36s
2026-07-22 14:08:18 +08:00
john cce56a4c6a fix(chat): translate session replay cursors
Memind CI / Test, build, and release guards (pull_request) Successful in 2m55s
2026-07-17 16:49:31 +08:00
john 0c1c0c3b48 feat: add pluggable Excel analyst report guard
Memind CI / Test, build, and release guards (push) Has been cancelled
2026-07-17 12:05:51 +08:00
john f437a37660 fix: import consumeSessionEventsUntilFinish for H5 agent runs
H5 chat via POST /api/agent/runs failed with ReferenceError after the
session Finish alignment change; restore the missing import from
session-reply-wait.mjs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 14:47:36 +08:00
john 294e331a03 fix(page-data): deliver MindSpace workspace URLs instead of /u/.../pages/ routes.
Page Data questionnaires were returning publication slugs to users; password-mode
pages always fell back to /u/ routes. Prefer MindSpace paths at publish time and
rewrite mistaken delivery links in WeChat and Portal chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 13:54:24 +08:00
john dc7b440bfb Merge branch 'hotfix/mindspace-url-canonical-0710' 2026-07-12 12:18:51 +08:00
john 32fb2cdeaf feat: chat uploads, vision turn isolation, and MindSpace agent improvements
Add chat file/image upload UX, attachment proxying, vision thumbnails, and per-turn image scoping so agents only use the current upload. Extend MindSpace asset context, billing token state, OA/scenario verify scripts, and related runtime config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-11 00:23:01 +08:00
john 880cd59ca5 fix(mindspace): link inline public html paths 2026-07-10 11:53:03 +08:00
john adc13a167e fix(mindspace): canonicalize public page links without MindSpace segment 2026-07-10 11:39:21 +08:00
john eea14c1855 Add page data delivery and publication guards 2026-07-08 21:10:47 +08:00
john 14a00774d9 feat(h5): web 联网能力、实时查询路由与 session Finish 对齐
- 新增 web 能力并挂载 platform/web(web_search/fetch_url)
- 实时查询强制 web skill,router fallback 与 await session Finish
- Session Broker 覆盖率/指标、stream replay 与相关单测/E2E 脚本

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 16:06:26 +08:00
john 08feae8bef feat(h5-session): Session Broker、run SSE replay 与 Finish 竞态修复
落地 H5 Session 架构 Patch 1–5(Broker 收口、Router decision、SSE taxonomy、goosed 边界检查),
并新增可选 MEMIND_RUN_STREAM_REPLAY run 事件回放与 H5 假交付 guard;修复 Finish 先于 agent-run
gate 导致 UI 永久 loading 的竞态,接入 verify:h5-session-patches 回归脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-06 14:19:48 +08:00
john cb7a446d3e fix: ensure userVisible metadata on Goosed session replies
Goosed rejects /sessions/:id/reply when user_message.metadata lacks
userVisible. Normalize metadata before submit and during agent orchestration
so page-generation runs no longer fail before streaming starts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 11:58:17 +08:00
john 00a00a1f69 fix: portal stability, session list DB fallback, and UX polish
- Free stale Memind listeners on 8081 before startup and exit cleanly on EADDRINUSE
- Backfill owned sessions missing from Goose via h5_conversation_messages summaries
- Strip Memind task orchestration prefixes from user-facing chat text
- Repair missing public docx links before release MindSpace link checks

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 11:26:34 +08:00
john 614837e199 fix: repair chat history from DB when Goose session has empty placeholders
Portal direct chat → goosed escalation can leave hollow Goose messages while
h5_conversation_messages retains the full dialogue. Backfill session detail
from DB, extend snapshot list fallback, and keep stored session id on transient
boot failures so refresh no longer looks like a blank new chat.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-05 11:04:25 +08:00
john e45c9300bf feat: LLM intent router, direct chat execution, and Memory V2 light intervention
Wire chat intent routing with direct_chat on regular sessions, skill-selected
short-circuit to Agent, memory light/heavy intervention tiers, and fix direct
chat UI stuck streaming after completion.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 22:32:57 +08:00
john 29d9a87d4f feat: split h5 direct chat from goosed tasks 2026-07-04 14:02:18 +08:00
john 9e4074474b fix: harden session event proxy errors 2026-07-03 16:34:05 +08:00
john 20116b161f Merge Memory V2 runtime facade 2026-07-03 09:46:03 +08:00
John e24e6ca4a7 feat: add runtime worker heartbeat sidecar 2026-07-02 09:03:30 +08:00
John 12f74eb44e feat: add first token latency window stats 2026-07-02 08:06:58 +08:00
John 8e5094fcd9 feat: record first token latency in runtime router 2026-07-02 07:45:47 +08:00
John a13808b462 feat: feed worker metrics into runtime router 2026-07-02 07:35:10 +08:00
John e989526886 feat: gate code agent runs server side 2026-07-02 07:25:16 +08:00
John 0271d83756 feat: wire code agent runs to tool mode 2026-07-02 07:16:47 +08:00
John e17dcaf4a8 feat: gate code tools by task mode 2026-07-02 07:12:18 +08:00
John 4420cca340 chore: add runtime observability ops 2026-07-02 07:04:50 +08:00
John 04e308e582 feat: add streaming runtime router 2026-07-02 06:55:26 +08:00
john ec375b1402 fix(wip): WIP - partial unify WeChat/H5 skill prompts (build agent changes)
- Reuse H5's buildAutoChatSkillPrefix in buildWechatAgentPrompt signature
- Inject autoSkillPrefix into voice/text message prompts
- Add origin tagging in GET /sessions for h5/wechat channel labels

Still TODO (will complete in next cycle):
- Full resolveGrantedSkills → buildWechatAgentPrompt flow
- ensureWechatAgentSession idle rotation logic
- setSessionOrigin + touchWechatAgentRoute calls
- Backend schema/migrations (h5_user_sessions origin column)
- Frontend type + UI component updates

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-01 21:07:25 +08:00
john de5fab370c fix(agent): inject Shanghai time into each reply message
103 goosed harness_remember returns remembered:false, so session memory
never carried the time anchor. Prepend buildCurrentTimeAgentPrefix on every
H5 /reply and WeChat agent prompt so the model sees Asia/Shanghai clock.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-01 18:32:27 +08:00