advisers 0.2.3 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/LICENSE +0 -0
  2. package/NOTICE +0 -0
  3. package/README-zh.md +15 -6
  4. package/README.md +22 -6
  5. package/THIRD-PARTY-NOTICES.md +1 -1
  6. package/bin/advisers.js +3323 -222
  7. package/index.js +1 -1
  8. package/lib/agent.js +0 -0
  9. package/lib/attachments.js +0 -0
  10. package/lib/audit-anchor.js +683 -0
  11. package/lib/backup.js +1345 -0
  12. package/lib/capture.js +0 -0
  13. package/lib/context-window.js +0 -0
  14. package/lib/digest.js +0 -0
  15. package/lib/doc-review.js +0 -0
  16. package/lib/egress.js +0 -0
  17. package/lib/error-codes.js +1373 -0
  18. package/lib/evidence.js +202 -26
  19. package/lib/fs-safe.js +70 -7
  20. package/lib/ical.js +0 -0
  21. package/lib/imap.js +6 -2
  22. package/lib/importers.js +0 -0
  23. package/lib/learning.js +0 -0
  24. package/lib/ledger-read.js +608 -0
  25. package/lib/mcp-server.js +294 -38
  26. package/lib/model.js +0 -0
  27. package/lib/node-warning-filter.js +15 -0
  28. package/lib/notify.js +13 -3
  29. package/lib/nudge.js +0 -0
  30. package/lib/ocr.js +0 -0
  31. package/lib/pdf.js +0 -0
  32. package/lib/pet-brief-store.js +0 -0
  33. package/lib/pet-brief.js +102 -39
  34. package/lib/receipt-verify.js +213 -15
  35. package/lib/relative-date.js +0 -0
  36. package/lib/remind.js +91 -36
  37. package/lib/research.js +0 -0
  38. package/lib/review.js +0 -0
  39. package/lib/routine.js +0 -0
  40. package/lib/safety/classifier.js +0 -0
  41. package/lib/safety/explain.js +0 -0
  42. package/lib/safety/index.js +0 -0
  43. package/lib/safety/redact.js +0 -0
  44. package/lib/safety/rules.js +0 -0
  45. package/lib/scheduler.js +0 -0
  46. package/lib/source.js +0 -0
  47. package/lib/sqlite.js +1214 -24
  48. package/lib/sync.js +0 -0
  49. package/lib/text-safe.js +229 -0
  50. package/lib/timestamp.js +0 -0
  51. package/lib/tos/index.js +1 -1
  52. package/lib/tos/manifest.json +6 -6
  53. package/lib/tos/privacy.zh-CN.md +12 -9
  54. package/lib/tos/safety.zh-CN.md +4 -3
  55. package/lib/tos/summary.zh-CN.md +3 -3
  56. package/lib/tos/terms.zh-CN.md +8 -6
  57. package/lib/tui/color.js +164 -0
  58. package/lib/tui/index.js +33 -0
  59. package/lib/tui/json.js +124 -0
  60. package/lib/tui/labels.js +50 -0
  61. package/lib/tui/policy.js +108 -0
  62. package/lib/tui/render.js +371 -0
  63. package/lib/tui/sanitize.js +142 -0
  64. package/lib/tui/text-file.js +116 -0
  65. package/lib/tui/width.js +577 -0
  66. package/lib/ui.js +0 -0
  67. package/lib/undo.js +0 -0
  68. package/lib/untrusted.js +0 -0
  69. package/lib/vault.js +0 -0
  70. package/package.json +6 -5
package/LICENSE CHANGED
File without changes
package/NOTICE CHANGED
File without changes
package/README-zh.md CHANGED
@@ -5,13 +5,12 @@
5
5
  ## 安装
6
6
 
