omo-memory 0.1.8 → 0.1.10

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.
@@ -2,64 +2,46 @@ export const CODEX_MARKETPLACE = "islee23520";
2
2
  export const CODEX_PLUGIN = "omo-memory";
3
3
  export const CODEX_SKILL = `---
4
4
  name: omo-memory
5
- description: Use OMO Memory as the shared local memory ledger across Codex, Grok, and OpenCode. Trigger when starting non-trivial workspace work, needing prior session context, recording decisions, QA evidence, task state, handoffs, or using the omo-memory MCP tools.
5
+ description: "Use OMO Memory for concise local project memory: bootstrap recent events, record decisions, QA evidence, blockers, and handoffs without secrets."
6
6
  ---
7
7
 
8
8
  # OMO Memory
9
9
 
10
- Use the \`omo-memory\` MCP server as the shared local memory ledger across Codex, Grok, and OpenCode.
11
-
12
- ## Session Start
13
-
14
- At the beginning of non-trivial workspace work, call \`memory_bootstrap_session\` with:
10
+ For non-trivial workspace work, call \`memory_bootstrap_session\` before edits:
15
11
 
16
12
  - \`host\`: \`codex\`
17
13
  - \`adapter\`: \`lazycodex\`
18
- - \`limit\`: \`5\`
19
-
20
- Read \`recentEvents\` before changing files. Keep the returned \`sessionId\` for the turn/session.
21
-
22
- ## During Work
23
-
24
- Record durable, concise facts with \`memory_record_event\` and the active \`sessionId\`: decisions, QA evidence, task state, blockers, and handoff-worthy facts.
14
+ - \`limit\`: \`2\`
25
15
 
26
- Use \`memory_write_handoff\` for explicit handoff summaries.
16
+ Read \`recentEvents\`, keep the returned \`sessionId\`, and record only durable summaries with \`memory_record_event\`: decisions, QA evidence, task state, blockers, and handoffs.
27
17
 
28
- ## Privacy
29
-
30
- Never store full transcripts, API keys, tokens, \`.env\` contents, auth files, cookies, bearer headers, or raw secret-bearing logs. Store summaries and evidence references only.
18
+ Use \`memory_write_handoff\` only for explicit handoff summaries. Never store transcripts, secrets, \`.env\`, auth files, cookies, bearer headers, or raw secret-bearing logs.
31
19
  `;
32
20
  export const GROK_SKILL = CODEX_SKILL.replace("Codex, Grok", "Grok, Codex")
33
21
  .replace("- `host`: `codex`", "- `host`: `grok`")
34
22
  .replace("- `adapter`: `lazycodex`", "- `adapter`: `lfg`");
35
23
  export const CODEX_AGENTS_BLOCK = `### OMO Memory lifecycle
36
24
 
37
- When the \`omo-memory\` MCP server is available, use it as the shared local memory ledger for Codex/Grok/OpenCode work.
38
-
39
- At the beginning of a non-trivial workspace session, call \`memory_bootstrap_session\` with:
25
+ When the \`omo-memory\` MCP server is available, use it for concise local project memory. For non-trivial workspace work, call \`memory_bootstrap_session\` before edits:
40
26
 
41
27
  - \`host\`: \`codex\`
42
28
  - \`adapter\`: \`lazycodex\`
43
- - \`limit\`: \`5\`
44
-
45
- Read the returned \`recentEvents\` before making changes. Keep the returned \`sessionId\` for this session.
29
+ - \`limit\`: \`2\`
46
30
 
47
- During work, record concise durable state with \`memory_record_event\` using that \`sessionId\`: decisions, task state, QA evidence, important blockers, and handoff-worthy facts. Use \`memory_write_handoff\` only for explicit handoff summaries. Do not store full transcripts, API keys, tokens, \`.env\` contents, auth files, cookies, bearer headers, or raw secret-bearing logs.`;
31
+ Read \`recentEvents\`, keep the returned \`sessionId\`, and record only durable summaries with \`memory_record_event\`: decisions, task state, QA evidence, blockers, and handoffs. Never store transcripts, secrets, \`.env\`, auth files, cookies, bearer headers, or raw secret-bearing logs.`;
48
32
  export const GROK_AGENTS_BLOCK = CODEX_AGENTS_BLOCK.replace("- `host`: `codex`", "- `host`: `grok`").replace("- `adapter`: `lazycodex`", "- `adapter`: `lfg`");
