@jjh32456/longlive 0.0.0-stage → 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 +235 -0
- package/LICENSE +21 -0
- package/QUICKSTART.md +362 -0
- package/README.en.md +64 -0
- package/README.md +256 -2
- package/SPEC.md +211 -0
- package/build-info.json +1665 -0
- package/cordis.patch.yml +208 -0
- package/docs/A1-MIGRATION.md +75 -0
- package/docs/ANSWER-GUARD.md +92 -0
- package/docs/ARCHITECTURE.md +128 -0
- package/docs/AUTO-RECALL-WIRING.md +115 -0
- package/docs/AUTO-RECALL.md +237 -0
- package/docs/CONCEPTS.md +143 -0
- package/docs/CONFIG.md +839 -0
- package/docs/ERRORS.md +271 -0
- package/docs/FAQ.md +186 -0
- package/docs/FEATURES.md +579 -0
- package/docs/INDEX-FRESHNESS.md +21 -0
- package/docs/METRICS.md +244 -0
- package/docs/MIGRATION-1.6.0.md +220 -0
- package/docs/OPERATIONS.md +439 -0
- package/docs/PANEL-INTEGRATION.md +190 -0
- package/docs/PRIVACY.md +88 -0
- package/docs/QUICKSTART.md +155 -0
- package/docs/RAW-INDEX-POLICY.md +7 -0
- package/docs/README.en.md +48 -0
- package/docs/RESIDENT-WATCHER.md +90 -0
- package/docs/SESSION-WATCH.md +214 -0
- package/docs/TOOLS.md +184 -0
- package/docs/TROUBLESHOOTING.md +329 -0
- package/icon.svg +11 -0
- package/lib/client.js +436 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +163 -4
- package/runbook.md +343 -0
- package/scripts/archive-digest-build.mjs +668 -0
- package/scripts/auto-truncate-run.ps1 +752 -0
- package/scripts/backfill-auto-cards.mjs +98 -0
- package/scripts/edges-build.mjs +1003 -0
- package/scripts/index-maintain.mjs +39 -0
- package/scripts/index-reconcile.mjs +49 -0
- package/scripts/index-status.mjs +28 -0
- package/scripts/install-resident-watcher.ps1 +15 -0
- package/scripts/install-session-watch.ps1 +332 -0
- package/scripts/install-surgery-task.ps1 +174 -0
- package/scripts/lib/auto-truncate-run.ps1 +512 -0
- package/scripts/lib/session-watch-fixture.mjs +207 -0
- package/scripts/longlive-doctor.mjs +578 -0
- package/scripts/metrics-read.mjs +79 -0
- package/scripts/metrics-sample.mjs +215 -0
- package/scripts/migrate-180.mjs +163 -0
- package/scripts/migrate-200.mjs +8 -0
- package/scripts/migrate-a1-legacy.mjs +62 -0
- package/scripts/migrate-lifecycle.mjs +157 -0
- package/scripts/pack.mjs +392 -0
- package/scripts/recall-index-build.mjs +128 -0
- package/scripts/recall-links-build.mjs +420 -0
- package/scripts/rescore-cards.mjs +36 -0
- package/scripts/resident-watcher-status.ps1 +15 -0
- package/scripts/resident-watcher.ps1 +643 -0
- package/scripts/session-watch-drill.mjs +553 -0
- package/scripts/session-watch-status.ps1 +146 -0
- package/scripts/session-watch.mjs +1367 -0
- package/scripts/surgery-inspect.mjs +122 -0
- package/scripts/surgery-run.cmd +34 -0
- package/scripts/truncate-cli.mjs +279 -0
- package/scripts/unattended-surgery.ps1 +1019 -0
- package/scripts/uninstall-resident-watcher.ps1 +15 -0
- package/scripts/uninstall-session-watch.ps1 +192 -0
- package/scripts/verify-card-anchors.mjs +138 -0
- package/scripts/watch-loop.ps1 +916 -0
- package/src/actions/audit.js +125 -0
- package/src/actions/evidence.js +122 -0
- package/src/actions/fs.js +162 -0
- package/src/activity/index.js +873 -0
- package/src/activity/model.js +351 -0
- package/src/activity/store.js +786 -0
- package/src/activity/summary.js +180 -0
- package/src/activity/thinking.js +191 -0
- package/src/adapters/constants.js +11 -0
- package/src/adapters/engram/data/aliases.json +51 -0
- package/src/adapters/engram/data/policy.json +8 -0
- package/src/adapters/engram/data/routing-rules.json +546 -0
- package/src/adapters/engram/index.js +278 -0
- package/src/adapters/registry.js +315 -0
- package/src/answer/audit.js +238 -0
- package/src/answer/claim-guard.mjs +234 -0
- package/src/answer/evidence.js +30 -0
- package/src/answer/guard.js +1370 -0
- package/src/answer/index.js +1086 -0
- package/src/answer/query.js +111 -0
- package/src/answer/second-hop.mjs +101 -0
- package/src/auto-truncate-status.js +164 -0
- package/src/auto-truncate.js +1181 -0
- package/src/autoprocedure/candidate.js +342 -0
- package/src/autoprocedure/config.js +122 -0
- package/src/autoprocedure/evidence.js +345 -0
- package/src/autoprocedure/index.js +83 -0
- package/src/autoprocedure/ledger.js +329 -0
- package/src/autoprocedure/lint.js +232 -0
- package/src/autoprocedure/llm.js +409 -0
- package/src/autoprocedure/locks.js +102 -0
- package/src/autoprocedure/paths.js +39 -0
- package/src/autoprocedure/privacy.js +87 -0
- package/src/autoprocedure/rules.js +288 -0
- package/src/autoprocedure/runtime.js +718 -0
- package/src/autoprocedure/session-reader.js +328 -0
- package/src/backup.js +310 -0
- package/src/bus/bus.mjs +1446 -0
- package/src/codec.js +269 -0
- package/src/compaction/cut-engine.js +44 -0
- package/src/compaction/engine-core.js +1237 -0
- package/src/compaction/entry.js +228 -0
- package/src/compaction.js +230 -0
- package/src/conclusion.js +366 -0
- package/src/config.js +835 -0
- package/src/d6/runtime.js +517 -0
- package/src/d6/surface.js +181 -0
- package/src/deps.js +189 -0
- package/src/engine-status.js +141 -0
- package/src/features.js +1035 -0
- package/src/handoff/index.js +1077 -0
- package/src/handoff/model.js +1058 -0
- package/src/handoff/store.js +1233 -0
- package/src/heartbeat.js +385 -0
- package/src/home.js +16 -0
- package/src/host-version.js +280 -0
- package/src/hot-truncate-diag.js +98 -0
- package/src/identity/card-marker.js +281 -0
- package/src/identity/handover.js +845 -0
- package/src/identity/index.js +337 -0
- package/src/identity/inject-position.js +133 -0
- package/src/identity/writeback.js +344 -0
- package/src/identity.js +118 -0
- package/src/index.js +647 -0
- package/src/lifecycle/gap-clocks.js +364 -0
- package/src/lifecycle/index.js +269 -0
- package/src/lifecycle/proactive.js +1426 -0
- package/src/live-target.js +212 -0
- package/src/live.js +1603 -0
- package/src/log-rotation.js +153 -0
- package/src/memory/a1-migration.js +190 -0
- package/src/memory/activity-capture.js +229 -0
- package/src/memory/anchor-fallback.js +116 -0
- package/src/memory/anchors.js +194 -0
- 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/audit-records.js +222 -0
- package/src/memory/auto-cards.js +441 -0
- package/src/memory/capture-host.js +297 -0
- package/src/memory/capture.js +496 -0
- package/src/memory/card-anchors.js +203 -0
- package/src/memory/card-priority.js +110 -0
- package/src/memory/cards.js +425 -0
- package/src/memory/catchup.mjs +534 -0
- package/src/memory/conclusion-distill.js +381 -0
- package/src/memory/conclusion-drafts.js +243 -0
- package/src/memory/conflicts.js +1060 -0
- package/src/memory/consolidate.js +834 -0
- package/src/memory/decay.js +311 -0
- package/src/memory/distill.js +485 -0
- package/src/memory/event-index.js +1826 -0
- package/src/memory/evidence-chain.js +295 -0
- package/src/memory/evidence.js +213 -0
- package/src/memory/filter-runner.js +555 -0
- package/src/memory/filter.js +1035 -0
- package/src/memory/forget-v2.js +680 -0
- package/src/memory/forget.js +531 -0
- package/src/memory/frames-activation.js +249 -0
- package/src/memory/frontmatter.js +454 -0
- package/src/memory/fts-query.js +342 -0
- package/src/memory/governance.js +604 -0
- package/src/memory/index-freshness.js +234 -0
- package/src/memory/index.js +435 -0
- package/src/memory/l2-gate.js +169 -0
- package/src/memory/land.mjs +743 -0
- package/src/memory/lifecycle.js +235 -0
- package/src/memory/lock.js +121 -0
- package/src/memory/maintenance.js +1149 -0
- package/src/memory/manifest.js +245 -0
- package/src/memory/memory-health.mjs +607 -0
- package/src/memory/migrate-200.js +1681 -0
- package/src/memory/migrate-lifecycle.js +1808 -0
- package/src/memory/migrate.js +139 -0
- package/src/memory/paths.js +229 -0
- package/src/memory/procedure-candidate.mjs +377 -0
- package/src/memory/procedure.js +982 -0
- package/src/memory/prospective-memory.mjs +362 -0
- package/src/memory/provenance.js +119 -0
- package/src/memory/recall-feedback.mjs +406 -0
- package/src/memory/recall-v2.js +218 -0
- package/src/memory/recall.js +357 -0
- package/src/memory/reconcile.js +265 -0
- package/src/memory/records.js +433 -0
- package/src/memory/reinforce.js +281 -0
- package/src/memory/retention.js +162 -0
- package/src/memory/review.js +124 -0
- package/src/memory/state.js +279 -0
- package/src/memory/tiers.js +168 -0
- package/src/memory/topic-phrases.js +73 -0
- package/src/memory/trust.js +97 -0
- package/src/memory/turn-budget.mjs +290 -0
- package/src/memory/version-chain.js +264 -0
- package/src/memory/wake-bridge.mjs +2999 -0
- package/src/memory/wal.js +137 -0
- package/src/memory/working-frame.js +779 -0
- package/src/metrics/classify.mjs +191 -0
- package/src/metrics/estimate.mjs +108 -0
- package/src/metrics/index.mjs +204 -0
- package/src/metrics/measure.mjs +462 -0
- package/src/metrics/prestep-latency.mjs +307 -0
- package/src/metrics/store.mjs +264 -0
- package/src/original.js +294 -0
- package/src/policy/threshold-policy.js +224 -0
- package/src/policy-profile.js +463 -0
- package/src/recall/anaphora.mjs +87 -0
- package/src/recall/archive-config.mjs +130 -0
- package/src/recall/archive-fallback.mjs +390 -0
- package/src/recall/archive-search.mjs +428 -0
- package/src/recall/archive-state.mjs +588 -0
- package/src/recall/brain.mjs +501 -0
- package/src/recall/cards.mjs +202 -0
- package/src/recall/current-line.mjs +110 -0
- package/src/recall/edges.js +398 -0
- package/src/recall/embedding.mjs +698 -0
- package/src/recall/entities.mjs +112 -0
- package/src/recall/explain.mjs +443 -0
- package/src/recall/force-policy.mjs +138 -0
- package/src/recall/gate-log.mjs +280 -0
- package/src/recall/gate-metrics.mjs +191 -0
- package/src/recall/index.js +1337 -0
- package/src/recall/inject-order.mjs +279 -0
- package/src/recall/link-recall.mjs +183 -0
- package/src/recall/links.mjs +696 -0
- package/src/recall/privacy.mjs +208 -0
- package/src/recall/recall-core.mjs +810 -0
- package/src/recall/shared-visibility.js +302 -0
- package/src/recall/time-normalizer.mjs +196 -0
- package/src/recall/turn-budget-inject.mjs +154 -0
- package/src/retention/cold-gate.mjs +146 -0
- package/src/retention/config.js +163 -0
- package/src/retention/index.js +801 -0
- package/src/role/activation.js +191 -0
- package/src/role/attention.js +318 -0
- package/src/role/base.js +36 -0
- package/src/role/channels.js +423 -0
- package/src/role/index.js +425 -0
- package/src/role/interfaces.js +115 -0
- package/src/role/personality.js +370 -0
- package/src/role/readers.js +151 -0
- package/src/role/relationships.js +477 -0
- package/src/role/store.js +202 -0
- package/src/role/writeprotect.js +373 -0
- package/src/router/aliases.json +182 -0
- package/src/router/background/agent-runner.mjs +239 -0
- package/src/router/background/anchor.mjs +323 -0
- package/src/router/background/audit.mjs +337 -0
- package/src/router/background/budget-ledger.mjs +648 -0
- package/src/router/background/host-sim.mjs +451 -0
- package/src/router/background/index.mjs +81 -0
- package/src/router/background/memory.mjs +63 -0
- package/src/router/background/mock-llm.mjs +203 -0
- package/src/router/background/queue.mjs +224 -0
- package/src/router/background/retry.mjs +255 -0
- package/src/router/background/router.mjs +1459 -0
- package/src/router/background/stream.mjs +276 -0
- package/src/router/background/tool-policy.mjs +255 -0
- package/src/router/design-headings.json +221 -0
- package/src/router/face/config.mjs +155 -0
- package/src/router/face/context.mjs +284 -0
- package/src/router/face/face.mjs +466 -0
- package/src/router/face/identity.mjs +130 -0
- package/src/router/face/index.mjs +65 -0
- package/src/router/face/journal.mjs +119 -0
- package/src/router/face/llm.mjs +252 -0
- package/src/router/face/outbox.mjs +153 -0
- package/src/router/face/paths.mjs +54 -0
- package/src/router/judge.mjs +987 -0
- package/src/router/policies/generic.json +131 -0
- package/src/router/route.js +1766 -0
- package/src/router/router.mjs +535 -0
- package/src/router/routing-rules.json +816 -0
- package/src/router/run-sim.mjs +530 -0
- package/src/router/runtime.js +569 -0
- package/src/router/service/apply.mjs +1218 -0
- package/src/router/service/board.mjs +712 -0
- package/src/router/service/caller.mjs +131 -0
- package/src/router/service/config.mjs +361 -0
- package/src/router/service/context.mjs +314 -0
- package/src/router/service/hint.mjs +668 -0
- package/src/router/service/lease.mjs +494 -0
- package/src/router/service/live.mjs +251 -0
- package/src/router/service/lock.mjs +550 -0
- package/src/router/service/merge.mjs +255 -0
- package/src/router/service/model-resolve.mjs +350 -0
- package/src/router/service/paths.mjs +168 -0
- package/src/router/service/proposals.mjs +1461 -0
- package/src/router/service/queue.mjs +477 -0
- package/src/router/service/reconcile.mjs +271 -0
- package/src/router/service/service.mjs +2998 -0
- package/src/router/service/sources.mjs +352 -0
- package/src/router/service/status.mjs +520 -0
- package/src/router/service/store.mjs +476 -0
- package/src/router/service/ticklock.mjs +239 -0
- package/src/router/service/tokens.mjs +95 -0
- package/src/router/service/tools.mjs +248 -0
- package/src/router/service/wake.mjs +544 -0
- package/src/router/service/wal.mjs +685 -0
- package/src/router/shadow.mjs +821 -0
- package/src/surgery-recovery.js +1909 -0
- package/src/tool-output.js +485 -0
- package/src/tools.js +3262 -0
- package/src/truncate-visible.js +2416 -0
- package/src/truncate.js +999 -0
- package/src/ui/actions.js +1312 -0
- package/src/ui/flags.js +259 -0
- package/src/ui/panel-api.js +371 -0
- package/src/ui/panel-auth.js +251 -0
- package/src/ui/panel-integrity.js +243 -0
- package/src/ui/routes-readonly.js +759 -0
- package/src/ui/routes.js +284 -0
- package/src/util/append-store.js +368 -0
- package/src/util/local-day.js +30 -0
- package/src/util/redact.js +227 -0
- package/src/util/stale-locks.js +148 -0
- package/src/version.js +99 -0
- package/test/fixtures/pre-step-container.mjs +100 -0
- package/test/p1_probe.mjs +97 -0
package/src/config.js
ADDED
|
@@ -0,0 +1,835 @@
|
|
|
1
|
+
// Host-visible configuration schema — 1.6.0 config surface.
|
|
2
|
+
//
|
|
3
|
+
// This module declares the plugin's user-facing configuration as a
|
|
4
|
+
// `schemastery` object so the Cordis loader can validate a row's `config` at
|
|
5
|
+
// activation and so schema-aware settings surfaces can describe it without a
|
|
6
|
+
// second source of truth. It is deliberately limited to the switches and
|
|
7
|
+
// limits documented in docs/CONFIG.md §1.1–1.9; Router's 50 advanced tuning
|
|
8
|
+
// keys keep their own tolerant normaliser (src/router/service/config.mjs) and
|
|
9
|
+
// are left as passthrough keys so alias migration, clamping and warning-based
|
|
10
|
+
// fallbacks are not shadowed by a schema default.
|
|
11
|
+
//
|
|
12
|
+
// The schema is optional debt, not a second runtime config read: every default
|
|
13
|
+
// below mirrors the value the 1.6.0 code already falls back to (including the
|
|
14
|
+
// 1.6.0 safety defaults: autoTruncate off/dryrun and routerRuntime off). Where
|
|
15
|
+
// the runtime distinguishes "absent" from a value (routerRuntime vs
|
|
16
|
+
// shadowEnabled, routerProvider vs providerExplicit, and the three alias-mapped
|
|
17
|
+
// router keys), the field intentionally has no default.
|
|
18
|
+
//
|
|
19
|
+
// schemastery is a host-provided peer (`@deepseek-ai/schemastery >=3.18.5 <4`;
|
|
20
|
+
// the current host ships 3.18.5). A missing peer degrades to "no Config",
|
|
21
|
+
// exactly like 1.5.0, instead of making the plugin unimportable: the packaging
|
|
22
|
+
// suite imports src/index.js from a shallow copy with no node_modules.
|
|
23
|
+
|
|
24
|
+
import { createRequire } from 'node:module';
|
|
25
|
+
import { AUTO_TRUNCATE_LOG_TOKENS, FOLD_TRIGGER_TOKENS, TRUNCATE_INPUT_HARD_CAP_NORMAL_TOKENS, TRUNCATE_INPUT_HARD_CAP_LONG_TOKENS, TRUNCATE_OUTPUT_MAX_TOKENS, TRUNCATE_SAFETY_TOKENS, TRUNCATE_RESERVE_NORMAL_TOKENS, TRUNCATE_RESERVE_LONG_TOKENS } from './policy/threshold-policy.js';
|
|
26
|
+
|
|
27
|
+
let z = null;
|
|
28
|
+
try {
|
|
29
|
+
const require = createRequire(import.meta.url);
|
|
30
|
+
const resolved = require('@deepseek-ai/schemastery');
|
|
31
|
+
z = resolved?.default ?? resolved;
|
|
32
|
+
} catch {
|
|
33
|
+
// Fall through to the ESM build (e.g. a future ESM-only peer).
|
|
34
|
+
try {
|
|
35
|
+
const imported = await import('@deepseek-ai/schemastery');
|
|
36
|
+
z = imported?.default ?? imported;
|
|
37
|
+
} catch {
|
|
38
|
+
z = null;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Whether a schemastery peer resolved at import time (test and doctor surface). */
|
|
43
|
+
export const CONFIG_SCHEMA_AVAILABLE = z !== null && typeof z?.object === 'function';
|
|
44
|
+
|
|
45
|
+
/** Chinese copy: every field's `''` fallback and the `zh` locale. */
|
|
46
|
+
const ZH = {
|
|
47
|
+
$description: '会话长寿插件的功能开关与运行参数。修改后需重启宿主生效。',
|
|
48
|
+
memoryRoot: '记忆根目录(只读展示)。显式路径必须已存在;留空则使用 <DSH home>/longlive-memory。',
|
|
49
|
+
memRoot: 'memoryRoot 的兼容别名(只读展示);两者同时设置时 memoryRoot 优先。',
|
|
50
|
+
strictMemoryRoot: '未配置 memoryRoot 时直接报错,而不是回落到推导出的默认目录。',
|
|
51
|
+
filterEnabled: '记忆准入过滤器:启动后异步分析 journal 与卡片(只读,默认开启)。',
|
|
52
|
+
shadowEnabled: '旧配置兼容位:默认路由判定已关闭;要开启请显式设 routerRuntime=shadow 或 on。',
|
|
53
|
+
autoConclusion: '结论候选池:只从 user 消息中的决定触发写 .longlive/index/conclusion-drafts.jsonl(默认开启;true=候选池模式,false=全关;assistant 不参与判定)。',
|
|
54
|
+
surgeryRecovery: '启动时检查无人值守手术的恢复报告(默认开启)。',
|
|
55
|
+
recoverOnStart: '启动时收尾或回滚未完成的可见截断事务(默认开启)。',
|
|
56
|
+
keepEvents: 'session_truncate 默认保留的事件数(默认 20000)。',
|
|
57
|
+
recentWriteWindowMs: '最近写入保护窗口;窗口内拒绝截断(默认 60000 毫秒)。',
|
|
58
|
+
heartbeatMs: '活跃会话心跳间隔(默认 15000 毫秒)。0 只关定时心跳与工具调用触发的写;turn 开始/结束仍按状态机维护 state/turn。',
|
|
59
|
+
routerEnabled: '开启 Router 路由服务:判定工具调用并按策略记录/拦截(默认开启;显式 false 关闭)。',
|
|
60
|
+
routerRuntime: '路由运行时模式:off / shadow / on(默认 off;要记录判定须显式设 shadow 或 on)。',
|
|
61
|
+
routerProvider: 'Router 使用的 provider;留空则用 deepseek-official。',
|
|
62
|
+
routerModel: 'Router 使用的模型(auto = 由宿主解析)。',
|
|
63
|
+
routerPolicyProfile: '路由策略档名,指向 src/router/policies/<name>.json(默认 generic)。',
|
|
64
|
+
routerSharedBoard: '共享大脑提示:把 board 摘要注入 agent/pre-step(默认开启;显式 false 关闭)。',
|
|
65
|
+
routerRuntimeStatePath: '路由判定记录文件路径(默认 <memoryRoot>/.longlive/router-runtime.jsonl)。',
|
|
66
|
+
routerRuntimeMaxRecords: '路由判定记录条数上限(默认 1000)。',
|
|
67
|
+
routerTickMs: 'Router 定时 tick 间隔(默认 60000 毫秒)。',
|
|
68
|
+
routerAutonomy: '路由自治级别:report / draft(默认 report)。',
|
|
69
|
+
routerHintScope: '共享板提示作用域:root / all / off(默认 root)。',
|
|
70
|
+
routerProposalEnabled: '第二道闸:允许 Router 写提案,不写工作区(默认开启;显式 false 关闭)。',
|
|
71
|
+
routerApplyEnabled: '第三道闸:允许批准后的九步写入(默认关闭)。',
|
|
72
|
+
routerL4MergeEnabled: '允许相邻小写合并(默认开启;显式 false 关闭)。',
|
|
73
|
+
routerWakeEnabled: '允许 Router 唤醒会话(默认开启;显式 false 关闭)。',
|
|
74
|
+
routerWriterLeaseMs: '写入租约时长(默认 120000 毫秒,夹取到 60000–120000)。',
|
|
75
|
+
metrics: '工作集度量(D1/D4):每轮追加一行账本;metrics:false 或 metrics.enabled:false 关闭。默认开启。',
|
|
76
|
+
embedding: '自动想起的向量索引后端;仅在 autoRecall.enabled 时透传。默认开启;本地模型不可用时静默退关键词。',
|
|
77
|
+
d2: {
|
|
78
|
+
$description: '工具输出裁剪(D2):超过上限的工具输出全文归档,只保留头尾内联。',
|
|
79
|
+
enabled: '开启 D2 工具输出裁剪(默认开启;显式 false 关闭)。',
|
|
80
|
+
maxInlineChars: '内联保留的最大字符数(默认 4096,范围 64–1000000)。',
|
|
81
|
+
headRatio: '内联预算中头部的比例(默认 0.6,范围 0.2–0.8)。',
|
|
82
|
+
skipTools: '永不裁剪的工具名(默认 ["read"])。',
|
|
83
|
+
trimErrors: '错误结果也裁剪(默认关闭)。',
|
|
84
|
+
},
|
|
85
|
+
d6: {
|
|
86
|
+
$description: '工具面裁剪(D6):第一轮冻结按任务挑选的工具清单,其余工具用 tool_search 申请。',
|
|
87
|
+
enabled: '开启 D6 工具面裁剪(默认开启;显式 false 关闭)。',
|
|
88
|
+
dryRun: '只记录判定,不实际裁剪工具面(默认关闭)。',
|
|
89
|
+
log: '输出 [d6] 决策日志(默认开启)。',
|
|
90
|
+
keepTools: '无论任务如何都保留的工具名(默认空)。',
|
|
91
|
+
},
|
|
92
|
+
autoRecall: {
|
|
93
|
+
$description: '自动想起:按轮次从记忆库召回卡片并注入上下文。',
|
|
94
|
+
enabled: '开启自动想起(默认开启;显式 false 关闭)。',
|
|
95
|
+
topK: '每次召回的最大卡片数(默认 3,范围 1–10)。',
|
|
96
|
+
budgetTokens: '每次召回的 token 预算(默认 2000,范围 200–2000)。B3 起每轮注入走字符车道:九项合计 2000 字符(≈1000 token,见 src/memory/turn-budget.mjs),召回块自身 ≤990 字符;本项同时作为字符车道上限使用(2000 字符),不再是纯 token 口径。',
|
|
97
|
+
everyNTurns: '每 N 轮召回一次(默认 6;1.8.8 起强制触发路径不再受它限制)。',
|
|
98
|
+
forceOnUserMessage: '1.8.8:每条真实用户任务消息都强制召回一次(默认 true;显式 false 完全回落 1.8.7 的按轮次/话题切换触发)。纯应答(好/嗯/继续/谢谢/收到)不触发。',
|
|
99
|
+
},
|
|
100
|
+
// 1.8.8 M2:链路学习整块按「整块 passthrough」处理——不声明 schemastery 节点(settings schema
|
|
101
|
+
// 节点数与 1.8.7 保持一致),由 src/recall/links.mjs 的 normalizeLinksConfig 从 raw config 读取,
|
|
102
|
+
// 与 proactive / handoff / tiering 的既有做法相同。
|
|
103
|
+
recall: {
|
|
104
|
+
$description: '强制召回的「一说就直连老记忆」链路层(1.8.8):种子链路直连 + 在线学习 + 归档兜底。',
|
|
105
|
+
links: {
|
|
106
|
+
$description: '词→老记忆卡的直连链路(默认开启;显式 enabled:false 关闭,行为回落 1.8.7)。',
|
|
107
|
+
enabled: '开启链路直连(默认 true):用户消息里命中词就按权重直连对应老卡。',
|
|
108
|
+
learn: '在线学习(默认 true):用户确认/否认后调整链路权重并原子写回 links.jsonl。',
|
|
109
|
+
minWeight: '触发直连的最小权重(默认 0.5)。',
|
|
110
|
+
maxCardsPerTurn: '单轮链路直连注入的最大卡片数(默认 5,上限 5)。',
|
|
111
|
+
maxCardsPerTerm: '单个词最多保留的卡片边数(默认 5)。',
|
|
112
|
+
maxTermsPerCard: '单张卡最多保留的词边数(默认 50)。',
|
|
113
|
+
decayAfterDays: '多少天未使用后开始衰减(默认 30)。',
|
|
114
|
+
decayFactor: '每个衰减周期的权重乘数(默认 0.85)。',
|
|
115
|
+
decayFloor: '衰减权重下限(默认 0.01;低于阈值的链路靠 maxEdges 淘汰)。',
|
|
116
|
+
confirmDelta: '用户确认一次加多少权重(默认 +1)。',
|
|
117
|
+
denyDelta: '用户否认一次减多少权重(默认 −1.5;≤0 即删除该边)。',
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
identityCard: {
|
|
121
|
+
$description: '身份卡:在每次对话前置注入 STATE.md 摘要。recentBudgetChars(最近三件预算,默认 1161)与 handoffSummary(交接摘要承接,默认开启)按块内非严格解析透传,不新增 schema 叶子(153 节点锁)。',
|
|
122
|
+
enabled: '开启身份卡注入(默认开启;显式 false 关闭)。',
|
|
123
|
+
path: '身份卡路径(默认 <memoryRoot>/STATE.md)。',
|
|
124
|
+
maxChars: '身份卡最多注入的字符数(默认 2233,范围 120–4000)。',
|
|
125
|
+
},
|
|
126
|
+
presenceBus: {
|
|
127
|
+
$description: '共享大脑:消费其他会话写入总线的消息。',
|
|
128
|
+
enabled: '开启共享大脑总线(默认开启;显式 false 关闭)。',
|
|
129
|
+
pollMs: '总线轮询间隔(默认 3000 毫秒;0 关闭轮询)。',
|
|
130
|
+
root: '总线根目录;留空则使用记忆根。',
|
|
131
|
+
},
|
|
132
|
+
sharedBrain: {
|
|
133
|
+
$description: '共享大脑活动流:把各会话「正在干什么」写进活动板,每轮只注入未读的新增条目。',
|
|
134
|
+
activity: {
|
|
135
|
+
$description: '活动流开关与注入预算(与 presenceBus 无关,失败静默)。',
|
|
136
|
+
enabled: '开启共享大脑活动流(默认开启;显式 false 关闭,关闭时不写活动板、不注入)。',
|
|
137
|
+
injectMaxChars: '每次注入的总字符上限,含固定头尾(默认 300,范围 60–2000)。',
|
|
138
|
+
maxItems: '每次最多注入的活动条数(默认 5,范围 1–10)。',
|
|
139
|
+
retainHours: '活动板活窗覆盖的小时数(默认 24,范围 1–720);更早的行移到 activity-YYYYMM.jsonl 月档,不删除,seq 仍可回查。',
|
|
140
|
+
recentMaxRows: '活窗行数上限护栏(默认 3200,范围 100–20000);先按时间裁、再按行数裁,裁掉的行同样进月档。',
|
|
141
|
+
summaryMaxChars: '新会话首轮(或距上次摘要满 retainHours)注入的近 24h 摘要整块上限(默认 400,范围 120–400)。',
|
|
142
|
+
},
|
|
143
|
+
thinkingInjection: '开启 thinking 摘要注入(默认开启;显式 false 关闭;需 sharedBrain.activity.enabled=true。开启后把其他会话 assistant 可见 reasoning 的首句/≤200 字符摘要注入,单次最多 5 行)。',
|
|
144
|
+
},
|
|
145
|
+
// S1(rc.7 整合线)新增段:审计与工具输出落盘的 scrub/TTL 元数据。
|
|
146
|
+
// 只新增独立块,不改任何既有配置块的语义与默认值。
|
|
147
|
+
audit: {
|
|
148
|
+
$description: '审计落盘治理(S1):answer-audit 写入前的凭据类 scrub 与 TTL 元数据;删除执行归 S5 retention,本层只标注。',
|
|
149
|
+
redact: '开启 answer-audit 写入前凭据 scrub(默认开启;显式 false 关闭;命中只影响落盘文本,不影响审计判定)。',
|
|
150
|
+
retentionDays: 'answer-audit 行的保留天数元数据(默认 30;只写 retainUntil 元数据,不做删除)。',
|
|
151
|
+
cleanStaleLocks: '启动/doctor 清理陈旧锁(默认开启;只删超过阈值的 *.lock / *.lock.tmp-*)。',
|
|
152
|
+
},
|
|
153
|
+
toolOutput: {
|
|
154
|
+
$description: 'D2 工具输出归档治理(S1):写入前凭据 scrub 与 TTL 元数据;删除执行归 S5 retention,本层只标注。',
|
|
155
|
+
redact: '开启 D2 tool-output 归档写入前凭据 scrub(默认开启;显式 false 关闭;sidecar 记录原文 sha256/长度/命中类型)。',
|
|
156
|
+
retentionDays: 'tool-output 归档的保留天数元数据(默认 90;只写 sidecar retainUntil,不做删除)。',
|
|
157
|
+
},
|
|
158
|
+
memoryV2: {
|
|
159
|
+
$description: '记忆/回忆/遗忘 v2 面板接口(M2-F 只读面 + M2-G 动作面):1.8.0 默认开启,显式 false 为独立 kill switch(关闭时行为=1.6.8)。',
|
|
160
|
+
enabled: '开启面板 API(27 条只读路由 + 18 动作 + HMAC 审计;1.8.0 默认开启,false=kill switch)。',
|
|
161
|
+
},
|
|
162
|
+
role: {
|
|
163
|
+
$description: '角色内核(v2.8 §16.3):attention queue / channel adapter / relationship graph / personality projection + 三接口;1.8.0 默认开启,显式 false 为独立 kill switch(关闭后零 hook/零 IO)。',
|
|
164
|
+
enabled: '开启角色内核(1.8.0 默认开启;设为 false = 独立 kill switch,关闭后不注册 hook、零 IO)。',
|
|
165
|
+
},
|
|
166
|
+
answerGuard: {
|
|
167
|
+
$description: '有据才答(1.8.0 默认开启):会话历史问题强制轮号引用 + 生成后审计;显式 false / DSH_LONGLIVE_DISABLE_ANSWER_GUARD 为独立 kill switch。',
|
|
168
|
+
enabled: '开启有据才答层(1.8.0 默认开启;开启后注册 pre-step 注入、系统提示短规则、turn/end 审计与 answer_audit 工具;false=kill switch)。',
|
|
169
|
+
maxEvidenceTurns: '证据包最多列出的历史轮数(默认 3,范围 1–10)。',
|
|
170
|
+
evidenceMinScore: '证据检索的最低分(默认 1.8;调低召回更多、也更容易误命中)。',
|
|
171
|
+
evidenceMaxChars: '证据包正文的最大字符数(默认 4000,范围 400–4000)。',
|
|
172
|
+
maxHistoryTurns: '证据检索最多回看的历史轮数(默认 80,范围 5–400)。',
|
|
173
|
+
systemPromptSection: '通过宿主 ctx.systemPrompt.section 注入短规则(默认开启)。',
|
|
174
|
+
injectRule: '系统提示不可用时用隐藏消息兜底注入同一段规则(默认开启)。',
|
|
175
|
+
audit: 'turn/end 写生成后审计 <memoryRoot>/.longlive/answer-audit/(默认开启;仅在 answerGuard 开启时生效)。',
|
|
176
|
+
auditMaxBytes: '审计文件轮转阈值字节数(默认 2 MiB)。',
|
|
177
|
+
auditContextChars: '审计取证上下文的最大字符数(默认 40000)。',
|
|
178
|
+
panel: '注册只读面板路由 /api/longlive/answer-audit(默认开启)。',
|
|
179
|
+
knownTools: '假执行检测认可的工具名;留空用内置宿主工具表 + 本插件 22 个工具。',
|
|
180
|
+
gate: {
|
|
181
|
+
enabled: '信心闸(M1)灰度开关:默认 false(保持 1.8.0 现状);开启后 auditTurn 做三态判定并写 gate 字段。',
|
|
182
|
+
minCoverage: '降级阈值:有事实断言的句子中带引用或【推断】标注的最低比例(默认 0.15;R3 依据 A5 真实答案 coverage 均值 0.26 下调)。',
|
|
183
|
+
requireReadable: '要求草稿引用的轮号必须在证据包轮次内且 excerpt 可回读(默认 true)。',
|
|
184
|
+
conflictPolicy: '证据冲突时的策略:degrade(默认降级)/ abstain(弃答)。',
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
retention: {
|
|
188
|
+
$description: '统一保留策略(默认关闭;打开后仍默认 dryRun,只有显式 dryRun:false 才删除):hot-truncate 按容量+天数、tool-output 按 TTL+天数+容量、index 构建产物保留最近 N 份、handoff 按天数/容量、备份历史按天/份数。',
|
|
189
|
+
enabled: '开启维护 job 的统一 retention(默认关闭;显式 true 才注册调度)。',
|
|
190
|
+
dryRun: '只打印/返回计划,不删除(默认 true;设为 false 才允许删除)。',
|
|
191
|
+
intervalMs: '维护 job 间隔毫秒(默认 86400000,范围 60000–604800000)。',
|
|
192
|
+
runOnStart: '启动时先跑一次 plan(默认 true)。',
|
|
193
|
+
hotTruncate: {
|
|
194
|
+
$description: '热截断历史层:按容量与天数清理;删除前必须校验对应卡/锚点已覆盖,未覆盖则推迟并告警。',
|
|
195
|
+
maxBytes: '容量上限字节数(默认 2147483648,即 2 GiB)。',
|
|
196
|
+
maxAgeDays: '最长保留天数(默认 14)。',
|
|
197
|
+
requireCoverage: '删除前要求卡/锚点已覆盖(默认 true;关闭只在明确风险下使用)。',
|
|
198
|
+
},
|
|
199
|
+
toolOutput: {
|
|
200
|
+
$description: '工具输出层:按天数(可配合每轮 meta.json 的 ttlDays/expiresAt)与总容量清理。',
|
|
201
|
+
maxBytes: '容量上限字节数(默认 2147483648,即 2 GiB)。',
|
|
202
|
+
maxAgeDays: '默认最长保留天数(默认 90)。',
|
|
203
|
+
},
|
|
204
|
+
indexArtifacts: {
|
|
205
|
+
$description: '.longlive/index 的 verify/build JSON 构建产物:只保留最近 N 份,绝不删 cards/events 等主文件。',
|
|
206
|
+
keep: '保留最近 N 份(默认 5,范围 1–1000)。',
|
|
207
|
+
},
|
|
208
|
+
handoff: {
|
|
209
|
+
$description: 'handoff 交付材料:按天数(默认 180)或容量清理;删除前先写归档清单,release 证据标记。',
|
|
210
|
+
maxBytes: '容量上限字节数(默认 2147483648,即 2 GiB)。',
|
|
211
|
+
maxAgeDays: '最长保留天数(默认 180)。',
|
|
212
|
+
},
|
|
213
|
+
backup: {
|
|
214
|
+
$description: '备份历史:会话备份目录按天保留,profile 快照保留最近 N 份;不碰一次性 memory 快照。',
|
|
215
|
+
sessionsRoot: '会话备份根(默认空:未配置时该层不执行;部署时用宿主注入的备份根)。',
|
|
216
|
+
sessionsDays: '会话备份保留天数(默认 14)。',
|
|
217
|
+
profileRoot: 'profile 快照根(默认空:未配置时该层不执行;部署时用宿主注入的快照根)。',
|
|
218
|
+
profileKeep: 'profile 快照保留份数(默认 7)。',
|
|
219
|
+
},
|
|
220
|
+
health: {
|
|
221
|
+
$description: '启动健康检查:.longlive 总量 vs 预算。',
|
|
222
|
+
budgetBytes: '.longlive 预算字节数(默认 8 GiB)。',
|
|
223
|
+
warnRatio: 'warn 阈值比例(默认 0.85,范围 0–1)。',
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
autoMaintenance: {
|
|
227
|
+
$description: '每日维护:本地午夜调度 consolidate 报告与 forget 候选清单。',
|
|
228
|
+
enabled: '开启每日维护(默认开启;显式 false 关闭)。',
|
|
229
|
+
consolidate: '维护时生成合并报告(默认开启)。',
|
|
230
|
+
forget: '维护时生成遗忘候选清单(默认开启)。',
|
|
231
|
+
runOnStart: '启动后立即补跑一次(默认开启)。',
|
|
232
|
+
startDelayMs: '启动后延迟毫秒数(默认 500)。',
|
|
233
|
+
},
|
|
234
|
+
// 1.8.6: 本地规则蒸馏的 procedure 候选(默认关闭;设计见 PLAN-v0.3)。
|
|
235
|
+
autoProcedure: {
|
|
236
|
+
$description: '本地规则蒸馏的 procedure 候选(默认关闭):任务结束后异步从轨迹生成四段式候选,只写 staging,系统永不自动转正;转正唯一入口是 lead 的 memory_procedure save。',
|
|
237
|
+
enabled: '开启 autoProcedure(默认关闭;关闭时零注册、零读盘、零定时器)。',
|
|
238
|
+
delayMs: '任务结束后的异步延迟毫秒数(默认 600000;真正的解析/写盘都在定时器里)。',
|
|
239
|
+
idleMs: '会话空闲判定毫秒数;turn/end 后未满该间隔则顺延(默认 60000)。',
|
|
240
|
+
minToolCalls: '一轮至少完成的工具调用数,不足不采样(默认 8)。',
|
|
241
|
+
perSessionCandidates: '每会话每个本地日最多候选数(默认 1)。',
|
|
242
|
+
dailyCandidates: '每个本地日最多候选数(默认 3)。',
|
|
243
|
+
retentionDays: '候选保留天数(默认 30;过期只在 staging 内移动或标记,绝不进 procedures/)。',
|
|
244
|
+
maxDecompressBytes: '采样时允许解压的会话文本上限(字节,默认 8 MiB;超限的会话 reject too_big 不进候选;上限 64 MiB)。',
|
|
245
|
+
llm: {
|
|
246
|
+
$description: 'B 模式(LLM 润色):显式开启才写 llm_enable_ack 账本行并调用宿主 ctx.get(\'llm\');默认关闭,A 模式零调用零探测。',
|
|
247
|
+
enabled: '开启 B 模式(默认关闭;必须显式 true)。',
|
|
248
|
+
dailyTokenBudget: 'B 模式每日 token 预算(默认 30000)。',
|
|
249
|
+
perCallTokenCap: 'B 模式单次调用 token 上限(默认 15000)。',
|
|
250
|
+
dailyLlmCalls: 'B 模式每日调用次数上限(默认 2)。',
|
|
251
|
+
},
|
|
252
|
+
},
|
|
253
|
+
routerFace: {
|
|
254
|
+
$description: '后台面(routerFace v1):定时读取共享记忆,写 journal 与建议 outbox(默认开启;显式 false 关闭)。',
|
|
255
|
+
enabled: '开启后台面(默认开启;显式 false 关闭)。',
|
|
256
|
+
tickMs: 'tick 间隔(默认 60000 毫秒,范围 30000–900000)。',
|
|
257
|
+
dailyTokenBudget: '每个本地日的 token 预算(默认 50000)。',
|
|
258
|
+
maxContextTokens: '单次组装的上下文上限(默认 30000)。',
|
|
259
|
+
dryRun: '只写 journal,不调用 LLM(默认开启)。',
|
|
260
|
+
provider: '后台面 provider;留空则沿用宿主当前 provider。',
|
|
261
|
+
model: '后台面模型(auto = 由宿主解析)。',
|
|
262
|
+
maxSuggestions: '每次最多写入 outbox 的建议条数(默认 3,范围 0–10)。',
|
|
263
|
+
},
|
|
264
|
+
autoTruncate: {
|
|
265
|
+
$description: '自动可见截断:在 turn/end 规划 log / dryrun / request(默认开启,mode=dryrun;显式 false 关闭)。',
|
|
266
|
+
enabled: '开启自动可见截断(默认开启;显式 false 关闭;开启后仍默认只 dryrun,不写会话)。',
|
|
267
|
+
mode: '模式:log / dryrun / request(旧值 apply 会被改写为 request)。',
|
|
268
|
+
tokensThreshold: '触发截断的估算 token 阈值(默认 12000000 ≈ 60MB 会话日志;这是外部日志提醒线,不是 350000 的上下文/热截断线;非 API 强制)。',
|
|
269
|
+
minTurns: '触发截断的最小轮数(默认 12,严格大于)。',
|
|
270
|
+
cooldownMinutes: '每会话冷却分钟数(默认 60)。',
|
|
271
|
+
keepTurns: '至少保留的轮数(默认 12)。',
|
|
272
|
+
keepTokens: '至少保留的估算 token 数(默认 80000)。',
|
|
273
|
+
firstUserCapChars: '携带首条用户消息的字符上限(默认 4000)。',
|
|
274
|
+
boundaryRetries: '边界不稳定时的重试次数(默认 3)。',
|
|
275
|
+
appExe: 'runner 关闭/重启的应用路径;留空使用当前进程 exe。',
|
|
276
|
+
profile: '写入 request 的 profile 标签(默认 desktop;runner 不传该参数)。',
|
|
277
|
+
// logMaxBytes / logMaxAgeDays / logMaxFiles / logRotateDaily are passthrough
|
|
278
|
+
// keys (not schema leaves) because the settings schema node count is locked.
|
|
279
|
+
},
|
|
280
|
+
hotTruncate: {
|
|
281
|
+
$description: '热截断(compaction-hot-truncate 行):只切已完成且早于保留窗口的整轮,不调 LLM。',
|
|
282
|
+
mode: '模式:off / cut / auto(默认 cut);cut 在宿主每步按阈值检查,auto 再加空闲时自动切。',
|
|
283
|
+
retainTurns: '切完保留最近 4 轮完成对话(默认 4)。',
|
|
284
|
+
retainTokens: '保留窗口的估算 token 下限(默认 8000)。',
|
|
285
|
+
autoMinTokens: '自动切达到该估算 token 数才剪(1.8.3 策略线默认 350000;手动 /compact 与溢出恢复不受此限);每次切刀都会让前缀缓存失效,下一轮全价重算。',
|
|
286
|
+
},
|
|
287
|
+
// 04 主动浮现 / 02 跨会话交接卡 / 03 热温冷分层:配置键全部走 passthrough(不声明
|
|
288
|
+
// schemastery 叶子,settings schema 节点数与 1.8.3 锁死一致 153——同 :234-235 的
|
|
289
|
+
// logMaxBytes"故意不做 leaf"先例)。schemastery 非严格解析会把未声明键合并回解析结果,
|
|
290
|
+
// 因此 normalize* 仍能从 raw config 读到整块;默认值/钳制/字面布尔语义分别由
|
|
291
|
+
// src/lifecycle/proactive.js#normalizeProactiveConfig / src/handoff/index.js#normalizeHandoffConfig
|
|
292
|
+
// / src/memory/tiers.js#normalizeTiering 负责。
|
|
293
|
+
tiering: '热温冷分层(03):mode = off / shadow / filter(默认 shadow,读取面与 1.8.3 一致);filter 时默认只放行 hot+warm,cold 需显式 tier:\'cold\' 或 tier:\'all\'。子键:mode / hotSessions / hotTurns / hotCardDays / hotCardMax / warmDays / hotDays / maxStaleHours / suppressedCap;归一化在 src/memory/tiers.js#normalizeTiering。',
|
|
294
|
+
proactive: '主动浮现(04):隔 ≥3 小时回来时注入 1 条 ≤300 字的记忆卡线索(默认关闭;开启后默认先 dry-run,只审计不注入)。子键:enabled / dryRun / minSilenceMs / topicMinScore / topicMinHits / topicMinPhraseChars / topicBudgetTokens(渲染预算,按代码点保守上界收紧 maxChars)/ maxItems(硬钳 0..1;0 = 显式关闭,零注入零额度)/ maxChars / dirs / allowFirstTurn / skipSubagents / logMaxLines。',
|
|
295
|
+
handoff: '跨会话交接卡(02):每轮 completed 结束把 目标/已结论/未决/下一步/最近动作 upsert 进源会话的 per-session 卡;新会话首轮按「cwd 门 + 存活门 + 相关性/实质门 + 续接意图(实质 + ≤60min 新鲜 + 唯一近期实质卡)+ 预算 + 认领」选 1 张,注入 ≤281 码点的隐藏消息。默认关闭(字面 enabled:true 才开启);开启后建议先 dryRun:true 只审计不注入。kill switch:DSH_LONGLIVE_DISABLE_HANDOFF=1。子键:enabled / dryRun / maxChars(128..300) / maxAgeHours(1..168) / firstTurnOnly / inject / write / decidedMax(1..3) / relevanceContainShort(0.2..0.8) / relevanceDiceLong(0.1..0.6) / intentBypass / intentFreshMinutes(10..180) / intentSemantics(unique-recent|latest;latest 需产品拍板) / maxIndexFiles(8..256) / auditWindowRows(100..2000) / privacyScan;归一化在 src/handoff/index.js#normalizeHandoffConfig。',
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
/** English copy: `en` is the locale fallback chain's base. */
|
|
299
|
+
const EN = {
|
|
300
|
+
$description: 'Session-longlive feature switches and runtime options. Changes take effect after restarting the host.',
|
|
301
|
+
memoryRoot: 'Memory root (display only). An explicit path must already exist; leave empty for <DSH home>/longlive-memory.',
|
|
302
|
+
memRoot: 'Backward-compatible alias for memoryRoot (display only); memoryRoot wins when both are set.',
|
|
303
|
+
strictMemoryRoot: 'Fail when memoryRoot is unset instead of falling back to the derived directory.',
|
|
304
|
+
filterEnabled: 'Memory-admission filter: analyses the journal and cards asynchronously at startup (read-only; on by default).',
|
|
305
|
+
shadowEnabled: 'Legacy compatibility: router evaluation is off by default; set routerRuntime=shadow or on to opt in.',
|
|
306
|
+
autoConclusion: 'Conclusion candidate pool: writes only user-authored decision triggers to .longlive/index/conclusion-drafts.jsonl (on by default; true=candidate-pool mode, false=fully off; assistant text never triggers).',
|
|
307
|
+
surgeryRecovery: 'Check the unattended-surgery recovery report at startup (on by default).',
|
|
308
|
+
recoverOnStart: 'Finish or roll back an interrupted visible-truncation transaction at startup (on by default).',
|
|
309
|
+
keepEvents: 'Default events kept by session_truncate (20000).',
|
|
310
|
+
recentWriteWindowMs: 'Recent-write guard window; truncation is refused inside it (60000 ms).',
|
|
311
|
+
heartbeatMs: 'Live-session heartbeat interval (15000 ms). 0 disables only the timer heartbeat and tool-touch writes; turn start/end still maintain state/turn.',
|
|
312
|
+
routerEnabled: 'Enable the Router service: evaluate tool calls and record/deny them by policy (on by default; explicitly false opts out).',
|
|
313
|
+
routerRuntime: 'Router runtime mode: off / shadow / on (default off; set shadow or on to record evaluations).',
|
|
314
|
+
routerProvider: 'Provider used by Router; empty means deepseek-official.',
|
|
315
|
+
routerModel: 'Model used by Router (auto = resolved by the host).',
|
|
316
|
+
routerPolicyProfile: 'Router policy profile under src/router/policies/<name>.json (generic by default).',
|
|
317
|
+
routerSharedBoard: 'Shared-board hint: inject the board digest at agent/pre-step (on by default; explicitly false opts out).',
|
|
318
|
+
routerRuntimeStatePath: 'Router-decision record path (default <memoryRoot>/.longlive/router-runtime.jsonl).',
|
|
319
|
+
routerRuntimeMaxRecords: 'Maximum router-decision records (1000).',
|
|
320
|
+
routerTickMs: 'Router tick interval (60000 ms).',
|
|
321
|
+
routerAutonomy: 'Router autonomy level: report / draft (report by default).',
|
|
322
|
+
routerHintScope: 'Shared-board hint scope: root / all / off (root by default).',
|
|
323
|
+
routerProposalEnabled: 'Second gate: allow Router to write proposals without touching the workspace (on by default; explicitly false opts out).',
|
|
324
|
+
routerApplyEnabled: 'Third gate: allow approved nine-step writes (off by default).',
|
|
325
|
+
routerL4MergeEnabled: 'Enable merging of adjacent small writes (on by default; explicitly false opts out).',
|
|
326
|
+
routerWakeEnabled: 'Allow Router to wake sessions (on by default; explicitly false opts out).',
|
|
327
|
+
routerWriterLeaseMs: 'Writer lease duration (120000 ms, clamped to 60000–120000).',
|
|
328
|
+
metrics: 'Working-set metrics (D1/D4): one ledger row per turn; `metrics: false` or `metrics.enabled: false` disables it. On by default.',
|
|
329
|
+
embedding: 'Vector-index backend for auto-recall; passed through only when autoRecall.enabled. On by default; silently falls back to keyword when the local model is unavailable.',
|
|
330
|
+
d2: {
|
|
331
|
+
$description: 'Tool-output trimming (D2): archive oversized tool results and keep only head/tail inline.',
|
|
332
|
+
enabled: 'Enable D2 tool-output trimming (on by default; explicitly false opts out).',
|
|
333
|
+
maxInlineChars: 'Maximum inline characters kept (default 4096, range 64–1000000).',
|
|
334
|
+
headRatio: 'Share of the inline budget given to the head (default 0.6, range 0.2–0.8).',
|
|
335
|
+
skipTools: 'Tool names that are never trimmed (default ["read"]).',
|
|
336
|
+
trimErrors: 'Trim error results too (off by default).',
|
|
337
|
+
},
|
|
338
|
+
d6: {
|
|
339
|
+
$description: 'Tool-surface trimming (D6): freeze a task-derived tool list at turn 1 and expose the rest through tool_search.',
|
|
340
|
+
enabled: 'Enable D6 tool-surface trimming (on by default; explicitly false opts out).',
|
|
341
|
+
dryRun: 'Log the decision without trimming the surface (off by default).',
|
|
342
|
+
log: 'Emit [d6] decision logs (on by default).',
|
|
343
|
+
keepTools: 'Tool names kept regardless of the task (empty by default).',
|
|
344
|
+
},
|
|
345
|
+
autoRecall: {
|
|
346
|
+
$description: 'Auto-recall: retrieve cards from the memory store and inject them into context every N turns.',
|
|
347
|
+
enabled: 'Enable auto-recall (on by default; explicitly false opts out).',
|
|
348
|
+
topK: 'Maximum cards per recall (default 3, range 1–10).',
|
|
349
|
+
budgetTokens: 'Token budget per recall (default 2000, range 200–2000).',
|
|
350
|
+
everyNTurns: 'Recall once every N turns (default 6; since 1.8.8 the forced path ignores it).',
|
|
351
|
+
forceOnUserMessage: '1.8.8: force one recall for every real user task message (default true; explicitly false falls back completely to the 1.8.7 turn/topic trigger). Pure acknowledgements (ok/thanks/got it) do not force.',
|
|
352
|
+
},
|
|
353
|
+
// 1.8.8 M2: the link-learning block is declared as a whole-block passthrough — no schemastery
|
|
354
|
+
// node (the settings schema node count stays identical to 1.8.7); src/recall/links.mjs
|
|
355
|
+
// normalizeLinksConfig reads it from the raw config, same as proactive / handoff / tiering.
|
|
356
|
+
recall: {
|
|
357
|
+
$description: 'Link layer for forced recall (1.8.8): seed link direct-connect + online learning + archive fallback.',
|
|
358
|
+
links: {
|
|
359
|
+
$description: 'Word→old-memory-card direct links (on by default; explicitly enabled:false falls back to 1.8.7 behaviour).',
|
|
360
|
+
enabled: 'Enable link direct-connect (default true): a word hit in the user message links its old cards by weight.',
|
|
361
|
+
learn: 'Online learning (default true): confirm/deny adjusts link weights and atomically writes links.jsonl back.',
|
|
362
|
+
minWeight: 'Minimum weight that triggers a direct link (default 0.5).',
|
|
363
|
+
maxCardsPerTurn: 'Maximum cards a single turn may link-inject (default 5, capped at 5).',
|
|
364
|
+
maxCardsPerTerm: 'Maximum card edges kept per word (default 5).',
|
|
365
|
+
maxTermsPerCard: 'Maximum word edges kept per card (default 50).',
|
|
366
|
+
decayAfterDays: 'Days without use before decay starts (default 30).',
|
|
367
|
+
decayFactor: 'Weight multiplier per decay period (default 0.85).',
|
|
368
|
+
decayFloor: 'Lower bound of the decayed weight (default 0.01; weakest edges go through maxEdges).',
|
|
369
|
+
confirmDelta: 'Weight added per user confirmation (default +1).',
|
|
370
|
+
denyDelta: 'Weight removed per user denial (default −1.5; ≤0 deletes the edge).',
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
identityCard: {
|
|
374
|
+
$description: 'Identity card: prepend a STATE.md digest at the start of the conversation. recentBudgetChars (recent-section budget, default 1161) and handoffSummary (handoff-summary carry-over, on by default) pass through the block via non-strict parsing and add no schema leaves (153-node lock).',
|
|
375
|
+
enabled: 'Enable identity-card injection (on by default; explicitly false opts out).',
|
|
376
|
+
path: 'Identity-card path (default <memoryRoot>/STATE.md).',
|
|
377
|
+
maxChars: 'Maximum characters injected (default 2233, range 120–4000).',
|
|
378
|
+
},
|
|
379
|
+
presenceBus: {
|
|
380
|
+
$description: 'Shared brain: consume messages other sessions write to the bus.',
|
|
381
|
+
enabled: 'Enable the shared-brain bus (on by default; explicitly false opts out).',
|
|
382
|
+
pollMs: 'Bus polling interval (default 3000 ms; 0 disables polling).',
|
|
383
|
+
root: 'Bus root directory; empty means the memory root.',
|
|
384
|
+
},
|
|
385
|
+
sharedBrain: {
|
|
386
|
+
$description: 'Shared-brain activity stream: one board row per turn, and only unread rows are injected.',
|
|
387
|
+
activity: {
|
|
388
|
+
$description: 'Activity-stream switches and injection budget (independent of presenceBus; failures are silent).',
|
|
389
|
+
enabled: 'Enable the shared-brain activity stream (on by default; explicitly false opts out and writes/injects nothing).',
|
|
390
|
+
injectMaxChars: 'Total characters per injection, header/footer included (default 300, range 60–2000).',
|
|
391
|
+
maxItems: 'Maximum activity rows per injection (default 5, range 1–10).',
|
|
392
|
+
retainHours: 'Live-window hours for the activity board (default 24, range 1–720); older rows move to activity-YYYYMM.jsonl, never deleted and still findable by seq.',
|
|
393
|
+
recentMaxRows: 'Live-window row guard (default 3200, range 100–20000); time trims first, then the row cap, and dropped rows also go to the monthly archive.',
|
|
394
|
+
summaryMaxChars: 'Whole-block limit for the last-24h recap injected on a new session (or once per retainHours) (default 400, range 120–400).',
|
|
395
|
+
},
|
|
396
|
+
thinkingInjection: 'Inject thinking summaries (on by default; explicitly false opts out; requires sharedBrain.activity.enabled=true). Summaries are the first sentence or ≤200 chars of other sessions\' visible reasoning, max 5 lines per injection.',
|
|
397
|
+
},
|
|
398
|
+
// S1 (rc.7 integration line): new blocks only; no existing block is modified.
|
|
399
|
+
audit: {
|
|
400
|
+
$description: 'Audit write governance (S1): credential scrub before answer-audit writes plus TTL metadata; deletion belongs to S5 retention, this layer only annotates.',
|
|
401
|
+
redact: 'Credential scrub before writing answer-audit rows (ON by default; explicitly false opts out; only affects persisted text, never the audit verdict).',
|
|
402
|
+
retentionDays: 'Retention metadata for answer-audit rows (default 30; writes retainUntil only, never deletes).',
|
|
403
|
+
cleanStaleLocks: 'Clean stale locks on startup/doctor (ON by default; only *.lock / *.lock.tmp-* older than the threshold).',
|
|
404
|
+
},
|
|
405
|
+
toolOutput: {
|
|
406
|
+
$description: 'D2 tool-output archive governance (S1): credential scrub before writes plus TTL metadata; deletion belongs to S5 retention, this layer only annotates.',
|
|
407
|
+
redact: 'Credential scrub before archiving D2 tool output (ON by default; explicitly false opts out; the sidecar records the original sha256/length/hit types).',
|
|
408
|
+
retentionDays: 'Retention metadata for D2 tool-output archives (default 90; sidecar retainUntil only, never deletes).',
|
|
409
|
+
},
|
|
410
|
+
memoryV2: {
|
|
411
|
+
$description: 'Memory/recall/forget v2 panel API (M2-F read-only face + M2-G action face): ON by default in 1.8.0; explicit false is an independent kill switch (behaviour = 1.6.8 when killed).',
|
|
412
|
+
enabled: 'Enable the panel API (27 read-only routes + 18 actions + HMAC audit; ON by default, false = kill switch).',
|
|
413
|
+
},
|
|
414
|
+
role: {
|
|
415
|
+
$description: 'Role kernel (v2.8 §16.3): attention queue / channel adapter / relationship graph / personality projection + the three interfaces; ON by default in 1.8.0, explicit false is an independent kill switch (no hooks, no IO when killed).',
|
|
416
|
+
enabled: 'Enable the role kernel (ON by default in 1.8.0; set false to kill it independently — no hooks and no IO).',
|
|
417
|
+
},
|
|
418
|
+
answerGuard: {
|
|
419
|
+
$description: 'Evidence-first answers (ON by default in 1.8.0): turn-number citations for history questions plus a post-generation audit; explicit false / DSH_LONGLIVE_DISABLE_ANSWER_GUARD is an independent kill switch.',
|
|
420
|
+
enabled: 'Enable the answer guard (ON by default in 1.8.0; enables the pre-step injection, system-prompt rule, turn/end audit and the answer_audit tool; false = kill switch).',
|
|
421
|
+
maxEvidenceTurns: 'Maximum historical turns listed in the evidence packet (default 3, range 1-10).',
|
|
422
|
+
evidenceMinScore: 'Minimum evidence-retrieval score (default 1.8; lower recalls more and is easier to mis-hit).',
|
|
423
|
+
evidenceMaxChars: 'Maximum characters of the evidence packet (default 4000, range 400-4000).',
|
|
424
|
+
maxHistoryTurns: 'Maximum historical turns scanned for evidence (default 80, range 5-400).',
|
|
425
|
+
systemPromptSection: 'Register the short rule through the host ctx.systemPrompt.section (on by default).',
|
|
426
|
+
injectRule: 'Fall back to one hidden rule message when the host has no systemPrompt.section (on by default).',
|
|
427
|
+
audit: 'Write the post-generation audit to <memoryRoot>/.longlive/answer-audit/ at turn end (on by default; only when answerGuard is enabled).',
|
|
428
|
+
auditMaxBytes: 'Audit-file rotation threshold in bytes (default 2 MiB).',
|
|
429
|
+
auditContextChars: 'Maximum grounding context stored for the audit (default 40000).',
|
|
430
|
+
panel: 'Register the read-only panel route /api/longlive/answer-audit (on by default).',
|
|
431
|
+
knownTools: 'Tool names accepted by the fake-execution check; empty uses the built-in host list plus this plugin\'s 22 tools.',
|
|
432
|
+
gate: {
|
|
433
|
+
enabled: 'Confidence gate (M1) gray switch: default false (keeps 1.8.0 behaviour); when on, auditTurn does the three-state decision and writes gate fields.',
|
|
434
|
+
minCoverage: 'Degraded threshold: minimum share of factual sentences that carry a citation or an 【推断】 mark (default 0.15; lowered in R3 because A5 real answers average 0.26).',
|
|
435
|
+
requireReadable: 'Require every cited turn number to be inside the evidence turns with a readable excerpt (default true).',
|
|
436
|
+
conflictPolicy: 'Policy on evidence conflicts: degrade (default) or abstain.',
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
retention: {
|
|
440
|
+
$description: 'Unified retention policy (off by default; even when on, dryRun stays on until explicitly disabled): hot-truncate by capacity+age, tool-output by TTL+age+capacity, index build artifacts keep newest N, handoff by age/capacity, backup history by age/count.',
|
|
441
|
+
enabled: 'Enable the unified retention maintenance job (off by default; explicitly true registers the scheduler).',
|
|
442
|
+
dryRun: 'Plan only, never delete (default true; set false to allow deletion).',
|
|
443
|
+
intervalMs: 'Maintenance interval in ms (default 86400000, range 60000-604800000).',
|
|
444
|
+
runOnStart: 'Run one plan at startup (default true).',
|
|
445
|
+
hotTruncate: {
|
|
446
|
+
$description: 'Hot-truncate history: capacity and age limits; a file is deleted only after its cut turns are covered by a card or anchor; uncovered files are postponed with a warning.',
|
|
447
|
+
maxBytes: 'Capacity limit in bytes (default 2147483648, 2 GiB).',
|
|
448
|
+
maxAgeDays: 'Maximum age in days (default 14).',
|
|
449
|
+
requireCoverage: 'Require card/anchor coverage before deletion (default true; disable only with explicit risk acceptance).',
|
|
450
|
+
},
|
|
451
|
+
toolOutput: {
|
|
452
|
+
$description: 'Tool-output layer: age (optionally per-turn meta.json ttlDays/expiresAt) plus total capacity.',
|
|
453
|
+
maxBytes: 'Capacity limit in bytes (default 2147483648, 2 GiB).',
|
|
454
|
+
maxAgeDays: 'Default maximum age in days (default 90).',
|
|
455
|
+
},
|
|
456
|
+
indexArtifacts: {
|
|
457
|
+
$description: 'verify/build JSON artifacts under .longlive/index: keep newest N; never delete cards/events or other main files.',
|
|
458
|
+
keep: 'Keep newest N artifacts (default 5, range 1-1000).',
|
|
459
|
+
},
|
|
460
|
+
handoff: {
|
|
461
|
+
$description: 'Handoff materials: age (default 180 days) or capacity; an archive manifest is written before deletion and release evidence is marked.',
|
|
462
|
+
maxBytes: 'Capacity limit in bytes (default 2147483648, 2 GiB).',
|
|
463
|
+
maxAgeDays: 'Maximum age in days (default 180).',
|
|
464
|
+
},
|
|
465
|
+
backup: {
|
|
466
|
+
$description: 'Backup history: keep session backup dirs by day and the newest N profile snapshots; one-off memory snapshots are never touched.',
|
|
467
|
+
sessionsRoot: 'Session backup root (empty by default: layer disabled until the host injects one).',
|
|
468
|
+
sessionsDays: 'Session backup retention days (default 14).',
|
|
469
|
+
profileRoot: 'Profile snapshot root (empty by default: layer disabled until the host injects one).',
|
|
470
|
+
profileKeep: 'Profile snapshots to keep (default 7).',
|
|
471
|
+
},
|
|
472
|
+
health: {
|
|
473
|
+
$description: 'Startup health check: .longlive total size vs. budget.',
|
|
474
|
+
budgetBytes: '.longlive budget in bytes (default 8 GiB).',
|
|
475
|
+
warnRatio: 'Warn threshold ratio (default 0.85, range 0-1).',
|
|
476
|
+
},
|
|
477
|
+
},
|
|
478
|
+
autoMaintenance: {
|
|
479
|
+
$description: 'Daily maintenance: schedule consolidate reports and forget candidates at local midnight.',
|
|
480
|
+
enabled: 'Enable daily maintenance (on by default; explicitly false opts out).',
|
|
481
|
+
consolidate: 'Produce a consolidate report during maintenance (on by default).',
|
|
482
|
+
forget: 'Produce a forget-candidate list during maintenance (on by default).',
|
|
483
|
+
runOnStart: 'Run once shortly after startup (on by default).',
|
|
484
|
+
startDelayMs: 'Startup delay in milliseconds (default 500).',
|
|
485
|
+
},
|
|
486
|
+
// 1.8.6: local-rule procedure candidates (off by default; see PLAN-v0.3).
|
|
487
|
+
autoProcedure: {
|
|
488
|
+
$description: 'Local-rule procedure candidates (OFF by default): after a completed turn, asynchronously distil a four-section candidate from the trace into staging only; the system never promotes a candidate — only the lead\'s memory_procedure save does.',
|
|
489
|
+
enabled: 'Enable autoProcedure (OFF by default; when off: no hooks, no disk reads, no timers).',
|
|
490
|
+
delayMs: 'Async delay after a completed turn in ms (default 600000; all parsing/writes happen in the timer).',
|
|
491
|
+
idleMs: 'Idle gate in ms; a turn/end younger than this postpones the drain (default 60000).',
|
|
492
|
+
minToolCalls: 'Minimum completed tool calls in one turn (default 8).',
|
|
493
|
+
perSessionCandidates: 'Maximum candidates per session per local day (default 1).',
|
|
494
|
+
dailyCandidates: 'Maximum candidates per local day (default 3).',
|
|
495
|
+
retentionDays: 'Candidate retention in days (default 30; expiry only moves/marks inside staging, never procedures/).',
|
|
496
|
+
maxDecompressBytes: 'Decompressed session-text cap in bytes for sampling (default 8 MiB; a larger session is rejected with reason too_big and yields no candidate; hard cap 64 MiB).',
|
|
497
|
+
llm: {
|
|
498
|
+
$description: 'B mode (LLM polishing): only an explicit enable writes the llm_enable_ack row and calls the host ctx.get(\'llm\'); OFF by default, A mode makes zero calls and zero provider probes.',
|
|
499
|
+
enabled: 'Enable B mode (OFF by default; must be explicit true).',
|
|
500
|
+
dailyTokenBudget: 'B-mode daily token budget (default 30000).',
|
|
501
|
+
perCallTokenCap: 'B-mode per-call token cap (default 15000).',
|
|
502
|
+
dailyLlmCalls: 'B-mode daily call cap (default 2).',
|
|
503
|
+
},
|
|
504
|
+
},
|
|
505
|
+
routerFace: {
|
|
506
|
+
$description: 'Background face (routerFace v1): read shared memory on a timer and write a journal and suggestion outbox (on by default; explicitly false opts out).',
|
|
507
|
+
enabled: 'Enable the background face (on by default; explicitly false opts out).',
|
|
508
|
+
tickMs: 'Tick interval (default 60000 ms, range 30000–900000).',
|
|
509
|
+
dailyTokenBudget: 'Token budget per local day (default 50000).',
|
|
510
|
+
maxContextTokens: 'Context cap per assembly (default 30000).',
|
|
511
|
+
dryRun: 'Write the journal only; do not call the LLM (on by default).',
|
|
512
|
+
provider: 'Provider for the background face; empty uses the host current provider.',
|
|
513
|
+
model: 'Model for the background face (auto = resolved by the host).',
|
|
514
|
+
maxSuggestions: 'Maximum suggestions written to the outbox (default 3, range 0–10).',
|
|
515
|
+
},
|
|
516
|
+
autoTruncate: {
|
|
517
|
+
$description: 'Automatic visible truncation: plan log / dryrun / request at turn end (off by default in 1.6.0, mode=dryrun).',
|
|
518
|
+
enabled: 'Enable automatic visible truncation (on by default; explicitly false opts out; even when enabled it only dry-runs unless you change mode).',
|
|
519
|
+
mode: 'Mode: log / dryrun / request (the legacy value apply is rewritten to request).',
|
|
520
|
+
tokensThreshold: 'Estimated-token threshold that triggers truncation (default 12000000 ≈ 60MB session log; this is the external-log notice line, NOT the 350000 model-context line; not API-enforced).',
|
|
521
|
+
minTurns: 'Minimum turns before truncation may trigger (default 12, strictly greater).',
|
|
522
|
+
cooldownMinutes: 'Per-session cooldown in minutes (default 60).',
|
|
523
|
+
keepTurns: 'Minimum turns kept (default 12).',
|
|
524
|
+
keepTokens: 'Minimum estimated tokens kept (default 80000).',
|
|
525
|
+
firstUserCapChars: 'Cap for the carried first user message (default 4000).',
|
|
526
|
+
boundaryRetries: 'Retries when the boundary is unstable (default 3).',
|
|
527
|
+
appExe: 'Application path the runner closes/restarts; empty uses the current process executable.',
|
|
528
|
+
profile: 'Profile label written into the request (default desktop; the runner does not pass it).',
|
|
529
|
+
},
|
|
530
|
+
hotTruncate: {
|
|
531
|
+
$description: 'Hot truncate (compaction-hot-truncate row): cuts only completed turns older than the retention window, with no LLM call.',
|
|
532
|
+
mode: 'Mode: off / cut / auto (cut by default); cut is checked each step, auto also cuts at idle.',
|
|
533
|
+
retainTurns: 'Keep the last 4 completed turns after a cut (default 4).',
|
|
534
|
+
retainTokens: 'Minimum estimated tokens kept in the retention window (default 8000).',
|
|
535
|
+
autoMinTokens: 'Automatic cuts happen only once the estimated token count reaches this value (1.8.3 policy default 350000; manual /compact and overflow recovery ignore it); every cut invalidates the prefix cache, so the next turn re-bills at full price.',
|
|
536
|
+
},
|
|
537
|
+
tiering: 'Recall tiers (03): mode = off / shadow / filter (default shadow; reads match 1.8.3). In filter mode only hot+warm are visible by default; pass tier:\'cold\' or tier:\'all\' to search cold turns. Keys: mode / hotSessions / hotTurns / hotCardDays / hotCardMax / warmDays / hotDays / maxStaleHours / suppressedCap; normalised in src/memory/tiers.js#normalizeTiering.',
|
|
538
|
+
proactive: 'Proactive surface (04): after a >=3h silence, inject one <=300-char memory-card clue (off by default; when enabled it first runs in dry-run and only audits). Keys: enabled / dryRun / minSilenceMs / topicMinScore / topicMinHits / topicMinPhraseChars / topicBudgetTokens (render budget; a conservative code-point ceiling applied to maxChars) / maxItems (clamped 0..1; 0 = explicitly off: no injection, no quota) / maxChars / dirs / allowFirstTurn / skipSubagents / logMaxLines.',
|
|
539
|
+
handoff: 'Cross-session handoff card (02): after every completed turn, upsert goal/decided/open/next/last-action into the source session latest card; on a new session\'s first step pick one card through cwd gate + liveness gate + relevance/substance gate + continuation intent (substantive + <=60min fresh + unique recent substantive card) + budget + claim, then inject one hidden <=281-code-point message. Off by default (only a literal enabled:true turns it on); enable dryRun:true first to audit without injecting. Kill switch: DSH_LONGLIVE_DISABLE_HANDOFF=1. Keys: enabled / dryRun / maxChars(128..300) / maxAgeHours(1..168) / firstTurnOnly / inject / write / decidedMax(1..3) / relevanceContainShort(0.2..0.8) / relevanceDiceLong(0.1..0.6) / intentBypass / intentFreshMinutes(10..180) / intentSemantics(unique-recent|latest; latest needs sign-off) / maxIndexFiles(8..256) / auditWindowRows(100..2000) / privacyScan; normalised in src/handoff/index.js#normalizeHandoffConfig.',
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
function schemaOf() {
|
|
543
|
+
const d2 = z.object({
|
|
544
|
+
enabled: z.boolean().default(true).description(ZH.d2.enabled),
|
|
545
|
+
maxInlineChars: z.number().default(4096).description(ZH.d2.maxInlineChars),
|
|
546
|
+
headRatio: z.number().default(0.6).description(ZH.d2.headRatio),
|
|
547
|
+
skipTools: z.array(z.string()).default(['read']).description(ZH.d2.skipTools),
|
|
548
|
+
trimErrors: z.boolean().default(false).description(ZH.d2.trimErrors),
|
|
549
|
+
}).collapse();
|
|
550
|
+
|
|
551
|
+
const d6 = z.object({
|
|
552
|
+
enabled: z.boolean().default(true).description(ZH.d6.enabled),
|
|
553
|
+
dryRun: z.boolean().default(false).description(ZH.d6.dryRun),
|
|
554
|
+
log: z.boolean().default(true).description(ZH.d6.log),
|
|
555
|
+
keepTools: z.array(z.string()).default([]).description(ZH.d6.keepTools),
|
|
556
|
+
}).collapse();
|
|
557
|
+
|
|
558
|
+
const autoRecall = z.object({
|
|
559
|
+
enabled: z.boolean().default(true).description(ZH.autoRecall.enabled),
|
|
560
|
+
topK: z.number().default(3).description(ZH.autoRecall.topK),
|
|
561
|
+
budgetTokens: z.number().default(2000).description(ZH.autoRecall.budgetTokens),
|
|
562
|
+
everyNTurns: z.number().default(6).description(ZH.autoRecall.everyNTurns),
|
|
563
|
+
}).collapse();
|
|
564
|
+
|
|
565
|
+
// M05(DESIGN §8 C):maxChars 默认对齐生产契约 2233。recentBudgetChars / handoffSummary
|
|
566
|
+
// 不声明 schemastery 叶子:settings schema 节点数与 1.8.3 锁死一致 153;schemastery
|
|
567
|
+
// 非严格解析会把块内未声明键合并回解析结果(test/config-schema.test.mjs「未知键保留」)。
|
|
568
|
+
const identityCard = z.object({
|
|
569
|
+
enabled: z.boolean().default(true).description(ZH.identityCard.enabled),
|
|
570
|
+
path: z.string().default('<memoryRoot>/STATE.md').description(ZH.identityCard.path),
|
|
571
|
+
maxChars: z.number().default(2233).description(ZH.identityCard.maxChars),
|
|
572
|
+
}).collapse();
|
|
573
|
+
|
|
574
|
+
const presenceBus = z.object({
|
|
575
|
+
enabled: z.boolean().default(true).description(ZH.presenceBus.enabled),
|
|
576
|
+
pollMs: z.number().default(3000).description(ZH.presenceBus.pollMs),
|
|
577
|
+
root: z.string().description(ZH.presenceBus.root),
|
|
578
|
+
}).collapse();
|
|
579
|
+
|
|
580
|
+
const sharedBrain = z.object({
|
|
581
|
+
activity: z.object({
|
|
582
|
+
enabled: z.boolean().default(true).description(ZH.sharedBrain.activity.enabled),
|
|
583
|
+
injectMaxChars: z.number().default(300).description(ZH.sharedBrain.activity.injectMaxChars),
|
|
584
|
+
maxItems: z.number().default(5).description(ZH.sharedBrain.activity.maxItems),
|
|
585
|
+
// 1.8.8 M3 live window: time first, row cap as the guard; recap budget separate.
|
|
586
|
+
retainHours: z.number().default(24).description(ZH.sharedBrain.activity.retainHours),
|
|
587
|
+
recentMaxRows: z.number().default(3200).description(ZH.sharedBrain.activity.recentMaxRows),
|
|
588
|
+
summaryMaxChars: z.number().default(400).description(ZH.sharedBrain.activity.summaryMaxChars),
|
|
589
|
+
}).collapse(),
|
|
590
|
+
thinkingInjection: z.boolean().default(true).description(ZH.sharedBrain.thinkingInjection),
|
|
591
|
+
}).collapse();
|
|
592
|
+
|
|
593
|
+
const memoryV2 = z.object({
|
|
594
|
+
enabled: z.boolean().default(true).description(ZH.memoryV2.enabled),
|
|
595
|
+
}).collapse().description(ZH.memoryV2.$description);
|
|
596
|
+
|
|
597
|
+
// v2.8 §16.3 角色内核:1.8.0 默认 ON(任务:功能必须真的跑起来);显式 false 是
|
|
598
|
+
// 独立 kill switch。子开关走代码默认(normalizeRoleConfig,默认全开),不放大 Config 节点数。
|
|
599
|
+
const role = z.object({
|
|
600
|
+
enabled: z.boolean().default(true).description(ZH.role.enabled),
|
|
601
|
+
}).collapse().description(ZH.role.$description);
|
|
602
|
+
|
|
603
|
+
const autoMaintenance = z.object({
|
|
604
|
+
enabled: z.boolean().default(true).description(ZH.autoMaintenance.enabled),
|
|
605
|
+
consolidate: z.boolean().default(true).description(ZH.autoMaintenance.consolidate),
|
|
606
|
+
forget: z.boolean().default(true).description(ZH.autoMaintenance.forget),
|
|
607
|
+
runOnStart: z.boolean().default(true).description(ZH.autoMaintenance.runOnStart),
|
|
608
|
+
startDelayMs: z.number().default(500).description(ZH.autoMaintenance.startDelayMs),
|
|
609
|
+
}).collapse();
|
|
610
|
+
|
|
611
|
+
const routerFace = z.object({
|
|
612
|
+
enabled: z.boolean().default(true).description(ZH.routerFace.enabled),
|
|
613
|
+
tickMs: z.number().default(60000).description(ZH.routerFace.tickMs),
|
|
614
|
+
dailyTokenBudget: z.number().default(50000).description(ZH.routerFace.dailyTokenBudget),
|
|
615
|
+
maxContextTokens: z.number().default(30000).description(ZH.routerFace.maxContextTokens),
|
|
616
|
+
dryRun: z.boolean().default(true).description(ZH.routerFace.dryRun),
|
|
617
|
+
provider: z.string().default('').description(ZH.routerFace.provider),
|
|
618
|
+
model: z.string().default('auto').description(ZH.routerFace.model),
|
|
619
|
+
maxSuggestions: z.number().default(3).description(ZH.routerFace.maxSuggestions),
|
|
620
|
+
}).collapse();
|
|
621
|
+
|
|
622
|
+
const autoTruncate = z.object({
|
|
623
|
+
enabled: z.boolean().default(true).description(ZH.autoTruncate.enabled),
|
|
624
|
+
mode: z.string().default('dryrun').description(ZH.autoTruncate.mode),
|
|
625
|
+
tokensThreshold: z.number().default(AUTO_TRUNCATE_LOG_TOKENS).description(ZH.autoTruncate.tokensThreshold),
|
|
626
|
+
minTurns: z.number().default(12).description(ZH.autoTruncate.minTurns),
|
|
627
|
+
cooldownMinutes: z.number().default(60).description(ZH.autoTruncate.cooldownMinutes),
|
|
628
|
+
keepTurns: z.number().default(12).description(ZH.autoTruncate.keepTurns),
|
|
629
|
+
keepTokens: z.number().default(80000).description(ZH.autoTruncate.keepTokens),
|
|
630
|
+
firstUserCapChars: z.number().default(4000).description(ZH.autoTruncate.firstUserCapChars),
|
|
631
|
+
boundaryRetries: z.number().default(3).description(ZH.autoTruncate.boundaryRetries),
|
|
632
|
+
appExe: z.string().default('').description(ZH.autoTruncate.appExe),
|
|
633
|
+
profile: z.string().default('desktop').description(ZH.autoTruncate.profile),
|
|
634
|
+
// Log rotation knobs intentionally stay as passthrough keys rather than
|
|
635
|
+
// schema leaves: the settings schema is snapshot-locked (113 nodes), while
|
|
636
|
+
// normalizeAutoTruncateConfig() reads and validates these keys when present.
|
|
637
|
+
// Defaults live in AUTO_TRUNCATE_DEFAULTS and are documented in docs/CONFIG.md.
|
|
638
|
+
}).collapse();
|
|
639
|
+
|
|
640
|
+
// Hot truncate lives on the separate `compaction-hot-truncate` row, but the
|
|
641
|
+
// engine accepts the same `hotTruncate` block; mirror its defaults here so a
|
|
642
|
+
// schema-aware settings surface documents the engine's contract instead of
|
|
643
|
+
// letting a second, drifted copy of 6 turns / 30k tokens circulate.
|
|
644
|
+
const hotTruncate = z.object({
|
|
645
|
+
mode: z.string().default('cut').description(ZH.hotTruncate.mode),
|
|
646
|
+
retainTurns: z.number().default(4).description(ZH.hotTruncate.retainTurns),
|
|
647
|
+
retainTokens: z.number().default(8000).description(ZH.hotTruncate.retainTokens),
|
|
648
|
+
autoMinTokens: z.number().default(350000).description(ZH.hotTruncate.autoMinTokens),
|
|
649
|
+
}).collapse();
|
|
650
|
+
|
|
651
|
+
// 1.8.6 autoProcedure: 默认关闭的独立配置树。所有叶子都带默认值,归一化器
|
|
652
|
+
// (src/autoprocedure/config.js) 会再校验一次范围;这里只负责宿主可见的 schema。
|
|
653
|
+
const autoProcedureLlm = z.object({
|
|
654
|
+
enabled: z.boolean().default(false).description(ZH.autoProcedure.llm.enabled),
|
|
655
|
+
dailyTokenBudget: z.number().default(30000).description(ZH.autoProcedure.llm.dailyTokenBudget),
|
|
656
|
+
perCallTokenCap: z.number().default(15000).description(ZH.autoProcedure.llm.perCallTokenCap),
|
|
657
|
+
dailyLlmCalls: z.number().default(2).description(ZH.autoProcedure.llm.dailyLlmCalls),
|
|
658
|
+
}).collapse().description(ZH.autoProcedure.llm.$description);
|
|
659
|
+
|
|
660
|
+
const autoProcedure = z.object({
|
|
661
|
+
enabled: z.boolean().default(false).description(ZH.autoProcedure.enabled),
|
|
662
|
+
delayMs: z.number().default(600000).description(ZH.autoProcedure.delayMs),
|
|
663
|
+
idleMs: z.number().default(60000).description(ZH.autoProcedure.idleMs),
|
|
664
|
+
minToolCalls: z.number().default(8).description(ZH.autoProcedure.minToolCalls),
|
|
665
|
+
perSessionCandidates: z.number().default(1).description(ZH.autoProcedure.perSessionCandidates),
|
|
666
|
+
dailyCandidates: z.number().default(3).description(ZH.autoProcedure.dailyCandidates),
|
|
667
|
+
retentionDays: z.number().default(30).description(ZH.autoProcedure.retentionDays),
|
|
668
|
+
maxDecompressBytes: z.number().default(8388608).description(ZH.autoProcedure.maxDecompressBytes),
|
|
669
|
+
llm: autoProcedureLlm,
|
|
670
|
+
}).collapse().description(ZH.autoProcedure.$description);
|
|
671
|
+
|
|
672
|
+
// 1.8.3 fold/truncate are separate concepts and separate config namespaces.
|
|
673
|
+
const fold = z.object({
|
|
674
|
+
triggerTokens: z.number().default(FOLD_TRIGGER_TOKENS).description('折叠策略线(token):达到即请求宿主 compaction;插件不能 pre-step 强制本轮折叠。默认 350000。'),
|
|
675
|
+
}).collapse();
|
|
676
|
+
const truncate = z.object({
|
|
677
|
+
inputHardCapNormal: z.number().default(TRUNCATE_INPUT_HARD_CAP_NORMAL_TOKENS).description('输入硬截断触发线(正常输出预留):input+reserve+safety >= 1M,等号算超;默认 757000。'),
|
|
678
|
+
inputHardCapLongOutput: z.number().default(TRUNCATE_INPUT_HARD_CAP_LONG_TOKENS).description('输入硬截断触发线(长输出预留):默认 599000。'),
|
|
679
|
+
outputMaxTokens: z.number().default(TRUNCATE_OUTPUT_MAX_TOKENS).description('输出策略上限/告警值(宿主不可配,不是 API 强制):默认 350000。'),
|
|
680
|
+
safetyTokens: z.number().default(TRUNCATE_SAFETY_TOKENS).description('共享窗口 safety 预留:默认 50000。'),
|
|
681
|
+
reserveNormal: z.number().default(TRUNCATE_RESERVE_NORMAL_TOKENS).description('正常输出 reserve:默认 192000。'),
|
|
682
|
+
reserveLongOutput: z.number().default(TRUNCATE_RESERVE_LONG_TOKENS).description('长输出 reserve:默认 350000;input>=350K 默认取此档。'),
|
|
683
|
+
}).collapse();
|
|
684
|
+
|
|
685
|
+
const answerGuardGate = z.object({
|
|
686
|
+
enabled: z.boolean().default(false).description(ZH.answerGuard.gate.enabled),
|
|
687
|
+
minCoverage: z.number().default(0.15).description(ZH.answerGuard.gate.minCoverage),
|
|
688
|
+
requireReadable: z.boolean().default(true).description(ZH.answerGuard.gate.requireReadable),
|
|
689
|
+
conflictPolicy: z.string().default('degrade').description(ZH.answerGuard.gate.conflictPolicy),
|
|
690
|
+
}).collapse();
|
|
691
|
+
|
|
692
|
+
const answerGuard = z.object({
|
|
693
|
+
enabled: z.boolean().default(true).description(ZH.answerGuard.enabled),
|
|
694
|
+
maxEvidenceTurns: z.number().default(3).description(ZH.answerGuard.maxEvidenceTurns),
|
|
695
|
+
evidenceMinScore: z.number().default(1.8).description(ZH.answerGuard.evidenceMinScore),
|
|
696
|
+
evidenceMaxChars: z.number().default(4000).description(ZH.answerGuard.evidenceMaxChars),
|
|
697
|
+
maxHistoryTurns: z.number().default(80).description(ZH.answerGuard.maxHistoryTurns),
|
|
698
|
+
systemPromptSection: z.boolean().default(true).description(ZH.answerGuard.systemPromptSection),
|
|
699
|
+
injectRule: z.boolean().default(true).description(ZH.answerGuard.injectRule),
|
|
700
|
+
audit: z.boolean().default(true).description(ZH.answerGuard.audit),
|
|
701
|
+
auditMaxBytes: z.number().default(2097152).description(ZH.answerGuard.auditMaxBytes),
|
|
702
|
+
auditContextChars: z.number().default(40000).description(ZH.answerGuard.auditContextChars),
|
|
703
|
+
panel: z.boolean().default(true).description(ZH.answerGuard.panel),
|
|
704
|
+
knownTools: z.array(z.string()).description(ZH.answerGuard.knownTools),
|
|
705
|
+
gate: answerGuardGate,
|
|
706
|
+
}).collapse();
|
|
707
|
+
|
|
708
|
+
// S1(rc.7 整合线)新增段位:audit / toolOutput 独立配置块。
|
|
709
|
+
// 只新增字段,不改任何既有块;删除执行归 S5 retention,这里只写 TTL 元数据。
|
|
710
|
+
const audit = z.object({
|
|
711
|
+
redact: z.boolean().default(true).description(ZH.audit.redact),
|
|
712
|
+
retentionDays: z.number().default(30).description(ZH.audit.retentionDays),
|
|
713
|
+
cleanStaleLocks: z.boolean().default(true).description(ZH.audit.cleanStaleLocks),
|
|
714
|
+
}).collapse();
|
|
715
|
+
|
|
716
|
+
const toolOutput = z.object({
|
|
717
|
+
redact: z.boolean().default(true).description(ZH.toolOutput.redact),
|
|
718
|
+
retentionDays: z.number().default(90).description(ZH.toolOutput.retentionDays),
|
|
719
|
+
}).collapse();
|
|
720
|
+
|
|
721
|
+
const retention = z.object({
|
|
722
|
+
enabled: z.boolean().default(false).description(ZH.retention.enabled),
|
|
723
|
+
dryRun: z.boolean().default(true).description(ZH.retention.dryRun),
|
|
724
|
+
intervalMs: z.number().default(86400000).description(ZH.retention.intervalMs),
|
|
725
|
+
// 批 C(M25):启动瞬间不跑清理;先门禁(冷档校验 + approve)再执行。
|
|
726
|
+
runOnStart: z.boolean().default(false).description(ZH.retention.runOnStart),
|
|
727
|
+
hotTruncate: z.object({
|
|
728
|
+
maxBytes: z.number().default(2147483648).description(ZH.retention.hotTruncate.maxBytes),
|
|
729
|
+
maxAgeDays: z.number().default(14).description(ZH.retention.hotTruncate.maxAgeDays),
|
|
730
|
+
requireCoverage: z.boolean().default(true).description(ZH.retention.hotTruncate.requireCoverage),
|
|
731
|
+
}).collapse(),
|
|
732
|
+
toolOutput: z.object({
|
|
733
|
+
maxBytes: z.number().default(2147483648).description(ZH.retention.toolOutput.maxBytes),
|
|
734
|
+
maxAgeDays: z.number().default(90).description(ZH.retention.toolOutput.maxAgeDays),
|
|
735
|
+
}).collapse(),
|
|
736
|
+
indexArtifacts: z.object({
|
|
737
|
+
keep: z.number().default(5).description(ZH.retention.indexArtifacts.keep),
|
|
738
|
+
}).collapse(),
|
|
739
|
+
handoff: z.object({
|
|
740
|
+
maxBytes: z.number().default(2147483648).description(ZH.retention.handoff.maxBytes),
|
|
741
|
+
maxAgeDays: z.number().default(180).description(ZH.retention.handoff.maxAgeDays),
|
|
742
|
+
}).collapse(),
|
|
743
|
+
backup: z.object({
|
|
744
|
+
sessionsRoot: z.string().default('').description(ZH.retention.backup.sessionsRoot),
|
|
745
|
+
sessionsDays: z.number().default(14).description(ZH.retention.backup.sessionsDays),
|
|
746
|
+
profileRoot: z.string().default('').description(ZH.retention.backup.profileRoot),
|
|
747
|
+
profileKeep: z.number().default(7).description(ZH.retention.backup.profileKeep),
|
|
748
|
+
}).collapse(),
|
|
749
|
+
health: z.object({
|
|
750
|
+
budgetBytes: z.number().default(8589934592).description(ZH.retention.health.budgetBytes),
|
|
751
|
+
warnRatio: z.number().default(0.85).description(ZH.retention.health.warnRatio),
|
|
752
|
+
}).collapse(),
|
|
753
|
+
}).collapse();
|
|
754
|
+
|
|
755
|
+
return z.object({
|
|
756
|
+
memoryRoot: z.string().description(ZH.memoryRoot).disabled(),
|
|
757
|
+
memRoot: z.string().description(ZH.memRoot).disabled(),
|
|
758
|
+
strictMemoryRoot: z.boolean().default(false).description(ZH.strictMemoryRoot),
|
|
759
|
+
filterEnabled: z.boolean().default(true).description(ZH.filterEnabled),
|
|
760
|
+
shadowEnabled: z.boolean().default(true).description(ZH.shadowEnabled),
|
|
761
|
+
autoConclusion: z.boolean().default(true).description(ZH.autoConclusion),
|
|
762
|
+
conclusionDraft: z.object({
|
|
763
|
+
ttlDays: z.number().default(30).description('A1 候选池未蒸馏过期天数(默认 30;过期移入 .longlive/archive/conclusion-drafts/,不删)。'),
|
|
764
|
+
}).description('A1 结论候选池:原料先落盘,蒸馏后才可进召回面。'),
|
|
765
|
+
conclusionDistill: z.object({
|
|
766
|
+
enabled: z.boolean().default(true).description('维护周期是否把 pending A1 候选蒸馏进 topics/(默认开启)。'),
|
|
767
|
+
}).description('A1 候选蒸馏开关;enabled=false 时 A1 仍写候选池,只是不蒸馏。'),
|
|
768
|
+
surgeryRecovery: z.boolean().default(true).description(ZH.surgeryRecovery),
|
|
769
|
+
recoverOnStart: z.boolean().default(true).description(ZH.recoverOnStart),
|
|
770
|
+
keepEvents: z.number().default(20000).description(ZH.keepEvents),
|
|
771
|
+
recentWriteWindowMs: z.number().default(60000).description(ZH.recentWriteWindowMs),
|
|
772
|
+
heartbeatMs: z.number().default(15000).description(ZH.heartbeatMs),
|
|
773
|
+
|
|
774
|
+
routerEnabled: z.boolean().default(true).description(ZH.routerEnabled),
|
|
775
|
+
routerRuntime: z.string().description(ZH.routerRuntime),
|
|
776
|
+
routerProvider: z.string().description(ZH.routerProvider),
|
|
777
|
+
routerModel: z.string().default('auto').description(ZH.routerModel),
|
|
778
|
+
routerPolicyProfile: z.string().default('generic').description(ZH.routerPolicyProfile),
|
|
779
|
+
routerSharedBoard: z.boolean().default(true).description(ZH.routerSharedBoard),
|
|
780
|
+
routerRuntimeStatePath: z.string().description(ZH.routerRuntimeStatePath),
|
|
781
|
+
routerRuntimeMaxRecords: z.number().default(1000).description(ZH.routerRuntimeMaxRecords),
|
|
782
|
+
routerTickMs: z.number().default(60000).description(ZH.routerTickMs),
|
|
783
|
+
routerAutonomy: z.string().default('report').description(ZH.routerAutonomy),
|
|
784
|
+
routerHintScope: z.string().default('root').description(ZH.routerHintScope),
|
|
785
|
+
// No defaults on the three alias-mapped gates: a materialised default would
|
|
786
|
+
// win over routerProposalsEnabled / routerMergeEnabled / routerLeaseTtlMs
|
|
787
|
+
// before normalizeRouterConfig gets to migrate the legacy key.
|
|
788
|
+
routerProposalEnabled: z.boolean().description(ZH.routerProposalEnabled),
|
|
789
|
+
routerApplyEnabled: z.boolean().default(false).description(ZH.routerApplyEnabled),
|
|
790
|
+
routerL4MergeEnabled: z.boolean().description(ZH.routerL4MergeEnabled),
|
|
791
|
+
routerWakeEnabled: z.boolean().default(true).description(ZH.routerWakeEnabled),
|
|
792
|
+
routerWriterLeaseMs: z.number().description(ZH.routerWriterLeaseMs),
|
|
793
|
+
|
|
794
|
+
metrics: z.any().description(ZH.metrics),
|
|
795
|
+
embedding: z.any().description(ZH.embedding),
|
|
796
|
+
// 04 主动浮现 / 02 跨会话交接卡 / 03 热温冷分层:整块 passthrough,**不声明 schemastery
|
|
797
|
+
// 节点**——settings schema 节点数与 1.8.3 锁死一致 153(同 :234-235 的 logMaxBytes 一类
|
|
798
|
+
// "故意不做 leaf"先例)。schemastery 非严格解析会把未声明键合并回解析结果,因此
|
|
799
|
+
// config.proactive / config.handoff / config.tiering 仍是原始行配置,归一化分别由
|
|
800
|
+
// normalizeProactiveConfig / normalizeHandoffConfig / normalizeTiering 从 raw config 读取;
|
|
801
|
+
// 配置文案见上方 ZH/EN.tiering、ZH/EN.proactive、ZH/EN.handoff。
|
|
802
|
+
//
|
|
803
|
+
// H 批 hardgate 唤醒桥(N15)也走同一 passthrough 路线:config.hardgate.wake 不声明 leaf
|
|
804
|
+
// (153 节点锁不变),只允许 6 个运维键 enabled/triggers/maxPerDay/cooldownSec/timeoutSec/
|
|
805
|
+
// toolExclude(其余键 maxRounds/maxOutputTokens/maxOutputChars/retryMax/ticketTtlHours/
|
|
806
|
+
// queueMax/maxFilesPerRun/allowTools/preset/approvalPolicy 走代码默认、只可收紧)。
|
|
807
|
+
// 归一化 + 钳制在 src/memory/wake-bridge.mjs 的 normalizeWakeConfig(越界 clamp + warn +
|
|
808
|
+
// 下次 run 审计 configClamps),接线见 src/features.js 的 registerHardgateWake 块。
|
|
809
|
+
|
|
810
|
+
d2,
|
|
811
|
+
d6,
|
|
812
|
+
audit,
|
|
813
|
+
toolOutput,
|
|
814
|
+
autoRecall,
|
|
815
|
+
identityCard,
|
|
816
|
+
presenceBus,
|
|
817
|
+
sharedBrain,
|
|
818
|
+
memoryV2,
|
|
819
|
+
role,
|
|
820
|
+
answerGuard,
|
|
821
|
+
autoMaintenance,
|
|
822
|
+
autoProcedure,
|
|
823
|
+
retention,
|
|
824
|
+
routerFace,
|
|
825
|
+
autoTruncate,
|
|
826
|
+
hotTruncate,
|
|
827
|
+
}).description(ZH.$description).i18n({ zh: ZH, en: EN });
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* The plugin's Config export. `undefined` is a supported form: the loader then
|
|
832
|
+
* keeps the raw row config, which is exactly the 1.5.0 behaviour when the peer
|
|
833
|
+
* schemastery cannot be resolved in the current installation.
|
|
834
|
+
*/
|
|
835
|
+
export const Config = CONFIG_SCHEMA_AVAILABLE ? schemaOf() : undefined;
|