greprag 5.20.0 → 5.22.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.
Files changed (39) hide show
  1. package/README.md +47 -12
  2. package/dist/codex-steering.d.ts +29 -0
  3. package/dist/codex-steering.js +168 -0
  4. package/dist/codex-steering.js.map +1 -0
  5. package/dist/commands/codex.d.ts +33 -0
  6. package/dist/commands/codex.js +418 -0
  7. package/dist/commands/codex.js.map +1 -0
  8. package/dist/commands/corpus/client.d.ts +1 -0
  9. package/dist/commands/corpus/client.js.map +1 -1
  10. package/dist/commands/corpus/search.js +36 -6
  11. package/dist/commands/corpus/search.js.map +1 -1
  12. package/dist/commands/corpus/upload.js +24 -1
  13. package/dist/commands/corpus/upload.js.map +1 -1
  14. package/dist/commands/discover.d.ts +1 -1
  15. package/dist/commands/discover.js +1 -1
  16. package/dist/commands/doctor.js +3 -3
  17. package/dist/commands/doctor.js.map +1 -1
  18. package/dist/commands/init.d.ts +7 -2
  19. package/dist/commands/init.js +479 -59
  20. package/dist/commands/init.js.map +1 -1
  21. package/dist/commands/status.d.ts +22 -10
  22. package/dist/commands/status.js +159 -69
  23. package/dist/commands/status.js.map +1 -1
  24. package/dist/hook.js +120 -13
  25. package/dist/hook.js.map +1 -1
  26. package/dist/index.js +20 -10
  27. package/dist/index.js.map +1 -1
  28. package/dist/opencode-plugin.d.ts +2 -2
  29. package/dist/opencode-plugin.js +47 -14
  30. package/dist/opencode-plugin.js.map +1 -1
  31. package/dist/project-anchor.d.ts +11 -9
  32. package/dist/project-anchor.js +58 -27
  33. package/dist/project-anchor.js.map +1 -1
  34. package/package.json +4 -2
  35. package/scripts/postinstall.js +51 -46
  36. package/skill/greprag/SKILL.md +22 -4
  37. package/skill/greprag/docs/doctor.md +1 -1
  38. package/skill/greprag/docs/setup.md +93 -6
  39. package/skill/lore-advisor/SKILL.md +38 -34
package/README.md CHANGED
@@ -1,47 +1,82 @@
1
1
  # GrepRAG
2
2
 
3
- Agent memory as a service. Episodic project memory for Claude Code and OpenCode — auto-captures turns, compacts into hourly/daily/weekly summaries, and exposes two access patterns: lexical search by topic (`greprag memory search "<query>"`) or a SessionStart-shaped recap (`greprag memory recap`). The memory product line is marketed as **Odyssey**. Also handles cross-project async messaging via inbox.
3
+ Agent memory as a service. Episodic project memory for Claude Code, Codex, and OpenCode — captures supported agent turns, compacts into hourly/daily/weekly summaries, and exposes two access patterns: lexical search by topic (`greprag memory search "<query>"`) or a session recap (`greprag memory recap`). The memory product line is marketed as **Odyssey**. Also handles cross-project async messaging via inbox.
4
4
 
5
- ## Quick start (both clients)
5
+ ## Quick Start
6
6
 
7
7
  ```bash
8
8
  npm i -g greprag
9
9
  ```
10
10
 
11
+ Then either run `/greprag` inside a supported agent, or run `greprag init` in a terminal. Bare `greprag init` detects Claude Code, Codex, and OpenCode; if more than one is present in a non-interactive shell, it prints the explicit command to use.
12
+
11
13
  ### Claude Code
12
14
 
13
15
  Run `/greprag` in any Claude Code session, or:
14
16
 
15
17
  ```bash
16
- greprag init # set up hooks + anchor + skill
18
+ greprag init --claude
17
19
  ```
18
20
 
