77 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 9ac9f96167 fix(router): route casual chat to DeepSeek and reserve Cursor for page tasks
Default unmatched conversation to direct_chat, stop blanket Agent session continuation and generic Agent→Cursor promotion; fix WeChat page retry userPublishDir scope and simplify ChatPanel controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:09:44 +08:00
john 9dfafb99ca fix(schedule): harden reminder utterance routing for WeChat ITL
Memind CI / Test, build, and release guards (push) Successful in 3m43s
Expand ASR normalization and colloquial reminder parsing so simple timed reminders route to L1 confirm cards instead of the agent, and disable schedule-guard false failures when ITL is enabled.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 18:02:19 +08:00
john d58dc2a251 feat(wechat): add Intent Transaction Layer with unified task schema
Introduce Draft → Confirm → Commit flow for WeChat schedule intents behind
feature flags, plus h5_tasks dual-write/read aggregation and rollout scripts
so reminders and automations get explicit user confirmation before persisting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 15:59:17 +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 1ca06e58e7 fix(scheduled-task): deliver verified WeChat links only after page is ready
Memind CI / Test, build, and release guards (push) Successful in 8m42s
Wait for HTML materialization before releasing delivery contracts, pass
verified MindSpace URLs through proactive WeChat sends, resend on reconcile
when pages land late, and report deferred customer-service delivery as unsent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 22:07:41 +08:00
john 9f7633be24 fix(wechat): rotate polluted image sessions before follow-up turns
Memind CI / Test, build, and release guards (push) Successful in 3m28s
After a successful image report flow, Goose may keep image_url parts that
DeepSeek rejects on later turns while PUT scrub returns 405. Detect polluted
sessions up front, rotate to a fresh agent route with carried assistant
context, and recover image URLs from recent media on historical retries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-15 09:06:00 +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 049d8a6f80 fix(scheduled-task): enable worker by default and add WeChat preflight
Memind CI / Test, build, and release guards (push) Has been cancelled
Scheduled automations were saved but never executed because the worker
required an explicit env flag. Follow H5_REMINDER_WORKER_ENABLED when unset,
add WeChat preflight to write tasks deterministically, and surface worker
warnings on create.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 19:32:09 +08:00
john 26846a0274 feat(wechat): add WeChat voice reco API fallback for service account
Memind CI / Test, build, and release guards (push) Successful in 3m27s
When passive Recognition is empty, convert AMR to mp3 and call WeChat
addvoicetorecofortext before the existing asr.tkmind.cn fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 18:01:50 +08:00
john 1e7004dffe fix(wechat): apply agent timeout and Page Data review to all users
Memind CI / Test, build, and release guards (push) Failing after 10m39s
Remove per-user gray gates so WeChat MP always honors agentReplyTimeoutMs and enables Page Data Aider review when the feature flag is on.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 09:32:27 +08:00
john 5ead1abf7f fix(page-data): scope WeChat survey delivery when tool calls are hidden
Memind CI / Test, build, and release guards (push) Failing after 3s
Collect request-scoped tool messages in the WeChat SSE stream, infer this
turn Page Data HTML via mtime when messages lack writes, and limit bind and
delivery smoke to those paths so historical already_bound pages cannot block new surveys.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 21:41:00 +08:00
john c7dcc5d002 fix(wechat): guard bare page-continuation follow-ups from session loss and memory drift
Memind CI / Test, build, and release guards (push) Failing after 3s
Prevent chat-to-page flows like writing a poem then saying "做成页面吧" from opening
a fresh session without carried content, failing with a vague error, or letting Memory
page-template preferences replace the immediate topic.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 18:49:57 +08:00
john 3547cf8ef0 fix(wechat): complement page link delivery when reply references public html
Memind CI / Test, build, and release guards (push) Failing after 7s
Intent routing and reply content now both trigger HTML delivery: public links,
public/*.html paths, or html writes in the agent reply enable artifact recovery,
link attachment, and fail-closed when the claimed page is missing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 10:00:22 +08:00
john 3e8cdfdda3 fix(wechat): defer 45047/45015 delivery and control customer message budget
Memind CI / Test, build, and release guards (push) Failing after 10s
Persist formal replies when WeChat customer-service quota is exhausted,
claim them once on the next passive response, skip progress notices for
page generation, and suppress failure notices while a formal reply is pending.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 09:21:54 +08:00
john 1faba62f9b fix(wechat): repair share preview on disk for sanitized delivery artifacts
Memind CI / Test, build, and release guards (push) Failing after 6s
Production WeChat delivery strips localPath from artifacts, so share-preview
auto-repair never wrote back to HTML. Resolve paths via publishDir +
relativePath, repair at materialize and delivery prep, and pass h5Root from
Portal so page.generate can patch missing meta before sending links.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 08:48:03 +08:00
john 0a71370bf4 fix(wechat): auto-repair missing share preview meta before page delivery
Memind CI / Test, build, and release guards (push) Failing after 3s
Pages with real HTML content but missing description, mindspace-cover, or
platform brand markers are patched in-place so WeChat link delivery no longer
fails after successful generation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 08:09:13 +08:00
john b9f5720ce0 fix(wechat): recognize news page intents and harden scheduled task delivery
Memind CI / Test, build, and release guards (push) Failing after 4s
Expand page.generate rules for post-page verbs and link-missing retries,
recover HTML artifacts when shadow LLM agrees, and stop marking scheduled
tasks failed when WeChat notification hits rate limits.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 06:46:37 +08:00
john 26fe5912a3 fix(wechat): guard ambiguous memory recall and scheduled task execution
Skip memory injection for short filler messages, demote page-workflow memory
pollution, keep scheduled automation off page.generate, and fail scheduled
tasks that only return clarification instead of deliverables.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 22:50:46 +08:00
john dcf83e9b6f fix(memory-v2): improve pgvector recall and WeChat memory injection
Add keyword fallback and dedupe for pgvector resolve, score personal vs episodic memories by relevance, record WeChat recall product events, and disable broken chatrecall on Postgres session storage.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 22:26:47 +08:00
john 91e140d402 feat(wechat): add admin-pluggable LLM intent router separate from H5.
Memind CI / Test, build, and release guards (push) Failing after 8s
Give WeChat MP its own chat.general→page.generate LLM refinement layer with memindadm toggles, shadow mode, and canary openids so service account routing stays independent of the H5 chatIntentRouter.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 20:57:41 +08:00
john 065b1588b7 fix: deliver WeChat pages when image_make fails
Fall back to workspace share thumbnails so already-published HTML can be
sent instead of blocking on REQUIRED_FRESH. Also allow an explicit
ALLOW_DIRECT_STABLE_RELEASE path matching the pre-2026-07-23 direct
stable packaging flow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 18:19:29 +08:00
john 7eedda092d fix: broaden WeChat session page continuation phrasing
Memind CI / Test, build, and release guards (push) Successful in 2m37s
Recognize retry, HTML page, page edits, and poem content edits as session continuations so delivery skips fresh-thumbnail forcing and retains agent context for multi-turn page work.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 16:54:42 +08:00
john 6307f974cf fix: treat decorated HTML page requests as WeChat immediate context
Memind CI / Test, build, and release guards (push) Successful in 4m32s
Match phrases like「生成一个精美的 HTML 页面」so poem follow-ups skip fresh-thumbnail forcing and reuse the same session poem context.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 16:27:28 +08:00
john 491a62aed6 fix: require write_file for WeChat immediate-context page requests
Memind CI / Test, build, and release guards (push) Failing after 12m9s
Skip fresh thumbnail forcing and retry in-session when load_skill completes without HTML落盘, so「把刚才的诗做成页面」can deliver the prior poem as a static page.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 15:27:23 +08:00
john e1ad094f93 fix: retain unlinked WeChat route for immediate-context page requests
Memind CI / Test, build, and release guards (push) Successful in 20m49s
Short follow-ups like "把刚才的诗做成页面" must keep the existing agent
session so Goose still sees the adjacent poem in snapshot history. Rotating
orphan routes before these requests dropped the poem and revived stale memory.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-28 14:38:53 +08:00
john 31cfdf7a94 fix: guard WeChat page follow-up context 2026-07-28 11:53:00 +08:00
john 7f9453433c fix: isolate WeChat runtime delivery path 2026-07-28 09:33:25 +08:00
john 8bfb7959fc fix: guard WeChat Page Data delivery with Aider review
Memind CI / Test, build, and release guards (push) Has been cancelled
2026-07-28 00:26:24 +08:00
john e94052ff24 mindspace: close authority boundaries 2026-07-27 15:34:35 +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 7e20ec14f1 feat: add semantic WeChat session actions 2026-07-23 17:18:25 +08:00
john a69e2766ed fix: harden agent and WeChat run completion 2026-07-23 10:24:21 +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 5242cbf08b fix: inject episodic memory into WeChat agent
Memind CI / Test, build, and release guards (pull_request) Successful in 3m24s
2026-07-22 13:41:40 +08:00
john cb62b36cd5 fix: recover WeChat page thumbnail delivery
Memind CI / Test, build, and release guards (pull_request) Successful in 5m1s
2026-07-22 11:51:48 +08:00
john 7b3acb6813 fix(wechat): retry missing page thumbnails in fresh sessions
Memind CI / Test, build, and release guards (pull_request) Successful in 4m1s
2026-07-22 09:38:13 +08:00
john c6ae7cd21c fix(wechat): trust configured imgproxy generated images
Memind CI / Test, build, and release guards (pull_request) Successful in 2m56s
2026-07-22 09:05:18 +08:00
john 28581310da feat(wechat): add image generation delivery policy
Memind CI / Test, build, and release guards (pull_request) Successful in 2m45s
2026-07-21 23:22:06 +08:00
john 2ce1527edd feat: enable WeChat media for all users 2026-07-18 21:20:56 +08:00
john 711a7d2061 fix: aggregate WeChat multi-image batches 2026-07-18 19:53:09 +08:00
john ae3e1ba3fa fix: recover stale WeChat active requests 2026-07-18 19:05:33 +08:00
john 8eaf4d23f3 fix: route WeChat media through shared vision pipeline 2026-07-18 18:15:22 +08:00
john 94f347398d feat: gate WeChat media analysis by user 2026-07-18 17:46:20 +08:00
john fd3904fdee feat: add WeChat media analysis adapters 2026-07-18 17:41:32 +08:00
john 320945a485 feat(mindspace): add opt-in local analytics 2026-07-16 21:07:17 +08:00
john da422a82e6 fix(wechat): restore session routing exports after merge
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 22:44:18 +08:00
john 16fd99e8ba fix(page-data): trust live API smoke and WeChat survey submit compat
Stop blocking WeChat delivery when Page Data insert works but publish
quota blocks h5_publish_records; fix smoke URL missing /api; patch survey
radios for WeChat X5 and detect dataset constants in admin pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-12 22:42:47 +08:00
john ca4805533b fix(wechat): isolate page data sessions 2026-07-12 21:13:45 +08:00