Commit Graph

67 Commits

Author SHA1 Message Date
十五便士 be998adeb2 Replace WeChat group QR code image
Updated the WeChat group QR code image in the README_CN.md file.
2026-05-23 21:20:19 +08:00
honchow bfddda6d3e Merge pull request #31 from akhilesharora/fix/sanitize-text-preserve-non-bmp
fix(offload): preserve non-BMP characters in sanitizeText
2026-05-21 14:46:19 +08:00
chrishuan 0d462e0b63 chore: release v0.3.5 v0.3.5 2026-05-20 22:58:05 +08:00
noFloat f81b79e4ac Merge pull request #55 from YOMXXX/fix/install-root-su-recursion
fix(install): prevent infinite su recursion when running as root
2026-05-20 19:30:55 +08:00
chrishuan 3d965dfbb6 fix(docs): add cd docker/opensource before docker build command 2026-05-20 18:21:34 +08:00
李冠辰 e2223bd532 fix(install): prevent infinite su recursion when running as root
If install_hermes_memory_tencentdb.sh is invoked directly by the root
user (e.g. fresh server with root SSH login), the prior logic:

  USERNAME=$(whoami)             # → "root"
  if [ "$(id -u)" -eq 0 ]; then
      su - $USERNAME -c "bash $TEMP_SCRIPT"   # → su - root → root → loops
  fi

