Commit Graph

279 Commits

Author SHA1 Message Date
john 6a88b98044 feat: enforce real imagery for news002
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 11:03:55 +08:00
john 91d5c7a1fd chore(infra): update Studio/103 host IP to 114.85.107.50
Replace all references to the previous Portal host 180.159.29.143 with
114.85.107.50 across release scripts, safety gates, runbooks, and docs.

Also add scripts/push-wechat-news-morning-draft-now.mjs for direct draft
push without waiting on the worker poll interval.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:49:09 +08:00
john 2049bc8c6e fix(news): count lead cards in degradation check, add draft dry-run script
Trying to push a WeChat draft locally surfaced two problems.

isNewsMorningContentDegraded matched cards with `class="card(?:\s|")`, which
never matches news002's `class="lead-card"`. Headline cards were therefore
invisible to the check, so a healthy news002 page could be flagged as degraded
and regenerated. Count cards through the shared extractor instead, which
handles card, lead-card and highlight-box alike.

Add scripts/dryrun-news-morning-draft.mjs to run a page through the dedup gate,
degradation check, inline conversion and footer layout without calling the
WeChat API, since local IPs are not in the official account whitelist
(errcode 40164) and a real push would write into the production draft box.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:31:54 +08:00
john 5708b333cc feat(news): add news002 morning-report template with dedup gate and card images
Freeze the 2026-09-18 layout as news001 and add news002 alongside it.

Analysis of the 0918 production page found 49 news cards covering only ~20
distinct events (4x "王毅同鲁比奥通电话", 5x "东博会南宁开幕"), citing just 7
URLs that are all section landing pages rather than article permalinks, with
zero images. The root cause is structural: 23 fixed sections with fixed card
quotas force padding when the day yields fewer events.

news002 changes the contract so events decide sections, not the reverse:
core sections always render, flex sections are dropped entirely when they have
no unused event, total story cards are capped at 28, and every card carries a
data-event-key fingerprint.

Add wechat-news-morning-dedup.mjs as a post-generation gate, since the prompt
level "no duplicates" rule is unverifiable. It dedupes by event key, then by
article permalink (deliberately ignoring section landing pages, which would
otherwise delete most of the page), then by CJK bigram title similarity, since
the existing whitespace-tokenised matcher does not work on Chinese titles.

Carry per-item images through normalizeSearchResult into the prefetch brief so
cards can render real article thumbnails with a placeholder fallback.

Teach the WeChat inline converter both DOM variants (lead-card, masthead meta,
lede). Per-card images in the WeChat draft body remain a known gap.

