mnemo-engine 0.17.0__tar.gz → 0.17.1__tar.gz
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.
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/PKG-INFO +1 -1
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/Cargo.lock +3 -3
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/Cargo.toml +1 -1
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/README.md +1 -1
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/guide/guide.md +3 -3
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/hook.rs +82 -4
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/onboard.rs +988 -125
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/keys/mod.rs +62 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/mcp.rs +24 -13
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo-python/Cargo.lock +2 -2
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo-python/Cargo.toml +1 -1
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/pyproject.toml +1 -1
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/README.md +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/.gitignore +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/benches/corpus.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/build.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/deny.toml +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/ann_defaults_v0_6_0.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/ann_diagnose.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/ann_recall_grid.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/ann_recall_grid_v2.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/candle_hard.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/embedder_server.py +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/file_size_breakdown.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/open_rss.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/quickstart.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/ranking_v2.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/session.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/shared_bench.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/examples/thread_profile.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/export.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/inspect.html +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/inspect.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/mcp_install.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo/project.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/bin/mnemo.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/builtin.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/cache.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/crypto.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/embed.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/embed_cmd.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/error.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/format.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/freelist.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/guide.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/ident.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/index.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/keys/display.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/keys/os_store.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/keys/recovery.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/keyslot.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/lib.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/mcp/context.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/memory.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/pager.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/redact.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/result_cache.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/session.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/shared/call.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/shared/fscheck.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/shared/lock.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/shared/mod.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/shared/presence.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/shared/sidecar.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/ann.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/cache_api.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/continuation.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/coordination.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/crud.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/essence.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/flush.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/header_graft_tests.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/hooks.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/keyed.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/load.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/maintenance.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/mod.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/open.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/recall.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/records.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/shared.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/snapshots.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/store/threads.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/text.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/transcript.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/veccol.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo/src/wal.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo-python/.gitignore +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo-python/README.md +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo-python/src/lib.rs +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/mnemo-python/test_mnemo.py +0 -0
- {mnemo_engine-0.17.0 → mnemo_engine-0.17.1}/python/mnemo_engine/__init__.py +0 -0
|
@@ -1520,7 +1520,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
|
1520
1520
|
|
|
1521
1521
|
[[package]]
|
|
1522
1522
|
name = "mnemo-engine"
|
|
1523
|
-
version = "0.17.
|
|
1523
|
+
version = "0.17.1"
|
|
1524
1524
|
dependencies = [
|
|
1525
1525
|
"aes-gcm",
|
|
1526
1526
|
"apple-native-keyring-store",
|
|
@@ -1561,7 +1561,7 @@ dependencies = [
|
|
|
1561
1561
|
|
|
1562
1562
|
[[package]]
|
|
1563
1563
|
name = "mnemo-node"
|
|
1564
|
-
version = "0.17.
|
|
1564
|
+
version = "0.17.1"
|
|
1565
1565
|
dependencies = [
|
|
1566
1566
|
"mnemo-engine",
|
|
1567
1567
|
"napi",
|
|
@@ -1571,7 +1571,7 @@ dependencies = [
|
|
|
1571
1571
|
|
|
1572
1572
|
[[package]]
|
|
1573
1573
|
name = "mnemo-uniffi"
|
|
1574
|
-
version = "0.17.
|
|
1574
|
+
version = "0.17.1"
|
|
1575
1575
|
dependencies = [
|
|
1576
1576
|
"mnemo-engine",
|
|
1577
1577
|
"serde_json",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# The CLI binary name stays `mnemo`, so users still invoke `mnemo` on
|
|
11
11
|
# the command line after `cargo install mnemo-engine`.
|
|
12
12
|
name = "mnemo-engine"
|
|
13
|
-
version = "0.17.
|
|
13
|
+
version = "0.17.1"
|
|
14
14
|
edition = "2021"
|
|
15
15
|
rust-version = "1.94"
|
|
16
16
|
# `benches/corpus.rs` is a shared helper module pulled into real benches
|
|
@@ -1002,7 +1002,7 @@ cargo run --bin mnemo -- <command>
|
|
|
1002
1002
|
| `snapshots` | List the restorable snapshots (one per flush); no path needed in a git repository (v0.16.1) |
|
|
1003
1003
|
| `restore` | Roll the database back to a past snapshot |
|
|
1004
1004
|
| `thread ingest` | Save a transcript into a thread's archive (idempotent per turn). `--tool-results omit` keeps only `[tool_result ok|error, N bytes]` markers, and `--redact` replaces known secret shapes (private keys, cloud and API tokens, JWTs, recovery codes, secret-looking `NAME=value`s) with `[redacted: <kind>]` (v0.16). A turn of nothing but markers (`[thinking]`, a tool call) is kept, but not embedded or recalled (v0.16.1) |
|
|
1005
|
-
| `onboard` | Set up the project's memory for Claude Code and Cursor: the brain (a generated key in the keychain), the model, the MCP server, the hooks and a skill or rule. Shows the plan and asks once (`--yes`, `--print`); safe to re-run; `--undo` removes what it wrote. `--guide` prints the guide (v0.16). Since v0.17 it writes the per-turn hook too, and `--wake stop` adds the Stop continuation (`--wake off` removes it; a re-run keeps what an earlier one chose) |
|
|
1005
|
+
| `onboard` | Set up the project's memory for Claude Code and Cursor: the brain (a generated key in the keychain), the model, the MCP server, the hooks and a skill or rule. Shows the plan and asks once (`--yes`, `--print`); safe to re-run; `--undo` removes what it wrote. `--guide` prints the guide (v0.16). At a terminal (v0.17.1), each item is one line tagged like a boot log (`[ OK ]`, `[ ADDED ]`, `[UPDATED]`, ...), after a plan in the future tense when it asks first, and the guide is a pointer; run by an agent, the output is unchanged. Since v0.17 it writes the per-turn hook too, and `--wake stop` adds the Stop continuation (`--wake off` removes it; a re-run keeps what an earlier one chose) |
|
|
1006
1006
|
| `hook` | The hooks `onboard` installs for Claude Code and Cursor (v0.16): `session-start` adds the guide's card, the project's notes and essence, and a short recall to the context (8,000 bytes by default, `--budget` up to 9,000); `pre-compact` and `session-end` save the transcript without tool output and with secrets redacted. Since v0.17, `user-prompt` (Claude Code's `UserPromptSubmit`, Cursor's `postToolUse` at most once a minute) shows what's new for `MNEMO_AGENT`/`MNEMO_ROLE`: unread messages, tasks ready for the role, its task claims about to lapse, after the framing line and escaped, at most 600 bytes, then marks them seen; an unchanged turn reads only the file's first page (no key, no open). `stop` (written by `onboard --wake stop`) keeps an agent going for a pre-approved task or a message to it by id, within the wake-up guardrails, never twice in a row. Always exits 0, never prompts or downloads |
|
|
1007
1007
|
| `wake pause\|resume\|status` | The wake-up kill switch for every session of the brain (on the manifest). Paused, nothing wakes an agent (`MNEMO_WAKE=off` does it for one session); the per-turn hook and the brief still show its work. `status` also shows the `crossSessionInbound` settings it finds (keep `accept`). The guardrails: 12 wake-ups per agent an hour, 60 s apart, none for a burst of 8 messages between two agents in 10 minutes or an explicit reply past 8 hops (v0.17) |
|
|
1008
1008
|
| `demo` | Self-contained end-to-end demonstration |
|
|
@@ -60,9 +60,9 @@ wrote, but never the brain or its key.
|
|
|
60
60
|
|
|
61
61
|
**One step is for a person.** The brain's recovery code is the only way
|
|
62
62
|
back in if the keychain entry is lost. `onboard` shows it only to a person
|
|
63
|
-
at a terminal.
|
|
64
|
-
|
|
65
|
-
terminal of their own and writes the code down:
|
|
63
|
+
at a terminal. Run by an agent, its output ends with the `human step:`
|
|
64
|
+
lines, which the agent passes to its user word for word. The person runs
|
|
65
|
+
this in a terminal of their own and writes the code down:
|
|
66
66
|
|
|
67
67
|
```sh
|
|
68
68
|
mnemo recovery-code
|
|
@@ -399,12 +399,26 @@ const NO_KEY: &str = "mnemo: this brain's key isn't available here (`mnemo unloc
|
|
|
399
399
|
const BUSY: &str = "mnemo: the brain was busy; call the `about` tool";
|
|
400
400
|
const BAD_ID: &str = "mnemo: the session id isn't one this hook accepts";
|
|
401
401
|
|
|
402
|
-
/// The brain's secret from the key sources, never a prompt.
|
|
402
|
+
/// The brain's secret from the key sources, never a prompt. A keychain
|
|
403
|
+
/// that refuses, or keeps it waiting, is named (KEYCHAIN-REPROMPT), apart
|
|
404
|
+
/// from a key that isn't there.
|
|
403
405
|
fn secret(path: &Path) -> Result<Secret, String> {
|
|
404
406
|
use mnemo_engine::keys::{self, Resolution};
|
|
405
407
|
let store = keys::default_store();
|
|
406
|
-
|
|
408
|
+
let waiting = keys::SlowStoreNote::after(keys::SLOW_STORE_NOTE_AFTER, "mnemo: ");
|
|
409
|
+
let r = keys::resolve(path, store.as_deref(), keys::SERVER_COMMAND_TIMEOUT);
|
|
410
|
+
drop(waiting);
|
|
411
|
+
match r {
|
|
407
412
|
Ok(Resolution::Found(r)) => Ok(r.secret),
|
|
413
|
+
Err(e) if keys::is_store_error(&e) => {
|
|
414
|
+
let note = format!(
|
|
415
|
+
"mnemo: the keychain didn't give this brain's key ({}); {}",
|
|
416
|
+
one_line(&e.to_string()),
|
|
417
|
+
keys::KEYCHAIN_ALLOW_HINT
|
|
418
|
+
);
|
|
419
|
+
eprintln!("{note}");
|
|
420
|
+
Err(note)
|
|
421
|
+
}
|
|
408
422
|
_ => Err(NO_KEY.into()),
|
|
409
423
|
}
|
|
410
424
|
}
|
|
@@ -988,10 +1002,31 @@ pub fn turn_text(work: &mnemo_engine::NewWork, now: i64) -> String {
|
|
|
988
1002
|
"claims lapsing soon",
|
|
989
1003
|
));
|
|
990
1004
|
}
|
|
1005
|
+
// What to call, for only what the counts hold (ONBOARD-UX).
|
|
1006
|
+
let mut calls = Vec::new();
|
|
1007
|
+
let it = |k: usize, one: &'static str, many: &'static str| if k == 1 { one } else { many };
|
|
1008
|
+
if !work.messages.is_empty() {
|
|
1009
|
+
calls.push(format!(
|
|
1010
|
+
"Call `inbox` to read {}.",
|
|
1011
|
+
it(work.messages.len(), "it", "them")
|
|
1012
|
+
));
|
|
1013
|
+
}
|
|
1014
|
+
if !work.tasks.is_empty() {
|
|
1015
|
+
calls.push(format!(
|
|
1016
|
+
"Call `task` with `next` to take {}.",
|
|
1017
|
+
it(work.tasks.len(), "it", "one")
|
|
1018
|
+
));
|
|
1019
|
+
}
|
|
1020
|
+
if !work.lapsing.is_empty() {
|
|
1021
|
+
calls.push(format!(
|
|
1022
|
+
"Update the task with `task` to renew {}.",
|
|
1023
|
+
it(work.lapsing.len(), "its claim", "their claims")
|
|
1024
|
+
));
|
|
1025
|
+
}
|
|
991
1026
|
let head = format!(
|
|
992
|
-
"mnemo: new for you: {}.
|
|
993
|
-
claim).\n{}",
|
|
1027
|
+
"mnemo: new for you: {}. {}\n{}",
|
|
994
1028
|
counts.join(", "),
|
|
1029
|
+
calls.join(" "),
|
|
995
1030
|
guide::FRAMING
|
|
996
1031
|
);
|
|
997
1032
|
let mut items: Vec<String> = Vec::new();
|
|
@@ -1446,6 +1481,49 @@ pub fn redaction_note(counts: &[(&'static str, usize)]) -> Option<String> {
|
|
|
1446
1481
|
mod tests {
|
|
1447
1482
|
use super::*;
|
|
1448
1483
|
|
|
1484
|
+
/// ONBOARD-UX: the per-turn line asks for only what its counts hold.
|
|
1485
|
+
#[test]
|
|
1486
|
+
fn the_turn_line_names_only_what_is_new() {
|
|
1487
|
+
let msg = |s: &str| mnemo_engine::Message {
|
|
1488
|
+
id: ulid::Ulid::nil(),
|
|
1489
|
+
to: "worker-a".into(),
|
|
1490
|
+
from: "user".into(),
|
|
1491
|
+
subject: s.into(),
|
|
1492
|
+
body: String::new(),
|
|
1493
|
+
refs: Vec::new(),
|
|
1494
|
+
conversation: String::new(),
|
|
1495
|
+
hops: 0,
|
|
1496
|
+
status: "open".into(),
|
|
1497
|
+
delivery: String::new(),
|
|
1498
|
+
created_at: 0,
|
|
1499
|
+
acked_at: None,
|
|
1500
|
+
};
|
|
1501
|
+
let claim = mnemo_engine::Claim {
|
|
1502
|
+
topic: "task:ship".into(),
|
|
1503
|
+
holder: "worker-a".into(),
|
|
1504
|
+
expires_at: 600,
|
|
1505
|
+
lease: 900,
|
|
1506
|
+
};
|
|
1507
|
+
let head = |w: &mnemo_engine::NewWork| turn_text(w, 0).lines().next().unwrap().to_string();
|
|
1508
|
+
let w = mnemo_engine::NewWork {
|
|
1509
|
+
messages: vec![msg("hello")],
|
|
1510
|
+
..Default::default()
|
|
1511
|
+
};
|
|
1512
|
+
assert_eq!(
|
|
1513
|
+
head(&w),
|
|
1514
|
+
"mnemo: new for you: 1 message. Call `inbox` to read it."
|
|
1515
|
+
);
|
|
1516
|
+
let w = mnemo_engine::NewWork {
|
|
1517
|
+
lapsing: vec![claim.clone(), claim],
|
|
1518
|
+
..Default::default()
|
|
1519
|
+
};
|
|
1520
|
+
assert_eq!(
|
|
1521
|
+
head(&w),
|
|
1522
|
+
"mnemo: new for you: 2 claims lapsing soon. Update the task with `task` to renew \
|
|
1523
|
+
their claims."
|
|
1524
|
+
);
|
|
1525
|
+
}
|
|
1526
|
+
|
|
1449
1527
|
#[test]
|
|
1450
1528
|
fn session_ids() {
|
|
1451
1529
|
for ok in ["abc", "0f8e-11.x_Y", &"a".repeat(128)] {
|