21
+ ### Codex
22
+
23
+ Run `/greprag` in Codex after install, or:
24
+
25
+ ```bash
26
+ greprag init --codex
27
+ ```
28
+
29
+ Codex requires one extra trust step: after init/update, run `/hooks` in Codex, trust the GrepRAG hooks, then start a fresh session.
30
+
31
+ For live inbox push into idle Codex sessions, install the login watcher:
32
+
33
+ ```bash
34
+ greprag codex startup install
35
+ ```
36
+
37
+ `greprag init --codex` offers this in interactive terminals. For foreground
38
+ testing, run:
39
+
40
+ ```bash
41
+ greprag codex watch --session <8hex-or-full-codex-session-id>
42
+ ```
43
+
44
+ If `--session` is omitted, GrepRAG uses the latest Codex session. The watcher
45
+ wakes Codex with `codex exec resume` when messages arrive.
46
+
19
47
  ### OpenCode
20
48
 
21
49
  ```bash
22
50
  greprag init --opencode
23
51
  ```
24
52
 
25
- This creates a project anchor in `.opencode/project.json` and installs the memory plugin at `~/.config/opencode/plugins/greprag-memory.js`. The plugin automatically injects the memory recap at session start and stores every turn. No agent cooperation needed.
53
+ This installs the memory plugin at `~/.config/opencode/plugins/greprag-memory.js`.
54
+
55
+ All platforms share project identity through `.greprag/project.json` when a file anchor is needed, or git-derived identity when available. Legacy `.claude/project.json` anchors still read and migrate on init.
26
56
 
27
- Status check (works for both):
57
+ Status check:
28
58
 
29
59
  ```bash
30
- greprag status # check what's configured
60
+ greprag status --all-platforms
31
61
  ```
32
62
 
33
63
  ## What's active
34
64
 
35
- - **Memory** (episodic project memory, marketed as Odyssey): every turn captured via Stop hook, compacted into hourly/daily/weekly summaries. Query via `greprag memory search "<query>"` (lexical retrieval, v5 RRF+adjacency pipeline) or `recap` / `daily` / `weekly` / `hourly` / `turns` / `ships` (by time window). (`greprag memory briefing` and `greprag odyssey ...` are silent back-compat aliases.)
36
- - **SessionStart recap**: injects recent memory rows at the start of each session
65
+ - **Memory** (episodic project memory, marketed as Odyssey): supported agent turns captured via platform hooks/plugin, compacted into hourly/daily/weekly summaries. Query via `greprag memory search "<query>"` (lexical retrieval, v5 RRF+adjacency pipeline) or `recap` / `daily` / `weekly` / `hourly` / `turns` / `ships` (by time window). (`greprag memory briefing` and `greprag odyssey ...` are silent back-compat aliases.)
66
+ - **Memory recap**: surfaces recent memory rows through platform hooks or `/greprag`
37
67
  - **Inbox**: cross-project async messaging between your projects or other GrepRAG users
38
68
 
39
69
  ## Commands
40
70
 
41
71
  | Command | Description |
42
72
  |---------|-------------|
43
- | `greprag status` | Check auth, hooks, project anchor |
44
- | `greprag init` | Configure hooks + anchor in current repo |
73
+ | `greprag status --all-platforms` | Check auth, hooks/plugins, skills, and project anchor |
74
+ | `greprag init` | Detect/ask which agent to configure |
75
+ | `greprag init --claude` | Configure Claude Code hooks + skill |
76
+ | `greprag init --codex` | Configure Codex hooks + skill |
77
+ | `greprag codex watch --session <id>` | Live-push inbox messages into Codex |
78
+ | `greprag codex startup install` | Start the Codex live watcher at login |
79
+ | `greprag init --opencode` | Configure OpenCode plugin |
45
80
  | `greprag init --global` | Global anchor for ephemeral sessions |
46
81
  | `greprag doctor` | Diagnose project_id drift and orphan consolidation |
47
82
  | `greprag memory search "<query>"` | Lexical search over the project's memory (v5 RRF+adjacency pipeline) |
@@ -55,12 +90,12 @@ greprag status # check what's configured
55
90
  ## Requirements
56
91
 
57
92
  - Node.js 18+
58
- - Claude Code (the `/greprag` skill handles setup)
93
+ - Claude Code, Codex, or OpenCode
59
94
  - An API key (generated during email signup in the skill flow)
60
95
 
61
96
  ## How it works
62
97
 
63
- The CLI is a thin HTTP client. All intelligence — keyword extraction, dedup, scoring, compaction, graduation — lives server-side. The hook fires on Stop/SessionStart, calls the API, and the server handles everything else.
98
+ The CLI is a thin HTTP client. All intelligence — scoring, compaction, and retrieval — lives server-side. Platform hooks/plugins call the API; the server handles everything else.
64
99
 