would spin forever: ``su - root`` enters a fresh root shell that re-runs
the script, which sees EUID=0 again and ``su -``-s itself once more.
Symptom (per issue #20):

  [memory-tencentdb] Running as root, switching to root for installation...
  [memory-tencentdb] Running as root, switching to root for installation...
  ...   (only Ctrl+C stops it)

Fix:

  1. ``USERNAME`` resolution adds two precedence steps before
     ``$(whoami)`` so admins running ``sudo bash install.sh`` end up
     installing for the original user instead of for root:
       a. ``INSTALL_AS_USER`` env override (explicit admin choice)
       b. ``SUDO_USER`` (sudo's own record of the calling user)
       c. ``whoami`` (final fallback)

  2. The ``id -u == 0`` branch now skips the ``su -`` step when the
     target user is also root — that's the recursion-trigger case. The
     script proceeds inline as root for the rest of the install.

  3. A new ``elif`` arm logs a clear ``"Running as root; target user is
     also root — installing in place."`` so the operator sees what's
     happening.

Verified by dry-run simulation of 5 scenarios:

  | Case                                    | Branch        | USERNAME |
  | --------------------------------------- | ------------- | -------- |
  | root SSH direct (#20 reproducer)        | INLINE        | root     |
  | non-root user direct                    | NORMAL        | <user>   |
  | sudo bash install.sh from non-root user | SU            | <user>   |
  | root + INSTALL_AS_USER=bar              | SU            | bar      |
  | root + INSTALL_AS_USER=root             | INLINE        | root     |

Closes #20.

Signed-off-by: 李冠辰 <liguanchen@xiaomi.com>
2026-05-19 07:30:35 +08:00
Yuntong8888 c13d020047 Update README_CN.md 2026-05-18 18:22:59 +08:00
Akhilesh Arora bf58853343 fix(offload): preserve non-BMP characters in sanitizeText
UNSAFE_CHAR_RE included the surrogate range [\uD800-\uDFFF] without the `u`
flag, so JS treated strings as UTF-16 code units and stripped each half of
every well-formed non-BMP code point. sanitizeText and sanitizeJsonLine
therefore destroyed emoji, CJK Extension B, math bold, etc. in tool params,
tool results, and ref-md archives.

Adding the `u` flag makes paired surrogates combine into a single code point
before matching, so the [\uD800-\uDFFF] entry now matches only lone (malformed)
surrogates, which is the original intent. All other entries (replacement char,
C0/C1 controls, zero-width chars, line separators, BOM) keep their behavior.

Added a vitest suite covering the preserved and stripped cases.

Closes #30
2026-05-16 22:23:45 +02:00
十五便士 5736acc871 feat: add question/consultation issue template
Add a question template for issue submissions with categories and fields for detailed inquiries.
2026-05-16 20:17:22 +08:00
Yuntong8888 96870953e3 Update README_CN.md 2026-05-16 08:05:38 +08:00
Yuntong8888 4a3f8238d4 Update README_CN.md 2026-05-15 15:12:02 +08:00
Yuntong8888 285896f899 Update README_CN.md 2026-05-14 16:31:56 +08:00
Yuntong8888 e0efaab4db Update README_CN.md 2026-05-14 16:15:13 +08:00
Yuntong8888 0f2894eed9 Update README_CN.md 2026-05-14 15:21:35 +08:00
Yuntong8888 3f69f3c92d Update README.md 2026-05-14 15:21:30 +08:00
Yuntong8888 31d3542ba9 Update README.md 2026-05-14 04:19:15 +08:00
Yuntong8888 d3f220ce15 Update README_CN.md 2026-05-14 04:19:10 +08:00
Yuntong8888 5717b4aab0 Update README.md v0.3.4 2026-05-13 17:51:10 +08:00
Yuntong8888 209420727c Update README_CN.md 2026-05-13 17:51:06 +08:00
Yuntong8888 2488ae2c7a Update README_CN.md 2026-05-13 17:38:18 +08:00
Yuntong8888 7608894156 Update README.md 2026-05-13 17:37:58 +08:00
Yuntong8888 79bf24fbe4 Update README.md 2026-05-13 16:09:43 +08:00
Yuntong8888 a657499c72 Update README_CN.md 2026-05-13 16:01:54 +08:00
十五便士 910be30bbe Change security issue reporting email 2026-05-13 15:40:25 +08:00
十五便士 f6263da67c Change security issue reporting email
Updated the contact method for reporting security issues.
2026-05-13 15:38:19 +08:00
chrishuan f7794f198e docs: sync README, SKILL, and image updates from GitHub 2026-05-13 15:02:10 +08:00
chrishuan d377b09fbc feat: release v0.3.4 — offload local LLM, CLI restore, bugfix scripts 2026-05-13 14:56:56 +08:00
chrishuan 28be408fb8 docs: add Hermes quick start to README and Docker support v0.3.3 2026-05-13 02:14:54 +08:00
chrishuan db8f3e516a feat: release v0.3.3 — Hermes adapter, context offload, core refactor 2026-05-13 01:58:18 +08:00
chrishuan a74b0b3e43 feat: release v0.2.2 — TCVDB backend, BM25 hybrid retrieval, pipeline refactor v0.2.2 2026-05-13 01:23:05 +08:00
chrishuan 5bf5f890a3 docs: rewrite README.md to match README_CN.md structure 2026-05-13 00:16:08 +08:00
chrishuan 3cc6d2aa75 docs: fix benchmark data, replace placeholder links, add EN pyramid image 2026-05-13 00:02:53 +08:00
chrishuan 076fbda195 Merge remote-tracking branch 'github/main' into public 2026-05-12 23:30:25 +08:00
chrishuan 39a8b4c6d7 Update README_CN.md 2026-05-12 23:21:29 +08:00
chrishuan c53eff041e Update README.md 2026-05-12 23:12:54 +08:00
chrishuan 2b6c3e7cd9 Update README_CN.md 2026-05-12 22:56:48 +08:00
chrishuan 0f346c4a99 Update README_CN.md 2026-05-12 22:43:32 +08:00
chrishuan 781a020f45 Update README_CN.md 2026-05-12 22:42:41 +08:00
chrishuan 84ddedb06a Update README_CN.md 2026-05-12 22:27:47 +08:00
chrishuan acf0ef70ab Update README_CN.md 2026-05-12 22:27:16 +08:00
chrishuan d500796f19 Update README.md 2026-05-12 20:46:54 +08:00
chrishuan 3ebe1e5d32 Update README_CN.md 2026-05-12 20:35:08 +08:00
chrishuan 5b46f4c8aa Add files via upload 2026-05-12 20:19:37 +08:00
chrishuan 8ed1f0fe40 Delete assets/images/logo2.png 2026-05-12 20:16:06 +08:00
chrishuan bddbfd2eac Rename logo 2026-05-12 20:04:47 +08:00
chrishuan 0e2fcbe763 logo2.png 2026-05-12 20:03:36 +08:00
chrishuan 37a5e853de Update README_CN.md 2026-05-12 15:27:35 +08:00
chrishuan cad62bccbd Update README.md 2026-05-12 15:17:17 +08:00
chrishuan 9d1f0321c2 chore: remove root-level images, now in assets/images/ 2026-05-12 14:41:43 +08:00
chrishuan e4b3d64dff Merge github/main, keep local README/README_CN 2026-05-12 14:38:15 +08:00