@mono-agent/agent-app 0.2.1 → 0.3.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/dist/app.d.ts.map +1 -1
- package/dist/app.js +108 -2
- package/dist/app.js.map +1 -1
- package/dist/background.d.ts +81 -0
- package/dist/background.d.ts.map +1 -0
- package/dist/background.js +326 -0
- package/dist/background.js.map +1 -0
- package/dist/channels.d.ts +4 -6
- package/dist/channels.d.ts.map +1 -1
- package/dist/channels.js +72 -28
- package/dist/channels.js.map +1 -1
- package/dist/cli.d.ts +10 -2
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +124 -10
- package/dist/cli.js.map +1 -1
- package/dist/doctor.js +111 -5
- package/dist/doctor.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/init.d.ts +1 -1
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +1 -2
- package/dist/init.js.map +1 -1
- package/dist/launchd.d.ts +67 -0
- package/dist/launchd.d.ts.map +1 -0
- package/dist/launchd.js +164 -0
- package/dist/launchd.js.map +1 -0
- package/dist/memory-rituals.d.ts +51 -0
- package/dist/memory-rituals.d.ts.map +1 -0
- package/dist/memory-rituals.js +228 -0
- package/dist/memory-rituals.js.map +1 -0
- package/package.json +15 -15
- package/skills/mono-agent-composer/SKILL.md +2 -2
- package/skills/mono-agent-composer/references/config-blueprint.md +28 -11
- package/skills/mono-agent-composer/references/discovery-questions.md +100 -4
- package/skills/mono-agent-composer/references/feature-coverage.md +8 -8
- package/skills/mono-agent-composer/references/package-map.md +4 -6
|
@@ -32,7 +32,7 @@ my-agent/
|
|
|
32
32
|
"effort": "medium", // none|low|medium|high|xhigh|max
|
|
33
33
|
"permissionMode": "default", // default|plan|acceptEdits|bypassPermissions (CLI backends)
|
|
34
34
|
"reasoningSummary": "auto", // auto|concise|detailed|off|on
|
|
35
|
-
"maxTurns":
|
|
35
|
+
"maxTurns": 0, // 0 or omitted means unlimited; 1-100 caps turns
|
|
36
36
|
"workspace": ".",
|
|
37
37
|
"session": { "mode": "continuous", "idleTimeoutMs": 1800000 } // or "per-message"
|
|
38
38
|
},
|
|
@@ -63,20 +63,32 @@ my-agent/
|
|
|
63
63
|
},
|
|
64
64
|
|
|
65
65
|
// Memory strategy. Omit the section for no memory.
|
|
66
|
+
// Three tiers over one substrate (memory-store + memory-bujo):
|
|
67
|
+
// lite — FTS keyword recall + rapid-log; no external deps.
|
|
68
|
+
// journal — + hybrid recall (BM25+vector) + decay; needs Ollama embeddings.
|
|
69
|
+
// bujo — + LLM capture/reconcile + entity graph + auto-scheduled
|
|
70
|
+
// reflection/migration; needs Ollama embeddings + chat model.
|
|
66
71
|
"memory": {
|
|
67
|
-
"mode": "
|
|
68
|
-
"path": "./.mono-agent/memory", //
|
|
72
|
+
"mode": "bujo", // lite | journal | bujo
|
|
73
|
+
"path": "./.mono-agent/memory", // root directory for all tiers
|
|
69
74
|
"writeMode": "append-host-summary", // disabled | append-host-summary
|
|
70
|
-
"scope": "single-file", // markdown only: single-file | per-conversation
|
|
71
75
|
"maxBytes": 64000,
|
|
72
|
-
"
|
|
73
|
-
"graphPath": "./.mono-agent/memory/graph.jsonl", // journal only; this is the default
|
|
74
|
-
"embeddings": { // optional: semantic memory_search
|
|
76
|
+
"embeddings": { // required for journal and bujo
|
|
75
77
|
"provider": "ollama", // ollama | openai
|
|
76
|
-
"model": "nomic-embed-text",
|
|
78
|
+
"model": "nomic-embed-text:v1.5", // use exact :v1.5 tag (pull first with ollama pull)
|
|
77
79
|
"endpoint": "http://localhost:11434",
|
|
78
|
-
"apiKeyEnv": "OPENAI_API_KEY"
|
|
79
|
-
|
|
80
|
+
"apiKeyEnv": "OPENAI_API_KEY", // or inline "apiKey"; required for openai
|
|
81
|
+
"dim": 768 // nomic-embed-text:v1.5 output dimension
|
|
82
|
+
},
|
|
83
|
+
"llm": { // required for bujo; omit for lite/journal
|
|
84
|
+
"provider": "ollama",
|
|
85
|
+
"model": "qwen3.6:latest", // any local Ollama chat model; also set MONO_AGENT_MEMORY_LLM_MODEL for CLI
|
|
86
|
+
"endpoint": "http://localhost:11434" // optional; defaults to http://localhost:11434
|
|
87
|
+
},
|
|
88
|
+
// Bujo auto-scheduler — override defaults or disable per-ritual.
|
|
89
|
+
// Rituals run in-app; no external cron or launchd needed.
|
|
90
|
+
"reflection": { "enabled": true, "cron": "0 3 * * *" }, // default: nightly 03:00
|
|
91
|
+
"migration": { "enabled": true, "cron": "0 4 1 * *" } // default: 1st of month 04:00
|
|
80
92
|
},
|
|
81
93
|
|
|
82
94
|
// Fail-closed tool policy + MCP servers. Deny wins; overlap is rejected.
|
|
@@ -138,12 +150,14 @@ my-agent/
|
|
|
138
150
|
},
|
|
139
151
|
|
|
140
152
|
"telegram": {
|
|
153
|
+
"enabled": true, // opt-in; defaults to false (off → "disabled")
|
|
141
154
|
"botToken": "...",
|
|
142
155
|
"allowedChatIds": ["123456789"], // or "allowAllChats": true
|
|
143
156
|
"allowAllChats": false
|
|
144
157
|
},
|
|
145
158
|
|
|
146
159
|
"slack": {
|
|
160
|
+
"enabled": true, // opt-in; defaults to false (off → "disabled")
|
|
147
161
|
"botToken": "xoxb-...", // Socket Mode app
|
|
148
162
|
"appToken": "xapp-...",
|
|
149
163
|
"allowedChannelIds": ["C0123"], // or "allowAllChannels": true
|
|
@@ -154,6 +168,7 @@ my-agent/
|
|
|
154
168
|
},
|
|
155
169
|
|
|
156
170
|
"whatsapp": {
|
|
171
|
+
"enabled": true, // opt-in; defaults to false (off → "disabled")
|
|
157
172
|
"allowedChatJids": ["123@s.whatsapp.net"], // or "allowAllChats": true
|
|
158
173
|
"allowAllChats": false,
|
|
159
174
|
"groupMode": "mention", // mention | any (group trigger rule)
|
|
@@ -187,6 +202,7 @@ my-agent/
|
|
|
187
202
|
},
|
|
188
203
|
|
|
189
204
|
"cron": {
|
|
205
|
+
"dir": "cron", // optional: folder of *.md jobs (frontmatter + prompt body), default "cron"
|
|
190
206
|
"jobs": [
|
|
191
207
|
{
|
|
192
208
|
"id": "daily",
|
|
@@ -197,6 +213,7 @@ my-agent/
|
|
|
197
213
|
"conversationId": "cron-daily" // optional: share memory/history across ticks
|
|
198
214
|
}
|
|
199
215
|
]
|
|
216
|
+
// Jobs here merge with cron/*.md files (duplicate ids error).
|
|
200
217
|
// Overlapping ticks of the same job are skipped, never queued.
|
|
201
218
|
}
|
|
202
219
|
}
|
|
@@ -205,7 +222,7 @@ my-agent/
|
|
|
205
222
|
## Lifecycle
|
|
206
223
|
|
|
207
224
|
```bash
|
|
208
|
-
mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory
|
|
225
|
+
mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory lite|journal|bujo]
|
|
209
226
|
mono-agent validate # per-section report incl. sandbox, console, every channel; exit 0 means ready
|
|
210
227
|
mono-agent start # console + traceability + every configured channel
|
|
211
228
|
mono-agent start --no-console # headless (or "console": { "enabled": false })
|
|
@@ -84,12 +84,108 @@ Question:
|
|
|
84
84
|
Should the agent remember anything between conversations?
|
|
85
85
|
|
|
86
86
|
1. No durable memory yet (recommended for first integration)
|
|
87
|
-
2.
|
|
88
|
-
3. Journal memory
|
|
89
|
-
4.
|
|
87
|
+
2. Lite memory — FTS keyword recall + rapid-log capture; zero external deps
|
|
88
|
+
3. Journal memory — hybrid recall (BM25+vector) + salience decay; requires local Ollama embeddings
|
|
89
|
+
4. BuJo memory — full tier: journal + LLM capture/reconcile + entity graph + auto-scheduled
|
|
90
|
+
reflection/migration; requires Ollama embeddings AND a local chat model
|
|
90
91
|
```
|
|
91
92
|
|
|
92
|
-
|
|
93
|
+
All tiers share the same `@mono-agent/memory-bujo` substrate. Fills: `memory.mode`
|
|
94
|
+
(`lite`/`journal`/`bujo`), `memory.path`, `memory.writeMode`
|
|
95
|
+
(`disabled`/`append-host-summary`), and tier-specific blocks below.
|
|
96
|
+
|
|
97
|
+
**Tier 2 — lite (no external deps):**
|
|
98
|
+
|
|
99
|
+
Write:
|
|
100
|
+
|
|
101
|
+
```jsonc
|
|
102
|
+
"memory": {
|
|
103
|
+
"mode": "lite",
|
|
104
|
+
"path": "./.mono-agent/memory",
|
|
105
|
+
"writeMode": "append-host-summary"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
No prerequisites. No Ollama. SQLite is bundled.
|
|
110
|
+
|
|
111
|
+
**Tier 3 — journal (embeddings required):**
|
|
112
|
+
|
|
113
|
+
- Ask: which local Ollama embeddings model? (default `nomic-embed-text:v1.5` — use the
|
|
114
|
+
exact `:v1.5` tag; pull first with `ollama pull nomic-embed-text:v1.5`).
|
|
115
|
+
- Default `memory.embeddings.dim` to `768` for `nomic-embed-text:v1.5`.
|
|
116
|
+
|
|
117
|
+
Write:
|
|
118
|
+
|
|
119
|
+
```jsonc
|
|
120
|
+
"memory": {
|
|
121
|
+
"mode": "journal",
|
|
122
|
+
"path": "./.mono-agent/memory",
|
|
123
|
+
"writeMode": "append-host-summary",
|
|
124
|
+
"embeddings": {
|
|
125
|
+
"provider": "ollama",
|
|
126
|
+
"model": "nomic-embed-text:v1.5",
|
|
127
|
+
"dim": 768
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
After writing, remind the user to run `mono-agent validate` (checks Ollama reachability
|
|
133
|
+
and that the model is pulled — warns loudly on any failure, never silently falls back).
|
|
134
|
+
|
|
135
|
+
**Tier 4 — bujo (embeddings + chat model + auto-rituals):**
|
|
136
|
+
|
|
137
|
+
Proactively explain what bujo does: capture → reconcile (ADD/UPDATE/SUPERSEDE/NOOP),
|
|
138
|
+
hybrid BM25+vector recall, entity graph, reflection (decay + insight synthesis), monthly
|
|
139
|
+
migration (promote/reschedule/cluster/forget), living `index.md` + `future-log.md`.
|
|
140
|
+
The reflection and migration rituals are **auto-scheduled in-app** — no external cron or
|
|
141
|
+
launchd setup needed.
|
|
142
|
+
|
|
143
|
+
- Ask: which local Ollama embeddings model? (default `nomic-embed-text:v1.5` — exact
|
|
144
|
+
`:v1.5` tag; `ollama pull nomic-embed-text:v1.5`).
|
|
145
|
+
- Ask: which local chat model for LLM pipelines? (e.g. `qwen3.6:latest`;
|
|
146
|
+
`ollama pull qwen3.6:latest`). A chat model is required — without it the `bujo` tier
|
|
147
|
+
cannot run capture/reflect/migrate.
|
|
148
|
+
- Ask: should we keep the default reflection/migration schedule (nightly `0 3 * * *` /
|
|
149
|
+
monthly `0 4 1 * *`), or customise the cron expressions?
|
|
150
|
+
|
|
151
|
+
Write (embeddings + chat model):
|
|
152
|
+
|
|
153
|
+
```jsonc
|
|
154
|
+
"memory": {
|
|
155
|
+
"mode": "bujo",
|
|
156
|
+
"path": "./.mono-agent/memory",
|
|
157
|
+
"writeMode": "append-host-summary",
|
|
158
|
+
"embeddings": {
|
|
159
|
+
"provider": "ollama",
|
|
160
|
+
"model": "nomic-embed-text:v1.5",
|
|
161
|
+
"dim": 768
|
|
162
|
+
},
|
|
163
|
+
"llm": {
|
|
164
|
+
"provider": "ollama",
|
|
165
|
+
"model": "qwen3.6:latest"
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
If the user customises the ritual schedule, add the `reflection`/`migration` blocks:
|
|
171
|
+
|
|
172
|
+
```jsonc
|
|
173
|
+
"reflection": { "enabled": true, "cron": "0 3 * * *" },
|
|
174
|
+
"migration": { "enabled": true, "cron": "0 4 1 * *" }
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
After writing, append a prerequisite note:
|
|
178
|
+
|
|
179
|
+
```
|
|
180
|
+
Before running mono-agent validate, pull the required models:
|
|
181
|
+
ollama pull nomic-embed-text:v1.5
|
|
182
|
+
ollama pull qwen3.6:latest # (or whichever chat model you chose)
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Then run `mono-agent validate` — the Memory section confirms Ollama reachability, both
|
|
186
|
+
models are present, the root is writable, and the ritual cadence (with next-run times).
|
|
187
|
+
See `docs/memory.md` for the full tier table, config shapes, and CLI subcommands
|
|
188
|
+
(`memory-bujo rebuild|recall|index|reflect|migrate`).
|
|
93
189
|
|
|
94
190
|
## 7. Sandbox
|
|
95
191
|
|
|
@@ -26,15 +26,15 @@ Every framework capability and how a composed agent reaches it. Use this to answ
|
|
|
26
26
|
| Identity + optional soul documents | config | `context.identityPath`, `context.soulPath` |
|
|
27
27
|
| Selected skills from a skills root | config | `context.skillsRoot`, `context.selectedSkills` |
|
|
28
28
|
| Per-skill byte cap | config | `context.skillMaxBytes` |
|
|
29
|
-
| Conversation history (in-memory
|
|
30
|
-
|
|
|
31
|
-
| Journal memory (
|
|
29
|
+
| Conversation history (in-memory; unlimited unless turns are capped) | auto | sized from `runtime.maxTurns`; custom store via code |
|
|
30
|
+
| Lite memory (FTS keyword recall + rapid-log capture; no external deps) | config | `memory.mode: "lite"`, `path`, `maxBytes`, `writeMode` |
|
|
31
|
+
| Journal memory (hybrid recall BM25+vector + salience decay; needs Ollama embeddings) | config | `memory.mode: "journal"`, `path`, `memory.embeddings.{provider,model,dim}` |
|
|
32
|
+
| BuJo memory (journal + LLM capture/reconcile ADD/UPDATE/SUPERSEDE/NOOP + entity graph + auto-scheduled reflection/migration; needs Ollama embeddings + chat model) | config | `memory.mode: "bujo"`, `path`, `memory.embeddings.{provider,model,dim}`, `memory.llm.{provider,model,endpoint}` — see `docs/memory.md` |
|
|
33
|
+
| BuJo reflection auto-scheduler (nightly decay + insight synthesis; in-app, no external cron needed) | config | `memory.reflection.{enabled,cron}` (default `0 3 * * *`); env `MONO_AGENT_MEMORY_REFLECTION_CRON`, `MONO_AGENT_MEMORY_REFLECTION_ENABLED` |
|
|
34
|
+
| BuJo migration auto-scheduler (monthly promote/reschedule/cluster/forget; in-app) | config | `memory.migration.{enabled,cron}` (default `0 4 1 * *`); env `MONO_AGENT_MEMORY_MIGRATION_CRON`, `MONO_AGENT_MEMORY_MIGRATION_ENABLED` |
|
|
35
|
+
| Memory out-of-band maintenance CLI (rebuild/recall/index/reflect/migrate) | cli | `memory-bujo <subcommand> <root>`; opt-in `MONO_AGENT_MEMORY_EMBEDDINGS_PROVIDER`/`_MODEL`/`_DIM` for semantic recall; `MONO_AGENT_MEMORY_LLM_MODEL`, `MONO_AGENT_MEMORY_LLM_ENDPOINT` required for reflect/migrate |
|
|
36
|
+
| Memory liveness check (root writable; Ollama + models for journal/bujo; ritual cadence for bujo — loud warn, no silent fallback) | cli | `mono-agent validate` |
|
|
32
37
|
| Host summaries appended after runs | config | `memory.writeMode: "append-host-summary"` |
|
|
33
|
-
| Entity graph + salience digest in context (journal) | config | automatic; path override `memory.graphPath` |
|
|
34
|
-
| MCP recall tools (`memory_read_day`, `memory_list_days`, `memory_grep`, `memory_search`, `entity_get`) | config | `memory.tools.enabled` |
|
|
35
|
-
| Model-initiated notes (`journal_append`) | config | `memory.tools.allowJournalAppend` |
|
|
36
|
-
| Semantic `memory_search` (Ollama nomic-embed-text or OpenAI embeddings; keyword fallback when unset) | config | `memory.embeddings.{provider,model,endpoint,apiKey,apiKeyEnv}` |
|
|
37
|
-
| Consolidation tools (`entity_upsert`, `memory_reindex`) | code | exposed by `@mono-agent/memory-mcp`, not in the default allowlist |
|
|
38
38
|
|
|
39
39
|
## Tools, MCP, sandbox
|
|
40
40
|
|
|
@@ -48,11 +48,9 @@ Use this path when the agent needs identity, selected skills, history, and optio
|
|
|
48
48
|
| --- | --- | --- |
|
|
49
49
|
| Prompt assembly | `@mono-agent/context` | Load identity/SOUL/skills/history/memory into deterministic prompt context |
|
|
50
50
|
| Selected skill bodies | `@mono-agent/skills` | Load only configured skills from `<skillsRoot>/<name>/SKILL.md` |
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
| Searchable memory | `@mono-agent/memory-search` | Chunk and semantically search local memory with embeddings (`memory.embeddings`) |
|
|
55
|
-
| Runtime memory tools | `@mono-agent/memory-mcp` | Expose memory tools over MCP when the runtime should query memory itself (`memory.tools`); also ships host-side `entity_upsert`/`memory_reindex` consolidation tools |
|
|
51
|
+
| Memory substrate (schema, migrations, FTS+vector db, RRF) | `@mono-agent/memory-store` | SQLite storage, BM25 FTS, optional vector index, hybrid recall; `MemoryStore`/`MemoryBlock`/`MemoryWriteResult` contract |
|
|
52
|
+
| Memory engine (all tiers: lite/journal/bujo) | `@mono-agent/memory-bujo` | `BujoMemoryStore` — tier-aware: FTS recall (lite), hybrid recall + decay (journal), LLM capture/reconcile + entity graph + reflection/migration + auto-scheduler (bujo) |
|
|
53
|
+
| Embedding providers | `@mono-agent/memory-search` | Ollama/OpenAI embedding providers used by memory-store for vector recall |
|
|
56
54
|
|
|
57
55
|
Mono-agent selected skills are not auto-selected by description. The host chooses `context.selectedSkills`, and the harness loads those exact bodies.
|
|
58
56
|
|
|
@@ -103,7 +101,7 @@ Communication adapters are edge packages. They accept an `AgentResponder` and ow
|
|
|
103
101
|
| Webhook | `@mono-agent/webhook-adapter` | `curl` the configured invocation path |
|
|
104
102
|
| Cron | `@mono-agent/cron-adapter` | One scheduled or manually triggered invocation |
|
|
105
103
|
|
|
106
|
-
Adapters must not import the harness, runtime adapter, memory packages, or other adapters. `@mono-agent/agent-app` composes them from config; custom hosts and demos may compose them directly.
|
|
104
|
+
Adapters must not import the harness, runtime adapter, memory packages (`memory-store`, `memory-bujo`, `memory-search`), or other adapters. `@mono-agent/agent-app` composes them from config; custom hosts and demos may compose them directly.
|
|
107
105
|
|
|
108
106
|
## Operator And Observability Join
|
|
109
107
|
|