macro-memory 0.9.1 → 0.26.8
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 +157 -268
- package/bin/macro-memory.mjs +524 -5
- package/docs/CHANGELOG.md +1101 -0
- package/docs/MAC.md +44 -6
- package/lib/core/client.js +56 -22
- package/lib/core/config.js +15 -2
- package/lib/core/daemon.js +336 -0
- package/lib/core/engine.js +7 -6
- package/lib/core/fence.js +1 -1
- package/lib/core/serve.js +37 -14
- package/lib/core/trust.js +6 -2
- package/lib/index.js +209 -3
- package/lib/macro/contract.js +31 -1
- package/lib/macro/defs/admin.js +4 -4
- package/lib/macro/defs/link.js +96 -9
- package/lib/macro/defs/read.js +11 -1
- package/lib/macro/defs/remember.js +89 -1
- package/lib/macro/defs/search.js +157 -6
- package/lib/macro/dreamledger.js +6 -1
- package/lib/macro/evidence.js +84 -0
- package/lib/macro/fakesites.js +93 -0
- package/lib/macro/fusion.js +16 -2
- package/lib/macro/linkflow.js +130 -5
- package/lib/macro/links.js +69 -0
- package/lib/macro/platform.js +74 -0
- package/lib/macro/portability.js +737 -0
- package/lib/macro/prompt.js +6 -6
- package/lib/macro/revisions.js +3 -13
- package/lib/macro/slots.js +252 -0
- package/lib/macro/snapshot.js +309 -1
- package/lib/macro/tools.js +49 -4
- package/lib/macro/topicpages.js +300 -0
- package/lib/rerank/download.js +68 -0
- package/lib/rerank/provider.js +507 -0
- package/lib/rerank/runtime.js +246 -0
- package/lib/rerank/tokenizer.js +183 -0
- package/lib/semantic/download.js +68 -0
- package/lib/semantic/provider.js +205 -0
- package/lib/semantic/runtime.js +175 -0
- package/lib/semantic/tokenizer.js +169 -0
- package/package.json +1 -1
- package/vendor/VENDOR.json +4 -4
- package/vendor/dsh-memory-nebula/lib/host/adapters/meow.js +7 -1
- package/vendor/dsh-memory-nebula/lib/host/graph.js +183 -3
- package/vendor/dsh-memory-nebula/lib/index.js +75 -3
- package/vendor/dsh-memory-nebula/lib/web/app.js +5 -0
- package/vendor/dsh-memory-nebula/lib/web/i18n.js +1 -0
- package/vendor/meow-memory/lib/index.js +3205 -167
- package/vendor/meow-memory/lib/prompts/en/labels.md +2 -0
- package/vendor/meow-memory/lib/prompts/en/tools.md +1 -0
- package/vendor/meow-memory/lib/prompts/pt-br/labels.md +2 -0
- package/vendor/meow-memory/lib/prompts/pt-br/tools.md +1 -0
- package/vendor/meow-memory/lib/prompts/zh/labels.md +2 -0
- package/vendor/meow-memory/lib/prompts/zh/tools.md +1 -0
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
- dream.conflict.same: -> both carry the exact same update time ({time}), so neither is newer — read the bodies and decide yourself
|
|
52
52
|
- dream.conflict.rule: Ruler — same subject + different numbers/versions + neither a verbatim duplicate nor an excerpt-plus-write-up. Different wording with identical numbers does **not** count as a conflict (that is a restatement); an archived entry is not reported either (archiving is already the disposition). However you settle it, leave a trace on the entry you changed that says why.
|
|
53
53
|
- dream.plan.conflicts: {n} more probable conflicts (same subject, different numbers/versions — named in the checklist).
|
|
54
|
+
- dream.plan.grew: [Net growth: {chars} chars / {rows} rows this round] — organizing should not grow the library; new entries need matching merges, trims or archives. A net gain means this round only added.
|
|
55
|
+
- dream.plan.shrunk: [Net shrink: {chars} chars / {rows} rows this round] — the normal shape of organizing: the same conclusions written with fewer words.
|
|
54
56
|
- dream.chain.title: 【{n} broken succession chains】(these entries say "superseded by <id8>", but that successor is no longer in the store, or the first 8 characters collide with several entries so we cannot tell which — the blocks above compare wording, which cannot catch this):
|
|
55
57
|
- dream.chain.absent: it says {who} took over ({day}), but that entry is not in the store anymore (deleted or moved) — either this entry is the current conclusion (set it back to active), or rewrite it once with supersedes so a new entry takes over.
|
|
56
58
|
- dream.chain.ambiguous: it says {who} took over ({day}), but that prefix matches {hits} entries in the store (entries written in the same second always share the first 8 characters) — check the opening「{head}」yourself and pick the right one; do not edit the wrong entry from the prefix alone.
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
- memory_search.out.timeline: Timeline, earliest first: only when the query asks about time (when / before / after / ...) and at least 3 hits came back; at most 8 entries, like `[3] 2023-05-08 13:56 · [1] ...`, where the number is the same [k] that starts each hit header.
|
|
35
35
|
- memory_search.out.hits.id: Full memory id (pass it to memory_read/memory_update/memory_find_similar).
|
|
36
36
|
- memory_search.out.hits.keywords: The entry's keywords (extracted by an LLM or automatically).
|
|
37
|
+
- memory_search.out.hits.matched: Matched words: which words of the query actually appear in this entry (title/content/keywords), in query order, longest match first, at most 6. Absent when nothing matches — not a "no hit", the entry came in via links.
|
|
37
38
|
- memory_search.out.hits.project: Project the entry belongs to; ""=unlabeled; globally applicable entries read "global".
|
|
38
39
|
- memory_search.out.hits.updated_at: Memory timestamp (last update, in milliseconds).
|
|
39
40
|
- memory_search.out.hits.truncated: Whether content was cut to content_max; true means the original is longer — read the full text with memory_read.
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
- dream.conflict.same: -> as duas têm exatamente o mesmo horário de atualização ({time}), então nenhuma é mais nova — leia os textos e decida você mesmo
|
|
52
52
|
- dream.conflict.rule: Régua — mesmo assunto + números/versões diferentes + nem duplicata literal nem resumo-com-redação. Redação diferente com números idênticos **não** conta como conflito (é reescrita); entrada arquivada também não é reportada (arquivar já é o desfecho). Como quer que resolva, deixe na entrada alterada um rastro do porquê.
|
|
53
53
|
- dream.plan.conflicts: mais {n} conflitos prováveis (mesmo assunto, números/versões diferentes — nomeados na lista).
|
|
54
|
+
- dream.plan.grew: [Crescimento líquido: {chars} caracteres / {rows} linhas nesta rodada] — organizar não é crescer; o que foi adicionado precisa de mesclagens, cortes ou arquivamentos equivalentes.
|
|
55
|
+
- dream.plan.shrunk: [Redução líquida: {chars} caracteres / {rows} linhas nesta rodada] — a forma normal de organizar: as mesmas conclusões com menos palavras.
|
|
54
56
|
- dream.chain.title: 【{n} cadeias de sucessão quebradas】(estas entradas dizem "substituída por <id8>", mas essa sucessora não está mais no acervo, ou os 8 primeiros caracteres colidem com várias entradas e não dá para saber qual — os blocos acima comparam redação, o que não pega este caso):
|
|
55
57
|
- dream.chain.absent: diz que {who} assumiu ({day}), mas essa entrada não está mais no acervo (apagada ou movida) — ou esta entrada é a conclusão atual (volte para active), ou reescreva uma vez com supersedes para uma nova entrada assumir.
|
|
56
58
|
- dream.chain.ambiguous: diz que {who} assumiu ({day}), mas esse prefixo casa com {hits} entradas do acervo (entradas gravadas no mesmo segundo sempre compartilham os 8 primeiros caracteres) — confira você mesmo o início「{head}」e escolha a certa; não edite a entrada errada só pelo prefixo.
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
- memory_search.out.timeline: Linha do tempo, do mais antigo ao mais recente: so quando a query pergunta sobre tempo (when / before / after / ...) e houve pelo menos 3 acertos; no maximo 8 entradas, como `[3] 2023-05-08 13:56 · [1] ...`, em que o numero e o mesmo [k] do cabecalho do acerto.
|
|
35
35
|
- memory_search.out.hits.id: id completo da memória (passe-o para memory_read/memory_update/memory_find_similar).
|
|
36
36
|
- memory_search.out.hits.keywords: As palavras-chave da entrada (extraídas por um LLM ou automaticamente).
|
|
37
|
+
- memory_search.out.hits.matched: Palavras que casaram: quais palavras da consulta aparecem nesta entrada (título/conteúdo/palavras-chave), na ordem da consulta, casamento mais longo primeiro, no máximo 6. Ausente quando nada casa — não é "sem acerto", a entrada veio por vínculos.
|
|
37
38
|
- memory_search.out.hits.project: Projeto ao qual a entrada pertence; ""=sem rótulo; entradas aplicáveis globalmente mostram "global".
|
|
38
39
|
- memory_search.out.hits.updated_at: Timestamp da memória (última atualização, em milissegundos).
|
|
39
40
|
- memory_search.out.hits.truncated: Se o content foi cortado em content_max; true significa que o original é maior — leia o texto completo com memory_read.
|
|
@@ -51,6 +51,8 @@
|
|
|
51
51
|
- dream.conflict.same: → 两条更新时间一模一样({time}),分不出谁新——看正文自己决断
|
|
52
52
|
- dream.conflict.rule: 判据:同一主题 + 数字/版本不一样 + 既不是重复也不是摘要与全文。措辞不同而数字一致的**不算**冲突(那是复述);归档的那条也不报(归档本身就是处置)。改完库之后,被改的那条要留下能说明「为什么这么定」的痕迹。
|
|
53
53
|
- dream.plan.conflicts: 另有 {n} 对疑似冲突(同一主题写了彼此不同的数字/版本,清单里点名了)。
|
|
54
|
+
- dream.plan.grew: 【这一轮净增了 {chars} 字 / {rows} 条】——整理不是越整理越大;新增应该有对应的合并、压短或归档,净增说明这一轮只做了加法。
|
|
55
|
+
- dream.plan.shrunk: 【这一轮净减 {chars} 字 / {rows} 条】——这是整理的正常形状:同量的结论用更少的字写下来。
|
|
54
56
|
- dream.chain.title: 【链断了 {n} 条】(这些条目的正文写着「已被取代:<id8>」,可那个接手者现在不在库里、或者前 8 位撞了一堆认不出是谁——上面几块比的是正文像不像,这种断法比不出来):
|
|
55
57
|
- dream.chain.absent: 写着被 {who} 接手({day}),可那条现在不在库里(被删了或搬走了)——这条要么本身就是现在的结论(改回 active),要么带 supersedes 重写一次,让新条目接手它。
|
|
56
58
|
- dream.chain.ambiguous: 写着被 {who} 接手({day}),可这个前缀在库里有 {hits} 条(同一秒写入的前 8 位必然相同)——按开头「{head}」自己去核对是谁,别照着前缀改错人。
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
- memory_search.out.timeline: 时间轴(从早到晚):只在 query 问时间(when / 什么时候 / 之前 / 之后 …)且命中 ≥3 条时出现,最多 8 条,形如「[3] 2023-05-08 13:56 · [1] …」;方括号编号就是命中抬头开头的 [k]。
|
|
35
35
|
- memory_search.out.hits.id: 完整记忆 id(可传给 memory_read/memory_update/memory_find_similar)。
|
|
36
36
|
- memory_search.out.hits.keywords: 记忆关键词列表(LLM 提取或自动 bigram)。
|
|
37
|
+
- memory_search.out.hits.matched: 命中词:问句里真正出现在这条记忆(标题/正文/关键词)里的词,按问句顺序、最长匹配优先,最多 6 个;一个都没对上时整个字段不出现(不是「没命中」,是这条靠关联进来)。
|
|
37
38
|
- memory_search.out.hits.project: 项目归属;""=未标记;全局信息为"全局"。
|
|
38
39
|
- memory_search.out.hits.updated_at: 记忆时间戳(最后更新时间,毫秒)。
|
|
39
40
|
- memory_search.out.hits.truncated: content 是否按 content_max 截断;true 表示原文更长,全文用 memory_read 读。
|