Commit Graph

254 Commits

Author SHA1 Message Date
john cd81c4b2bb fix(release): tolerate volatile persisted files during portal deploy 2026-07-04 14:13:17 +08:00
john 03c46b37c3 fix(og): fall back to thumbnail when declared cover file is missing
WeChat link cards were pointing og:image at mindspace-cover paths that
never landed on disk; serve-time injection now uses thumbnail.png instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 14:07:49 +08:00
john 29d9a87d4f feat: split h5 direct chat from goosed tasks 2026-07-04 14:02:18 +08:00
john eb8d760dd9 test(wechat): align page fixtures with share preview requirements
Mock HTML in wechat-mp tests now includes mindspace-cover metadata so
page link delivery assertions match production guard behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 14:01:39 +08:00
john 31fb0e02cf feat(wechat): require share preview meta before page link delivery
Block service-account page links when HTML lacks mindspace-cover and
description so WeChat forwards always get TKMind branding and thumbnail.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 14:00:26 +08:00
john 031c6e086a feat(wechat): migrate schedule and sync handlers into wechat package
Extract schedule, greeting/status/connectivity replies, chat-general prompt, and display-name helpers from wechat-mp.mjs. Route sync intents via classifyWechatIntent and add channel isolation CI check.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 13:48:47 +08:00
tkmind fafc1fe7fd fix(guard): idempotent agent-run pause to stop portal restart loop
Skip repeat guard pause actions when code runs already disabled; add resume script and tests.
2026-07-04 05:41:51 +00:00
tkmind 2a3579c73a feat(wechat): channel split with stub-safe page delivery
Introduce wechat/ channel package; never send stub HTML links to service-account users.
2026-07-04 05:21:13 +00:00
john f36e8b9292 fix(build): externalize resvg when bundling wechat-mp runtime
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:54:27 +08:00
john 6bc5d128d2 fix(wechat): deliver failure notices and hot-swappable wechat-mp bundle
Notify users when HTML publish guards reject stub pages instead of silently
failing, send real page links when non-stub files exist, and split wechat-mp
into wechat-mp.bundle.mjs for fast production updates without full portal rebuilds.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:52:59 +08:00
john 5ed655b6c3 fix(wechat): detect tool_calls errors in Finish reply and sanitize outbound text
When Goose surfaces session poison errors as assistant text instead of Error events,
assertWechatAgentReplyIsSendable now throws to trigger session recreation. Outbound
sanitization prevents raw API errors from reaching WeChat users.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:38:00 +08:00
john f3a55dce29 merge: fix/wechat-mp-perf 2026-07-04 12:21:19 +08:00
john 8c72d0c950 fix: tighten WeChat session rotation and defer snapshot refresh
Use session snapshot message counts alongside WeChat route counts so long-lived dedicated sessions rotate before Goose history bloats, and refresh snapshots asynchronously so customer replies are not blocked.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 12:21:14 +08:00
john bef72b2768 fix wechat mp session rotation and bootstrap reuse 2026-07-04 12:10:22 +08:00
john 3139395b58 merge: fix/wechat-tool-calls-session-recovery
Auto-recover WeChat agent sessions when tool_calls history is poisoned.
2026-07-04 09:55:06 +08:00
john 7b09abeaa2 fix: auto-recover WeChat agent sessions poisoned by dangling tool_calls
When a dedicated WeChat session history leaves unmatched tool_calls, the next reply fails with a 400 LLM validation error; detect that pattern and recreate the session before retrying.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 09:53:59 +08:00
john 42baa3e468 test: align public image domain expectations 2026-07-04 00:23:13 +08:00
john 8d6e237128 merge: feature/generate-docx-sandbox into main for release 2026-07-04 00:21:12 +08:00
john 52c7082c70 feat: add generate_docx sandbox MCP tool for public Word downloads
Expose generate_docx in mindspace-sandbox-mcp so agents can write public/*.docx
before linking HTML download pages, with tests mirroring the Mark summary flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 00:18:43 +08:00
john 1ac9ad0277 fix: clarify upload errors and raise upload limits 2026-07-04 00:17:58 +08:00
john 702871a98c fix: restore public page share thumbnails from SVG sidecars
Serve missing *.thumbnail.png requests when the SVG sidecar exists, and schedule async PNG rasterization after public HTML is materialized so WeChat og:image URLs stop 404ing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-04 00:11:40 +08:00
john 553af7ca7a feat: improve H5 chat header with floating session rail and new chat entry
Move recent session chips below the nav on mobile H5/WeChat with three visible tabs and horizontal swipe, and add a new-chat icon next to notifications.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 23:21:50 +08:00
john c3c487a8fb fix: serve MindSpace public assets as same-origin relative URLs
Rewrite absolute tkmind asset download links to /api/... at delivery time
and strip base tags that violate public page CSP, so images load on any host.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 23:02:47 +08:00
john f543a91cc4 fix: allow inline page scripts in MindSpace public page CSP
Collect sha256 hashes from all inline scripts in published HTML so agent-generated
fade-in animations are not blocked while keeping the share-button CSP model.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-03 22:42:29 +08:00
john cd2cbdbe78 fix: restore m.tkmind.cn public base 2026-07-03 17:27:51 +08:00
john 145bf4eb01 Merge memind-0703-new01 2026-07-03 16:34:31 +08:00
john 9e4074474b fix: harden session event proxy errors 2026-07-03 16:34:05 +08:00
john ebf06b376b docs: clarify local and 103 runtime topology 2026-07-03 16:34:02 +08:00
john 996c83bbc8 Merge wechat mp page routing fix 2026-07-03 10:43:54 +08:00
john 72fc7cc618 fix wechat mp page reply routing 2026-07-03 10:43:13 +08:00
john 20116b161f Merge Memory V2 runtime facade 2026-07-03 09:46:03 +08:00
john 7005c2a834 Add MindSpace service runtime release chain 2026-07-03 09:29:00 +08:00
john ec5b1a6e3f feat: finalize mindspace service extraction phase a 2026-07-03 08:40:28 +08:00
john 506a551438 feat: polish mindspace decoupling flows 2026-07-03 00:34:03 +08:00
john b258004dad feat: complete mindspace conversation packages 2026-07-02 23:46:05 +08:00
john b084f6d23c Add page indexes to conversation manifests 2026-07-02 22:03:59 +08:00
john ab4dab6b38 Link page artifacts to preview route 2026-07-02 22:01:35 +08:00
john 49127d8675 Add conversation package manifest download 2026-07-02 21:58:14 +08:00
john b4ae4a870c Record synced workspace artifacts in packages 2026-07-02 21:55:07 +08:00
john c86a3fd15b Record published companion artifacts 2026-07-02 21:47:10 +08:00
john b38dd5961f Record chat docx artifacts in packages 2026-07-02 21:43:38 +08:00
john 0e00ed52cd Test conversation package route boundary 2026-07-02 21:39:28 +08:00
john 85936fff05 Show conversation package folder in chat 2026-07-02 21:36:33 +08:00
john ca88716d68 Add conversation package client types 2026-07-02 21:33:31 +08:00
john 32296cb422 Expose conversation package manifests 2026-07-02 21:32:34 +08:00
john 0f48792133 Record uploaded assets in conversation packages 2026-07-02 21:28:51 +08:00
john c2308a6ead Record published pages in conversation packages 2026-07-02 21:24:40 +08:00
john 39e4fffe91 Record page drafts in conversation packages 2026-07-02 21:22:43 +08:00
john 97b648322a Add conversation package registry 2026-07-02 21:17:40 +08:00
john 1b3e64703e Write conversation package manifests 2026-07-02 21:15:41 +08:00