7
7
  ```sh
8
- # 0.2.3 是已 staged 到 npm @latest 的发布候选,待账号所有者 OTP 批准;
9
- # 0.2.2 是当前已发布的 @latest(稳定渠道 = 默认 `latest`):
8
+ # 0.3.1 已于 2026-11-20 发布;npm @latest 现为 0.3.1(稳定渠道 = 默认 `latest`):
10
9
  # npm i -g --registry=https://registry.npmjs.org advisers@latest advisers-office@latest
11
10
  # 从 checkout 运行:
12
11
  # corepack pnpm install && corepack pnpm -r build
13
12
  # ADVISERS_OFFICE_LOCAL=1 node packages/advisers/bin/advisers.js status
14
- # preview/RC 构建使用 `next` 渠道(当前 `next` 也指向 0.2.2):
13
+ # `next` 渠道也指向 0.3.1:
15
14
  # npm i -g --registry=https://registry.npmjs.org advisers@next advisers-office@next
16
15
  advisers soul init
17
16
  advisers brief "做一份 Q4 预算 Excel,周五前给老板"
@@ -25,7 +24,7 @@ advisers export
25
24
  > 金融等专业意见;AI 输出可能出错,使用前请自行核验。禁止用于违法、侵权、欺诈、骚扰、
26
25
  > 伪造或未标识合成内容等用途;未成年人须经监护人同意。
27
26
  > 软件许可:PolyForm Noncommercial 1.0.0(源码可见、非 OSI 开源;商业使用须另行取得许可)。
28
- > 使用前请阅读[服务条款](https://github.com/PerryLink/advisers/blob/main/docs/TOS.md)(v2026.11.2)、
27
+ > 使用前请阅读[服务条款](https://github.com/PerryLink/advisers/blob/main/docs/TOS.md)(v2026.11.3)、
29
28
  > [免责声明](https://github.com/PerryLink/advisers/blob/main/docs/DISCLAIMER.md)、
30
29
  > [安全与内容审核说明](https://github.com/PerryLink/advisers/blob/main/docs/SAFETY.md) 与
31
30
  > [隐私与数据流说明](https://github.com/PerryLink/advisers/blob/main/docs/PRIVACY.md)。
@@ -37,9 +36,19 @@ CLI 是**本地秘书运行时**:一个 REPL、用户账/承诺账/流程账
37
36
 
38
37
  ## 状态
39
38
 
40
- `0.2.3` 是发布候选(2026-11-18):已 staged 到 npm `latest`,待账号所有者 OTP 批准;在此之前 `0.2.2` 仍是当前已发布的 `latest`:
39
+ `0.3.1` 已于 2026-11-20 发布(npm `latest` = `0.3.1`;`next` 也为 `0.3.1`)。
40
+ 0.3.1 是**仅修复发布面的 patch(无运行时/CLI/契约变化)**:它取代 `0.3.0`——0.3.0 的 tarball README 仍是
41
+ release candidate 文案,且发布面无法原地修复(npm 同版本 tarball 不可替换,`npm unpublish` 需要 owner 的 2FA)。
42
+ 运行时是「可信交付」feature line:所有出网面逐 item secrecy clearance、本地审计尾锚、备份轮换/可验证恢复与
43
+ `doctor --repair`、200k 读路径消除 TEMP B-TREE 写放大、MCP 输出上限 + legacy 协议协商、DSH 只读账本门面、
44
+ 机器可读契约、无 key 的确定性评测套件与 SBOM 门禁;被该 line 取代的 0.2.4 candidate 从未发布,`0.3.0` 仍可
45
+ 按版本号安装但已被取代。0.3.1 tarball 由 GitHub Actions OIDC/Trusted Publishing 发布,带 SLSA provenance;
46
+ 可用 `scripts/verify-release.mjs --version 0.3.1 --tag latest --sbom artifacts/sbom.cdx.json --require-sbom`
47
+ 校验(SBOM 由 `pnpm run sbom` 生成)。Release notes:
48
+ <https://github.com/PerryLink/advisers/releases/tag/v0.3.1>。完整 TUI 壳、邮件入口、PolicyGrant 与 MCP
49
+ modern 不在 0.3.1;未交付清单见仓库 CHANGELOG。
41
50
 
42
- - SQLite 账本 `~/.advisers/state.db`(JSON fallback;schema v20、无锁只读快照、增量写);
51
+ - SQLite 账本 `~/.advisers/state.db`(JSON fallback;schema v21 —— v21 增量加入客户/项目实体、无锁只读快照、增量写);
43
52
  - soul 位于 `~/.advisers/soul.md`,人类独占;
44
53
  - turns + 摘要 + FTS 检索;开场协议;`/resume`;
45
54
  - 承诺账 + `commit add/ls/done`、`tick`、`snooze`、nudge outcome;
package/README.md CHANGED
@@ -7,12 +7,12 @@ routines.
7
7
  ## Install
8
8
 
9
9
  ```sh
10
- # 0.2.3 is staged for npm @latest (0.2.2 is the current published latest; OTP pending):
10
+ # 0.3.1 was published on 2026-11-20; npm @latest is now 0.3.1:
11
11
  # npm i -g --registry=https://registry.npmjs.org advisers@latest advisers-office@latest
12
12
  # From checkout:
13
13
  # corepack pnpm install && corepack pnpm -r build
14
14
  # ADVISERS_OFFICE_LOCAL=1 node packages/advisers/bin/advisers.js status
