Commit Graph

789 Commits

Author SHA1 Message Date
john 61eebb44ec fix(agent-run): resolve MCP paths correctly from bundled worker
Memind CI / Test, build, and release guards (push) Successful in 4m10s
Agent-run-worker bundles under scripts/, so fallback MCP resolution pointed
at scripts/tkmind-excel-mcp.mjs and broke Goose session startup on H5 image
tasks. Pin MEMIND_PORTAL_H5_ROOT to the repo root and honor TKMIND_EXCEL_MCP_SERVER_PATH.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 19:32:58 +08:00
john 334b78a7df Add 103 script for Tang WeChat intent router shadow and close branch disposition.
Record feature/wechat-intent-channel-separation as merged and provide a reproducible admin-db toggle for Tang canary LLM router shadow on production.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 14:26:06 +08:00
john 8f88eec2bd Separate WeChat chat, page refine, and task flows with explicit routing.
Memind CI / Test, build, and release guards (push) Successful in 4m40s
Add channel prefixes, pin edit targets in Cursor prompts, and force fresh sessions for page refine URLs so DeepSeek/Goose chat history does not pollute page tasks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 14:10:02 +08:00
john b80584696d Only re-sync WeChat session provider after a failed Cursor attempt.
Memind CI / Test, build, and release guards (push) Successful in 5m24s
Avoids double applySessionLlmProvider on normal Goose chat paths that blocked fast release.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 10:52:01 +08:00
john dc948e10c9 Classify WeChat page refine and MindSpace URL edits as page.generate.
Memind CI / Test, build, and release guards (push) Has been cancelled
Fixes Tang-style follow-ups like「页面还不够详细」or linked HTML update requests from falling through to Goose chat and hitting stale providers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 10:44:50 +08:00
john 61ba554feb Treat WeChat travel-guide requests as page.generate and re-sync Kimi before Goose fallback.
Memind CI / Test, build, and release guards (push) Failing after 4m15s
Fixes Tang-style「做攻略」messages missing the 页面 keyword from entering Cursor, and forces provider refresh before DeepSeek/Kimi fallback after Cursor failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 10:36:04 +08:00
john fa20f735a5 Skip Cursor Chat Bridge for WeChat MP and page.generate sessions.
Memind CI / Test, build, and release guards (push) Failing after 5m45s
WeChat Goose turns always include tools, which the bridge PoC rejects with HTTP 501; keep Kimi/DeepSeek on the session while Cursor handles page execution separately.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 10:16:03 +08:00
john 3688d732c0 Bundle Cursor Chat Bridge into Portal runtime for 103 deploy.
Memind CI / Test, build, and release guards (push) Successful in 6m43s
Add prod runner and LaunchAgent installer so Tang chatBridge toggle can reach a live OpenAI-compatible bridge after env enablement.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 09:55:06 +08:00
john 71d1316919 Remove accidental harness runtime wiring from cursor release.
Memind CI / Test, build, and release guards (push) Successful in 10m16s
The cursor channel commit picked up unstaged harness bootstrap code without the service module, which broke Portal runtime bundling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 09:42:11 +08:00
john 617ff0d1dd Add per-feature Cursor channel toggles for admin and runtime.
Memind CI / Test, build, and release guards (push) Has been cancelled
Expose page/data/scheduled-task/chat-bridge switches in the智趣体验通道 config so Tang can roll out Cursor paths independently with DeepSeek fallback.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-31 09:40:52 +08:00
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