Commit Graph

802 Commits

Author SHA1 Message Date
john bf66fdf493 docs: register feature/memfuse-recall-benchmark branch disposition after 103 release.
Memind CI / Test, build, and release guards (push) Successful in 4m8s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 15:23:21 +08:00
john f6c82182cf test(memory-v2): align pgvector resolve params with score margin and expand cap.
Memind CI / Test, build, and release guards (push) Successful in 3m47s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 15:08:39 +08:00
john e370583fc0 Fix session history order when sidebar refresh merges stale server timestamps.
Keep the newer updated_at and max message_count during session list merges so local touchSession updates are not overwritten by lagging Goose summaries.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 14:59:38 +08:00
john 1d1af5c657 Add local script to verify Experience reflect aggregation end-to-end.
Seeds task outcomes, runs reflect(), and checks execution_pattern rows plus experience_saved product events for local acceptance.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 14:52:45 +08:00
john eb0c697c4e Document local MindSpace delivery links and block production URLs in dev.
Agents must deliver public pages via Portal 8081 with /MindSpace/<userId>/public/ paths; forbid mindspace.tkmind.cn and bare 5173/public links during local development.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 14:51:41 +08:00
john 49758568bb Add Experience reflect background worker with env-gated scheduling.
Start a periodic reflect loop from portal and MindSpace service bootstraps when EXPERIENCE_REFLECT_ENABLED=1, aggregating repeated task outcomes on a configurable interval.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 14:31:50 +08:00
john 2ec6fdbe11 Implement Experience V1 reflect, retrieval boost, and product metrics.
Add rule-based reflect() to aggregate task outcomes, environment-aware search scoring, experience_saved/recalled events, and structured injection blocks per the V1 schema.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 14:30:59 +08:00
john 6d48480b1c Improve cross_device MemFuse recall with source tags and recallContext.
Auto-enable device/location prefixes for cross_device scenarios, thread question_device into keyword and embedding paths, and boost lexical scores from source-tag tokens.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 14:12:48 +08:00
john fb3a442e73 Improve MemFuse recall via hybrid ranking and candidate generation.
Add RRF fusion with English word-level lexical scoring, tiered keyword fetch, and vector margin expansion (0.15/200) to fix pre-rank truncation; wire DashScope embedding bench path and update baseline to 28.8% recall@20.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 13:41:12 +08:00
john b923e54eff Add Experience V1 schema migration and agent-run completion extractor.
Extend h5_experience with structured fields, wire mindspace-agent-runner and agent-run-gateway to persist task_outcome records with provenance, and add local migration and verification scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 10:26:46 +08:00
john 908db04b67 Document Experience schema and JKRiver read-only references.
Map Mi-Memory Structure/Expansion into h5_experience V1 fields and record JKRiver Sleep design lessons under AGPL constraints, plus post-fix MemFuseBench numbers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 10:04:44 +08:00
john 2c0d903ecf Improve pgvector keyword recall ranking without changing hybrid sort.
Rank ILIKE matches by lexical coverage instead of recency and attach lexical scores to keyword rows so MemFuseBench candidate recall rises sharply while Chinese hybrid ordering stays unchanged.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 10:01:42 +08:00
john 0b6f79ae16 Add MemFuseBench retrieval harness and first baseline report.
Wire an offline benchmark over the production pgvector ranking path so Memory V2 recall can be measured with candidate/ranking loss split before lifecycle work lands.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-02 09:50:57 +08:00
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