15
- # Pre-release/RC builds land on the `next` channel (currently 0.2.2):
15
+ # The `next` channel also points at 0.3.1:
16
16
  # npm i -g --registry=https://registry.npmjs.org advisers@next advisers-office@next
17
17
  advisers soul init
18
18
  advisers brief "做一份 Q4 预算 Excel,周五前给老板"
@@ -28,7 +28,7 @@ advisers export
28
28
  > AI-generated content only with the required labels. Minors need guardian consent.
29
29
  > Software licence: PolyForm Noncommercial 1.0.0 (source-available, not OSI open source;
30
30
  > commercial use requires a separate licence). Terms:
31
- > <https://github.com/PerryLink/advisers/blob/main/docs/TOS.md> (v2026.11.2) · Disclaimer:
31
+ > <https://github.com/PerryLink/advisers/blob/main/docs/TOS.md> (v2026.11.3) · Disclaimer:
32
32
  > <https://github.com/PerryLink/advisers/blob/main/docs/DISCLAIMER.md> · Safety:
33
33
  > <https://github.com/PerryLink/advisers/blob/main/docs/SAFETY.md> · Privacy & data-flow:
34
34
  > <https://github.com/PerryLink/advisers/blob/main/docs/PRIVACY.md>. The local database is
@@ -43,10 +43,26 @@ turn natural language into commitments or artifacts.
43
43
 
44
44
  ## Status
45
45
 
46
- `0.2.3` is the release candidate (2026-11-18), staged for npm `latest` and awaiting the
47
- account owner's OTP approval; `0.2.2` remains the current published `latest` until then:
46
+ `0.3.1` was published on 2026-11-20 (npm `latest` = `0.3.1`; `next` is also `0.3.1`). It
47
+ is a **release-metadata patch with no runtime, CLI or contract changes**: it supersedes
48
+ `0.3.0`, whose tarball README shipped release-candidate text and whose release surface
49
+ could not be repaired in place (an npm tarball cannot be replaced, and `npm unpublish`
50
+ requires the owner's 2FA). The runtime is the "trustworthy delivery" feature line:
51
+ per-item secrecy clearance on every egress surface, a local audit tail anchor, backup
52
+ rotation/verified restore and `doctor --repair`, 200k-row read paths without the TEMP
53
+ B-TREE write amplification, MCP output caps plus legacy protocol negotiation, a read-only
54
+ ledger facade for the DSH adapter, machine-readable contracts, a deterministic no-key
55
+ eval suite and an SBOM gate. The 0.2.4 candidate superseded by that line was never
56
+ published, and `0.3.0` remains installable by pinning but is superseded. The 0.3.1
57
+ tarballs are published from GitHub Actions OIDC/Trusted Publishing with SLSA provenance;
58
+ verify with
59
+ `scripts/verify-release.mjs --version 0.3.1 --tag latest --sbom artifacts/sbom.cdx.json --require-sbom`
60
+ (the SBOM is generated by `pnpm run sbom`).
61
+ Release notes: <https://github.com/PerryLink/advisers/releases/tag/v0.3.1>. The full
62
+ interactive TUI shell, mail entry, PolicyGrant and MCP modern are not in 0.3.1; see the
63
+ repository CHANGELOG for the full not-delivered list.
48
64
 
49
- - SQLite ledger at `~/.advisers/state.db` (JSON fallback with `ADVISERS_STORE=json`; schema v20, lock-free read snapshot, incremental writes);
65
+ - SQLite ledger at `~/.advisers/state.db` (JSON fallback with `ADVISERS_STORE=json`; schema v21 — v21 adds the additive customer/project entities — lock-free read snapshot, incremental writes);
50
66
  - soul at `~/.advisers/soul.md`, human-owned;
51
67
  - local REPL, `chat`, `office`, `template`, `routine`, `link`, `bridge`, `soul`, `ls`, `why`, `forget`, `export`;
52
68
  - IntentBrief + clarification policy + readback;
@@ -11,7 +11,7 @@ dependency closure of the published packages ("pnpm list --prod --depth 100";
11
11
  devDependencies and workspace packages excluded). Do not edit by hand; CI runs
12
12
  "node scripts/check-licenses.mjs".
13
13
 
14
- This file is shipped with the advisers@0.2.3 npm package and covers the third-party production dependencies of that package only. Each dependency keeps its own license.
14
+ This file is shipped with the advisers@0.3.1 npm package and covers the third-party production dependencies of that package only. Each dependency keeps its own license.
15
15
 
16
16
  Optional platform-specific binaries (for example the @napi-rs/canvas builds for
17
17
  other operating systems and CPU architectures) are installed only on a matching