@a9i5k4/dsh-auto-memory 0.1.33 → 0.1.35
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/README.md +12 -0
- package/README.zh-CN.md +12 -0
- package/lib/client.js +17 -2
- package/lib/index.js +2 -0
- package/lib/semantic-js.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -220,6 +220,18 @@ Then edit `package.json` in that directory and append to the `dsh.profile.bundle
|
|
|
220
220
|
|
|
221
221
|
Restart **dsh web** (the 「Memory」entry appears in the sidebar).
|
|
222
222
|
|
|
223
|
+
### Semantic engine (optional but recommended)
|
|
224
|
+
|
|
225
|
+
The built-in JS semantic tier (e5-small q8, ~130MB) needs the `@huggingface/transformers` inference library, installed automatically as an optional dependency of the main package. If your pnpm security policy blocked its native scripts (you see `ERR_PNPM_IGNORED_BUILDS` / `Ignored build scripts: onnxruntime-node, sharp`), approve and reinstall once:
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
# approve the onnxruntime-node / sharp native install scripts, then reinstall transformers
|
|
229
|
+
pnpm approve-builds
|
|
230
|
+
pnpm add @huggingface/transformers
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Restart `dsh web` — the welcome tour's semantic-engine step auto-detects readiness (SHA256 verify + inference self-test). Lexical BM25 (0GB) always works as a fallback; skipping the engine only lowers recall precision.
|
|
234
|
+
|
|
223
235
|
> No pnpm? `npm install @a9i5k4/dsh-auto-memory` works the same.
|
|
224
236
|
> pnpm v11 blocks packages published <1 day ago: set `minimumReleaseAge: 0` in pnpm-workspace.yaml or pin an explicit version for same-day updates.
|
|
225
237
|
|
package/README.zh-CN.md
CHANGED
|
@@ -230,6 +230,18 @@ cd ~/.dsh/profiles/web
|
|
|
230
230
|
pnpm add @a9i5k4/dsh-auto-memory
|
|
231
231
|
```
|
|
232
232
|
|
|
233
|
+
### 语义引擎(可选但推荐)
|
|
234
|
+
|
|
235
|
+
内置 JS 语义档(e5-small q8 ~130MB)需要推理库 `@huggingface/transformers`(随主包作为可选依赖自动安装)。若你的 pnpm 因安全策略拦截了它的原生脚本(提示 `ERR_PNPM_IGNORED_BUILDS` / `Ignored build scripts: onnxruntime-node, sharp`),执行一次批准后重装即可:
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# 批准 onnxruntime-node / sharp 的原生安装脚本,再重装 transformers
|
|
239
|
+
pnpm approve-builds
|
|
240
|
+
pnpm add @huggingface/transformers
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
装完重启 `dsh web`,向导的语义引擎步会自动检测到就绪(SHA256 校验 + 推理自检)。词法检索 0GB 永远兜底,不装也能用(仅召回精度较低)。
|
|
244
|
+
|
|
233
245
|
然后编辑同目录 `package.json`,在 `dsh.profile.bundles` 数组追加:
|
|
234
246
|
|
|
235
247
|
```json
|
package/lib/client.js
CHANGED
|
@@ -492,6 +492,9 @@ window.__ModuleLoader__.load({
|
|
|
492
492
|
'修复:更新弹窗在小卡形态下内容被裁剪、底部按钮不可达导致无法关闭——新增右上 ✕ 关闭(同步已读版本),内容区自动滚动。',
|
|
493
493
|
'改进:「唤起回顾」决策↔投递时间线——每条决策标注真实投递结果(✓投递×N/未投递/技能✓),判定队列汇总与政策提示;记忆固化(stale 门降版本容忍,语料升版不再整单压制召回)。',
|
|
494
494
|
'补丁 0.1.31:发布物运行时 section 名 dsh:m6-reference-tail → 裸名(发布身份统一,不再带预览标识)。',
|
|
495
|
+
'补丁 0.1.32:「记忆唤起」开关与设置页双向联动(导览与设置走同一 semantic-emit 接口);语义引擎分级引导(无引擎自动装 JS 档,发烧友可选 Python)。',
|
|
496
|
+
'补丁 0.1.33:修复语义引擎下载 404(镜像 URL 重复前缀);transformers 推理库声明为可选依赖并随包分发。',
|
|
497
|
+
'补丁 0.1.34:修复推理库检测——pnpm 把 transformers 提升到 profile 根 node_modules,检测补该路径,新用户装完即用,无需手动操作。',
|
|
495
498
|
], en: [
|
|
496
499
|
'★ MAJOR: Brand-new Welcome Tour — after first launch or upgrade, every feature is introduced step by step with per-feature switches right in the tour (association / snapshot / greeting / night unattended / reflection / summaries / external memory / skill promotion…); engine detection, download, self-test and live external-source scanning are all inline.',
|
|
497
500
|
'★ New brand visuals: an Office/Fluent-style liquid-glass app icon family — each step gets its own colored glass squircle icon (cyan inject / amber greeting / green calendar / violet engine / sky radar / coral finish) with dedicated looping motion (bell sway, page flip, linked rings, prism spin, radar sweep, rising spark); the signature three-slab frosted-glass logo stays on the Core step.',
|
|
@@ -502,6 +505,9 @@ window.__ModuleLoader__.load({
|
|
|
502
505
|
'Fix: The update dialog could become impossible to close when its content overflowed the compact card — added an ✕ in the top-right (marks version seen) and made the content area scrollable.',
|
|
503
506
|
'Improved: Recall-review decision↔delivery timeline (delivered×N / not delivered / skill badges per decision), review-queue digest with policy hints, and consolidation stale-gate version tolerance so corpus version bumps no longer suppress recall.',
|
|
504
507
|
'Patch 0.1.31: release runtime section name dsh:m6-reference-tail → bare name (unified release identity, no preview marker).',
|
|
508
|
+
'Patch 0.1.32: the "Memory recall" switch now syncs bidirectionally with Settings (tour and settings share the semantic-emit endpoint); tiered engine onboarding (auto-install JS tier, Python optional for enthusiasts).',
|
|
509
|
+
'Patch 0.1.33: fixed semantic-engine download 404 (duplicate prefix in mirror URL); transformers inference lib declared as an optional dependency and shipped with the package.',
|
|
510
|
+
'Patch 0.1.34: fixed inference-lib detection — pnpm hoists transformers to the profile-root node_modules; detection now covers that path, so fresh installs work out of the box.',
|
|
505
511
|
] },
|
|
506
512
|
'0.1.29': { zh: [
|
|
507
513
|
'修复:工作区总览一直显示「未发现带记忆的工作区」——DSH 新版会话持久化改为 session.jsonl.zstd 压缩帧,旧逻辑只认 .jsonl 扫描不到任何会话;现已用 zstd 解压读取首行提取 cwd,并让空的 summary 缓存短时失效,避免空结果被永久固化。',
|
|
@@ -2729,7 +2735,7 @@ window.__ModuleLoader__.load({
|
|
|
2729
2735
|
: dl.phase === 'downloading' ? (t('dlDownloading') + ' · ' + fmtMB(dl.bytesDone || 0) + ' / ' + fmtMB(dl.bytesTotal || totalBytes))
|
|
2730
2736
|
: dl.phase === 'error' ? (t('dlError') + ': ' + String(dl.error || '').slice(0, 90))
|
|
2731
2737
|
: dl.phase === 'done' ? (wizSt.assetPresent && !wizSt.peerPresent
|
|
2732
|
-
? (locale === 'zh' ? '
|
|
2738
|
+
? (locale === 'zh' ? '模型已下载,推理库缺失——先 pnpm approve-builds(批准原生脚本),再 pnpm add @huggingface/transformers,重启生效' : 'Model downloaded, inference lib missing — run pnpm approve-builds, then pnpm add @huggingface/transformers, restart')
|
|
2733
2739
|
: t('dlDone'))
|
|
2734
2740
|
: (locale === 'zh' ? '未下载 · 词法检索照常可用' : 'Not downloaded · lexical search keeps working')
|
|
2735
2741
|
var startDl = function () {
|
|
@@ -3271,7 +3277,7 @@ window.__ModuleLoader__.load({
|
|
|
3271
3277
|
else if (dl.phase === 'error') { stateTxt = t('dlError'); stateBg = 'rgba(196,74,74,.22)' }
|
|
3272
3278
|
else if (dl.phase === 'cancelled') { stateTxt = t('dlCancelled'); stateBg = 'rgba(196,138,42,.2)' }
|
|
3273
3279
|
else if (isJs && dlActive) { stateTxt = dl.phase === 'verifying' ? t('dlVerifying') : t('dlDownloading'); stateBg = 'rgba(36,86,196,.2)' }
|
|
3274
|
-
else if (isJs && sem.assetPresent && !sem.peerPresent) { stateTxt = locale === 'zh' ? '
|
|
3280
|
+
else if (isJs && sem.assetPresent && !sem.peerPresent) { stateTxt = locale === 'zh' ? '模型已存在,缺推理库——pnpm approve-builds 后 pnpm add @huggingface/transformers' : 'Model present, runtime missing — pnpm approve-builds && pnpm add @huggingface/transformers'; stateBg = 'rgba(196,138,42,.2)' }
|
|
3275
3281
|
else { stateTxt = locale === 'zh' ? '未下载' : 'Not downloaded'; stateBg = 'rgba(196,138,42,.2)' }
|
|
3276
3282
|
var progress = dlActive || (isJs && dl.phase === 'done')
|
|
3277
3283
|
? Math.min(100, Math.round(((dl.bytesDone || 0) / Math.max(1, dl.bytesTotal || totalJs)) * 100))
|
|
@@ -3533,6 +3539,15 @@ window.__ModuleLoader__.load({
|
|
|
3533
3539
|
try {
|
|
3534
3540
|
var seen = localStorage.getItem('dsh-auto-memory.seenVersion')
|
|
3535
3541
|
var majorPending = !localStorage.getItem(MAJOR_TOUR_KEY)
|
|
3542
|
+
// 老用户(有使用痕迹)seen < 0.1.30(大更新前版本)升级上来 → 强制触发一次欢迎向导(含引擎下载引导)。
|
|
3543
|
+
// 不依赖一次性标记:0.1.29→0.1.34 升级即使曾看过旧版向导也要重放,确保模型下载引导不漏。
|
|
3544
|
+
var isExisting = !!seen || !!localStorage.getItem('dsh-auto-memory.firstRunDone') || !!localStorage.getItem('dsh-auto-memory.semWizardDone')
|
|
3545
|
+
var seenBeforeMajor = isExisting && (!seen || cmpVersion(seen, '0.1.30') < 0)
|
|
3546
|
+
if (seenBeforeMajor && !localStorage.getItem('dsh-auto-memory.semWizardDone')) {
|
|
3547
|
+
openDialog({ kind: 'welcomeTour' })
|
|
3548
|
+
try { localStorage.setItem(MAJOR_TOUR_KEY, '1') } catch (eM) {}
|
|
3549
|
+
return
|
|
3550
|
+
}
|
|
3536
3551
|
if (majorPending && (d.current === '0.1.30' || seen)) {
|
|
3537
3552
|
// 大更新触达(老用户:seen<current 或已有使用痕迹;新装用户走 first 流程不重复打扰)
|
|
3538
3553
|
openDialog({ kind: 'welcomeTour' })
|
package/lib/index.js
CHANGED
|
@@ -4255,6 +4255,8 @@ export function apply(ctx, config) {
|
|
|
4255
4255
|
const modelOnnx = cands.find((c) => fsMod.existsSync(c)) || cands[0]
|
|
4256
4256
|
const peerCands = [
|
|
4257
4257
|
path.join(pluginDir, 'node_modules', '@huggingface', 'transformers'),
|
|
4258
|
+
// pnpm 默认把 peer/optional 依赖提升到 profile 根 node_modules(pluginDir 上两级)
|
|
4259
|
+
path.join(pluginDir, '..', '..', '..', 'node_modules', '@huggingface', 'transformers'),
|
|
4258
4260
|
path.join(pluginDir, '..', 'artifacts', 'm7-live-pre', 'js-semantic-trial', 'node_modules', '@huggingface', 'transformers'),
|
|
4259
4261
|
]
|
|
4260
4262
|
const peerDir = peerCands.find((c) => fsMod.existsSync(c)) || peerCands[0]
|
package/lib/semantic-js.js
CHANGED
|
@@ -76,6 +76,8 @@ function defaultModelsDirCandidates(pluginDir) {
|
|
|
76
76
|
function defaultPeerDirCandidates(pluginDir) {
|
|
77
77
|
return [
|
|
78
78
|
path.join(pluginDir, 'node_modules', '@huggingface', 'transformers'),
|
|
79
|
+
// pnpm 默认把 peer/optional 依赖提升到 profile 根 node_modules(pluginDir 上两级)
|
|
80
|
+
path.join(pluginDir, '..', '..', '..', 'node_modules', '@huggingface', 'transformers'),
|
|
79
81
|
path.join(pluginDir, '..', 'artifacts', 'm7-live-pre', 'js-semantic-trial', 'node_modules', '@huggingface', 'transformers'),
|
|
80
82
|
]
|
|
81
83
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@a9i5k4/dsh-auto-memory",
|
|
3
3
|
"description": "主动联想记忆插件:记忆不靠模型调用,自己被唤回——Host 观察情境,NLP+向量化双轨检索,固定边界注入不破坏前缀缓存。三层记忆自动沉淀、欢迎向导、唤起回顾、无人值守、AI 问候与反思、日历、跨工具记忆继承。Proactive associative memory for DSH: zero-call recall, three-layer auto-consolidation, welcome tour, unattended mode.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.35",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|