Commit Graph

779 Commits

Author SHA1 Message Date
john ac2c87be43 fix(plaza): delegate thumbnail regen to chatSave authority boundary
Memind CI / Test, build, and release guards (push) Successful in 3m19s
Portal chat-share routes must not resolve workspace publish dirs directly;
quick-plaza flows now call mindSpaceChatSave.ensurePreviewThumbnail instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 16:18:06 +08:00
john ed910a68ca chore(plaza): add 103 backfill scripts for cover URLs and hero thumbnails
Memind CI / Test, build, and release guards (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 16:15:45 +08:00
john c446ae0db4 fix(plaza): use hero-generated thumbnails and portal cover URLs
Plaza posts now resolve cover_url to /u/{slug}/pages/{urlSlug}.thumbnail.png
instead of MindSpace workspace paths that fail on plaza.tkmind.cn. Public-html
and chat quick-plaza flows regenerate workspace thumbnails with force:true
after hero images are on disk so feed cards embed the generated art.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 16:00:00 +08:00
john 9610bd56cf Fix workspace sync restore for deleted assets with orphaned storage keys.
When a workspace file was soft-deleted but its workspace:// storage_key row remains, re-sync now restores and updates the asset instead of inserting a duplicate version that breaks WeChat Agent delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 14:37:01 +08:00
john 073185f57c chore(ops): add script to sync local deepseek-cp config to production
Memind CI / Test, build, and release guards (push) Successful in 4m47s
Automates copying the local deepseek-cp provider key, rebinding Goose executors, and syncing all goosed targets on 103.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 14:23:37 +08:00
john 6db460eb89 fix(wechat): fallback manage LLM providers when chat balance is exhausted
Memind CI / Test, build, and release guards (push) Failing after 4m34s
When DeepSeek returns 402, try other chat providers before giving up, and cancel the sole active task only during LLM outages so user 123 can cancel without Goose.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 14:02:48 +08:00
john 5de58af9ed fix(wechat): resolve scheduled task cancel via manage LLM instead of hard rules
Use a lightweight LLM over active task lists to pick taskId for cancel,
exclude page.generate from scheduled-task inbound, and remove single-task
auto-cancel so Cursor page generation stays isolated.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 13:45:28 +08:00
john d8463829f7 fix(wechat): cancel sole active scheduled task in inbound without Goose
When a user has exactly one active automation task, cancel it by taskId
after listTasks instead of relying on Goose when the LLM provider fails.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 12:36:19 +08:00
john 43ec144540 fix(wechat): yield schedule handler when scheduled-task intent matches
Stop schedule todo replies from intercepting cancel/list/create automation
requests, and recognize 有哪些 for inbound scheduled task listing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 11:38:17 +08:00
john a1a921eba6 fix(wechat): route scheduled task cancel and spec updates through Goose MCP
Pass cancel requests to Goose like create instead of inbound title matching,
and add scheduled_task_update_spec so format or execution constraints update
taskSpec without triggering page delivery guards.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-29 09:47:39 +08:00
john e13df82021 fix(wechat): pass inbound messages to goose and gate side effects at MCP tools
Memind CI / Test, build, and release guards (push) Failing after 14m19s
Stop ITL regex from intercepting new messages before Agent execution; move
scheduled task and schedule write confirmation to MCP tool calls with draft commit on 确认.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 22:16:23 +08:00
john fef2df119d docs(architecture): record Intent Layer V1 assessment against current runtime.
Keep Context Stability First as the active plan, document reuse vs conflict, and freeze the 15-question answers so the next session does not redesign from scratch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:45:41 +08:00
john 5f3980e0df feat(h5): inject direct-chat history on agent escalation and defer ambiguous routing.
Phase B appends snapshot context when leaving h5direct sessions so Goose no longer starts blind. Phase C lets the 0.72 fallback return null on gated chat text so the existing LLM router can run, flags default off.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:45:34 +08:00
john 6f48cad4c2 fix(billing): apply margin multiplier to subscription quota consumption
Memind CI / Test, build, and release guards (push) Successful in 5m1s
Subscription plans now deduct period_tokens_used as upstream tokens ×
marginMultiplier, aligning package quota burn with wallet cost-mode pricing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 20:31:38 +08:00
john e85b9b986a feat(h5): show subscription quota totals in balance popover
Memind CI / Test, build, and release guards (push) Successful in 4m50s
Display plan total, remaining, and used amounts with plain comma-separated numbers so H5 balance details match backend token accounting.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 17:37:26 +08:00
john 3df2c62c3c docs(architecture): add chat-to-task intent layer review and low-impact plan.
Document R1–R3 root causes in the H5 direct/agent routing path, reject the Task Runtime approach, and define a phased rollout with Memory V2 compatibility constraints.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 17:34:59 +08:00
john cebcc85e84 Fix portal agent runtime route test for cursor policy service wiring.
Memind CI / Test, build, and release guards (push) Successful in 5m22s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 15:33:31 +08:00
john 416bf7a29a Isolate Cursor executor to admin-configured whitelist channel for H5 and WeChat.
Memind CI / Test, build, and release guards (push) Failing after 4m22s
Non-allowlisted users stay on the existing Goose/DeepSeek path; only memindadm whitelist users enter the TKMind Cursor channel on selected intents and channels.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 15:27:10 +08:00
john 02fdcdedc5 fix(release-gate): map cursor/help/tool runtime paths for impact selection
Memind CI / Test, build, and release guards (push) Successful in 3m27s
Unblocks production Gate when promoting commits that touch cursor bridge,
tool gateway, help escalation, loading tips, and setup scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 09:43:17 +08:00
john f91ee97502 feat(wechat): send rich subscribe welcome with clickable intro and bind links
Memind CI / Test, build, and release guards (push) Has been cancelled
New followers receive capability overview plus WeChat anchor links for the
deep intro page and account binding instead of exposing raw URLs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 09:39:06 +08:00
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 aecde46ff6 fix(agent): restore active-task routing and active-mode validation observation
Memind CI / Test, build, and release guards (push) Successful in 5m23s
Keep correction follow-ups on Agent using session transcript and active task
context, and let Page Data validation reach Orchestrator when mode is active
instead of requiring shadowEngine.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 12:15:15 +08:00
john f95d766f69 feat(billing): bill Cursor executor usage via stream-json token parsing
Memind CI / Test, build, and release guards (push) Failing after 14m36s
Parse Cursor CLI usage from stream-json output and charge through billSessionUsage so subscription quota is consumed first and wallet overage applies when needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 10:16:38 +08:00
john 884e819f70 fix(mindspace): lower page access password minimum to 6 characters
Align publication validation, portal gate HTML, H5 publish UI, MCP docs,
and page-data skill guidance so passwords like 888888 are accepted while
3-character values such as 888 remain rejected.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 09:54:46 +08:00
john a15c4177de test(cursor): add executor routing and help remediation scenarios
Memind CI / Test, build, and release guards (push) Successful in 10m3s
Add dry-run, e2e, and poem-page remediation scripts for cursor executor
and help escalation verification.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 09:33:51 +08:00
john 8bdb6e2442 feat(h5): show rotating loading tips during agent-run execution
Surface backend loading_tip SSE events in chat UI with shared tip pool
and styles for long-running TKMind 智趣 tasks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 09:33:50 +08:00
john 8f91c52c67 feat(help): add cursor help escalation worker and chat bridge
Introduce help escalation persistence, cursor help worker processing,
optional OpenAI-compatible chat bridge, and page delivery remediation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 09:33:49 +08:00
john ad6dcc283f feat(cursor): wire executor through portal, admin, and wechat routes
Register cursor in LLM executor bindings, route page/code tasks through
cursor runtime selection, and bootstrap wechat cursor policy services.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 09:33:47 +08:00
john a29e1ec5c8 fix(agent-run): align cursor executor path with 103 production hotfixes
Recover requiredExecutor fallback, direct cursor launch in tool gateway,
and user-facing brand sanitization in source so the next portal release
can replace manual bundled edits on 103.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-27 09:31:36 +08:00
john b356ae8509 fix(h5): drop missing useTaskLoadingTip import blocking portal build
Memind CI / Test, build, and release guards (push) Successful in 5m45s
ChatPanel referenced an unstaged hook; use taskLoadingTip directly until loading tips ship.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:19:38 +08:00
john 644f7fc632 fix(wechat): add cursor channel modules required by wechat-mp imports
Memind CI / Test, build, and release guards (push) Has been cancelled
Ship the WeChat Cursor executor helpers referenced by the page delivery path so tests and runtime imports resolve consistently.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 21:14:36 +08:00
john 5bba9d3e40 merge origin/main into feature/cursor-goose-ops 2026-08-26 21:12:45 +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 0d6a3b97df fix(auth): include subscription in auth status for balance ring
Memind CI / Test, build, and release guards (push) Failing after 5m54s
Refresh/login previously dropped active subscription from the client user
payload, so paid users saw a 0% balance ring despite valid plan quota.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-26 17:05:42 +08:00
john 1ec971515b feat(publish): auto-localize Leaflet CDN to platform assets
Memind CI / Test, build, and release guards (push) Failing after 3m57s
Ship Leaflet 1.9.4 under public/assets/leaflet and rewrite common CDN script/stylesheet URLs during publish and public HTML delivery, matching the existing Chart.js guard pattern.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 16:05:50 +08:00
john 9332bacabd feat(router): improve direct_chat fast-path and add 103 token env sync
Memind CI / Test, build, and release guards (push) Failing after 12m44s
Route explicit text-only Q&A away from Agent before page-generation rules,
and add a script to enable Router + tighter memory budgets on 103 without
changing the global deepseek-v4-pro model.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-25 15:13:22 +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 2319c9c808 fix(schedule): route daily set-remind phrases through ITL with recurrence
Memind CI / Test, build, and release guards (push) Failing after 3m4s
Support colloquial forms like「设置每天18:00提醒打卡」, persist daily metadata on
commit, and schedule the next reminder after each delivery.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 17:42:08 +08:00
john 4100062ba8 fix(db): repair legacy h5_intent_drafts stub schema on migrate
Memind CI / Test, build, and release guards (push) Successful in 4m12s
Drop tables created with intent_kind instead of layer/draft_type so ITL draft
inserts succeed after one-off migrate scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 17:29:03 +08:00
john 1e3a125f83 fix(schedule): parse ASR times with spaces around colons for ITL routing
Memind CI / Test, build, and release guards (push) Successful in 4m15s
Voice/wechat ASR often emits forms like "17 :08", which bypassed timed_reminder
classification and fell through to agent_schedule + schedule-guard false failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 17:12:50 +08:00
john 4ef392e964 fix(schedule): parse「设置一个提醒」as timed reminder for ITL Confirm Gate
Memind CI / Test, build, and release guards (push) Successful in 4m29s
Colloquial phrasing with optional 一个/个 was falling through to agent_schedule,
so schedule-guard blocked false confirmations. Also strip orphaned 分 after HH:MM times.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 16:29:31 +08:00
john a512fecdc5 fix(tasks): match legacy_ref_json by extracted fields for idempotent migrate
Memind CI / Test, build, and release guards (push) Successful in 3m32s
MySQL JSON key order differs from JS stringify, which caused duplicate h5_tasks rows on re-run migrate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 16:07:46 +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 b93c92a3e2 test(scenario): cover multi-image page generation end to end
Memind CI / Test, build, and release guards (push) Failing after 14m27s
The read_image poisoning fix had no end-to-end guard because scenarios could
only send text. Add an upload_images step that renders and uploads visually
distinct images, let chat steps attach them the same way the WeChat channel
does, and assert the generated page actually embeds every upload.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-22 10:50:23 +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 f57e080b49 docs(ops): register wechat delivery fix branch and add manual resend scripts
Memind CI / Test, build, and release guards (push) Successful in 3m44s
Document branch disposition after 103 release, and add standalone/manual
helpers to resend scheduled-task WeChat delivery when reconcile cannot replay.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 22:35:16 +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 0a7b2df5fe docs(release): close production-inspection-fixes branch and add standalone repair script
Memind CI / Test, build, and release guards (push) Successful in 3m8s
Register branch disposition after 103 deploy/repair, and add a lightweight
103 repair script that avoids heavy runtime module imports.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 08:59:19 +08:00
john 843e4d1002 fix(prod): dedupe scheduled tasks and reconcile orphan delivery contracts
Memind CI / Test, build, and release guards (push) Successful in 2m58s
Prevent duplicate active scheduled tasks, fail static preparing contracts
when HTML is missing, raise MindSpace remote timeout default to 30s, and
add 103 repair scripts for inspection follow-ups.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 08:52:16 +08:00