greprag 0.1.0 → 0.1.2
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/hook.d.ts +7 -10
- package/dist/hook.js +60 -150
- package/dist/hook.js.map +1 -1
- package/package.json +1 -1
package/dist/hook.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
/** GrepRAG
|
|
2
|
+
/** GrepRAG Hook — thin HTTP pipe for Claude Code hooks.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* retrieve — UserPromptSubmit:
|
|
6
|
-
* store — Stop:
|
|
4
|
+
* Subcommands:
|
|
5
|
+
* retrieve — UserPromptSubmit: POST prompt to API, cache prompt locally
|
|
6
|
+
* store — Stop: read cached prompt + last_assistant_message → POST to API
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* Env: GREPRAG_API_KEY (required), GREPRAG_API_URL (optional)
|
|
13
|
-
* MEMORY_HOOK_ENABLED=true to activate */
|
|
8
|
+
* No transcript parsing. UserPromptSubmit gives us the user's prompt directly,
|
|
9
|
+
* Stop gives us last_assistant_message. We pair them and store the turn.
|
|
10
|
+
* This eliminates source misattribution from injected transcript content. */
|
|
14
11
|
export {};
|
package/dist/hook.js
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
|
-
/** GrepRAG
|
|
3
|
+
/** GrepRAG Hook — thin HTTP pipe for Claude Code hooks.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
* retrieve — UserPromptSubmit:
|
|
7
|
-
* store — Stop:
|
|
5
|
+
* Subcommands:
|
|
6
|
+
* retrieve — UserPromptSubmit: POST prompt to API, cache prompt locally
|
|
7
|
+
* store — Stop: read cached prompt + last_assistant_message → POST to API
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Env: GREPRAG_API_KEY (required), GREPRAG_API_URL (optional)
|
|
14
|
-
* MEMORY_HOOK_ENABLED=true to activate */
|
|
9
|
+
* No transcript parsing. UserPromptSubmit gives us the user's prompt directly,
|
|
10
|
+
* Stop gives us last_assistant_message. We pair them and store the turn.
|
|
11
|
+
* This eliminates source misattribution from injected transcript content. */
|
|
15
12
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
13
|
if (k2 === undefined) k2 = k;
|
|
17
14
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -48,6 +45,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
48
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
46
|
const path = __importStar(require("path"));
|
|
50
47
|
const fs = __importStar(require("fs"));
|
|
48
|
+
const os = __importStar(require("os"));
|
|
51
49
|
// -- Config ----------------------------------------------------------------
|
|
52
50
|
const API_URL_DEFAULT = 'https://api.greprag.com';
|
|
53
51
|
function getConfig(cwd) {
|
|
@@ -58,98 +56,25 @@ function getConfig(cwd) {
|
|
|
58
56
|
enabled: process.env.MEMORY_HOOK_ENABLED === 'true',
|
|
59
57
|
};
|
|
60
58
|
}
|
|
61
|
-
// --
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
'lgtm',
|
|
68
|
-
]);
|
|
69
|
-
const AGREEMENT_PHRASES = [
|
|
70
|
-
'go ahead', 'do it', 'sounds good', 'looks good', 'ship it',
|
|
71
|
-
];
|
|
72
|
-
function isShortAgreement(text) {
|
|
73
|
-
if (!text || text.trim().length === 0)
|
|
74
|
-
return true;
|
|
75
|
-
const normalized = text.trim().toLowerCase();
|
|
76
|
-
const wordCount = normalized.split(/\s+/).length;
|
|
77
|
-
if (wordCount > 8)
|
|
78
|
-
return false;
|
|
79
|
-
if (AGREEMENT_WORDS.has(normalized))
|
|
80
|
-
return true;
|
|
81
|
-
for (const phrase of AGREEMENT_PHRASES) {
|
|
82
|
-
if (normalized === phrase || normalized.startsWith(phrase + ' ') || normalized.startsWith(phrase + ',')) {
|
|
83
|
-
return true;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
return false;
|
|
59
|
+
// -- Prompt cache ----------------------------------------------------------
|
|
60
|
+
function getCachePath() {
|
|
61
|
+
const dir = path.join(os.homedir(), '.greprag');
|
|
62
|
+
if (!fs.existsSync(dir))
|
|
63
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
64
|
+
return path.join(dir, 'pending-prompt.json');
|
|
87
65
|
}
|
|
88
|
-
function
|
|
89
|
-
|
|
90
|
-
return content.trim();
|
|
91
|
-
if (Array.isArray(content)) {
|
|
92
|
-
const parts = [];
|
|
93
|
-
for (const block of content) {
|
|
94
|
-
if (block && typeof block === 'object' && block.type === 'text') {
|
|
95
|
-
parts.push(String(block.text || ''));
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return parts.join('\n').trim();
|
|
99
|
-
}
|
|
100
|
-
return '';
|
|
66
|
+
function cachePrompt(prompt, sessionId, profileId) {
|
|
67
|
+
fs.writeFileSync(getCachePath(), JSON.stringify({ prompt, sessionId, profileId }));
|
|
101
68
|
}
|
|
102
|
-
function
|
|
103
|
-
let data;
|
|
69
|
+
function readCachedPrompt() {
|
|
104
70
|
try {
|
|
105
|
-
data = fs.readFileSync(
|
|
71
|
+
const data = JSON.parse(fs.readFileSync(getCachePath(), 'utf-8'));
|
|
72
|
+
fs.unlinkSync(getCachePath()); // consume once
|
|
73
|
+
return data;
|
|
106
74
|
}
|
|
107
75
|
catch {
|
|
108
76
|
return null;
|
|
109
77
|
}
|
|
110
|
-
let lastUserMessage = '';
|
|
111
|
-
const agentTextByRequestId = new Map();
|
|
112
|
-
let userMessageCount = 0;
|
|
113
|
-
const lines = data.split('\n');
|
|
114
|
-
for (const line of lines) {
|
|
115
|
-
const trimmed = line.trim();
|
|
116
|
-
if (!trimmed)
|
|
117
|
-
continue;
|
|
118
|
-
let entry;
|
|
119
|
-
try {
|
|
120
|
-
entry = JSON.parse(trimmed);
|
|
121
|
-
}
|
|
122
|
-
catch {
|
|
123
|
-
continue;
|
|
124
|
-
}
|
|
125
|
-
const message = entry.message || entry;
|
|
126
|
-
const role = String(message.role || entry.type || '');
|
|
127
|
-
const content = message.content;
|
|
128
|
-
const requestId = String(entry.requestId || '');
|
|
129
|
-
if (role === 'user') {
|
|
130
|
-
const text = extractText(content);
|
|
131
|
-
if (text && text.length > 5) {
|
|
132
|
-
if (!text.startsWith('<system') && !text.startsWith('{')) {
|
|
133
|
-
lastUserMessage = text;
|
|
134
|
-
userMessageCount++;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
if (role === 'assistant') {
|
|
139
|
-
const text = extractText(content);
|
|
140
|
-
if (text && text.trim().length > 20 && requestId) {
|
|
141
|
-
const prev = agentTextByRequestId.get(requestId) || '';
|
|
142
|
-
if (text.length > prev.length) {
|
|
143
|
-
agentTextByRequestId.set(requestId, text);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
if (!lastUserMessage)
|
|
149
|
-
return null;
|
|
150
|
-
const agentTexts = Array.from(agentTextByRequestId.values());
|
|
151
|
-
const agentProse = agentTexts.length > 0 ? agentTexts[agentTexts.length - 1] : '';
|
|
152
|
-
return { userMessage: lastUserMessage, agentProse, turnIndex: userMessageCount };
|
|
153
78
|
}
|
|
154
79
|
// -- Env loader ------------------------------------------------------------
|
|
155
80
|
function loadEnvFile(filePath) {
|
|
@@ -185,17 +110,15 @@ function ensureEnv(cwd) {
|
|
|
185
110
|
loadEnvFile(path.join(cwd, '.env'));
|
|
186
111
|
}
|
|
187
112
|
// -- HTTP client -----------------------------------------------------------
|
|
188
|
-
async function apiCall(url, apiKey,
|
|
189
|
-
const
|
|
190
|
-
method,
|
|
113
|
+
async function apiCall(url, apiKey, body) {
|
|
114
|
+
const res = await fetch(url, {
|
|
115
|
+
method: 'POST',
|
|
191
116
|
headers: {
|
|
192
117
|
'Authorization': `Bearer ${apiKey}`,
|
|
193
118
|
'Content-Type': 'application/json',
|
|
194
119
|
},
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
opts.body = JSON.stringify(body);
|
|
198
|
-
const res = await fetch(url, opts);
|
|
120
|
+
body: JSON.stringify(body),
|
|
121
|
+
});
|
|
199
122
|
if (!res.ok) {
|
|
200
123
|
process.stderr.write(`[greprag-hook] API ${res.status}: ${await res.text()}\n`);
|
|
201
124
|
return null;
|
|
@@ -203,65 +126,52 @@ async function apiCall(url, apiKey, method, body) {
|
|
|
203
126
|
return res.json();
|
|
204
127
|
}
|
|
205
128
|
async function retrieve(input) {
|
|
206
|
-
const prompt = input.prompt || '';
|
|
207
129
|
const cwd = input.cwd || process.cwd();
|
|
208
130
|
const cfg = getConfig(cwd);
|
|
209
131
|
if (!cfg.enabled || !cfg.apiKey)
|
|
210
132
|
return;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
process.stdout.write(JSON.stringify(output));
|
|
232
|
-
}
|
|
133
|
+
const prompt = input.prompt || '';
|
|
134
|
+
const sessionId = input.session_id || '';
|
|
135
|
+
const profileId = path.basename(cwd);
|
|
136
|
+
// Cache prompt for the store hook to pick up
|
|
137
|
+
if (prompt)
|
|
138
|
+
cachePrompt(prompt, sessionId, profileId);
|
|
139
|
+
const result = await apiCall(`${cfg.apiUrl}/v1/memory/retrieve`, cfg.apiKey, {
|
|
140
|
+
query: prompt,
|
|
141
|
+
profileId,
|
|
142
|
+
sessionId,
|
|
143
|
+
});
|
|
144
|
+
if (result?.ok) {
|
|
145
|
+
const r = result.result;
|
|
146
|
+
if (r?.totalWords > 0 && r?.formattedBlock) {
|
|
147
|
+
process.stdout.write(JSON.stringify({
|
|
148
|
+
hookSpecificOutput: {
|
|
149
|
+
hookEventName: 'UserPromptSubmit',
|
|
150
|
+
additionalContext: r.formattedBlock,
|
|
151
|
+
},
|
|
152
|
+
}));
|
|
233
153
|
}
|
|
234
154
|
}
|
|
235
|
-
catch (err) {
|
|
236
|
-
process.stderr.write(`[greprag-hook:retrieve] Error: ${err.message}\n`);
|
|
237
|
-
}
|
|
238
155
|
}
|
|
239
156
|
async function store(input) {
|
|
240
|
-
const transcriptPath = input.transcript_path || '';
|
|
241
157
|
const cwd = input.cwd || process.cwd();
|
|
242
|
-
const sessionId = input.session_id || '';
|
|
243
158
|
const cfg = getConfig(cwd);
|
|
244
|
-
if (!
|
|
159
|
+
if (!cfg.enabled || !cfg.apiKey)
|
|
245
160
|
return;
|
|
246
|
-
const
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
process.stderr.write(`[greprag-hook:store] Stored turn ${parsed.turnIndex} (${profile})\n`);
|
|
261
|
-
}
|
|
262
|
-
catch (err) {
|
|
263
|
-
process.stderr.write(`[greprag-hook:store] Error: ${err.message}\n`);
|
|
264
|
-
}
|
|
161
|
+
const agentProse = input.last_assistant_message || '';
|
|
162
|
+
if (!agentProse)
|
|
163
|
+
return;
|
|
164
|
+
// Read the cached prompt from the retrieve hook
|
|
165
|
+
const cached = readCachedPrompt();
|
|
166
|
+
const userMessage = cached?.prompt || '';
|
|
167
|
+
const sessionId = cached?.sessionId || input.session_id || `hook-${Date.now()}`;
|
|
168
|
+
const profileId = cached?.profileId || path.basename(cwd);
|
|
169
|
+
await apiCall(`${cfg.apiUrl}/v1/memory/store`, cfg.apiKey, {
|
|
170
|
+
profileId,
|
|
171
|
+
sessionId,
|
|
172
|
+
userMessage,
|
|
173
|
+
agentProse,
|
|
174
|
+
});
|
|
265
175
|
}
|
|
266
176
|
// -- Main ------------------------------------------------------------------
|
|
267
177
|
async function main() {
|
package/dist/hook.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../src/hook.ts"],"names":[],"mappings":";;AACA
|
|
1
|
+
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../src/hook.ts"],"names":[],"mappings":";;AACA;;;;;;;;6EAQ6E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE7E,2CAA6B;AAC7B,uCAAyB;AACzB,uCAAyB;AAEzB,6EAA6E;AAE7E,MAAM,eAAe,GAAG,yBAAyB,CAAC;AAElD,SAAS,SAAS,CAAC,GAAW;IAC5B,SAAS,CAAC,GAAG,CAAC,CAAC;IACf,OAAO;QACL,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,eAAe;QACtD,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE;QACzC,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,KAAK,MAAM;KACpD,CAAC;AACJ,CAAC;AAED,6EAA6E;AAE7E,SAAS,YAAY;IACnB,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,UAAU,CAAC,CAAC;IAChD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;AAC/C,CAAC;AAED,SAAS,WAAW,CAAC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