49
33
  export const SESSION_BOOTSTRAP_SCRIPT = `#!/usr/bin/env node
50
34
  import { spawnSync } from "node:child_process";
51
35
 
52
36
  const host = process.env["OMO_MEMORY_HOST"] ?? "codex";
53
37
  const adapter = process.env["OMO_MEMORY_ADAPTER"] ?? "lazycodex";
54
- const limit = process.env["OMO_MEMORY_LIMIT"] ?? "5";
38
+ const limit = process.env["OMO_MEMORY_LIMIT"] ?? "2";
39
+ const args = ["session", "bootstrap", "--host", host, "--adapter", adapter, "--limit", limit];
55
40
 
56
- const result = spawnSync("npx", ["-y", "omo-memory", "session", "bootstrap", "--host", host, "--adapter", adapter, "--limit", limit], {
57
- encoding: "utf8",
58
- stdio: ["ignore", "pipe", "pipe"],
59
- timeout: 5000
60
- });
41
+ const direct = process.env["OMO_MEMORY_CLI"] ?? "omo-memory";
42
+ const result = runBootstrap(direct, args) ?? runBootstrap("npx", ["-y", "omo-memory", ...args]);
61
43
 
62
- if (result.status !== 0) {
44
+ if (result === undefined || result.status !== 0) {
63
45
  process.stdout.write("OMO Memory: bootstrap unavailable; continue without blocking the session.\\n");
64
46
  process.exit(0);
65
47
  }
@@ -69,7 +51,6 @@ try {
69
51
  const recentEvents = Array.isArray(payload.recentEvents) ? payload.recentEvents : [];
70
52
  process.stdout.write(\`OMO Memory sessionId: \${payload.sessionId}\\n\`);
71
53
  if (recentEvents.length === 0) {
72
- process.stdout.write("OMO Memory recentEvents: none for this project.\\n");
73
54
  process.exit(0);
74
55
  }
75
56
  process.stdout.write("OMO Memory recentEvents:\\n");
@@ -80,11 +61,21 @@ try {
80
61
  const detail = error instanceof Error ? error.message : String(error);
81
62
  process.stdout.write(\`OMO Memory: bootstrap returned unreadable output; \${detail}\\n\`);
82
63
  }
64
+
65
+ function runBootstrap(command, commandArgs) {
66
+ const result = spawnSync(command, commandArgs, {
67
+ encoding: "utf8",
68
+ stdio: ["ignore", "pipe", "pipe"],
69
+ timeout: 2000
70
+ });
71
+ if (result.error && result.error.code === "ENOENT") return undefined;
72
+ return result;
73
+ }
83
74
  `;
84
75
  export const GROK_HOOK_SCRIPT = SESSION_BOOTSTRAP_SCRIPT.replace('?? "codex"', '?? "grok"').replace('?? "lazycodex"', '?? "lfg"');
85
76
  export const GROK_PLUGIN_JSON = `{
86
77
  "name": "omo-memory",
87
- "version": "0.1.8",
78
+ "version": "0.1.10",
88
79
  "description": "Project-local OMO Memory bootstrap hook and MCP server for Grok.",
89
80
  "author": {
90
81
  "name": "islee23520"
@@ -109,7 +100,7 @@ export const GROK_MCP_JSON = `{
109
100
  `;
110
101
  export const CODEX_PLUGIN_JSON = `{
111
102
  "name": "omo-memory",
112
- "version": "0.1.8",
103
+ "version": "0.1.10",
113
104
  "description": "Session-start OMO Memory bootstrap hook for Codex.",
114
105
  "author": "islee23520",
115
106
  "homepage": "https://github.com/islee23520/omo-memory",
@@ -146,7 +137,7 @@ export const CODEX_HOOKS_JSON = `{
146
137
  {
147
138
  "type": "command",
148
139
  "command": "node \\"\${PLUGIN_ROOT}/scripts/omo-memory-session.mjs\\"",
149
- "timeout": 5,
140
+ "timeout": 2,
150
141
  "description": "omo-memory session bootstrap",
151
142
  "statusMessage": "OMO Memory: loading recent session memory"
152
143
  }
@@ -164,7 +155,7 @@ export const GROK_HOOKS_JSON = `{
164
155
  {
165
156
  "type": "command",
166
157
  "command": "node \\"{{HOME}}/.grok/hooks/omo-memory-session.mjs\\"",
167
- "timeout": 5,
158
+ "timeout": 2,
168
159
  "description": "omo-memory session bootstrap",
169
160
  "statusMessage": "OMO Memory: loading recent session memory"
170
161
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omo-memory",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "description": "Host-neutral local SQLite memory and session ledger for OMO adapters, exposed through CLI and MCP.",
5
5
  "type": "module",
6
6
  "files": [