dsh-macro-memory 0.0.0-stage → 0.4.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.
Files changed (132) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +506 -2
  3. package/cordis.patch.yml +6 -0
  4. package/lib/client.js +3623 -0
  5. package/lib/index.js +502 -0
  6. package/lib/macro/brand.js +82 -0
  7. package/lib/macro/bridge.js +158 -0
  8. package/lib/macro/chain.js +206 -0
  9. package/lib/macro/contract.js +471 -0
  10. package/lib/macro/cost.js +164 -0
  11. package/lib/macro/defs/admin.js +442 -0
  12. package/lib/macro/defs/dream.js +24 -0
  13. package/lib/macro/defs/link.js +257 -0
  14. package/lib/macro/defs/project.js +25 -0
  15. package/lib/macro/defs/read.js +160 -0
  16. package/lib/macro/defs/remember.js +411 -0
  17. package/lib/macro/defs/search.js +871 -0
  18. package/lib/macro/defs/update.js +161 -0
  19. package/lib/macro/dreamledger.js +1398 -0
  20. package/lib/macro/facade.js +135 -0
  21. package/lib/macro/fusion.js +182 -0
  22. package/lib/macro/linkflow.js +391 -0
  23. package/lib/macro/links.js +448 -0
  24. package/lib/macro/neighbor.js +209 -0
  25. package/lib/macro/panel.js +96 -0
  26. package/lib/macro/prompt.js +139 -0
  27. package/lib/macro/provenance.js +148 -0
  28. package/lib/macro/render.js +35 -0
  29. package/lib/macro/revisions.js +253 -0
  30. package/lib/macro/shared.js +113 -0
  31. package/lib/macro/store.js +103 -0
  32. package/lib/macro/supersede.js +197 -0
  33. package/lib/macro/tokencost.js +90 -0
  34. package/lib/macro/tools.js +67 -0
  35. package/package.json +54 -4
  36. package/vendor/VENDOR.json +23 -0
  37. package/vendor/dsh-memory-nebula/CONTRIBUTING.md +48 -0
  38. package/vendor/dsh-memory-nebula/LICENSE +21 -0
  39. package/vendor/dsh-memory-nebula/README.en.md +203 -0
  40. package/vendor/dsh-memory-nebula/README.md +253 -0
  41. package/vendor/dsh-memory-nebula/SECURITY.md +43 -0
  42. package/vendor/dsh-memory-nebula/SUPPORT.md +33 -0
  43. package/vendor/dsh-memory-nebula/cordis.patch.yml +4 -0
  44. package/vendor/dsh-memory-nebula/lib/client.js +105 -0
  45. package/vendor/dsh-memory-nebula/lib/host/adapters/index.js +279 -0
  46. package/vendor/dsh-memory-nebula/lib/host/adapters/ingest.js +230 -0
  47. package/vendor/dsh-memory-nebula/lib/host/adapters/meow.js +320 -0
  48. package/vendor/dsh-memory-nebula/lib/host/adapters/notes.js +305 -0
  49. package/vendor/dsh-memory-nebula/lib/host/adapters/sqlite.js +287 -0
  50. package/vendor/dsh-memory-nebula/lib/host/adapters/util.js +231 -0
  51. package/vendor/dsh-memory-nebula/lib/host/bridge.js +351 -0
  52. package/vendor/dsh-memory-nebula/lib/host/compress.js +97 -0
  53. package/vendor/dsh-memory-nebula/lib/host/demo.js +357 -0
  54. package/vendor/dsh-memory-nebula/lib/host/diagnostics.js +125 -0
  55. package/vendor/dsh-memory-nebula/lib/host/doctor.js +270 -0
  56. package/vendor/dsh-memory-nebula/lib/host/entities.js +230 -0
  57. package/vendor/dsh-memory-nebula/lib/host/graph.js +1762 -0
  58. package/vendor/dsh-memory-nebula/lib/host/graphcache.js +290 -0
  59. package/vendor/dsh-memory-nebula/lib/host/http.js +993 -0
  60. package/vendor/dsh-memory-nebula/lib/host/injectcfg.js +95 -0
  61. package/vendor/dsh-memory-nebula/lib/host/ledger.js +175 -0
  62. package/vendor/dsh-memory-nebula/lib/host/live.js +204 -0
  63. package/vendor/dsh-memory-nebula/lib/host/nebula.js +2105 -0
  64. package/vendor/dsh-memory-nebula/lib/host/page.js +75 -0
  65. package/vendor/dsh-memory-nebula/lib/host/path.js +83 -0
  66. package/vendor/dsh-memory-nebula/lib/host/recall.js +524 -0
  67. package/vendor/dsh-memory-nebula/lib/host/share.js +633 -0
  68. package/vendor/dsh-memory-nebula/lib/host/sources.js +266 -0
  69. package/vendor/dsh-memory-nebula/lib/host/store.js +333 -0
  70. package/vendor/dsh-memory-nebula/lib/host/text.js +410 -0
  71. package/vendor/dsh-memory-nebula/lib/host/transcripts.js +396 -0
  72. package/vendor/dsh-memory-nebula/lib/index.js +782 -0
  73. package/vendor/dsh-memory-nebula/lib/standalone.mjs +315 -0
  74. package/vendor/dsh-memory-nebula/lib/web/api.js +426 -0
  75. package/vendor/dsh-memory-nebula/lib/web/app.js +4172 -0
  76. package/vendor/dsh-memory-nebula/lib/web/i18n.js +580 -0
  77. package/vendor/dsh-memory-nebula/lib/web/index.html +174 -0
  78. package/vendor/dsh-memory-nebula/lib/web/nav.js +132 -0
  79. package/vendor/dsh-memory-nebula/lib/web/render.js +1890 -0
  80. package/vendor/dsh-memory-nebula/lib/web/space3d.js +1883 -0
  81. package/vendor/dsh-memory-nebula/lib/web/style.css +1402 -0
  82. package/vendor/dsh-memory-nebula/locale/en.json +7 -0
  83. package/vendor/dsh-memory-nebula/locale/zh.json +7 -0
  84. package/vendor/dsh-memory-nebula/market/assets/icon-180.png +0 -0
  85. package/vendor/dsh-memory-nebula/market/assets/icon.svg +40 -0
  86. package/vendor/dsh-memory-nebula/market/index.json +101 -0
  87. package/vendor/dsh-memory-nebula/package.json +87 -0
  88. package/vendor/dsh-memory-nebula/sidecar.ps1 +119 -0
  89. package/vendor/meow-memory/LICENSE +21 -0
  90. package/vendor/meow-memory/README.en.md +192 -0
  91. package/vendor/meow-memory/README.md +174 -0
  92. package/vendor/meow-memory/README.pt-br.md +180 -0
  93. package/vendor/meow-memory/cordis.patch.yml +7 -0
  94. package/vendor/meow-memory/lib/client.js +3344 -0
  95. package/vendor/meow-memory/lib/client.js.map +7 -0
  96. package/vendor/meow-memory/lib/index.js +9802 -0
  97. package/vendor/meow-memory/lib/index.js.map +7 -0
  98. package/vendor/meow-memory/lib/prompts/README.md +65 -0
  99. package/vendor/meow-memory/lib/prompts/en/dream-atomic.md +36 -0
  100. package/vendor/meow-memory/lib/prompts/en/dream-header.md +9 -0
  101. package/vendor/meow-memory/lib/prompts/en/dream-project-summary.md +12 -0
  102. package/vendor/meow-memory/lib/prompts/en/dream-topic.md +27 -0
  103. package/vendor/meow-memory/lib/prompts/en/external-memory-notice.md +8 -0
  104. package/vendor/meow-memory/lib/prompts/en/first-create-notice.md +8 -0
  105. package/vendor/meow-memory/lib/prompts/en/labels.md +98 -0
  106. package/vendor/meow-memory/lib/prompts/en/reflect.md +31 -0
  107. package/vendor/meow-memory/lib/prompts/en/system-guide.md +121 -0
  108. package/vendor/meow-memory/lib/prompts/en/tools.md +83 -0
  109. package/vendor/meow-memory/lib/prompts/en/welcome-guide.md +12 -0
  110. package/vendor/meow-memory/lib/prompts/pt-br/dream-atomic.md +36 -0
  111. package/vendor/meow-memory/lib/prompts/pt-br/dream-header.md +9 -0
  112. package/vendor/meow-memory/lib/prompts/pt-br/dream-project-summary.md +12 -0
  113. package/vendor/meow-memory/lib/prompts/pt-br/dream-topic.md +27 -0
  114. package/vendor/meow-memory/lib/prompts/pt-br/external-memory-notice.md +8 -0
  115. package/vendor/meow-memory/lib/prompts/pt-br/first-create-notice.md +8 -0
  116. package/vendor/meow-memory/lib/prompts/pt-br/labels.md +98 -0
  117. package/vendor/meow-memory/lib/prompts/pt-br/reflect.md +31 -0
  118. package/vendor/meow-memory/lib/prompts/pt-br/system-guide.md +121 -0
  119. package/vendor/meow-memory/lib/prompts/pt-br/tools.md +83 -0
  120. package/vendor/meow-memory/lib/prompts/pt-br/welcome-guide.md +12 -0
  121. package/vendor/meow-memory/lib/prompts/zh/dream-atomic.md +36 -0
  122. package/vendor/meow-memory/lib/prompts/zh/dream-header.md +9 -0
  123. package/vendor/meow-memory/lib/prompts/zh/dream-project-summary.md +19 -0
  124. package/vendor/meow-memory/lib/prompts/zh/dream-topic.md +27 -0
  125. package/vendor/meow-memory/lib/prompts/zh/external-memory-notice.md +8 -0
  126. package/vendor/meow-memory/lib/prompts/zh/first-create-notice.md +8 -0
  127. package/vendor/meow-memory/lib/prompts/zh/labels.md +98 -0
  128. package/vendor/meow-memory/lib/prompts/zh/reflect.md +30 -0
  129. package/vendor/meow-memory/lib/prompts/zh/system-guide.md +119 -0
  130. package/vendor/meow-memory/lib/prompts/zh/tools.md +83 -0
  131. package/vendor/meow-memory/lib/prompts/zh/welcome-guide.md +12 -0
  132. package/vendor/meow-memory/package.json +64 -0