65
100
  ## Links
66
101
 
@@ -0,0 +1,29 @@
1
+ export interface CodexSteeringInput {
2
+ session_id?: string;
3
+ cwd?: string;
4
+ hook_event_name?: string;
5
+ }
6
+ export interface GrepragHookConfig {
7
+ apiUrl: string;
8
+ apiKey: string;
9
+ enabled: boolean;
10
+ }
11
+ interface InboxMessage {
12
+ id: string;
13
+ from?: {
14
+ handle?: string;
15
+ tenant?: string;
16
+ project_id?: string | null;
17
+ session_id?: string | null;
18
+ };
19
+ to_session_id?: string | null;
20
+ body: string;
21
+ references?: unknown;
22
+ message_type?: string;
23
+ created_at?: string;
24
+ }
25
+ export declare function formatCodexInboxSteering(messages: InboxMessage[], session8: string): string | null;
26
+ export declare function buildCodexInboxSteering(input: CodexSteeringInput, cfg: GrepragHookConfig, opts?: {
27
+ debounce?: boolean;
28
+ }): Promise<string | null>;
29
+ export {};
@@ -0,0 +1,168 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.formatCodexInboxSteering = formatCodexInboxSteering;
37
+ exports.buildCodexInboxSteering = buildCodexInboxSteering;
38
+ const fs = __importStar(require("fs"));
39
+ const path = __importStar(require("path"));
40
+ const project_anchor_1 = require("./project-anchor");
41
+ const session_id_1 = require("./session-id");
42
+ const CODEX_INBOX_DEBOUNCE_MS = 15_000;
43
+ function stateDir() {
44
+ const home = process.env.HOME || process.env.USERPROFILE || '';
45
+ return home ? path.join(home, '.greprag', 'codex') : null;
46
+ }
47
+ function inboxStatePath(sessionId) {
48
+ const dir = stateDir();
49
+ if (!dir)
50
+ return null;
51
+ const safe = sessionId.replace(/[^a-zA-Z0-9_.-]/g, '_').slice(0, 160);
52
+ return path.join(dir, `${safe}.inbox.json`);
53
+ }
54
+ function wasRecentlyPolled(sessionId, now = Date.now()) {
55
+ const file = inboxStatePath(sessionId);
56
+ if (!file)
57
+ return false;
58
+ try {
59
+ const parsed = JSON.parse(fs.readFileSync(file, 'utf-8'));
60
+ const last = parsed.lastPollAt ? Date.parse(parsed.lastPollAt) : NaN;
61
+ return Number.isFinite(last) && now - last < CODEX_INBOX_DEBOUNCE_MS;
62
+ }
63
+ catch {
64
+ return false;
65
+ }
66
+ }
67
+ function stampPoll(sessionId) {
68
+ const file = inboxStatePath(sessionId);
69
+ if (!file)
70
+ return;
71
+ try {
72
+ const dir = path.dirname(file);
73
+ if (!fs.existsSync(dir))
74
+ fs.mkdirSync(dir, { recursive: true });
75
+ fs.writeFileSync(file, JSON.stringify({ lastPollAt: new Date().toISOString() }, null, 2) + '\n');
76
+ }
77
+ catch {
78
+ // Steering is best-effort; cache failures should not disturb the turn.
79
+ }
80
+ }
81
+ function renderReferences(refs) {
82
+ if (!refs || typeof refs !== 'object')
83
+ return null;
84
+ try {
85
+ const json = JSON.stringify(refs);
86
+ if (!json || json === '{}')
87
+ return null;
88
+ return json.length > 500 ? json.slice(0, 500) + '...' : json;
89
+ }
90
+ catch {
91
+ return null;
92
+ }
93
+ }
94
+ function formatSender(message) {
95
+ const from = message.from || {};
96
+ const handle = from.handle || from.tenant || 'unknown sender';
97
+ const short = (0, session_id_1.truncateSessionId)(from.session_id || undefined);
98
+ return short ? `${handle}/${short}` : handle;
99
+ }
100
+ function formatReplyHint(message) {
101
+ const from = message.from || {};
102
+ const handle = from.handle || from.tenant;
103
+ const short = (0, session_id_1.truncateSessionId)(from.session_id || undefined);
104
+ if (handle && short)
105
+ return `Reply with: greprag send "..." --to ${handle}/${short}`;
106
+ if (handle)
107
+ return `Reply with: greprag send "..." --to ${handle}`;
108
+ return null;
109
+ }
110
+ function formatCodexInboxSteering(messages, session8) {
111
+ const unread = messages.filter(m => m && typeof m.body === 'string' && m.body.trim());
112
+ if (unread.length === 0)
113
+ return null;
114
+ const parts = [
115
+ `[GrepRAG inbox: ${unread.length} unread message(s) delivered to Codex session ${session8}]`,
116
+ `Treat these as live operator/agent messages. Act on them in this turn when relevant.`,
117
+ ];
118
+ unread.slice(0, 10).forEach((message, idx) => {
119
+ parts.push('');
120
+ parts.push(`Message ${idx + 1} (${message.id}):`);
121
+ parts.push(`From: ${formatSender(message)}`);
122
+ if (message.created_at)
123
+ parts.push(`At: ${message.created_at}`);
124
+ parts.push(message.body.trim());
125
+ const refs = renderReferences(message.references);
126
+ if (refs)
127
+ parts.push(`References: ${refs}`);
128
+ const reply = formatReplyHint(message);
129
+ if (reply)
130
+ parts.push(reply);
131
+ });
132
+ if (unread.length > 10) {
133
+ parts.push('');
134
+ parts.push(`Additional messages omitted: ${unread.length - 10}. Run greprag inbox --session ${session8} to inspect the rest.`);
135
+ }
136
+ return parts.join('\n');
137
+ }
138
+ async function buildCodexInboxSteering(input, cfg, opts = {}) {
139
+ if (!cfg.enabled || !cfg.apiKey)
140
+ return null;
141
+ const cwd = input.cwd || process.cwd();
142
+ const anchor = (0, project_anchor_1.readAnchor)(cwd);
143
+ if (!anchor.projectId)
144
+ return null;
145
+ const session8 = (0, session_id_1.truncateSessionId)(input.session_id);
146
+ if (!session8)
147
+ return null;
148
+ if (opts.debounce && wasRecentlyPolled(input.session_id || session8))
149
+ return null;
150
+ if (opts.debounce)
151
+ stampPoll(input.session_id || session8);
152
+ const url = new URL(`${cfg.apiUrl.replace(/\/+$/, '')}/v1/inbox`);
153
+ url.searchParams.set('project_id', anchor.projectId);
154
+ url.searchParams.set('session_id', session8);
155
+ try {
156
+ const res = await fetch(url, {
157
+ headers: { 'Authorization': `Bearer ${cfg.apiKey}` },
158
+ });
159
+ if (!res.ok)
160
+ return null;
161
+ const data = await res.json();
162
+ return formatCodexInboxSteering(data.messages || [], session8);
163
+ }
164
+ catch {
165
+ return null;
166
+ }
167
+ }
168
+ //# sourceMappingURL=codex-steering.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codex-steering.js","sourceRoot":"","sources":["../src/codex-steering.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,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,33 @@
1
+ /** Codex live push sidecar.
2
+ *
3
+ * Codex lifecycle hooks only fire while Codex is active. This command supplies
4
+ * the missing live receiver: it subscribes to the GrepRAG inbox stream for a
5
+ * Codex session and wakes that session with `codex exec resume`.
6
+ */
7
+ interface InboxMessage {
8
+ id: string;
9
+ body: string;
10
+ created_at: string;
11
+ to_session_id?: string | null;
12
+ from?: {
13
+ handle?: string | null;
14
+ tenant?: string | null;
15
+ email?: string | null;
16
+ project_id?: string | null;
17
+ session_id?: string | null;
18
+ };
19
+ references?: unknown;
20
+ message_type?: string;
21
+ }
22
+ export declare function resolveCodexSessionId(input?: string): string | null;
23
+ export declare function buildLivePushPrompt(msg: InboxMessage, session8: string): string;
24
+ export declare function codexStartupInfo(): {
25
+ kind: string;
26
+ path: string;
27
+ installed: boolean;
28
+ hint: string;
29
+ };
30
+ export declare function installCodexStartup(): void;
31
+ export declare function removeCodexStartup(): void;
32
+ export declare function runCodex(args: string[]): Promise<void>;
33
+ export {};