Commit Graph

665 Commits

Author SHA1 Message Date
tkmind c44017eccd Merge pull request 'fix(analytics): include username on page_generated events' (#43) from fix/analytics-page-generated-username into main
Memind CI / Test, build, and release guards (push) Successful in 4m17s
2026-08-06 07:32:03 +00:00
john b300cb5e04 fix(analytics): include username on page_generated events
Memind CI / Test, build, and release guards (pull_request) Successful in 5m34s
Umami creator labels read event_data.username; server events only sent
owner_label, so dashboards fell back to MindSpace UUID path segments.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 15:25: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 d9db72fd90 fix(billing): use admin_adjust ledger reason for setImageQuota
Memind CI / Test, build, and release guards (push) Successful in 4m19s
Production ledger reason column is ENUM and rejects admin_set.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 16:24:24 +08:00
john f488d49d51 fix(billing): add setImageQuota for admin absolute remaining/total
Memind CI / Test, build, and release guards (push) Has been cancelled
Grant-only bonus adjustments cannot lower capacity below the stored plan
limit; admin set now updates period_images_limit when needed.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 16:21:07 +08:00
john fda90d8579 merge: billing PG session cost fallback
Memind CI / Test, build, and release guards (push) Successful in 17m14s
2026-08-05 15:48:44 +08:00
john 8c1ae7550d fix(billing): read Goose accumulated_cost from PostgreSQL fallback
Goosed GET /sessions/:id returns accumulated_cost null while memind_sessions
PG has the real upstream cost. Fall back to PG before token estimate billing.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 15:48:39 +08:00
john e2014e05e6 fix(analytics): stop identifying Public visitors as page creators
Public generated pages were calling umami.identify(owner_id), collapsing
every visitor into the creator session. Anonymous visits now skip identify;
logged-in viewers identify with their own distinct id.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 13:05:18 +08:00
john 9e50681d96 merge: billing branch disposition registration
Memind CI / Test, build, and release guards (push) Failing after 10m24s
2026-08-05 10:04:02 +08:00
john eb8eedb07f docs: register billing session cost fix branch disposition
Record closure of feature/billing-session-cost-priority after merge to main
and 103 release 20260805-095542-44121df.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 10:04:02 +08:00
john 44121df83c merge: billing session cost priority and compensation script
Memind CI / Test, build, and release guards (push) Has been cancelled
Fix inflated token-estimate overcharge by preferring Goose accumulated_cost;
includes Aug 4+ user compensation tooling.
2026-08-05 09:53:10 +08:00
john e7f0627dc9 fix(billing): prefer Goose session cost over token estimate
Billing fell back to inflated token list-price estimates when Finish
frames carried inline accumulatedCost, causing ~70x overcharge vs DeepSeek.
Always fetch session accumulated_cost first; add Aug 4+ compensation script.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 09:52:13 +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 089a44fb11 docs: close codex/flux-schnell-workflow-kind after main rollback release
Memind CI / Test, build, and release guards (push) Successful in 4m25s
Register the abandoned flux branch as non-reusable after 103 returned to main @ 6a48e0a.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-04 20:48:49 +08:00
john 6a48e0ad91 merge: native goosed remount for Portal release
Memind CI / Test, build, and release guards (push) Successful in 4m59s
2026-08-03 16:50:54 +08:00
john c2189ee30d fix(release): restart native goosed pool after Portal live swap on 103
103 production uses launchd goosed-native instead of Docker bind mounts;
fall back to kickstarting native services when docker compose is unavailable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 16:50:54 +08:00
john 2cc98b9392 merge: retrigger CI on host runner
Memind CI / Test, build, and release guards (push) Successful in 7m3s
2026-08-03 16:12:39 +08:00
john 2f4dd39181 ci: retrigger on host-mode runner
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 16:12:36 +08:00
john 4e66c43350 merge: retrigger CI after runner wrapper
Memind CI / Test, build, and release guards (push) Failing after 2s
2026-08-03 16:11:09 +08:00
john 85872e1e84 ci: retrigger after runner wrapper fix
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 16:11:06 +08:00
john 93aa7c1cfa merge: retrigger CI after runner recovery
Memind CI / Test, build, and release guards (push) Failing after 8s
2026-08-03 16:06:09 +08:00
john 49c2671845 ci: retrigger workflow after runner and Colima recovery
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 16:06:07 +08:00
john 5cebd1121e merge: map Gitea workflows as non-runtime for release gate
Memind CI / Test, build, and release guards (push) Failing after 7s
2026-08-03 15:50:29 +08:00
john 492bf6fbb4 fix(release-gate): treat Gitea workflow files as non-runtime impact paths
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:50:26 +08:00
john 1d1af888e9 merge: fix CI for macOS self-hosted runner and AUTH-08 flake
Memind CI / Test, build, and release guards (push) Failing after 5s
2026-08-03 15:47:27 +08:00
john 4ebe7c76aa fix(ci): support memind-ci-mac runner and stabilize acceptance HTTP server
The self-hosted macOS runner cannot run apt-get or install Linux-only Sharp
packages; gate CI on sqlite availability and platform-specific Sharp setup.
Also wait for ephemeral Express listen before fetch to avoid AUTH-08 flakes.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:47:11 +08:00
john 147734870b fix(release-gate): stabilize browser smoke UI-08 console check
Memind CI / Test, build, and release guards (push) Failing after 12s
Drop optional cover meta from the fixture and scope UI-08 console errors to
the final public-page view so chat /api/goals polling does not fail the gate.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:24:53 +08:00
john 36b1ae3992 fix(release-gate): map admin billing paths and repair pgvector test
Memind CI / Test, build, and release guards (push) Failing after 3s
Allow image-quota admin files in impact selection and update Memory V2
runtime test for hybrid pgvector keyword query.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:08:02 +08:00
john 35ec2e3544 docs: register feature/image-quota-admin branch disposition
Memind CI / Test, build, and release guards (push) Failing after 6s
Record merged image quota work as closed; admin UI lives in memind_adm 5174 only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 15:01:27 +08:00
john 946d8756c8 feat(billing): enforce image generation quota with admin API and user display
Memind CI / Test, build, and release guards (push) Failing after 3s
Add period_images_bonus and ledger tracking, gate image_make on remaining quota,
expose admin image-quota routes, show remaining image quota in the balance popover,
and document that admin UI must live in memind_adm (5174) not ops.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 14:58:38 +08:00
john 36d8e74784 merge: register feature/h5-llm-router-canary branch disposition
Memind CI / Test, build, and release guards (push) Failing after 2s
2026-08-03 12:32:13 +08:00
john 305af3cd35 docs: close feature/h5-llm-router-canary after main merge and 103 release
Record that the branch core LLM router work is already on main and production,
and mark the stale branch as read-only to prevent merge or release reuse.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-03 12:28:16 +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 762453852f fix(page-data): deliver WeChat surveys when agent pre-binds pages
Memind CI / Test, build, and release guards (push) Failing after 5s
Include already_bound auto-bind skips and request-scoped relative paths
when building Page Data delivery artifacts, so pre-bound survey pages are
verified and linked instead of failing the finish guard.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 21:10:38 +08:00
john 599f23521f fix(release): accept active launchctl state for portal tunnel preflight
Memind CI / Test, build, and release guards (push) Failing after 3s
Tunnel agents can report spawn scheduled while the SSH forward is already
healthy; treating that as failure caused successful releases to roll back.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 20:40:37 +08:00
john 7e26b459bc fix(page-data): scope WeChat delivery verification to newly bound pages
Memind CI / Test, build, and release guards (push) Failing after 4s
Historical workspace Page Data HTML was failing delivery smoke checks and
blocking new survey links from reaching WeChat users. Add a webhook scenario
test script for 103 regression runs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 20:32:03 +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 55100f8945 fix(mindspace): ensure thumbnail sidecars for WeChat link card og:image
Memind CI / Test, build, and release guards (push) Failing after 2s
Generate SVG/PNG sidecars at HTML delivery and after share-preview repair so
forwarded service-account links get a raster og:image when only meta exists.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 13:47:31 +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 db53090ba1 fix(wechat): only auto-repair substantial HTML during materialize
Memind CI / Test, build, and release guards (push) Failing after 8s
Skip share-preview repair for tiny HTML fragments so sandbox write tests
and partial tool outputs stay unchanged while real pages still get metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 08:49:51 +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 dac06753ce fix(wechat): stop relay bootstrap from hijacking LLM provider selection.
Memind CI / Test, build, and release guards (push) Failing after 2s
Schedule LLM now binds an explicit provider key and fails closed on network errors so dead relay endpoints cannot block ordinary chat; relay bootstrap is opt-in only.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 21:44:08 +08:00
john 122a25649b fix(ops): align Memory V2 Runtime Control badge with actual config flags.
The admin page treated every section as enabled via section.enabled, but runtimeControl has no such field; derive status from agent resolve/injection/lifecycle flags and proxy runtime status from Portal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 21:44:01 +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 cdc265d7e0 fix(agent-run): tolerate goosed stdio MCP listing gaps during session reconcile.
Memind CI / Test, build, and release guards (push) Failing after 4s
Skip hot-adding stdio extensions goosed omits from /extensions, stabilize MCP
scope during session start, and wire chat intent routing into the agent-run worker.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 20:02:33 +08:00