@@ -0,0 +1,580 @@
1
+ /*
2
+ * 宏记忆 · 星图 · 界面文案表
3
+ *
4
+ * [macro-fusion 0.2.11] 面板口径:这个子应用对外只有一个名字「宏记忆 · 星图」
5
+ * (侧栏、设置段、面板标题、窗口标题、画布水印全部一致);原来叫「记忆星图」,
6
+ * 与融合层的「宏记忆 · 星图」并存会让用户以为是两个东西。改名只动显示名,不动逻辑。
7
+ *
8
+ * 中文是源语言:代码里写的就是界面上要显示的中文,T("…") 在英文模式下查表替换。
9
+ * 这样不会出现「加了一个新按钮却忘了加 key」的半截翻译:查不到就回退中文,
10
+ * 至少不会显示成 undefined。
11
+ *
12
+ * 静态 HTML 用 data-zh / data-zh-title / data-zh-ph / data-zh-aria 声明原文,
13
+ * 由 applyDom() 在启动时替换;动态文案在 app.js 里用 T() 包住。
14
+ */
15
+ ;(function () {
16
+ const EN = {
17
+ "灵魂": "Soul",
18
+ "主人": "Master",
19
+ "项目": "Project",
20
+ "教训": "Lesson",
21
+ "话题": "Topic",
22
+ "事实": "Fact",
23
+ "准则": "Rule",
24
+ "来源": "Source",
25
+ "环境 · 插件/技能/MCP": "Environment · plugins/skills/MCP",
26
+ "手工": "Manual",
27
+ "同项目": "Same project",
28
+ "同一实体": "Same entity",
29
+ "同关键词": "Shared keywords",
30
+ "语义相似": "Semantically similar",
31
+ "共激活": "Co-activated",
32
+ "提到来源": "Mentions source",
33
+ "正在处理…": "Working…",
34
+ "撤销失败:": "Undo failed: ",
35
+ "记忆": "Memories",
36
+ "连接": "Connections",
37
+ "工作区": "Workspaces",
38
+ "会话": "Sessions",
39
+ "平均连接": "Avg. links",
40
+ "跨工作区收集到的记忆条目总数": "Total memories collected across all workspaces",
41
+ "图里画出来的边:同一实体 / 同关键词 / 语义近邻 / 人工连的": "Edges drawn here: same entity / shared keyword / semantic neighbour / manual",
42
+ "这些记忆来自几个工作区": "How many workspaces these memories come from",
43
+ "写这些记忆时所在的会话数": "Sessions these memories were written in",
44
+ "平均每条记忆连了几条边": "Average links per memory",
45
+ "连接已恢复": "Link restored",
46
+ " 降级:": " · degraded: ",
47
+ "收起 / 展开": "Collapse / expand",
48
+ "只画「": "Only show “",
49
+ "」给的记忆": "”",
50
+ "记忆来源": "Memory sources",
51
+ "重置筛选 · 回全视图": "Reset filters · full view",
52
+ "清掉所有筛选,并把镜头拉回能看见全部记忆的位置(F)": "Clear every filter and frame the whole map (F)",
53
+ "记忆层级": "Memory level",
54
+ "连接类型": "Link type",
55
+ "最小连接强度": "Min link strength",
56
+ "最低重要度": "Min importance",
57
+ "全部": "All",
58
+ "来源读不到:": "Can't read sources: ",
59
+ "有来源读不动:": "Some sources can't be read: ",
60
+ "有 ": "Can't read ",
61
+ " 个来源读不动:": " unreadable source(s): ",
62
+ ",这些记忆不在图里": " — their memories are not in this map",
63
+ " 个库读不动": " unreadable",
64
+ "看来源": "Show sources",
65
+ "(细节在「来源」里)": " (details in Sources)",
66
+ "读不动": "unreadable",
67
+ " 条": " items",
68
+ " · 只列前 ": " · showing first ",
69
+ "记忆库": "Stores",
70
+ " 个": " stores",
71
+ "每个工作区一个 .dsh-meow/memory.db": "One .dsh-meow/memory.db per workspace",
72
+ "已装插件": "Plugins",
73
+ "profile 里声明的全部插件": "All plugins declared in the profile",
74
+ "记忆类插件": "Memory plugins",
75
+ "技能": "Skills",
76
+ "SKILL.md 目录数": "SKILL.md directories",
77
+ "已屏蔽关联": "Muted",
78
+ "点一下展开,可以逐条恢复": "Click to expand and restore one by one",
79
+ "还没有屏蔽过任何关联": "No links muted yet",
80
+ "恢复": "Restore",
81
+ "已恢复这条关联": "Link restored",
82
+ "恢复失败:": "Restore failed: ",
83
+ "正在算(库大时要十几秒,算完这里会自己填上)…": "Working it out (a big library takes a dozen seconds; this fills in when done)…",
84
+ "记忆体检": "Health",
85
+ " 项": " issues",
86
+ "不是说记忆写错了,是说它们该整理、该更新、该被用起来": "Not that a memory is wrong—these should be tidied, updated, or used",
87
+ " 天": " days",
88
+ " · 均 ": " · avg ",
89
+ " 字": " chars",
90
+ "还有 ": "and ",
91
+ " 条(用 nebula_stats 看全量)": " more (use nebula_stats for the full list)",
92
+ "记忆本体只读:星图只读 meow-memory 的数据库,不改任何一条原文。": "The memory data is read-only: the map only reads meow-memory's database and never edits a single word.",
93
+ "刚刚": "just now",
94
+ " 分钟前": " min ago",
95
+ " 小时前": " h ago",
96
+ " 天前": " d ago",
97
+ " 个月前": " mo ago",
98
+ "疑似重复": "Likely duplicate",
99
+ "太长": "Too long",
100
+ "该更新": "Should update",
101
+ "没人读": "Never read",
102
+ "关系凑数": "Weak links",
103
+ "孤立": "Isolated",
104
+ "只看 ": "Only ",
105
+ "正在汇总…": "Summarising…",
106
+ "读取失败:": "Read failed: ",
107
+ " 个工作区 · 共 ": " workspaces · ",
108
+ " 条记忆 · ": " memories · ",
109
+ "还没有可汇总的记忆": "No memories to summarise yet",
110
+ "点一下:星图里只看这个项目": "Click to show only this project in the map",
111
+ " 个会话": " sessions",
112
+ "最近变更": "Recent changes",
113
+ "下一步与卡点": "Next steps & blockers",
114
+ "没有 active 的 todo 条目": "No active todo items",
115
+ "代表记忆": "Representative memories",
116
+ "重要度 ": "Importance ",
117
+ " 条连接": " links",
118
+ "已筛选:隐藏 ": "Filtered: hiding ",
119
+ " 条记忆": " memories",
120
+ " / 弱连接 ": " / weak links ",
121
+ " 以下不画": " and below hidden",
122
+ "(共 ": "(",
123
+ " 条连接)": " links)",
124
+ "这一屏没有记忆": "No memories in this view",
125
+ "当前筛选把整张图都藏起来了 · Shift + F 或左栏「重置筛选」回到全视图": "The current filters hide the whole map · press Shift + F or use “Reset filters” on the left",
126
+ "当前已加载 ": "Only the ",
127
+ " 条里没有匹配 · 可能还在后面的页里:点底部「继续加载」,或用搜索直接找": " loaded memories were checked and none match · the match may be on a later page: use “Load more” at the bottom, or search directly",
128
+ "筛选命中在后面的页里:已往后加载 {n} 页,找到 {m} 条": "Matches were on later pages: loaded {n} more page(s) and found {m}",
129
+ "已往后加载 {n} 页,仍没找到匹配;可以再点底部「继续加载」": "Loaded {n} more page(s) and still nothing matches · use “Load more” at the bottom to keep going",
130
+ "已回到全视图": "Back to the full view",
131
+ "正在读…": "Reading…",
132
+ "记忆库(只读)": "Memory stores (read-only)",
133
+ "只看它 →": "Only this →",
134
+ "记忆类插件 / MCP / 技能": "Memory plugins / MCP / skills",
135
+ "已装插件 ": "Plugins ",
136
+ " · 记忆类 ": " · memory ",
137
+ "技能 ": "Skills ",
138
+ "外部记忆源": "External memory sources",
139
+ " · 可读": " · readable",
140
+ " · 暂不可读": " · unavailable",
141
+ "声明过自己是权威的记忆:": "Memories declaring themselves authoritative: ",
142
+ " 条 / ": " / ",
143
+ " 个项目": " projects",
144
+ "还没有记忆在正文里声明「以…为准」。": "No memory declares “this is authoritative” in its body yet.",
145
+ "打开 →": "Open →",
146
+ "体检:": "Health: ",
147
+ " 项 · 只诊断不改库": " issues · diagnose only, never edits",
148
+ "没查出问题。": "No issues found.",
149
+ "对比 →": "Compare →",
150
+ " · 重要度 ": " · importance ",
151
+ "…还有 ": "…and ",
152
+ "已屏蔽的关联": "Muted links",
153
+ "屏蔽列表读不到:": "Can't read the mute list: ",
154
+ "已屏蔽的关联:": "Muted links: ",
155
+ "没有屏蔽任何关联。": "No links are muted.",
156
+ "恢复中…": "Restoring…",
157
+ "已恢复": "Restored",
158
+ "这已经是一份离线快照了": "This is already an offline snapshot",
159
+ "示例星系不导出:先点顶部「退出示例」,再导你自己的星图": "The demo galaxy can't be exported: leave the demo first, then export your own map",
160
+ "整张星图": "Full map",
161
+ "日记": "Diary",
162
+ "这个工作区就是「日记」:要么取消勾选,要么换个范围再导": "This workspace is “Diary”: untick the box or pick another scope",
163
+ "选中节点周围 2 跳": "2 hops around the selected node",
164
+ "工作区「": "Workspace “",
165
+ "正在打包": "Packing",
166
+ "(已隐去日记)": " (diary hidden)",
167
+ ";下载名带范围和本地时间,不会覆盖上一份": "; the filename includes scope and local time, so it won't overwrite the last one",
168
+ "画布还没准备好": "Canvas is not ready",
169
+ "宏记忆 · 星图": "Macro Memory · Graph",
170
+ " 记忆 · ": " memories · ",
171
+ " 连接 · ": " links · ",
172
+ " 工作区": " workspaces",
173
+ " · 已筛选": " · filtered",
174
+ "导出失败:浏览器没给图": "Export failed: the browser returned no image",
175
+ "已导出 PNG": "Exported PNG",
176
+ "还没有图可导出": "Nothing to export yet",
177
+ "已导出 ": "Exported ",
178
+ " 个节点 / ": " nodes / ",
179
+ "视图": "View",
180
+ "星云(2D)": "Nebula (2D)",
181
+ "星系(3D)": "Galaxy (3D)",
182
+ "时间(螺旋)": "Time (spiral)",
183
+ "面板": "Panels",
184
+ "项目卡片": "Project cards",
185
+ "看板:来源": "Board: Sources",
186
+ "看板:真源": "Board: Truth",
187
+ "看板:体检": "Board: Health",
188
+ "看板:屏蔽": "Board: Muted",
189
+ "动作": "Actions",
190
+ "重建星图": "Rebuild map",
191
+ "导出": "Export",
192
+ "导出当前视图 PNG": "Export current view PNG",
193
+ "导出可见子图 JSON": "Export visible subgraph JSON",
194
+ "聚焦当前选中": "Focus selection",
195
+ "主线:当前记忆的时间线": "Thread: timeline of the current memory",
196
+ "帮助": "Help",
197
+ "快捷键一览": "Keyboard shortcuts",
198
+ "先选一条记忆,再看它的主线": "Select a memory to see its thread",
199
+ "主线 · ": "Thread · ",
200
+ "这条记忆所在会话里没有别的记忆。": "No other memories in this memory's session.",
201
+ "月": "month",
202
+ "日": "day",
203
+ "当前": "current",
204
+ "同一次会话共 ": " in the same session: ",
205
+ " 条(含当前这条),这里按时间排最相关的 ": " memories (including this one); the most relevant ",
206
+ " 条。": " are shown in time order.",
207
+ "回到全视图": "Back to full view",
208
+ "检索失败:": "Search failed: ",
209
+ " 条最相关": " most relevant",
210
+ " · 扫过 ": " · scanned ",
211
+ "没有命中": "No matches",
212
+ "没认出的词:": "Unrecognised words: ",
213
+ "没有找到相关记忆": "No related memories found",
214
+ "换更短的词试试;也可以先按工作区筛一下,再在图里顺着连线找。": "Try a shorter word; or filter by workspace and follow the links in the map.",
215
+ "清空搜索": "Clear search",
216
+ "只看一个工作区": "Show one workspace",
217
+ "在左栏点一个工作区,就只看它": "Click a workspace on the left to show only it",
218
+ "看看示例": "See the demo",
219
+ "跨工作区:这条记忆来自另一个项目,由星图的连接桥接过来": "Cross-workspace: this memory comes from another project and is bridged by the map",
220
+ "强度 ": "Strength ",
221
+ "证据链 · 没有连上": "Evidence chain · not connected",
222
+ "超过跳数上限": "beyond the hop limit",
223
+ "证据链 · ": "Evidence chain · ",
224
+ " 跳 · 链强度 ": " hops · strength ",
225
+ "(本地计算)": " (local)",
226
+ "新手三步": "Three-step start",
227
+ "第一次来?三步就够": "First time? Three steps is enough",
228
+ "关闭新手引导": "Close the guide",
229
+ "三步走完了;想重看,按 ? 打开快捷键一览": "Three steps done; press ? for shortcuts and to replay",
230
+ "搜一个你记得的词": "Search a word you remember",
231
+ "标题、正文、关键词都算;找不到就换个更短的词。": "Titles, bodies and keywords all count; try a shorter word if nothing hits.",
232
+ "输入一个词,比如「记忆」「部署」,回车看命中": "Type a word such as “memory” or “deploy” and press Enter",
233
+ "去搜": "Search",
234
+ "点开一条,看它凭什么": "Open one and see why",
235
+ "右栏是正文和它的邻居:每条连接都写了理由。": "The right panel shows the body and its neighbours; every link states its reason.",
236
+ "先搜一条记忆,再点开它": "Search a memory first, then open it",
237
+ "看一条": "Open one",
238
+ "Shift 点两条,看怎么连上": "Shift-click two, see how they connect",
239
+ "不相关就直说「没连上」,不会硬编一条关系。": "If they aren't related it says “not connected” instead of inventing a link.",
240
+ "这一片没有够强的连接可演示;先搜一条记忆看看": "No strong enough link here; search a memory first",
241
+ "看例子": "See an example",
242
+ "跳过,直接逛": "Skip and explore",
243
+ "随时按 ? 可以重看": "Press ? anytime to replay",
244
+ "搜索记忆": "Search memories",
245
+ "命令面板:切视图、开面板、搜记忆": "Command palette: switch views, open panels, search memories",
246
+ "在搜索结果里走位,回车打开": "Move through results, Enter to open",
247
+ "星云 / 星系 / 时间": "Nebula / Galaxy / Time",
248
+ "左键拖": "Drag left",
249
+ "星云平移 · 星系转视角": "Pan the nebula · orbit the galaxy",
250
+ "点光斑": "Click a blob",
251
+ "钻进那个项目(拉远到点聚成光斑时)": "Zoom into that project (when points merge into a blob)",
252
+ "双击空白": "Double-click empty space",
253
+ "回到全图": "Back to the full map",
254
+ "中键 / 右键拖": "Middle / right drag",
255
+ "平移视角(不会误选节点)": "Pan the view without selecting a node",
256
+ "Shift + 点两下": "Shift-click two nodes",
257
+ "查两个节点之间的证据链": "Trace the evidence chain between them",
258
+ "时间视图底部滑杆": "Slider at the bottom of Time view",
259
+ "回到某一天之前(双击滑杆恢复全部)": "Go back to before a given day (double-click the slider to reset)",
260
+ "顶栏「导出」": "“Export” in the top bar",
261
+ "当前视图 PNG / 可见子图 JSON": "Current view PNG / visible subgraph JSON",
262
+ "左栏小箭头": "Small arrow in the left column",
263
+ "收起任一分组,状态会记住": "Collapse any group; the state is remembered",
264
+ "回全视图(双击空白也行)": "Back to full view (or double-click empty space)",
265
+ "清掉所有筛选,回全视图": "Clear all filters and return to the full view",
266
+ "把选中的那颗拉到面前": "Bring the selected node to the front",
267
+ "项目卡片 / 四块看板 / 主线": "Project cards / four boards / thread",
268
+ "重建星云(重新分析全部记忆)": "Rebuild the map (re-analyse every memory)",
269
+ "从面板一层层关回去": "Close panels one layer at a time",
270
+ "显示或关闭这张说明": "Show or hide this help",
271
+ "快捷键": "Keyboard shortcuts",
272
+ "重看新手三步": "Replay the three-step guide",
273
+ "宏记忆 · 星图 v": "Macro Memory · Graph v",
274
+ " · 只读 · 数据留在本机": " · read-only · data stays on this machine",
275
+ "这条记忆已经不在了": "This memory no longer exists",
276
+ "来源 · ": "Source · ",
277
+ "连接 ": "Links ",
278
+ "命中 ": "Hits ",
279
+ "复制 id": "Copy ID",
280
+ "复制这条记忆的完整 id": "Copy this memory's full ID",
281
+ "已复制记忆 id": "Memory ID copied",
282
+ "复制失败": "Copy failed",
283
+ "复制会话": "Copy session",
284
+ "复制来源会话 id:": "Copy source session ID: ",
285
+ "已复制会话 id": "Session ID copied",
286
+ "(无标题)": "(untitled)",
287
+ "还挂着 active,但「": "Still marked active, but “",
288
+ "」更新更全——这条可能该并进去": "” is newer and fuller—this one may belong there",
289
+ "与「": "With “",
290
+ "」高度重复(相似 ": "” highly similar (similarity ",
291
+ "正文 ": "Body ",
292
+ " 字,属于本库最长的一批,读一次很贵": " chars—among the longest here; expensive to read",
293
+ " 条但平均强度只有 ": " links but average strength only ",
294
+ ",多半是关键词撞出来的": ", likely just keyword collisions",
295
+ "重要度建议 ": "Importance suggestion ",
296
+ "落库时算出的证据": "Evidence computed at write time",
297
+ "写这条记忆时,主人说的是": "What the Master said when this memory was written",
298
+ " 秒后写下": " s later",
299
+ " 分钟后写下": " min later",
300
+ " 小时后写下": " h later",
301
+ "出自会话 ": "From session ",
302
+ " · 说过这话": " · said this",
303
+ "目标": "Goal",
304
+ "这条记忆提到的来源": "Sources mentioned by this memory",
305
+ "谁提到过它 · ": "Mentioned by · ",
306
+ " / 分布在 ": " / across ",
307
+ "会话里实际调用过 ": "Actually called in sessions ",
308
+ " 次 · 分布在 ": " times · across ",
309
+ "会话里没有直接调用过它(可能只是被记忆提到,或由别的入口自动挂载)": "Never called directly in a session (it may only be mentioned, or auto-mounted elsewhere)",
310
+ "同一次会话里还写下 ": "Also written in the same session: ",
311
+ "连接到的记忆 · ": "Connected memories · ",
312
+ "断开这条人工连边": "Disconnect this manual link",
313
+ "屏蔽这条关联(以后重建也不会再连)": "Mute this link (it won't return after a rebuild)",
314
+ "已撤销": "Undone",
315
+ "已断开这条连边": "Manual link disconnected",
316
+ "已屏蔽这条关联": "Link muted",
317
+ "撤销": "Undo",
318
+ "当前引擎较旧,已改为断开这条边(重连后可用屏蔽)": "The running engine is older; the link was disconnected instead (muting returns after reconnect)",
319
+ "操作失败:": "Action failed: ",
320
+ "点击查看:": "Click to view: ",
321
+ "以它为种子扩散": "Spread from here",
322
+ "不是搜索:从这条出发,沿已有连接看 2 跳内的邻居": "Not a search: start here and follow existing links out to 2 hops",
323
+ "已复制 ": "Copied ",
324
+ "定位": "Locate",
325
+ "扩散不是搜索:从这条出发,沿已有连接看 2 跳内的邻居。": "Spreading is not searching: start here and follow existing links out to 2 hops.",
326
+ "它没有可以扩散出去的连接": "It has no links to spread through",
327
+ "激活 ": "Activated ",
328
+ " 条相邻记忆": " neighbouring memories",
329
+ "扩散失败:": "Spread failed: ",
330
+ " · 用过它的记忆 ": " · memories using it ",
331
+ "全部 ": "All ",
332
+ "超过三千条先在二维星云里看:三维在软件渲染下会卡,筛选到 3000 条以内再切": "Above 3,000 nodes, stay in the 2D nebula: 3D is slow under software rendering. Filter to 3,000 or fewer to switch.",
333
+ "三维模块还没加载好(独立引擎没开?),先看星云视图": "The 3D module isn't ready (is the standalone engine running?); stay in the nebula for now",
334
+ "已放大「": "Zoomed into “",
335
+ "」 · 双击空白回到全图": "” · double-click empty space to return",
336
+ "已切到独立引擎 ": "Switched to the standalone engine ",
337
+ "(宿主里的旧引擎没被使用)": " (the old engine inside the host is not used)",
338
+ "旧版": "older",
339
+ " 引擎</b>,缺 ": " engine</b>, missing ",
340
+ " 接口。重启 DSH 后刷新即可;不想重启就在插件目录运行 ": " APIs. Restart DSH and refresh; or run this in the plugin folder without restarting: ",
341
+ ",再刷新本页就会自动切到独立引擎。": ", then refresh this page to switch to the standalone engine.",
342
+ "还没有星星": "No stars yet",
343
+ "这里还没有星星": "No stars here yet",
344
+ "记忆库是空的,或者还没建立连接": "The memory store is empty, or has no links yet.",
345
+ "这里会显示你的记忆库。挑一条路开始:": "Your memory stores will appear here. Pick a way to start:",
346
+ "已经在用 meow-memory / OpenViking:先去对话里写几条记忆,再点「重建星图」。": "Already using meow-memory / OpenViking? Write a few memories in a conversation, then hit “Rebuild map”.",
347
+ "想先看看长什么样:进示例星系,逛完随时退出来,不会动你的库。": "Want a preview? Enter the demo galaxy and leave anytime; your stores are untouched.",
348
+ "想接自己的数据:看 docs/adapters.md,把记忆库指过来。": "Connect your own data: see docs/adapters.md and point the map at your store.",
349
+ "看示例": "See the demo",
350
+ " · 只读": " · read-only",
351
+ " · 生成于 ": " · generated ",
352
+ " · 搜索与证据链都在本地算": " · search and evidence chains are computed locally",
353
+ " 条虚构记忆 · 只读 · 你的记忆库没有被碰过": " fictional memories · read-only · your stores were never touched",
354
+ "示例星系": "Demo galaxy",
355
+ "退出示例": "Leave demo",
356
+ "示例星系:随便点,右栏的点线都是真的算出来的": "Demo galaxy: click anything; the dots and lines on the right are genuinely computed",
357
+ "这个视图需要从 DSH 里打开": "This view must be opened from DSH",
358
+ "连不上记忆库": "Can't reach the memory stores",
359
+ "加载记忆库时出错": "Failed to load the memory stores",
360
+ "直接打开这个地址会被挡在门外。回 DSH 的对话窗口,从侧栏或命令里打开宏记忆 · 星图即可。": "Opening this address directly is blocked. Return to DSH and open Macro Memory · Graph from the sidebar or command palette.",
361
+ "等了 12 秒还没有回包:宿主可能正忙,或者独立引擎半死。稍等一下再点重试。": "No response after 12 seconds: the host may be busy, or the standalone engine is half-dead. Wait a moment and retry.",
362
+ "取图这一步失败了。技术细节在下面,重试一次通常就好。": "Fetching the graph failed. Details are below; a retry usually fixes it.",
363
+ "重试中…": "Retrying…",
364
+ "诊断信息已复制": "Diagnostics copied",
365
+ "诊断信息已复制(不含正文)": "Diagnostics copied (no memory content)",
366
+ "分页:已加载 {n} / {total} 条,还有 {left} 条": "Loaded {n} of {total} memories — {left} more to go",
367
+ "继续加载": "Load more",
368
+ "加载中…": "Loading…",
369
+ "这一页没加载上:": "This page failed to load: ",
370
+ "星图刚更新过,已从第一页重新加载": "The map changed while loading; restarted from the first page",
371
+ "这一页没有新内容": "This page brought nothing new",
372
+ "已经加载全部 {n} 条": "All {n} memories are loaded",
373
+ "快照校验通过": "Snapshot checksum verified",
374
+ "快照校验失败:文件被改动过或没下载完整": "Snapshot checksum mismatch: the file was modified or truncated",
375
+ "期望 ": "expected ",
376
+ "实际 ": "actual ",
377
+ "。图上的内容可能缺一部分,请重新导出。": ". The map may be missing part of its content — please export again.",
378
+ "快照数据读不出来(文件损坏或没下载完整):": "The snapshot data cannot be read (damaged or truncated): ",
379
+ "。请重新导出。": ". Please export again.",
380
+ "快照长度与导出时不一致(": "Snapshot length differs from the export (",
381
+ " 字节):文件可能没下载完整。请重新导出。": " bytes): the file may be incomplete. Please export again.",
382
+ "三维只画重要度前 {n} 条(共 {total} 条);要全量请留在星云视图":
383
+ "3D draws the top {n} memories by importance ({total} total); stay in the nebula view for all of them",
384
+ "复制失败:浏览器没给剪贴板权限": "Copy failed: the browser did not grant clipboard access",
385
+ "回到你自己的记忆库": "Back to your own memory stores",
386
+ "星云已更新": "Map updated",
387
+ "后台重建完成": "Background rebuild finished",
388
+ "接口已切到 ": "Switched API to ",
389
+ "宿主": "host",
390
+ "独立引擎": "standalone engine",
391
+ "宏记忆 · 星图:": "Macro Memory · Graph: ",
392
+ " 条记忆,": " memories, ",
393
+ "暂无数据": "No data",
394
+ "当前位置:": "Now at: ",
395
+ "已打开:": "Opened: ",
396
+ "已收起详情": "Detail panel closed",
397
+ "已离开星图": "Left the star map",
398
+ "已放大": "Zoomed in",
399
+ "已缩小": "Zoomed out",
400
+ "这个方向没有别的记忆": "No other memory that way",
401
+ "这颗星没有连出去的线": "This star has no links going out",
402
+ "。按 Tab 进入星图后,用方向键在星星之间移动,回车打开。": ". Press Tab to enter the star map, use the arrow keys to move between stars, and Enter to open one.",
403
+ " 条,用搜索或项目筛选收窄范围。": " more — narrow the list with search or a workspace filter.",
404
+ "在星图里按方向走到下一颗(先点一下画面,或 Tab 进来)": "Walk to the next star that way (click the map first, or Tab in)",
405
+ "打开当前这颗星": "Open the current star",
406
+ "沿连接走到相邻的一颗": "Walk along a link to a neighbour",
407
+ "放大 / 缩小": "Zoom in / out",
408
+ "跳到连接最多的那颗": "Jump to the most connected star",
409
+ "记忆索引": "Memory index",
410
+ "跳到宏记忆 · 星图": "Skip to the memory map",
411
+ "宏记忆 · 星图:方向键在星星之间移动,回车打开详情": "Macro Memory · Graph: arrow keys move between stars, Enter opens details",
412
+ "方向键在记忆之间按方向移动;回车打开当前位置的记忆;[ 和 ] 沿连接走;加号减号缩放;0 回到全图;Esc 离开星图,回到页面上的其它按钮。": "Arrow keys move between memories by direction; Enter opens the memory you are on; [ and ] walk along links; plus and minus zoom; 0 returns to the whole map; Escape leaves the star map and goes back to the page controls.",
413
+ "示例星系是只读的:先点顶部「退出示例」,再重建自己的库": "The demo galaxy is read-only: leave the demo first, then rebuild your own stores",
414
+ "已重建:": "Rebuilt: ",
415
+ "什么都没变,没重建:": "Nothing changed, so no rebuild: ",
416
+ "刚好有一轮重建在进行,已用它的结果": "A rebuild was already running; used its result",
417
+ " 条连接 · ": " links · ",
418
+ "重建失败:": "Rebuild failed: ",
419
+ "先在左栏「工作区」里只留一个,再导出这一片": "Keep only one workspace on the left before exporting that slice",
420
+ "先在图上点一个节点,再导出它周围 2 跳": "Click a node on the map before exporting its 2-hop neighbourhood",
421
+ "星云": "Nebula",
422
+ "平面星云:看清连接与证据": "Flat nebula: see the links and the evidence",
423
+ "星系": "Galaxy",
424
+ "三维力导向星系:结构由真实连接决定,重要度越高越贴核心": "3D force-directed galaxy: structure comes from real links; more important memories sit closer to the core",
425
+ "时间": "Time",
426
+ "时间螺旋:越新的记忆越靠中心,每个工作区一条旋臂": "Time spiral: newer memories sit nearer the centre; one arm per workspace",
427
+ "切换中文 / English": "Switch language",
428
+ "隐去「日记」工作区": "Hide “Diary”",
429
+ "筛选面板:工作区 / 层级 / 连接类型 / 强度": "Filters: workspace / level / link type / strength",
430
+ "项目卡片:每个工作区的现状、最近变更、下一步与代表记忆": "Project cards: status, recent changes, next steps and representative memories for each workspace",
431
+ "看板:来源 / 真源 / 体检 / 屏蔽(B)": "Boards: sources / truth / health / muted (B)",
432
+ "重新提取记忆并重建连接": "Re-extract memories and rebuild the links",
433
+ "导出:当前视图 PNG / 可见子图 JSON": "Export: current view PNG / visible subgraph JSON",
434
+ "当前视图 · PNG": "Current view · PNG",
435
+ "可见子图 · JSON": "Visible subgraph · JSON",
436
+ "整张星图 · 单文件 HTML": "Full map · single-file HTML",
437
+ "当前工作区 · 单文件 HTML": "Current workspace · single-file HTML",
438
+ "选中节点 2 跳 · 单文件 HTML": "Selected node, 2 hops · single-file HTML",
439
+ "只影响导出的快照,不会改动记忆库": "Only affects the exported snapshot; your stores are untouched",
440
+ "搜索记忆 / 神经元扩散检索…": "Search memories — or spread from a node…",
441
+ "证据链": "Evidence chain",
442
+ "看板": "Boards",
443
+ "真源": "Truth",
444
+ "体检": "Health",
445
+ "屏蔽": "Muted",
446
+ "搜记忆、切换视图、打开项目卡片…": "Search memories, switch views, open project cards…",
447
+ "/ 搜索": "/ search",
448
+ "↑↓ 选择": "↑↓ select",
449
+ "Enter 执行": "Enter run",
450
+ "Esc 关闭": "Esc close",
451
+ "主线": "Thread",
452
+ "时间回放": "Time replay",
453
+ "每个工作区一张交接卡": "One handover card per workspace",
454
+ "关闭(Esc)": "Close (Esc)",
455
+ "关闭提示": "Dismiss",
456
+ "知道了": "Got it",
457
+ "关闭证据链": "Close the evidence chain",
458
+ "关闭看板": "Close the boards",
459
+ "关闭项目卡片": "Close the project cards",
460
+ "关闭主线": "Close the thread",
461
+ "命令面板输入": "Command palette input",
462
+ "时间回放滑块": "Time replay slider",
463
+ "快捷键一览(?)": "Keyboard shortcuts (?)",
464
+ "正在点亮记忆星云…": "Lighting up your memory nebula…",
465
+ "记忆概览": "Overview",
466
+ "聚焦": "Focus",
467
+ "筛选": "Filters",
468
+ "最近 ": "recent ",
469
+ " 小时": " h",
470
+ "1 天前": "1 day ago",
471
+ "请求超时(": "Request timed out (",
472
+ "这是一份离线快照,「": "This is an offline snapshot; “",
473
+ "」不可用;回到 DSH 里打开实时星图即可": "” is unavailable. Open the live map inside DSH to use it.",
474
+ "标题命中": "title hit",
475
+ "关键词「": "keyword “",
476
+ "标题含「": "title contains “",
477
+ "内容命中": "content hit",
478
+ "找不到这两个节点:": "Can't find these two nodes: ",
479
+ "连线": "link",
480
+ "断线": "unlink",
481
+ "解除屏蔽": "unmute",
482
+ "在算这条链…": "Tracing this chain…",
483
+ "这两条记忆在星图里没有连上(": "These two memories are not connected in the map (",
484
+ ")。没有关系就不编关系。": "). If there is no relation, no relation is invented.",
485
+ "正在生长记忆星云…": "Growing your memory nebula…",
486
+ "正在建图": "Building the map",
487
+ "库很大:": "Large library: ",
488
+ "配置文件读不出来:": "Config file unreadable: ",
489
+ "星图自己的小库重建了:": "Nebula's own sidecar store was rebuilt: ",
490
+ "来源被截断:": "Source truncated: ",
491
+ " 只读了前 ": " only the first ",
492
+ " 个文件,其余没有进图(调大该来源的 maxFiles)": " files were read; the rest are not on the map (raise that source's maxFiles)",
493
+ " 条记忆,最近一次建图 ": " memories, last build took ",
494
+ " 秒。建议按工作区拆库。": "s. Consider splitting by workspace.",
495
+ "宿主里跑的是 ": "The host is running the ",
496
+ " 引擎": " engine",
497
+ ",缺 ": ", missing ",
498
+ "离线快照": "Offline snapshot",
499
+ "没有回应。多半是 DSH 正在重启,或者独立引擎还没起来——等两秒再点重试。": " is not responding. DSH may be restarting, or the standalone engine is not up yet—wait a moment and retry.",
500
+ "重试": "Retry",
501
+ "复制诊断": "Copy diagnostics",
502
+ "# 不含记忆正文;可以整段贴给支持": "# contains no memory text; you can paste this whole report into a support thread",
503
+ "技术细节": "Technical details",
504
+ "接口": "API",
505
+ "重建": "Rebuild",
506
+ "最近": "recent",
507
+ "每个工作区一个 .dsh-meow/memory.db\n": "One .dsh-meow/memory.db per workspace\n",
508
+ "不是说记忆写错了,是说它们该整理、该更新、该被用起来\n点一下展开": "Not that a memory is wrong—these should be tidied, updated, or used\nClick to expand",
509
+ "提速了": "Faster now"
510
+ }
511
+
512
+ const params = new URLSearchParams(location.search)
513
+ const queryLang = params.get('lang')
514
+ let lang = queryLang === 'en' || queryLang === 'zh' ? queryLang : null
515
+ if (!lang) {
516
+ try {
517
+ lang = localStorage.getItem('nebula.lang')
518
+ } catch {}
519
+ }
520
+ if (lang !== 'en' && lang !== 'zh') {
521
+ lang = String(navigator.language || '').toLowerCase().startsWith('zh') ? 'zh' : 'en'
522
+ }
523
+
524
+ function t(zh, vars) {
525
+ let s = lang === 'en' ? EN[zh] || zh : zh
526
+ if (vars) for (const k of Object.keys(vars)) s = s.split('{' + k + '}').join(String(vars[k]))
527
+ return s
528
+ }
529
+
530
+ function applyDom(root) {
531
+ const scope = root || document
532
+ document.documentElement.lang = lang === 'en' ? 'en' : 'zh-CN'
533
+ document.documentElement.classList.toggle('lang-en', lang === 'en')
534
+ const title = document.querySelector('title')
535
+ if (title) title.textContent = lang === 'en' ? 'Macro Memory · Graph' : '宏记忆 · 星图'
536
+ const desc = document.querySelector('meta[name="description"]')
537
+ if (desc && lang === 'en') {
538
+ desc.setAttribute('content', 'Turn memories scattered across workspaces into a map of evidence: see them, walk the links, take it with you.')
539
+ }
540
+ for (const el of scope.querySelectorAll('[data-zh]')) {
541
+ const key = el.getAttribute('data-zh')
542
+ if (key != null) el.textContent = t(key)
543
+ }
544
+ for (const el of scope.querySelectorAll('[data-zh-title]')) {
545
+ const key = el.getAttribute('data-zh-title')
546
+ if (key != null) el.setAttribute('title', t(key))
547
+ }
548
+ for (const el of scope.querySelectorAll('[data-zh-ph]')) {
549
+ const key = el.getAttribute('data-zh-ph')
550
+ if (key != null) el.setAttribute('placeholder', t(key))
551
+ }
552
+ for (const el of scope.querySelectorAll('[data-zh-aria]')) {
553
+ const key = el.getAttribute('data-zh-aria')
554
+ if (key != null) el.setAttribute('aria-label', t(key))
555
+ }
556
+ for (const el of scope.querySelectorAll('[data-lang-label]')) el.textContent = lang === 'en' ? '中' : 'EN'
557
+ }
558
+
559
+ function setLang(next) {
560
+ try {
561
+ localStorage.setItem('nebula.lang', next)
562
+ } catch {}
563
+ location.reload()
564
+ }
565
+
566
+ const api = {
567
+ t,
568
+ applyDom,
569
+ setLang,
570
+ get lang() {
571
+ return lang
572
+ },
573
+ toggle() {
574
+ setLang(lang === 'en' ? 'zh' : 'en')
575
+ },
576
+ }
577
+ window.NebulaI18n = api
578
+ if (document.readyState === 'loading') document.addEventListener('DOMContentLoaded', () => applyDom())
579
+ else applyDom()
580
+ })()