Template selection is config/env driven and still defaults to news001.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-21 09:19:41 +08:00
john 830f8a4011 feat(wechat): add service-account push subscriptions and news morning cover delivery
Memind CI / Test, build, and release guards (push) Successful in 5m36s
Ship the 10-item numeric subscription loop on WeChat MP, wire schedule delivery
for news/weather/quote/health/finance/tech/knowledge/night/surprise pushes, and
extend news morning draft cover generation plus a one-shot draft push script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-20 16:15:15 +08:00
John a30b62b987 feat(chat-intent): observe routing, keep discuss-first on chat, and escalate short follow-ups
Memind CI / Test, build, and release guards (push) Has been cancelled
Close the chat-session dead zone without flipping production flags: record 0.72 fallbacks, stop C-2 from treating「先聊聊」as execute, and promote「不对你去执行」after a completed direct turn on both h5direct and date sessions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-19 13:13:17 +08:00
John e962d86ba5 feat(news-morning): enable comments, compact WeChat layout and SEO spec
Default open WeChat draft comments, add SEO/visual template rules with h2 sections and mindspace-geo, and compress inline styles to pack more cards within the 20k HTML budget.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 09:29:30 +08:00
John 9ae35f38e1 fix(news-morning): drop hot section and WeChat stats row
Remove the trending/hot search lane and section, forbid stats summary in page spec, and stop injecting card/section counts into WeChat inline articles.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 09:00:46 +08:00
John af0282e963 feat(news-morning): add full-tier channels with cross-group dedupe
Expand daily briefing prefetch and template to cover Asia-Pacific, commodities, AI/chips, policy, community, science, culture, startup, crypto, geopolitics, cities and wire feeds, with URL/title deduplication across sections.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 08:12:10 +08:00
John 31762be5ef feat(news-morning): add Google, X, university and global market sources
Expand SearXNG prefetch and template with four English-friendly sections so daily news can surface global headlines without copying stale archives.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-18 07:24:34 +08:00
john d820247aa1 fix(schedule): retry reminders when WeChat delivery is deferred
Memind CI / Test, build, and release guards (push) Successful in 3m32s
Treat deferred/skipped customer-service sends as failures so reminder worker
does not mark reminders sent, and add a 103 read-only health check script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 21:30:53 +08:00
john f281f15788 feat(seo): 固化 m.tkmind.cn 百度验证、推送与 sitemap 去重
Memind CI / Test, build, and release guards (pull_request) Failing after 3m21s
让 Portal 首页稳定注入站长验证 meta,并提供 sitemap 批量推送脚本与 LaunchAgent 安装入口;sitemap/llms 对同页优先保留 /u/ canonical URL。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 16:28:46 +08:00
john 357e26ab49 feat(seo-geo): 落盘自动补齐与 143 全量回填支持
Memind CI / Test, build, and release guards (pull_request) Failing after 7m12s
Memind CI / Test, build, and release guards (push) Has been cancelled
Finish/交付写盘前自动回填 mindspace-geo,扩展 storage publications 扫描与 geo meta 解析,并增加 143 生产回填脚本。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 10:26:02 +08:00
john acca846856 feat(seo-geo): 全页面 SEO/GEO 回填、统一检查与 Plaza 注入
Memind CI / Test, build, and release guards (pull_request) Failing after 4m17s
引入批量回填与审计工具链,强制 mindspace-geo 元数据,扩展 sitemap/llms 收录 /learn,并为 Plaza 壳页注入 canonical/OG/JSON-LD;本地 593 页已通过 check:mindspace-cover。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 09:36:01 +08:00
john 264c213fbe fix(mindspace): use lightweight page sync for background list refresh
Background page list sync was calling syncAndDeliver over the remote adapter,
which could exceed the 60s timeout for heavy users and block Portal. Route list
sync through pageSyncService only via listSync while keeping full delivery on
Finish and agent-run paths.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-16 08:53:58 +08:00
john f9e105acd0 feat(learn): add standalone /learn pages backed by Page Data
Serve lightweight child/parent learning assistant pages at /learn without
MindSpace injection, with a rebuild script and Portal static route.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 17:17:18 +08:00
John 4fc488ad33 fix(wechat): 早报必须搜当日新闻,禁止用旧稿充草稿
生成说明强制联网搜索当天内容,pushDraft 拒绝非当日页面;forceGenerateOnce 用于发版后重跑今日早报。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 06:11:36 +08:00
john b6d85d487a Update WeChat draft follow template
Memind CI / Test, build, and release guards (push) Failing after 2m51s
2026-09-14 15:36:40 +08:00
John ce2a4b0e1a feat(intent): 歧义任务走 LLM 路由,并在选中 agent 时离开直聊会话
Memind CI / Test, build, and release guards (push) Has been cancelled
对比/清单/行程等口吻按人群场景交给分类器;本机 .env 可覆盖 admin-db 的 router 开关。
顺带在 MindSpace MCP token 过期时轮换 Goose 会话,避免旧会话空 Finish。
2026-09-12 11:07:45 +08:00
john 0e7e4829db fix(wechat): sync MindSpace pages after MP generation and redirect on 401
Memind CI / Test, build, and release guards (push) Failing after 3m31s
WeChat page delivery now triggers syncUserGeneratedPages so write_file HTML
gets page records; public share widget redirects unauthenticated owners to
WeChat OAuth instead of only showing an error.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 19:58:44 +08:00
john d8eaef3fbd feat(wechat): MindSpace public draft push with 143 host defaults
Add public-page WeChat draft button, publication standard conversion for poem/prose/generic pages, and quick push APIs. Default Studio release SSH targets to john@180.159.29.143 with 105 edge upstream via 10.10.0.2.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 12:32:13 +08:00
john b09b269199 chore(infra): migrate 103 production host IP to 180.159.29.143
Update scripts, docs, nginx configs, and release-gate safety checks after the Studio server public IP changed from 58.38.22.103.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-11 12:28:19 +08:00
john 93aa35515e fix(release): parse nested agent-run status JSON during drain
Memind CI / Test, build, and release guards (push) Successful in 5m3s
Non-greedy brace regex missed the queue object when worker status output contains nested JSON; scan balanced objects from the end instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 20:31:17 +08:00
john f6c9256fbc fix(release): parse agent-run status JSON when worker emits multiple blocks
Memind CI / Test, build, and release guards (push) Has been cancelled
Release drain was timing out because --status now prints a preamble JSON blob without queue; pick the object that contains queue instead of sed from the first brace.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 20:20:06 +08:00
john d07815d317 feat(wechat): update subscribe welcome plaza picks to curated pages
Memind CI / Test, build, and release guards (push) Successful in 6m17s
Replace category links with Xinjiang travel, Plaza late-night food, and creative landing pages; sync missing E2E deps on 103 runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 18:03:27 +08:00
john e42417bd6e feat(wechat): add subscribe morning reminder, plaza welcome, and LLM fallback
Enable daily morning greeting on reply 1 (with custom time, modify, and cancel),
random greeting delivery, M发现 in subscribe welcome, and optional LLM parsing when
rules miss. Also fix WeChat MP draft/config error passthrough and add Tang E2E scripts.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 17:32:10 +08:00
john 78b7d546c2 feat(mindspace): add WeChat MP config and one-click draft push on publish.
Let users bind their own official account credentials in M 配置 and push MindSpace pages to the WeChat draft box during or after publish, reusing the existing draft conversion pipeline.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 16:43:25 +08:00
john 5b314ec9fd feat(goose-v149): add 103 full pool switch script with rollback
Switch native 18006-18014 from goosed agent 1.41 to goose serve 1.49; harden Portal restart during canary teardown.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:32:39 +08:00
john 96176ff280 feat(goose-v149): add 103 canary install and Portal routing scripts
Install v1.49 on loopback :18015 beside stable native pool and toggle TKMIND_GOOSE_CANARY on production .env for user-scoped cutover.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:27:48 +08:00
john 570ecbd1b0 feat(wechat): add WX gate evidence and v1.49 103 cutover runbook
Prioritize scheduled-task intent over page.generate for automation phrases, add run-wechat-gate-evidence.mjs for WX-01..13, and document 103 maintenance-window steps for Goose v1.49.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 15:01:32 +08:00
john 4ad04f07f0 chore(goose-v149): refresh merge-prep baselines and fix local build script
Fix build-goosed-v149-local.sh vendor/v8 paths after cd into the v149 worktree,
record phase3/memory drift evidence, and update phase3 closeout gate status.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 12:06:58 +08:00
john b208c4d2bd feat(context): promote local Context Runtime profile to full active
Memind CI / Test, build, and release guards (push) Failing after 3m47s
Add CONTEXT_RUNTIME_ACTIVE_ENV bundle and zero-LLM active probe covering
MCP compact, zvec, and headroom proxy readiness while keeping memory
injection on shadow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 09:41:55 +08:00
john 3414ae42b1 feat(context): promote MCP compactor to active locally
Memind CI / Test, build, and release guards (push) Has been cancelled
Add active-mode probe script and document mixed shadow/active promotion;
first active switch is MEMIND_MCP_COMPACT_MODE only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 09:39:32 +08:00
john 0daf40d950 docs(context): note agent memory shadow setup for fusion E2E
Memind CI / Test, build, and release guards (push) Failing after 3m15s
Allow custom shadow portal probe messages and document admin-db steps to
enable recall_fusion_resolved without turning on active injection.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 09:33:47 +08:00
john f3348f45c0 feat(dev-tools): add shadow portal and dsh gateway local E2E scripts
Add events-only Context Runtime shadow portal verification to save LLM
tokens, wire Tool Gateway → dsh headless smoke, and document both flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 09:25:13 +08:00
john c0d43379b8 feat(dev-tools): document dsh install and zero-LLM local checks
Memind CI / Test, build, and release guards (push) Failing after 3m44s
Pin @deepseek-ai/dsh@0.1.1-rc.2 probing in check-dsh-executor-local.mjs,
keep live headless smoke opt-in only, and record the 10k-token approval gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 08:50:20 +08:00
john 47d0d2accd feat(dev-tools): add codebase-memory-mcp local check and docs
Document MIT dev-tool setup for Cursor code intelligence and add an
offline probe for CLI, Cursor MCP config, and Memind index readiness.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-10 08:32:56 +08:00
john 478c33376c feat(context): add offline shadow profile and local dev gate
Memind CI / Test, build, and release guards (push) Has been cancelled
Provide context-runtime-profile simulation for gateway shadow events,
run-context-runtime-offline.mjs for zero-LLM verification, and a local
dev guide for user-led shadow self-tests later.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 22:18:47 +08:00
john 2fa9523587 feat(goose-v149): add offline phase3 gate without real LLM calls
Memind CI / Test, build, and release guards (push) Has been cancelled
Block unattended DashScope smokes by default and provide a zero-token
merge verification entry via run-goosed-v149-phase3-offline.mjs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 22:10:19 +08:00
john 67220a14ea fix(goose-v149): block unattended real LLM smokes by default
Prevent phase2/phase3/all reruns from burning DashScope tokens unless
GOOSE_V149_ALLOW_REAL_LLM=1 is explicitly set with human approval.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 22:08:39 +08:00
john 60a428612c feat(context): add MCP result compactor for tool output shadow path
Memind CI / Test, build, and release guards (push) Has been cancelled
Introduce off/shadow/active compaction for large tkmind read/research and
excel report payloads with optional Redis-backed ctx_fetch handles, keeping
fail-open behavior when storage is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 22:05:02 +08:00
john e5dfd8750f Merge branch 'feature/goose-v149-local-canary'
Memind CI / Test, build, and release guards (push) Has been cancelled
2026-09-09 22:01:45 +08:00
john 26ce1241c6 fix(context): repair headroom probe routing and add portal E2E gate
Use the default headroom health probe instead of the goosed fetch adapter
so active mode routes deepseek-no-think through the proxy, and add an E2E
script that verifies goosed pong via headroom with fail-open portal checks.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 22:01:29 +08:00
john fc4ac98e9f feat(context): add dsh executor and headroom active loopback probe
Wire DeepSeek Harness as an optional fourth code executor (default off)
and add a loopback observation script that compares prompt tokens through
headroom proxy with OPENAI_TARGET_API_URL pointed at the compat proxy.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 21:32:57 +08:00
john 40e4a527fe feat(context): add recall fusion and zvec workspace adapters
Introduce RRF-based recall fusion for personal/episodic/temporal paths,
zvec-grep workspace shadow probing for code executors, and a local
headroom proxy starter aligned with the fusion plan defaults.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 21:28:04 +08:00
john 49a1a68a29 feat(context): wire headroom proxy and injection budget shadow paths
Add fail-open headroom provider routing for goosed sync, context-budget
planning with shadow telemetry events, and fix portal-resume smoke to skip
force_deep_reasoning by default so session round-trip checks stay fast.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 21:24:02 +08:00
john d691fed8a6 fix(goose): extend portal-resume timeout for phase3 under load
Portal resume smoke can exceed 300s when agent-run worker is busy; raise
phase3 default to 600s and refresh memory/sanitize baselines from smoke.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 19:56:28 +08:00
john 1d165bc6e3 feat(goose): complete v1.49 phase3 closeout gates and context fusion plan
Expand Goose v1.49 smoke coverage (memory chat, portal resume, page e2e,
multiturn provider), add canary memory policy lock, refresh baselines, and
ignore one-off evidence artifacts. Document headroom-based context runtime
fusion plan; include auth, scheduled-task, and wechat intent fixes on branch.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 18:11:39 +08:00
john 2baf29b3ae feat(health): complete P0 health channel — baseline engine, page-data, MindSpace UI
Deliver encrypted health zone, observation API, baseline maturity pipeline,
page-data bindings, and H5/WeChat channel integration for health P0.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 18:04:57 +08:00
john 7bf16500a1 feat(health): wire H5 health page, WeChat channel, and observation API.
Expose /health and /api/health/observations behind MEMIND_HEALTH_ENABLED, redirect ordinary chat health intents without persisting, and run a dedicated WeChat menu flow with confirm-before-write semantics.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-09 18:04:26 +08:00