@kisev/agentomatic 11.0.0-dev.46.gfbe1e4c6992e → 11.0.0-dev.47.gcb218d104bc4
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 +13 -5
- package/README.ru.md +14 -6
- package/dist/plugins/memomatic.d.ts +6 -1
- package/dist/plugins/memomatic.js +16 -18
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -31,17 +31,25 @@ nightly dream sweep that ingests session transcripts, promotes repeatedly useful
|
|
|
31
31
|
entries through deterministic gates and one bounded model turn, supersedes
|
|
32
32
|
outdated facts by key, and archives every pre-image.
|
|
33
33
|
|
|
34
|
-
- State: `$XDG_STATE_HOME/memomatic/` (corpus, index, history, archive)
|
|
34
|
+
- State: `$XDG_STATE_HOME/memomatic/` (corpus, index, history, archive) and
|
|
35
|
+
`$XDG_STATE_HOME/memomatic/inbox/` where skills and agents queue asynchronous
|
|
36
|
+
Markdown drops.
|
|
35
37
|
- Config: `$XDG_CONFIG_HOME/memomatic/settings.json` (embedding endpoint, dream
|
|
36
|
-
model and variant, thresholds
|
|
37
|
-
`- never-save: <topic>` and opt-in
|
|
38
|
+
model and variant, thresholds, `projects` cwd-to-project map for recall) and
|
|
39
|
+
`MEMORY_RULES.md` with manual directives: `- never-save: <topic>` and opt-in
|
|
40
|
+
`- auto-clean: older-than=90d scope=episodic [source=name]`.
|
|
38
41
|
- Tools: `memory_search`, `memory_get`, `memory_write`, `memory_forget`, exposed
|
|
39
42
|
by the plugin, by the MCP stdio server (`memomatic mcp-serve`),
|
|
40
|
-
and by the CLI (`search`, `status`, `index`, `dream --dry-run`).
|
|
43
|
+
and by the CLI (`process`, `search`, `status`, `index`, `dream --dry-run`).
|
|
44
|
+
`memory_write` queues an inbox drop and answers with a flush hint; entries
|
|
45
|
+
carry a `source` annotation whose derived visibility (`team-*`, `gitlab`,
|
|
46
|
+
`spec-manage` are quotable in team artifacts, the rest personal-only) is
|
|
47
|
+
exposed in search results and the session bootstrap, which also injects
|
|
48
|
+
project- and trigger-matched recall blocks from the session database.
|
|
41
49
|
- Scheduling: copy `memomatic-dream.service` and `memomatic-dream.timer` from the
|
|
42
50
|
package `assets/systemd/` into `~/.config/systemd/user/` and run
|
|
43
51
|
`systemctl --user enable --now memomatic-dream.timer`; run the sweep another
|
|
44
|
-
way by invoking `memomatic dream` yourself.
|
|
52
|
+
way by invoking `memomatic process` or `memomatic dream` yourself.
|
|
45
53
|
- Forgetting is explicit or rule-gated: nothing is deleted without
|
|
46
54
|
`memory_forget` or an `auto-clean` directive; pinned entries never decay.
|
|
47
55
|
|
package/README.ru.md
CHANGED
|
@@ -33,18 +33,26 @@ Memomatic - персональная обучающая память по мот
|
|
|
33
33
|
воротами и одной ограниченной модельной фазой, замещает устаревшие факты по
|
|
34
34
|
ключу и сохраняет все предобразы.
|
|
35
35
|
|
|
36
|
-
- Состояние: `$XDG_STATE_HOME/memomatic/` (корпус, индекс, история, архив)
|
|
36
|
+
- Состояние: `$XDG_STATE_HOME/memomatic/` (корпус, индекс, история, архив) и
|
|
37
|
+
`$XDG_STATE_HOME/memomatic/inbox/`, куда скиллы и агенты кладут асинхронные
|
|
38
|
+
Markdown-дропы.
|
|
37
39
|
- Настройки: `$XDG_CONFIG_HOME/memomatic/settings.json` (эндпоинт эмбеддера,
|
|
38
|
-
модель и вариант мышления для сновидений,
|
|
39
|
-
|
|
40
|
-
`-
|
|
40
|
+
модель и вариант мышления для сновидений, пороги, маппинг `projects`
|
|
41
|
+
каталог→проект для напоминаний) и `MEMORY_RULES.md` с ручными директивами:
|
|
42
|
+
`- never-save: <тема>` и опциональная
|
|
43
|
+
`- auto-clean: older-than=90d scope=episodic [source=name]`.
|
|
41
44
|
- Инструменты: `memory_search`, `memory_get`, `memory_write`, `memory_forget` -
|
|
42
45
|
через плагин, MCP-сервер stdio (`memomatic mcp-serve`) и CLI
|
|
43
|
-
(`search`, `status`, `index`, `dream --dry-run`).
|
|
46
|
+
(`process`, `search`, `status`, `index`, `dream --dry-run`).
|
|
47
|
+
`memory_write` кладёт дроп в inbox и отвечает подсказкой flush; записи несут
|
|
48
|
+
аннотацию `source`, из которой выводится видимость (`team-*`, `gitlab` и
|
|
49
|
+
`spec-manage` цитируемы в командных артефактах, остальные personal-only);
|
|
50
|
+
метка видна в поиске и в bootstrap сессии, куда также попадают блоки
|
|
51
|
+
напоминаний по проекту и trigger-фразам из базы сессий.
|
|
44
52
|
- Расписание: скопируйте `memomatic-dream.service` и `memomatic-dream.timer` из
|
|
45
53
|
`assets/systemd/` пакета в `~/.config/systemd/user/` и выполните
|
|
46
54
|
`systemctl --user enable --now memomatic-dream.timer`; альтернативный запуск -
|
|
47
|
-
|
|
55
|
+
командами `memomatic process` или `memomatic dream`.
|
|
48
56
|
- Забывание явно или по правилу: ничего не удаляется без `memory_forget` или
|
|
49
57
|
директивы `auto-clean`; закрепленные записи не затухают.
|
|
50
58
|
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
export type MemomaticOptions = {
|
|
2
2
|
enabled?: boolean;
|
|
3
3
|
bootstrapBudgetChars?: number;
|
|
4
|
+
bootstrapEpisodicBudgetChars?: number;
|
|
4
5
|
};
|
|
5
6
|
export declare function memomatic(options?: MemomaticOptions): Promise<{
|
|
6
7
|
"experimental.chat.system.transform"?: undefined;
|
|
7
8
|
tool?: undefined;
|
|
8
9
|
} | {
|
|
9
|
-
"experimental.chat.system.transform": (
|
|
10
|
+
"experimental.chat.system.transform": (input: {
|
|
11
|
+
sessionID?: string;
|
|
12
|
+
}, output: {
|
|
10
13
|
system: string[];
|
|
11
14
|
}) => Promise<void>;
|
|
12
15
|
tool: {
|
|
@@ -56,6 +59,7 @@ export declare function memomatic(options?: MemomaticOptions): Promise<{
|
|
|
56
59
|
}>>;
|
|
57
60
|
key: import("zod").ZodOptional<import("zod").ZodString>;
|
|
58
61
|
project: import("zod").ZodOptional<import("zod").ZodString>;
|
|
62
|
+
source: import("zod").ZodOptional<import("zod").ZodString>;
|
|
59
63
|
importance: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
60
64
|
trigger: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
|
|
61
65
|
pinned: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
@@ -66,6 +70,7 @@ export declare function memomatic(options?: MemomaticOptions): Promise<{
|
|
|
66
70
|
origin?: "agent" | "user" | undefined;
|
|
67
71
|
key?: string | undefined;
|
|
68
72
|
project?: string | undefined;
|
|
73
|
+
source?: string | undefined;
|
|
69
74
|
importance?: number | undefined;
|
|
70
75
|
trigger?: string[] | undefined;
|
|
71
76
|
pinned?: boolean | undefined;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { tool } from "@opencode-ai/plugin";
|
|
2
|
-
import { forgetEntry, getEntry, openMemomatic, searchMemory, writeEntry, } from "@kisev/memomatic";
|
|
3
|
-
const DEFAULT_BOOTSTRAP_BUDGET = 4_000;
|
|
2
|
+
import { bootstrapContext, forgetEntry, getEntry, opencodeDatabasePath, openMemomatic, searchMemory, sessionFacts, writeEntry, } from "@kisev/memomatic";
|
|
4
3
|
async function withContext(work) {
|
|
5
4
|
const context = await openMemomatic();
|
|
6
5
|
try {
|
|
@@ -13,7 +12,8 @@ async function withContext(work) {
|
|
|
13
12
|
export async function memomatic(options = {}) {
|
|
14
13
|
if (options.enabled === false)
|
|
15
14
|
return {};
|
|
16
|
-
const
|
|
15
|
+
const curatedBudget = options.bootstrapBudgetChars ?? 4_000;
|
|
16
|
+
const episodicBudget = options.bootstrapEpisodicBudgetChars ?? 1_500;
|
|
17
17
|
const memorySearch = tool({
|
|
18
18
|
args: { query: tool.schema.string() },
|
|
19
19
|
description: "Search personal long-term memory for durable decisions, discoveries, failed attempts, and session outcomes.",
|
|
@@ -38,11 +38,12 @@ export async function memomatic(options = {}) {
|
|
|
38
38
|
origin: tool.schema.enum(["user", "agent"]).optional(),
|
|
39
39
|
key: tool.schema.string().optional(),
|
|
40
40
|
project: tool.schema.string().optional(),
|
|
41
|
+
source: tool.schema.string().optional(),
|
|
41
42
|
importance: tool.schema.number().min(1).max(10).optional(),
|
|
42
43
|
trigger: tool.schema.array(tool.schema.string()).optional(),
|
|
43
44
|
pinned: tool.schema.boolean().optional(),
|
|
44
45
|
},
|
|
45
|
-
description: "
|
|
46
|
+
description: "Queue a durable memory entry for the next process/dream pass: standing decisions with rationale, discoveries, failed attempts with rejection reasons, session outcomes, action-sensitive boundaries. Pass source=<skill-name> when a skill workflow requests the save. Respect MEMORY_RULES.md; never-save topics are rejected.",
|
|
46
47
|
async execute(args) {
|
|
47
48
|
return withContext((context) => writeEntry(context, {
|
|
48
49
|
importance: args.importance,
|
|
@@ -50,6 +51,7 @@ export async function memomatic(options = {}) {
|
|
|
50
51
|
origin: args.origin,
|
|
51
52
|
pinned: args.pinned,
|
|
52
53
|
project: args.project,
|
|
54
|
+
source: args.source,
|
|
53
55
|
target: args.target,
|
|
54
56
|
text: args.text,
|
|
55
57
|
trigger: args.trigger,
|
|
@@ -64,23 +66,19 @@ export async function memomatic(options = {}) {
|
|
|
64
66
|
},
|
|
65
67
|
});
|
|
66
68
|
return {
|
|
67
|
-
"experimental.chat.system.transform": async (
|
|
69
|
+
"experimental.chat.system.transform": async (input, output) => {
|
|
68
70
|
try {
|
|
69
71
|
const context = await openMemomatic();
|
|
70
72
|
try {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
}
|
|
81
|
-
if (!blocks.length)
|
|
82
|
-
return;
|
|
83
|
-
output.system.push(`${blocks.join("\n\n")}\n\nUse memory_search for episodic details and memory_write to save durable outcomes. Never re-save content that is already present in this memory.`);
|
|
73
|
+
const facts = input.sessionID
|
|
74
|
+
? sessionFacts(opencodeDatabasePath(), input.sessionID)
|
|
75
|
+
: { directory: null, title: null, firstMessage: null };
|
|
76
|
+
const block = await bootstrapContext(context, facts, {
|
|
77
|
+
curatedBudgetChars: curatedBudget,
|
|
78
|
+
episodicBudgetChars: episodicBudget,
|
|
79
|
+
});
|
|
80
|
+
if (block)
|
|
81
|
+
output.system.push(block);
|
|
84
82
|
}
|
|
85
83
|
finally {
|
|
86
84
|
context.store.close();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kisev/agentomatic",
|
|
3
|
-
"version": "11.0.0-dev.
|
|
3
|
+
"version": "11.0.0-dev.47.gcb218d104bc4",
|
|
4
4
|
"description": "OpenCode integration and opt-in installer for portable Agent Skills.",
|
|
5
5
|
"homepage": "https://github.com/kisev/skills#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
"pack:check": "node test/pack-allowlist.mjs"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@kisev/memomatic": "1.0.0-dev.
|
|
53
|
-
"@kisev/safe-fs": "1.0.0-dev.
|
|
52
|
+
"@kisev/memomatic": "1.0.0-dev.47.gcb218d104bc4",
|
|
53
|
+
"@kisev/safe-fs": "1.0.0-dev.47.gcb218d104bc4"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@opencode-ai/plugin": "1.18.29",
|