@jjh32456/longlive 1.8.12 → 2.0.0
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.
- package/CHANGELOG.md +232 -202
- package/QUICKSTART.md +10 -11
- package/README.en.md +13 -4
- package/README.md +42 -11
- package/SPEC.md +3 -3
- package/build-info.json +231 -121
- package/cordis.patch.yml +32 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/AUTO-RECALL.md +1 -1
- package/docs/CONFIG.md +41 -9
- package/docs/FAQ.md +7 -7
- package/docs/FEATURES.md +6 -6
- package/docs/OPERATIONS.md +1 -1
- package/docs/PANEL-INTEGRATION.md +1 -1
- package/docs/PRIVACY.md +5 -5
- package/docs/QUICKSTART.md +3 -3
- package/docs/README.en.md +4 -2
- package/docs/TROUBLESHOOTING.md +4 -4
- package/package.json +6 -3
- package/runbook.md +3 -3
- package/scripts/migrate-200.mjs +8 -0
- package/scripts/migrate-lifecycle.mjs +2 -2
- package/src/answer/claim-guard.mjs +234 -0
- package/src/backup.js +165 -1
- package/src/config.js +18 -7
- package/src/features.js +128 -5
- package/src/handoff/index.js +133 -0
- package/src/handoff/model.js +48 -0
- package/src/identity/handover.js +203 -15
- package/src/identity/inject-position.js +3 -1
- package/src/memory/a1-migration.js +72 -6
- package/src/memory/archive-cold-state.mjs +794 -0
- package/src/memory/archive-staging.mjs +305 -0
- package/src/memory/archive.mjs +415 -0
- package/src/memory/capture-host.js +71 -2
- package/src/memory/capture.js +45 -6
- package/src/memory/catchup.mjs +534 -0
- package/src/memory/conclusion-distill.js +51 -2
- package/src/memory/conclusion-drafts.js +7 -3
- package/src/memory/conflicts.js +915 -2
- package/src/memory/consolidate.js +20 -1
- package/src/memory/forget-v2.js +272 -2
- package/src/memory/forget.js +20 -1
- package/src/memory/frames-activation.js +3 -1
- package/src/memory/fts-query.js +2 -2
- package/src/memory/index.js +80 -7
- package/src/memory/land.mjs +743 -0
- package/src/memory/lifecycle.js +128 -0
- package/src/memory/maintenance.js +386 -22
- package/src/memory/memory-health.mjs +607 -0
- package/src/memory/migrate-200.js +1681 -0
- package/src/memory/migrate-lifecycle.js +3 -3
- package/src/memory/procedure-candidate.mjs +377 -0
- package/src/memory/procedure.js +20 -1
- package/src/memory/prospective-memory.mjs +362 -0
- package/src/memory/recall-feedback.mjs +406 -0
- package/src/memory/recall-v2.js +13 -1
- package/src/memory/recall.js +102 -1
- package/src/memory/reinforce.js +138 -2
- package/src/memory/retention.js +34 -0
- package/src/memory/turn-budget.mjs +290 -0
- package/src/memory/wake-bridge.mjs +2999 -0
- package/src/memory/working-frame.js +271 -8
- package/src/metrics/classify.mjs +3 -1
- package/src/recall/archive-config.mjs +130 -0
- package/src/recall/archive-fallback.mjs +174 -19
- package/src/recall/archive-search.mjs +3 -0
- package/src/recall/archive-state.mjs +588 -0
- package/src/recall/brain.mjs +501 -0
- package/src/recall/current-line.mjs +110 -0
- package/src/recall/edges.js +21 -2
- package/src/recall/explain.mjs +10 -0
- package/src/recall/gate-log.mjs +280 -0
- package/src/recall/gate-metrics.mjs +191 -0
- package/src/recall/index.js +322 -21
- package/src/recall/inject-order.mjs +3 -1
- package/src/recall/recall-core.mjs +47 -2
- package/src/recall/turn-budget-inject.mjs +154 -0
- package/src/retention/cold-gate.mjs +146 -0
- package/src/retention/config.js +58 -1
- package/src/retention/index.js +193 -35
- package/src/router/design-headings.json +10 -10
- package/src/tools.js +122 -6
package/README.en.md
CHANGED
|
@@ -3,18 +3,27 @@
|
|
|
3
3
|
A DeepSeek Harness plugin that keeps a long session healthy: **inspect it, back it up, and shrink it safely** before the context window fills up. No standalone UI; no network requests or telemetry in the default configuration (Router / RouterFace / embedding call the provider you configure, only after you enable them).
|
|
4
4
|
## What you get
|
|
5
5
|
|
|
6
|
-
- **
|
|
6
|
+
- **27 tools** (plus **7** panel `router_*` tools, 34 total) for session health/backup/compaction/truncation, on-demand original-text fetch, memory cards, workers (fan-out is on by default since 1.8.0; set `workers.enabled: false` to disable), and the live-session registry.
|
|
7
7
|
- A memory store at `<DSH home>/longlive-memory` (on Windows: `%USERPROFILE%\.dsh\longlive-memory`), created on first start.
|
|
8
|
-
- Optional: the separate read-only panel `@jjh32456/dsh-longlive-panel@
|
|
8
|
+
- Optional: the separate read-only panel `@jjh32456/dsh-longlive-panel@2.0.0` adds a sidebar named **潜望镜 (Periscope)**. The plugin itself ships no UI.
|
|
9
9
|
- **On by default since 1.8.0** (write side + real-time injection; added in 1.6.8): `sharedBrain.activity` writes activity rows from events (throttled to one row per key per 10 s, plus a conclusion row per turn/end) to `.longlive/board/activity.jsonl` and injects only unseen rows from other sessions (max 5 rows / 300 chars, zero tokens when nothing is new). It is independent of `presenceBus`; opt out with `sharedBrain.activity.enabled: false` and restart. All data stays in the local memoryRoot and is never uploaded.
|
|
10
10
|
- **On by default since 1.8.0** (set `false` to disable): `d2.enabled` trims oversized tool output (the full text is archived), `d6.enabled` freezes a per-task tool allowlist and registers `tool_search`. See [docs/FEATURES.md](docs/FEATURES.md) and [docs/CONFIG.md](docs/CONFIG.md) for enabling, budget and rollback.
|
|
11
11
|
|
|
12
|
+
## 2.0.0: hard gates and memory governance (released 2026-11-29)
|
|
13
|
+
|
|
14
|
+
Measured on the shipped 2.0.0 tree (commands and raw output in [docs/CLAIMS-EVIDENCE.md](docs/CLAIMS-EVIDENCE.md)): **27** longlive tools + **7** panel `router_*` tools = **34**; npm payload = **330** files (`build-info.json fileCount`); 10 breaking changes (CHANGELOG 2.0.0 section), 32 changed files = 28 existing + 4 extensions, 16 new code files, 22 file-level changes (16 code + 6 docs), 48 actions, 4 waves.
|
|
15
|
+
|
|
16
|
+
- **Hard-gate audit trail**: `.longlive/hardgate/` holds `gate-log.jsonl` (hash-chained + head), `land-log.jsonl`, `last-run.json`, `conflict-candidates.jsonl`, `procedure-candidates.jsonl`, `forget-suggestions.jsonl`, `auto-authz.jsonl`; gate decisions are the closed enum `ok / zero-hit / disabled / fail / warn / skip`.
|
|
17
|
+
- **Daily memory health (D21)**: `src/memory/memory-health.mjs` is the only producer of `<memoryRoot>/.longlive/hardgate/health-YYYY-MM-DD.json` (schema `hardgate-health/v1`, nine count groups + sources + errorCodes). Same-day recompute overwrites atomically, each file is <=64 KiB, the last 90 daily files are kept, symlinks are refused, bad JSON is never zeroed; failures only write `errorCodes` and stderr. **Wired (D21)**: `registerFeatures` registers one daily job when memoryV2 is on and a memoryRoot exists — one lightweight post-startup run, then one run per local midnight; same-day reruns are skipped and `ctx.effect` releases the timer. Failures only write `errorCodes` + stderr, never a gate event.
|
|
18
|
+
|
|
19
|
+
- **New config blocks** (profile and package template): `recall` (links, archiveFailOpen), `identityCard` (maxChars 2233 / recentBudgetChars 1161 / handoffSummary), `hardgate.catchup` (4 keys), `hardgate.conflicts` (7 keys). `archiveRoot`/`archiveStatePath` are machine paths and are not written into the template. A host restart is required; rollback is documented in [docs/ROLLBACK-MATRIX.md](docs/ROLLBACK-MATRIX.md).
|
|
20
|
+
|
|
12
21
|
## Install (3 commands)
|
|
13
22
|
|
|
14
23
|
```powershell
|
|
15
24
|
$DSH = '<DSH install>\resources\runtime\cli\bin\dsh.cmd'
|
|
16
25
|
$NODE = '<DSH install>\resources\runtime\primary-runtime\dependencies\node\bin\node.exe'
|
|
17
|
-
& $DSH plugin --profile desktop add "file:<path>/jjh32456-longlive-
|
|
26
|
+
& $DSH plugin --profile desktop add "file:<path>/jjh32456-longlive-2.0.0.tgz"
|
|
18
27
|
& $DSH plugin --profile desktop list --depth 0
|
|
19
28
|
& $NODE "$env:USERPROFILE\.dsh\profiles\desktop\node_modules\@jjh32456\longlive\scripts\longlive-doctor.mjs" --profile desktop
|
|
20
29
|
```
|
|
@@ -42,7 +51,7 @@ Fully quit and restart the host afterwards. Install from the local tgz with `plu
|
|
|
42
51
|
- Built-in identity is **neutral by default** in 1.8.0: no personal names or roles ship in the release. Define your own identity in `<memoryRoot>/IDENTITY.md`; when absent, a neutral default is used. Distillation's `who` defaults to empty and is injected only from your configuration.
|
|
43
52
|
- Shared-brain activity is **on by default since 1.8.0**: it writes and injects only inside your local memoryRoot and uploads nothing; opt out with `sharedBrain.activity.enabled: false` and restart.
|
|
44
53
|
- Shared-brain thinking is **on by default since 1.8.0, summary-level**: it injects summaries from other sessions only (no raw text, no logs), and reuses the privacy gate (`local_only` content is never written or injected); set `sharedBrain.thinkingInjection.enabled: false` to disable.
|
|
45
|
-
- The release package carries no memory store, session logs or machine paths
|
|
54
|
+
- The release package carries no memory store, session logs or machine paths.
|
|
46
55
|
- Details: [docs/PRIVACY.md](docs/PRIVACY.md).
|
|
47
56
|
|
|
48
57
|
## Boundaries
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @jjh32456/longlive(久视)
|
|
2
2
|
|
|
3
|
+
> **历史版本沿革(1.6.x / 1.8.x):以下是历史记录,不是 2.0.0 发布说明;2.0.0 口径见下文「2.0.0:硬门与记忆治理」一节。**
|
|
4
|
+
>
|
|
3
5
|
> 1.6.0 起包名由 `dsh-session-longlive` 改为 `dsh-longlive`;1.6.4 起发布名改为 scoped 包
|
|
4
6
|
> `@jjh32456/dsh-longlive`(npm 包名;2026-11-27 起改为 `@jjh32456/longlive`),显示名仍是「久视」(英文 Longlive);
|
|
5
7
|
> 1.6.3 在 1.6.0 基线上新增**热截断**(cut-only 压缩引擎,见下文「版本与边界」),这一项是 1.5.0
|
|
@@ -14,6 +16,8 @@
|
|
|
14
16
|
> 见 [docs/PRIVACY.md](docs/PRIVACY.md))、可移植性加固。质量门改用 Gate-3 V2
|
|
15
17
|
> 人类机制校准版,见 (判据文件随发布证据归档,不随发布包)。
|
|
16
18
|
|
|
19
|
+
> **计数口径注记(2026-11-29 发布收口)**:本文安装步骤已按 2.0.0 口径写作(安装命令指向 `jjh32456-longlive-2.0.0.tgz`);下文旧章节(「读完你会得到什么」「装完你会看到什么」及 Router v1.1 说明)里的 **22 个工具 / 22→26** 是 1.8.x 历史值,**保留不改**;2.0.0 实测计数为 **27 个 longlive 工具 + 7 个面板 `router_*` 工具 = 34**,详见下文 2.0.0 段。
|
|
20
|
+
|
|
17
21
|
**一句话**:一个大脑,多双手脚——把「我」从会话里搬出来,让人格与记忆长久化。
|
|
18
22
|
|
|
19
23
|
我们过去把「我」塞在一个会话里。会话一长就慢、就挤,断了就失忆;多开几个,就成了几个互不相识的自己。
|
|
@@ -51,7 +55,32 @@ longlive 的做法,是把「我」从会话里搬出来,做成一个**共享
|
|
|
51
55
|
|
|
52
56
|
每个会话是一个 `session.v4.jsonl.zstd` 日志,平时只追加、不会自己缩小。压缩过的旧事件仍占着磁盘。插件负责体检、备份、按规则回收,而不是让你手动删文件。
|
|
53
57
|
|
|
54
|
-
##
|
|
58
|
+
## 2.0.0:硬门与记忆治理(2026-11-29 发布)
|
|
59
|
+
|
|
60
|
+
> 口径:以下数字是 **2026-11-29 发布前实测**(复算命令与原始输出见 [docs/CLAIMS-EVIDENCE.md](docs/CLAIMS-EVIDENCE.md)),不是预测值。工具 = **27** 个 longlive 工具 + **7** 个面板 `router_*` 工具 = **34**;npm payload = **330** 个文件(`node scripts/pack.mjs` 写出的 `build-info.json` 里 `fileCount`)。改点口径:**32** 必改(28 既有 + 4 扩展)、新增代码 **16**、文件级 **22**(16 代码 + 6 文档)、动作 **48**、窗口 **4**、breaking **10**。
|
|
61
|
+
|
|
62
|
+
**硬门(门日志)**:新增 `src/recall/gate-log.mjs`,配合 `.longlive/hardgate/` 下的 `gate-log.jsonl`(链式 sha + head)、`land-log.jsonl`、`last-run.json`、`conflict-candidates.jsonl`、`procedure-candidates.jsonl`、`forget-suggestions.jsonl`、`auto-authz.jsonl`,把「这轮有没有落地 / 召回有没有被 gate 掉」变成可审计的行。decision 闭枚举:`ok / zero-hit / disabled / fail / warn / skip`。
|
|
63
|
+
|
|
64
|
+
**记忆治理(12 项能力,D12–D23)**:工作帧扩展、遗忘建议、冲突候选、前瞻记忆、指令加权、复习、程序候选、冷档归档、召回反馈、记忆体检、claim guard、唤醒桥。规则与边界见 [docs/FEATURES.md](docs/FEATURES.md)。
|
|
65
|
+
|
|
66
|
+
**记忆体检(D21)**:`src/memory/memory-health.mjs` 是唯一 health 生产者,每天写一份 `<memoryRoot>/.longlive/hardgate/health-YYYY-MM-DD.json`(schema `hardgate-health/v1`;九组计数 `write/inject/skip/zeroHit/distill/candidates/historical/budget/errors` + `sources` + `errorCodes`)。同日重算覆盖(tmp→fsync→rename)、单文件 ≤64 KiB、保留 90 个日文件、拒 symlink、坏 JSON 不归零;失败只写 health 文件的 errorCodes 与 stderr,不写门事件。**调度注册(D21 已接线)**:`registerFeatures` 在 memoryV2 打开且有 `memoryRoot` 时注册每日 job——启动后轻量跑一次、此后每日本地午夜一次,同日重入直接跳过;`ctx.effect` 负责释放,插件卸载不留 timer;失败只落 health 文件 `errorCodes` + stderr,不写门事件。
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
**配置(profile 与包内模板两处)**:`recall`(links、archiveFailOpen)、`identityCard`(maxChars 2233 / recentBudgetChars 1161 / handoffSummary)、`hardgate.catchup` 4 键、`hardgate.conflicts` 7 键;`archiveRoot`/`archiveStatePath` 是本机路径,不写进包内模板。改完**需重启宿主**生效;回滚=删块或整文件还原(见 [docs/ROLLBACK-MATRIX.md](docs/ROLLBACK-MATRIX.md))。
|
|
71
|
+
|
|
72
|
+
## 2.0.0 安装与发布口径(与仓库内文档 [INSTALL.md](INSTALL.md) 同门校验;npm 包不含 INSTALL.md)
|
|
73
|
+
|
|
74
|
+
- 安装核心:`& $DSH plugin --profile desktop add "file:<path-to>/jjh32456-longlive-2.0.0.tgz"`;装完重启宿主。
|
|
75
|
+
- 安装面板(可选,先装核心 2.0.0 再装面板 2.0.0):`& $DSH plugin --profile desktop add "file:<path-to>/jjh32456-dsh-longlive-panel-2.0.0.tgz"`。面板从 registry 安装时为 `& $DSH plugin --profile desktop add @jjh32456/dsh-longlive-panel@2.0.0`;它对本包的 peer 要求:peer `^2.0.0`(与核心 2.x 严格同线;旧版面板的 `^1.8.12` 兼容区间已作废,混装核心 1.8.x 会被 peer 拒绝;回滚顺序见仓库内文档 [INSTALL.md](INSTALL.md)(npm 包不含))。
|
|
76
|
+
- 发布后核心可从 registry 安装:`& $DSH plugin --profile desktop add @jjh32456/longlive@2.0.0`;卸载:`& $DSH plugin --profile desktop remove @jjh32456/longlive`。
|
|
77
|
+
- 实测计数:工具注册 34(`tools.js` 27 + `router/tools.mjs` 7);安装树 331 文件(payload 330 + build-info.json);`build-info.json` 的 fileCount = 330、files[] = 330;`package.json` 白名单 84 项;文档 23 篇;新增代码 16、新增文件级 22。
|
|
78
|
+
- 面板面:ROUTES 16、面板页签 21、PANEL_API_VERSION 3、18 个受控动作。
|
|
79
|
+
- 引擎:dsh >=0.2.0 <1.0.0,node >=20.0.0。
|
|
80
|
+
|
|
81
|
+
- 旧版口径:1.8.x 历史章节保留,数字以文首计数注记为准(历史口径不参与 2.0.0 校验)。
|
|
82
|
+
|
|
83
|
+
## 1.8.11 / 1.8.13 新功能:记忆网络 + 蒸馏 + 隐私修复(历史版本,保留)
|
|
55
84
|
|
|
56
85
|
**记忆网络(1.8.11)**:记忆卡之间可以有「关系边」了——supersedes / superseded_by /
|
|
57
86
|
deprecated_by / conflicts_with / answers_with / derived_from / mentions / same_topic 八类,
|
|
@@ -69,7 +98,7 @@ historical 卡降权 ×0.3(显式历史查询不降权),但检索层仍能
|
|
|
69
98
|
`scripts/migrate-lifecycle.mjs` 提供 `--mode plan|dry-run|apply|rollback`:apply 一次性快照原文、
|
|
70
99
|
按 apply 前行号替换、校验失败自动还原,rollback 逐字节恢复。
|
|
71
100
|
|
|
72
|
-
**隐私修复(1.8.
|
|
101
|
+
**隐私修复(1.8.13,历史版本)**:npm 包里不再包含 `lifecycle-plan.json`(真实记忆内容)与验收脚本
|
|
73
102
|
`acceptance-1.8.11.mjs`;迁移计划改由你在仓库内提供,或用 `--plan` 显式传入,或把计划放到
|
|
74
103
|
`<memoryRoot>/.longlive/lifecycle-plan.json`。迁移 CLI 找不到计划时会报 `E_PLAN_MISSING` 并给出
|
|
75
104
|
指引,不会静默跑空。
|
|
@@ -102,7 +131,7 @@ historical 卡降权 ×0.3(显式历史查询不降权),但检索层仍能
|
|
|
102
131
|
## 隐私与身份(1.8.3)
|
|
103
132
|
|
|
104
133
|
- **默认中性身份**:1.8.0 起发布包与内置提示不含具体人名/角色;身份由你在记忆根下的 `IDENTITY.md` 定义(不建文件时使用中性默认)。蒸馏的 who 字段默认空,由你显式配置注入。
|
|
105
|
-
-
|
|
134
|
+
- **隐私**:包内不含记忆库、会话日志或本机路径。
|
|
106
135
|
- **共享大脑活动流默认开启(1.8.0 起,写侧 + 实时注入)**:数据只在本机 `memoryRoot`、不上传;不想要就设 `sharedBrain.activity.enabled: false` 后重启(回到 1.6.8 默认行为)。
|
|
107
136
|
- **共享大脑 thinking 默认开启(1.8.0 起,摘要级)**:只注入其他会话的**摘要**,不写原文、不进日志;写入/注入前复用隐私门(`local_only` 不写不注入);不想要设 `sharedBrain.thinkingInjection.enabled: false` 后重启。
|
|
108
137
|
- 细节与操作步骤见 [docs/PRIVACY.md](docs/PRIVACY.md)。
|
|
@@ -126,7 +155,7 @@ $NODE = '<DSH 安装目录>\resources\runtime\primary-runtime\dependencies\node\
|
|
|
126
155
|
|
|
127
156
|
```powershell
|
|
128
157
|
# 1. 安装本地 tgz(用 plugin add,不要用 npm install)
|
|
129
|
-
& $DSH plugin --profile desktop add "file:<path>/jjh32456-longlive-
|
|
158
|
+
& $DSH plugin --profile desktop add "file:<path>/jjh32456-longlive-2.0.0.tgz"
|
|
130
159
|
|
|
131
160
|
# 2. 确认版本
|
|
132
161
|
& $DSH plugin --profile desktop list --depth 0
|
|
@@ -146,7 +175,7 @@ $NODE = '<DSH 安装目录>\resources\runtime\primary-runtime\dependencies\node\
|
|
|
146
175
|
- 记忆:`session_wake`、`memory_index`、`memory_consolidate`、`memory_reinforce`、`memory_forget`、`memory_procedure`、`memory_recall`
|
|
147
176
|
- 协作:`worker_spawn`、`worker_status`、`worker_kill`、`lease_acquire`、`lease_release`
|
|
148
177
|
- 活体巡检:`session_live_update`、`session_live_list`、`session_live_get`、`session_live_prune`
|
|
149
|
-
- **Router
|
|
178
|
+
- **Router v1.1.0 默认开启(1.8.0 起)**:`routerEnabled` 不写或给 `true` 时起后台服务(上面仍是 22 个工具);写 `false` 关闭、不建
|
|
150
179
|
`.longlive/router/`、不起定时器。显式打开后先多 4 个 `router_*`(22→26);再开
|
|
151
180
|
`routerProposalEnabled` 多 3 个(26→29)。开关与默认值见 [docs/FEATURES.md](docs/FEATURES.md)
|
|
152
181
|
和 [docs/CONFIG.md](docs/CONFIG.md),建议先只开 `routerEnabled` 观察。
|
|
@@ -155,7 +184,7 @@ $NODE = '<DSH 安装目录>\resources\runtime\primary-runtime\dependencies\node\
|
|
|
155
184
|
被裁掉的工具)。打开方式、预算与回退见 [docs/FEATURES.md](docs/FEATURES.md) 和
|
|
156
185
|
[docs/CONFIG.md](docs/CONFIG.md)。
|
|
157
186
|
- 默认记忆目录:`%USERPROFILE%\.dsh\longlive-memory`(首次启动自动创建)。
|
|
158
|
-
- **没有自带界面**。另装可选的只读面板 `@jjh32456/dsh-longlive-panel@
|
|
187
|
+
- **没有自带界面**。另装可选的只读面板 `@jjh32456/dsh-longlive-panel@2.0.0` 后,侧栏才会出现「潜望镜」(面板 2.0.0 共 21 个页签 = 14 个遗留页 + 7 个 v2 页,含六层视图、截断记录、过滤器决策、影子记录、常驻 Router、本轮想起等)。面板是独立可选包,不装就没有这个侧栏。
|
|
159
188
|
|
|
160
189
|
## 第一次使用
|
|
161
190
|
|
|
@@ -170,19 +199,21 @@ $NODE = '<DSH 安装目录>\resources\runtime\primary-runtime\dependencies\node\
|
|
|
170
199
|
| [FAQ.md](docs/FAQ.md) | 装完没反应、401/404、断电、卸载、换电脑 |
|
|
171
200
|
| [README.en.md](README.en.md) | 给英文读者的一页版 |
|
|
172
201
|
|
|
173
|
-
开发、打包与回滚细节见 [docs/DEV.md](
|
|
202
|
+
开发、打包与回滚细节见 [docs/DEV.md](docs/DEV.md)(仓库内文档,npm 包不含)。
|
|
203
|
+
|
|
204
|
+
回滚矩阵见 [docs/ROLLBACK-MATRIX.md](docs/ROLLBACK-MATRIX.md),每条能力声明的实测证据表见 [docs/CLAIMS-EVIDENCE.md](docs/CLAIMS-EVIDENCE.md)(两份都是仓库内文档,npm 包不含)。
|
|
174
205
|
|
|
175
206
|
## 1.8.3 阈值(策略 vs 可强制)
|
|
176
207
|
|
|
177
208
|
- 官方:1M 是**输入+输出共享窗口**;384K 是 `max_tokens` 上限;超限 `finish_reason=length`。
|
|
178
209
|
- 固定策略:正常预留 192K / 长输出预留 350K;input≥350K 策略折叠线;输入硬截断触发线正常 **757K**、长输出 **599K**(`input+reserve+50K ≥ 1M`,等号算超;不是硬截断);safety 50K。
|
|
179
210
|
- 可强制边界:hotTruncate.autoMinTokens=350K / autoTruncate turn-end 评估可由插件执行;主模型 `max_tokens` 不可配(仅 router face 1024),350K 只是策略预留+告警/分段提示,**不能本轮强制折叠**。
|
|
180
|
-
- 折叠后对外口径:实测中位约 **52K**(23 次压缩);目标 **84K(52–84K)**未实现(无 targetTokens),未测出前不宣称 84K
|
|
211
|
+
- 折叠后对外口径:实测中位约 **52K**(23 次压缩);目标 **84K(52–84K)**未实现(无 targetTokens),未测出前不宣称 84K。详见仓库内文档 [docs/THRESHOLDS.md](docs/THRESHOLDS.md)(npm 包不含)。
|
|
181
212
|
|
|
182
213
|
## 版本与边界
|
|
183
214
|
|
|
184
|
-
- 本套文档对应 **
|
|
185
|
-
1.6.4 起为 `@jjh32456/dsh-longlive`;1.8.
|
|
215
|
+
- 本套文档对应 **2.0.0** 的本地 tgz(1.6.0 起包名由 `dsh-session-longlive` 改为 `dsh-longlive`;
|
|
216
|
+
1.6.4 起为 `@jjh32456/dsh-longlive`;1.8.13 起为 `@jjh32456/longlive`(以上为历史版本沿革))。
|
|
186
217
|
**1.8.0 变更**:有据才答注入修复 + 来源闸(默认关闭的信心闸、证据投递修复,见
|
|
187
218
|
[docs/ANSWER-GUARD.md](docs/ANSWER-GUARD.md))、共享大脑 thinking(默认开启,仅摘要)、
|
|
188
219
|
身份默认中性([docs/PRIVACY.md](docs/PRIVACY.md))、可移植加固(node 走 `process.execPath`、
|
|
@@ -201,7 +232,7 @@ $NODE = '<DSH 安装目录>\resources\runtime\primary-runtime\dependencies\node\
|
|
|
201
232
|
降到「十几轮一刀」。**阈值与保留轮数都可调**:在 profile 的 `cordis.patch.yml` 里按
|
|
202
233
|
`- id: compaction-hot-truncate` 覆盖 `hotTruncate.autoMinTokens` / `hotTruncate.retainTurns`,
|
|
203
234
|
改完重启宿主生效(示例见 [docs/CONFIG.md](docs/CONFIG.md) §1.4a)。
|
|
204
|
-
- 包声明 `node >=20.0.0`、`dsh >=0.2.0 <1.0.0`;`@kenz1117/dsh-engram` 是可选增强,缺了只少 `engram_*` / `memory_save`,不影响
|
|
235
|
+
- 包声明 `node >=20.0.0`、`dsh >=0.2.0 <1.0.0`;`@kenz1117/dsh-engram` 是可选增强,缺了只少 `engram_*` / `memory_save`,不影响 27 个 longlive 工具(加面板 7 个 `router_*` 工具,共 34)和截断。
|
|
205
236
|
- **记忆准入过滤器(MAF)已并入,但从 1.2.0 起只是只读观测**:`filterEnabled` 默认开,启动后异步读
|
|
206
237
|
`journal/*.md` 给每条段落打分,把 remember / human / local_only 决策写进
|
|
207
238
|
`<memoryRoot>/.longlive/filter/decisions-*.jsonl`;它不调模型、不改卡片、**不拦截 `memory_*` 写入**。
|
package/SPEC.md
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
> 1.6.0–1.6.3 为 `dsh-longlive`),显示名「久视」(英文 Longlive)。原名
|
|
5
5
|
> `dsh-session-longlive`(2026-10-30 定),1.6.0 起迁移;拼写是 longlive,不是 longevity。
|
|
6
6
|
>
|
|
7
|
-
> 当前版本:**
|
|
8
|
-
> 1.8.0 共享大脑活动流与共享板状态诚实性;D2/D6 等插件功能 1.8.0 起默认开启(显式 false 关闭);1.8.11 记忆网络 + 蒸馏(edges/lifecycle/迁移 CLI);1.8.
|
|
7
|
+
> 当前版本:**2.0.0**(1.6.0 改名基座 + 1.6.3 热截断 + 1.8.3 的 350K 策略触发 / 保留 4 轮(1.6.4 历史 300k) + 1.6.7 热截断加固 + 1.8.0 有据才答/默认全开 +
|
|
8
|
+
> 1.8.0 共享大脑活动流与共享板状态诚实性;D2/D6 等插件功能 1.8.0 起默认开启(显式 false 关闭);1.8.11 记忆网络 + 蒸馏(edges/lifecycle/迁移 CLI);1.8.13 发布包修复(验收 fixture 随包、真根已迁移时验收显式拒绝、隐私清理:真实记忆计划与验收脚本不随包);2.0.0 硬门与记忆治理(D12–D23,10 条 breaking、34 工具口径:27 longlive + 7 面板 router_*);安装包 `jjh32456-longlive-2.0.0.tgz`)。
|
|
9
9
|
|
|
10
10
|
## 1.8.3 阈值(策略 vs 可强制)
|
|
11
11
|
|
|
12
12
|
- 官方:1M 是**输入+输出共享窗口**;384K 是 `max_tokens` 上限;超限 `finish_reason=length`。
|
|
13
13
|
- 固定策略:正常预留 192K / 长输出预留 350K;input≥350K 策略折叠线;输入硬截断触发线正常 **757K**、长输出 **599K**(`input+reserve+50K ≥ 1M`,等号算超);safety 50K。
|
|
14
14
|
- 可强制边界:hotTruncate.autoMinTokens=350K / autoTruncate turn-end 评估可由插件执行;主模型 `max_tokens` 不可配(仅 router face 1024),350K 只是策略预留+告警/分段提示,**不能本轮强制折叠**。
|
|
15
|
-
- 折叠后对外口径:实测中位约 **52K**(23 次压缩);目标 **84K(52–84K)**未实现(无 targetTokens),未测出前不宣称 84K
|
|
15
|
+
- 折叠后对外口径:实测中位约 **52K**(23 次压缩);目标 **84K(52–84K)**未实现(无 targetTokens),未测出前不宣称 84K。详见仓库内文档 [docs/THRESHOLDS.md](docs/THRESHOLDS.md)(npm 包不含)。
|
|
16
16
|
|
|
17
17
|
## 零、安全性承诺(2026-10-30 要求:不能出错,出错就死了)
|
|
18
18
|
|