@everstateai/mcp 1.3.11 → 1.3.13
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/README.md +26 -3
- package/dist/index.js +462 -12
- package/dist/index.js.map +1 -1
- package/dist/setup/auto-update.d.ts.map +1 -1
- package/dist/setup/auto-update.js +223 -0
- package/dist/setup/auto-update.js.map +1 -1
- package/dist/setup/hooks/templates.d.ts +18 -1
- package/dist/setup/hooks/templates.d.ts.map +1 -1
- package/dist/setup/hooks/templates.js +381 -41
- package/dist/setup/hooks/templates.js.map +1 -1
- package/dist/setup/types.d.ts +2 -0
- package/dist/setup/types.d.ts.map +1 -1
- package/dist/setup/types.js +3 -1
- package/dist/setup/types.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +108 -8
- package/dist/setup.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +503 -13
- package/src/setup/auto-update.ts +263 -0
- package/src/setup/hooks/templates.ts +398 -41
- package/src/setup/types.ts +3 -1
- package/src/setup.ts +123 -8
|
@@ -11,6 +11,9 @@ exports.getSyncTodosHook = getSyncTodosHook;
|
|
|
11
11
|
exports.getSessionStartHook = getSessionStartHook;
|
|
12
12
|
exports.getSessionEndHook = getSessionEndHook;
|
|
13
13
|
exports.getPreCompactHook = getPreCompactHook;
|
|
14
|
+
exports.getSubagentContextHook = getSubagentContextHook;
|
|
15
|
+
exports.getImplicitProgressHook = getImplicitProgressHook;
|
|
16
|
+
exports.getGotchaCheckHook = getGotchaCheckHook;
|
|
14
17
|
const types_js_1 = require("../types.js");
|
|
15
18
|
/**
|
|
16
19
|
* Get the sync-todos.js hook content
|
|
@@ -25,9 +28,13 @@ function getSyncTodosHook(config) {
|
|
|
25
28
|
* VERSION: ${types_js_1.HOOK_VERSIONS.syncTodos}
|
|
26
29
|
* GENERATED: ${generatedAt}
|
|
27
30
|
*
|
|
28
|
-
*
|
|
31
|
+
* Two-way sync between Claude's TodoWrite and Everstate dashboard.
|
|
29
32
|
* Runs after every TodoWrite tool call.
|
|
30
33
|
*
|
|
34
|
+
* Push: Sends Claude's todos to Everstate for matching and storage.
|
|
35
|
+
* Pull: Reads dashboard changes from API response and outputs instructions
|
|
36
|
+
* to stdout so Claude can update its TodoWrite list.
|
|
37
|
+
*
|
|
31
38
|
* Claude Code passes hook data via STDIN as JSON:
|
|
32
39
|
* { "tool_name": "TodoWrite", "tool_input": { "todos": [...] }, ... }
|
|
33
40
|
*/
|
|
@@ -92,6 +99,19 @@ async function main() {
|
|
|
92
99
|
process.exit(0);
|
|
93
100
|
}
|
|
94
101
|
|
|
102
|
+
// Read last sync timestamp for two-way sync
|
|
103
|
+
const syncStatePath = path.join(
|
|
104
|
+
process.env.CLAUDE_PROJECT_DIR || process.cwd(),
|
|
105
|
+
'.claude', '.sync-state.json'
|
|
106
|
+
);
|
|
107
|
+
let lastSyncedAt = null;
|
|
108
|
+
try {
|
|
109
|
+
if (fs.existsSync(syncStatePath)) {
|
|
110
|
+
const state = JSON.parse(fs.readFileSync(syncStatePath, 'utf8'));
|
|
111
|
+
lastSyncedAt = state.lastSyncedAt || null;
|
|
112
|
+
}
|
|
113
|
+
} catch {}
|
|
114
|
+
|
|
95
115
|
// Send to API for matching and storage
|
|
96
116
|
const response = await fetch(\`\${API_URL}/api/session/sync-todos\`, {
|
|
97
117
|
method: 'POST',
|
|
@@ -103,12 +123,47 @@ async function main() {
|
|
|
103
123
|
projectId,
|
|
104
124
|
todos,
|
|
105
125
|
sessionId: process.env.SESSION_ID || null,
|
|
126
|
+
lastSyncedAt,
|
|
106
127
|
}),
|
|
107
128
|
});
|
|
108
129
|
|
|
109
130
|
if (!response.ok) {
|
|
110
131
|
const text = await response.text();
|
|
111
132
|
console.error('[everstate] Sync failed:', response.status, text);
|
|
133
|
+
process.exit(0);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// Parse response for two-way sync
|
|
137
|
+
const data = await response.json();
|
|
138
|
+
|
|
139
|
+
// Save sync timestamp for next run
|
|
140
|
+
try {
|
|
141
|
+
fs.mkdirSync(path.dirname(syncStatePath), { recursive: true });
|
|
142
|
+
fs.writeFileSync(syncStatePath, JSON.stringify({
|
|
143
|
+
lastSyncedAt: data.syncedAt || new Date().toISOString(),
|
|
144
|
+
}));
|
|
145
|
+
} catch {}
|
|
146
|
+
|
|
147
|
+
// Output dashboard changes to stdout (Claude sees this)
|
|
148
|
+
const changes = data.dashboardChanges || [];
|
|
149
|
+
if (changes.length > 0) {
|
|
150
|
+
const lines = [];
|
|
151
|
+
for (const c of changes) {
|
|
152
|
+
if (c.type === 'status_changed') {
|
|
153
|
+
lines.push('- "' + c.taskTitle + '" was changed to ' + c.newValue + ' on the dashboard');
|
|
154
|
+
} else if (c.type === 'deleted') {
|
|
155
|
+
lines.push('- "' + c.taskTitle + '" was deleted on the dashboard');
|
|
156
|
+
} else if (c.type === 'title_changed') {
|
|
157
|
+
lines.push('- "' + c.oldValue + '" was renamed to "' + c.newValue + '" on the dashboard');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (lines.length > 0) {
|
|
161
|
+
console.log('');
|
|
162
|
+
console.log('[Everstate] Dashboard changes detected since last sync:');
|
|
163
|
+
console.log(lines.join('\\n'));
|
|
164
|
+
console.log('');
|
|
165
|
+
console.log('Please update your TodoWrite list to reflect these changes.');
|
|
166
|
+
}
|
|
112
167
|
}
|
|
113
168
|
} catch (error) {
|
|
114
169
|
console.error('[everstate] Hook error:', error.message);
|
|
@@ -153,7 +208,8 @@ function getSessionEndHook(config) {
|
|
|
153
208
|
# VERSION: ${types_js_1.HOOK_VERSIONS.sessionEnd}
|
|
154
209
|
# GENERATED: ${generatedAt}
|
|
155
210
|
#
|
|
156
|
-
#
|
|
211
|
+
# Auto-saves session when Claude session ends.
|
|
212
|
+
# Calls auto-done which generates summary from tracked activity.
|
|
157
213
|
|
|
158
214
|
API_KEY_PATH="${apiKeyPath}"
|
|
159
215
|
API_URL="${apiUrl}"
|
|
@@ -182,8 +238,8 @@ if [ -z "$PROJECT_ID" ]; then
|
|
|
182
238
|
exit 0
|
|
183
239
|
fi
|
|
184
240
|
|
|
185
|
-
#
|
|
186
|
-
curl -s -X POST "$API_URL/api/session/
|
|
241
|
+
# Call auto-done (generates summary from activity, skips if done() was already called)
|
|
242
|
+
curl -s -X POST "$API_URL/api/session/auto-done" \\
|
|
187
243
|
-H "Content-Type: application/json" \\
|
|
188
244
|
-H "Authorization: Bearer $API_KEY" \\
|
|
189
245
|
-d "{\\"projectId\\": \\"$PROJECT_ID\\"}" > /dev/null 2>&1
|
|
@@ -192,56 +248,337 @@ exit 0
|
|
|
192
248
|
`;
|
|
193
249
|
}
|
|
194
250
|
/**
|
|
195
|
-
* Get the pre-compact.
|
|
251
|
+
* Get the pre-compact.js hook content
|
|
252
|
+
* Prints critical Everstate memory to stdout so it survives compaction.
|
|
196
253
|
*/
|
|
197
254
|
function getPreCompactHook(config) {
|
|
198
255
|
const apiKeyPath = config?.apiKeyPath || `${(0, types_js_1.getEverstateDir)()}/api-key`;
|
|
199
256
|
const apiUrl = config?.apiUrl || types_js_1.EVERSTATE_API_URL;
|
|
200
257
|
const generatedAt = config?.generatedAt || new Date().toISOString();
|
|
201
|
-
return
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
258
|
+
return getContextInjectionHook({
|
|
259
|
+
hookName: 'Pre-Compact',
|
|
260
|
+
version: types_js_1.HOOK_VERSIONS.preCompact,
|
|
261
|
+
generatedAt,
|
|
262
|
+
apiKeyPath,
|
|
263
|
+
apiUrl,
|
|
264
|
+
preamble: 'Critical context preserved through compaction',
|
|
265
|
+
timeout: 8000,
|
|
266
|
+
includeBlockers: true,
|
|
267
|
+
includeTasks: true,
|
|
268
|
+
maxGotchas: 5,
|
|
269
|
+
maxDecisions: 5,
|
|
270
|
+
postAction: `
|
|
271
|
+
fetch(\\\`\\\${API_URL}/api/session/compact-warning\\\`, {
|
|
272
|
+
method: 'POST',
|
|
273
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': \\\`Bearer \\\${apiKey}\\\` },
|
|
274
|
+
body: JSON.stringify({ projectId, message: 'Context compacted — critical context re-injected' }),
|
|
275
|
+
}).catch(() => {});`,
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Get the subagent-context.js hook content
|
|
280
|
+
* Injects critical context when subagents spawn.
|
|
281
|
+
*/
|
|
282
|
+
function getSubagentContextHook(config) {
|
|
283
|
+
const apiKeyPath = config?.apiKeyPath || `${(0, types_js_1.getEverstateDir)()}/api-key`;
|
|
284
|
+
const apiUrl = config?.apiUrl || types_js_1.EVERSTATE_API_URL;
|
|
285
|
+
const generatedAt = config?.generatedAt || new Date().toISOString();
|
|
286
|
+
return getContextInjectionHook({
|
|
287
|
+
hookName: 'SubagentStart',
|
|
288
|
+
version: types_js_1.HOOK_VERSIONS.subagentContext,
|
|
289
|
+
generatedAt,
|
|
290
|
+
apiKeyPath,
|
|
291
|
+
apiUrl,
|
|
292
|
+
preamble: 'Project context for this subagent',
|
|
293
|
+
timeout: 5000,
|
|
294
|
+
includeBlockers: false,
|
|
295
|
+
includeTasks: false,
|
|
296
|
+
maxGotchas: 5,
|
|
297
|
+
maxDecisions: 3,
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Shared template for hooks that inject Everstate context via stdout.
|
|
302
|
+
* Used by both PreCompact and SubagentStart hooks.
|
|
303
|
+
*/
|
|
304
|
+
function getContextInjectionHook(opts) {
|
|
305
|
+
return `#!/usr/bin/env node
|
|
306
|
+
/**
|
|
307
|
+
* Everstate ${opts.hookName} Hook v${opts.version}
|
|
308
|
+
* VERSION: ${opts.version}
|
|
309
|
+
* GENERATED: ${opts.generatedAt}
|
|
310
|
+
*
|
|
311
|
+
* Prints critical Everstate memory to stdout.
|
|
312
|
+
* Claude adds hook stdout to the agent's context.
|
|
313
|
+
*/
|
|
207
314
|
|
|
208
|
-
|
|
209
|
-
|
|
315
|
+
const fs = require('fs');
|
|
316
|
+
const path = require('path');
|
|
210
317
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
exit 0
|
|
214
|
-
fi
|
|
215
|
-
API_KEY=$(cat "$API_KEY_PATH")
|
|
318
|
+
const API_KEY_PATH = '${opts.apiKeyPath}';
|
|
319
|
+
const API_URL = '${opts.apiUrl}';
|
|
216
320
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
321
|
+
async function main() {
|
|
322
|
+
if (!fs.existsSync(API_KEY_PATH)) process.exit(0);
|
|
323
|
+
const apiKey = fs.readFileSync(API_KEY_PATH, 'utf8').trim();
|
|
324
|
+
|
|
325
|
+
let projectId = null;
|
|
326
|
+
let searchDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
327
|
+
for (let i = 0; i < 10; i++) {
|
|
328
|
+
for (const cn of ['.everstate.json', '.codekeep.json']) {
|
|
329
|
+
const cp = path.join(searchDir, cn);
|
|
330
|
+
if (fs.existsSync(cp)) {
|
|
331
|
+
try { projectId = JSON.parse(fs.readFileSync(cp, 'utf8')).projectId; } catch {}
|
|
332
|
+
}
|
|
333
|
+
if (projectId) break;
|
|
334
|
+
}
|
|
335
|
+
if (projectId) break;
|
|
336
|
+
const parent = path.dirname(searchDir);
|
|
337
|
+
if (parent === searchDir) break;
|
|
338
|
+
searchDir = parent;
|
|
339
|
+
}
|
|
340
|
+
if (!projectId) process.exit(0);
|
|
341
|
+
|
|
342
|
+
try {
|
|
343
|
+
const response = await fetch(\\\`\\\${API_URL}/api/context/handoff?projectId=\\\${projectId}\\\`, {
|
|
344
|
+
headers: { 'Authorization': \\\`Bearer \\\${apiKey}\\\` },
|
|
345
|
+
signal: AbortSignal.timeout(${opts.timeout}),
|
|
346
|
+
});
|
|
347
|
+
if (!response.ok) process.exit(0);
|
|
348
|
+
const ctx = await response.json();
|
|
349
|
+
|
|
350
|
+
const lines = ['[Everstate] ${opts.preamble}:', ''];
|
|
351
|
+
|
|
352
|
+
if (ctx.activeDirective) {
|
|
353
|
+
lines.push(\\\`## Current Directive: \\\${ctx.activeDirective.title}\\\`);
|
|
354
|
+
if (ctx.activeDirective.currentFocus) lines.push(\\\`> \\\${ctx.activeDirective.currentFocus}\\\`);
|
|
355
|
+
if (ctx.activeDirective.branch) lines.push(\\\`Branch: \\\${ctx.activeDirective.branch}\\\`);
|
|
356
|
+
lines.push('');
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
if (ctx.gotchas && ctx.gotchas.length > 0) {
|
|
360
|
+
lines.push('## Gotchas');
|
|
361
|
+
for (const g of ctx.gotchas.slice(0, ${opts.maxGotchas})) {
|
|
362
|
+
lines.push(\\\`- \\\${g.title}: \\\${g.description.substring(0, 150)}\\\`);
|
|
363
|
+
}
|
|
364
|
+
lines.push('');
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
if (ctx.recentDecisions && ctx.recentDecisions.length > 0) {
|
|
368
|
+
lines.push('## Decisions');
|
|
369
|
+
for (const d of ctx.recentDecisions.slice(0, ${opts.maxDecisions})) {
|
|
370
|
+
lines.push(\\\`- \\\${d.summary}\\\${d.rationale ? ' (' + d.rationale.substring(0, 100) + ')' : ''}\\\`);
|
|
371
|
+
}
|
|
372
|
+
lines.push('');
|
|
373
|
+
}
|
|
374
|
+
${opts.includeTasks ? `
|
|
375
|
+
if (ctx.tasks) {
|
|
376
|
+
const inProgress = ctx.tasks.inProgress || [];
|
|
377
|
+
const pending = ctx.tasks.pending || [];
|
|
378
|
+
if (inProgress.length > 0 || pending.length > 0) {
|
|
379
|
+
lines.push('## Tasks');
|
|
380
|
+
for (const t of inProgress) lines.push(\\\`- [in_progress] \\\${t.title}\\\`);
|
|
381
|
+
for (const t of pending.slice(0, 5)) lines.push(\\\`- [pending] \\\${t.title}\\\`);
|
|
382
|
+
lines.push('');
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
` : ''}${opts.includeBlockers ? `
|
|
386
|
+
if (ctx.blockers && ctx.blockers.length > 0) {
|
|
387
|
+
lines.push('## Blockers');
|
|
388
|
+
for (const b of ctx.blockers) {
|
|
389
|
+
lines.push(\\\`- \\\${b.title} (\\\${b.severity}): \\\${b.description.substring(0, 100)}\\\`);
|
|
390
|
+
}
|
|
391
|
+
lines.push('');
|
|
392
|
+
}
|
|
393
|
+
` : ''}
|
|
394
|
+
if (ctx.doNotModify && ctx.doNotModify.length > 0) {
|
|
395
|
+
lines.push('Do not modify:');
|
|
396
|
+
for (const f of ctx.doNotModify) lines.push(\\\`- \\\${f.filePath}: \\\${f.reason}\\\`);
|
|
397
|
+
lines.push('');
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
if (lines.length > 2) console.log(lines.join('\\n'));
|
|
401
|
+
${opts.postAction || ''}
|
|
402
|
+
} catch {
|
|
403
|
+
try {
|
|
404
|
+
const cachePath = path.join(process.env.CLAUDE_PROJECT_DIR || process.cwd(), '.claude', '.gotcha-cache.json');
|
|
405
|
+
if (fs.existsSync(cachePath)) {
|
|
406
|
+
const gotchas = JSON.parse(fs.readFileSync(cachePath, 'utf8'));
|
|
407
|
+
if (Array.isArray(gotchas) && gotchas.length > 0) {
|
|
408
|
+
console.log('[Everstate] Known gotchas:');
|
|
409
|
+
for (const g of gotchas.slice(0, ${opts.maxGotchas})) console.log(\\\`- \\\${g.title}: \\\${g.description.substring(0, 150)}\\\`);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
} catch {}
|
|
413
|
+
}
|
|
228
414
|
}
|
|
229
415
|
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
416
|
+
main().catch(() => process.exit(0));
|
|
417
|
+
`;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Get the implicit-progress.js hook content (PostToolUse for Edit/Write/Bash)
|
|
421
|
+
*/
|
|
422
|
+
function getImplicitProgressHook(config) {
|
|
423
|
+
const apiKeyPath = config?.apiKeyPath || `${(0, types_js_1.getEverstateDir)()}/api-key`;
|
|
424
|
+
const apiUrl = config?.apiUrl || types_js_1.EVERSTATE_API_URL;
|
|
425
|
+
const generatedAt = config?.generatedAt || new Date().toISOString();
|
|
426
|
+
return `#!/usr/bin/env node
|
|
427
|
+
/**
|
|
428
|
+
* Everstate Implicit Progress Hook v${types_js_1.HOOK_VERSIONS.syncTodos}
|
|
429
|
+
* VERSION: ${types_js_1.HOOK_VERSIONS.syncTodos}
|
|
430
|
+
* GENERATED: ${generatedAt}
|
|
431
|
+
*
|
|
432
|
+
* Automatically logs progress when files are edited or commands run.
|
|
433
|
+
* Runs as PostToolUse hook for Edit, Write, and Bash tools.
|
|
434
|
+
*/
|
|
435
|
+
|
|
436
|
+
const fs = require('fs');
|
|
437
|
+
const path = require('path');
|
|
234
438
|
|
|
235
|
-
|
|
236
|
-
|
|
439
|
+
const API_KEY_PATH = '${apiKeyPath}';
|
|
440
|
+
const API_URL = '${apiUrl}';
|
|
237
441
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
-d "{\\"projectId\\": \\"$PROJECT_ID\\", \\"transcript\\": \\"\$TRANSCRIPT\\"}" > /dev/null 2>&1
|
|
442
|
+
let stdinData = '';
|
|
443
|
+
process.stdin.setEncoding('utf8');
|
|
444
|
+
process.stdin.on('data', chunk => stdinData += chunk);
|
|
445
|
+
process.stdin.on('end', () => main());
|
|
243
446
|
|
|
244
|
-
|
|
447
|
+
async function main() {
|
|
448
|
+
try {
|
|
449
|
+
if (!fs.existsSync(API_KEY_PATH)) process.exit(0);
|
|
450
|
+
const apiKey = fs.readFileSync(API_KEY_PATH, 'utf8').trim();
|
|
451
|
+
|
|
452
|
+
const hookData = JSON.parse(stdinData || '{}');
|
|
453
|
+
const toolName = hookData.tool_name;
|
|
454
|
+
const toolInput = hookData.tool_input || {};
|
|
455
|
+
|
|
456
|
+
let activity = null;
|
|
457
|
+
if (toolName === 'Edit' || toolName === 'Write') {
|
|
458
|
+
const filePath = toolInput.file_path || toolInput.filePath || '';
|
|
459
|
+
if (filePath) activity = { tool: toolName.toLowerCase(), file: path.basename(filePath), path: filePath };
|
|
460
|
+
} else if (toolName === 'Bash') {
|
|
461
|
+
const cmd = toolInput.command || '';
|
|
462
|
+
if (cmd && !cmd.startsWith('git status') && !cmd.startsWith('ls '))
|
|
463
|
+
activity = { tool: 'bash', command: cmd.substring(0, 100) };
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
if (!activity) process.exit(0);
|
|
467
|
+
|
|
468
|
+
// Find project
|
|
469
|
+
let projectId = null;
|
|
470
|
+
let searchDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
471
|
+
for (let i = 0; i < 10; i++) {
|
|
472
|
+
for (const cn of ['.everstate.json', '.codekeep.json']) {
|
|
473
|
+
const cp = path.join(searchDir, cn);
|
|
474
|
+
if (fs.existsSync(cp)) {
|
|
475
|
+
try { projectId = JSON.parse(fs.readFileSync(cp, 'utf8')).projectId; } catch {}
|
|
476
|
+
}
|
|
477
|
+
if (projectId) break;
|
|
478
|
+
}
|
|
479
|
+
if (projectId) break;
|
|
480
|
+
const parent = path.dirname(searchDir);
|
|
481
|
+
if (parent === searchDir) break;
|
|
482
|
+
searchDir = parent;
|
|
483
|
+
}
|
|
484
|
+
if (!projectId) process.exit(0);
|
|
485
|
+
|
|
486
|
+
// Debounce: 1 per file per 60s
|
|
487
|
+
const df = path.join(process.env.CLAUDE_PROJECT_DIR || process.cwd(), '.claude', '.progress-debounce.json');
|
|
488
|
+
let db = {};
|
|
489
|
+
try { if (fs.existsSync(df)) db = JSON.parse(fs.readFileSync(df, 'utf8')); } catch {}
|
|
490
|
+
const key = activity.file || activity.command || 'x';
|
|
491
|
+
const now = Date.now();
|
|
492
|
+
if (db[key] && (now - db[key]) < 60000) process.exit(0);
|
|
493
|
+
db[key] = now;
|
|
494
|
+
for (const [k, v] of Object.entries(db)) { if ((now - v) > 300000) delete db[k]; }
|
|
495
|
+
try { fs.mkdirSync(path.dirname(df), { recursive: true }); fs.writeFileSync(df, JSON.stringify(db)); } catch {}
|
|
496
|
+
|
|
497
|
+
await fetch(\`\${API_URL}/api/session/implicit-progress\`, {
|
|
498
|
+
method: 'POST',
|
|
499
|
+
headers: { 'Content-Type': 'application/json', 'Authorization': \`Bearer \${apiKey}\` },
|
|
500
|
+
body: JSON.stringify({ projectId, activity }),
|
|
501
|
+
}).catch(() => {});
|
|
502
|
+
} catch {}
|
|
503
|
+
process.exit(0);
|
|
504
|
+
}
|
|
505
|
+
`;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Get the gotcha-check.js hook content (PreToolUse for Edit/Write)
|
|
509
|
+
*/
|
|
510
|
+
function getGotchaCheckHook(config) {
|
|
511
|
+
const generatedAt = config?.generatedAt || new Date().toISOString();
|
|
512
|
+
return `#!/usr/bin/env node
|
|
513
|
+
/**
|
|
514
|
+
* Everstate Gotcha Check Hook v${types_js_1.HOOK_VERSIONS.syncTodos}
|
|
515
|
+
* VERSION: ${types_js_1.HOOK_VERSIONS.syncTodos}
|
|
516
|
+
* GENERATED: ${generatedAt}
|
|
517
|
+
*
|
|
518
|
+
* Surfaces relevant gotchas before file edits.
|
|
519
|
+
* Runs as PreToolUse hook for Edit and Write tools.
|
|
520
|
+
*
|
|
521
|
+
* Claude Code passes hook data via STDIN as JSON:
|
|
522
|
+
* { "tool_name": "Edit", "tool_input": { "file_path": "..." }, ... }
|
|
523
|
+
*/
|
|
524
|
+
|
|
525
|
+
const fs = require('fs');
|
|
526
|
+
const path = require('path');
|
|
527
|
+
|
|
528
|
+
let stdinData = '';
|
|
529
|
+
process.stdin.setEncoding('utf8');
|
|
530
|
+
process.stdin.on('data', chunk => stdinData += chunk);
|
|
531
|
+
process.stdin.on('end', () => main());
|
|
532
|
+
|
|
533
|
+
function main() {
|
|
534
|
+
try {
|
|
535
|
+
const hookData = JSON.parse(stdinData || '{}');
|
|
536
|
+
const filePath = hookData.tool_input?.file_path || hookData.tool_input?.filePath || '';
|
|
537
|
+
if (!filePath) {
|
|
538
|
+
process.exit(0);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// Read gotcha cache
|
|
542
|
+
const projectDir = process.env.CLAUDE_PROJECT_DIR || process.cwd();
|
|
543
|
+
const cachePath = path.join(projectDir, '.claude', '.gotcha-cache.json');
|
|
544
|
+
if (!fs.existsSync(cachePath)) {
|
|
545
|
+
process.exit(0);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
const gotchas = JSON.parse(fs.readFileSync(cachePath, 'utf8'));
|
|
549
|
+
if (!Array.isArray(gotchas) || gotchas.length === 0) {
|
|
550
|
+
process.exit(0);
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
// Match gotchas against file path
|
|
554
|
+
const fileLC = filePath.toLowerCase();
|
|
555
|
+
const fileName = path.basename(filePath).toLowerCase();
|
|
556
|
+
const matched = [];
|
|
557
|
+
|
|
558
|
+
for (const gotcha of gotchas) {
|
|
559
|
+
if (!gotcha.keywords || !Array.isArray(gotcha.keywords)) continue;
|
|
560
|
+
for (const keyword of gotcha.keywords) {
|
|
561
|
+
if (fileLC.includes(keyword) || fileName.includes(keyword)) {
|
|
562
|
+
matched.push(gotcha);
|
|
563
|
+
break;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
if (matched.length > 0) {
|
|
569
|
+
const sevIcon = { critical: '!!!', warning: '>>', info: '>' };
|
|
570
|
+
console.log('');
|
|
571
|
+
console.log('[Everstate] Gotcha warning for ' + path.basename(filePath) + ':');
|
|
572
|
+
for (const g of matched.slice(0, 3)) {
|
|
573
|
+
console.log((sevIcon[g.severity] || '>>') + ' ' + g.title + ': ' + g.description.substring(0, 150));
|
|
574
|
+
}
|
|
575
|
+
console.log('');
|
|
576
|
+
}
|
|
577
|
+
} catch {
|
|
578
|
+
// Silent failure - don't block tool execution
|
|
579
|
+
}
|
|
580
|
+
process.exit(0);
|
|
581
|
+
}
|
|
245
582
|
`;
|
|
246
583
|
}
|
|
247
584
|
exports.hookTemplates = {
|
|
@@ -249,5 +586,8 @@ exports.hookTemplates = {
|
|
|
249
586
|
sessionStart: getSessionStartHook,
|
|
250
587
|
sessionEnd: getSessionEndHook,
|
|
251
588
|
preCompact: getPreCompactHook,
|
|
589
|
+
subagentContext: getSubagentContextHook,
|
|
590
|
+
gotchaCheck: getGotchaCheckHook,
|
|
591
|
+
implicitProgress: getImplicitProgressHook,
|
|
252
592
|
};
|
|
253
593
|
//# sourceMappingURL=templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/setup/hooks/templates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../../src/setup/hooks/templates.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAOH,4CA2JC;AAKD,kDAoBC;AAKD,8CAgDC;AAMD,8CAwBC;AAMD,wDAkBC;AA0ID,0DAqFC;AAKD,gDA0EC;AAllBD,0CAA4F;AAE5F;;GAEG;AACH,SAAgB,gBAAgB,CAAC,MAA4B;IAC3D,MAAM,UAAU,GAAG,MAAM,EAAE,UAAU,IAAI,GAAG,IAAA,0BAAe,GAAE,UAAU,CAAC;IACxE,MAAM,MAAM,GAAG,MAAM,EAAE,MAAM,IAAI,4BAAiB,CAAC;IACnD,MAAM,WAAW,GAAG,MAAM,EAAE,WAAW,IAAI,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAEpE,OAAO;;gCAEuB,wBAAa,CAAC,SAAS;cACzC,wBAAa,CAAC,SAAS;gBACrB,WAAW;;;;;;;;;;;;;;;;wBAgBH,UAAU;mBACf,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AW,EAAE,kBAAkB;IAC/B,gBAAgB,EAAE,uBAAuB;CAC1C,CAAC"}
|
package/dist/setup/types.d.ts
CHANGED
|
@@ -113,6 +113,8 @@ export declare const HOOK_VERSIONS: {
|
|
|
113
113
|
sessionStart: string;
|
|
114
114
|
sessionEnd: string;
|
|
115
115
|
syncTodos: string;
|
|
116
|
+
preCompact: string;
|
|
117
|
+
subagentContext: string;
|
|
116
118
|
};
|
|
117
119
|
export declare const EVERSTATE_API_URL = "https://www.everstate.ai";
|
|
118
120
|
export declare function getEverstateDir(): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/setup/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjF,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC;IAClE,MAAM,CAAC,CAAC,MAAM,EAAE,gBAAgB,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,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BAAqB,IAAI,MAAM,CAE9C"}
|
package/dist/setup/types.js
CHANGED
|
@@ -39,7 +39,9 @@ function c(color, text) {
|
|
|
39
39
|
exports.HOOK_VERSIONS = {
|
|
40
40
|
sessionStart: '1.1.0',
|
|
41
41
|
sessionEnd: '1.1.0',
|
|
42
|
-
syncTodos: '
|
|
42
|
+
syncTodos: '6.0.0', // Two-way sync: dashboard changes reported back to Claude via stdout
|
|
43
|
+
preCompact: '2.0.0', // Re-injects critical context (gotchas, decisions, tasks) before compaction
|
|
44
|
+
subagentContext: '1.0.0', // Injects project context when subagents spawn
|
|
43
45
|
};
|
|
44
46
|
exports.EVERSTATE_API_URL = 'https://www.everstate.ai';
|
|
45
47
|
function getEverstateDir() {
|
package/dist/setup/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/setup/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA0JH,sCAQC;AAED,cAEC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/setup/types.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AA0JH,sCAQC;AAED,cAEC;AAgBD,0CAEC;AAED,kDAEC;AAED,gEAOC;AAED,kDAEC;AAED,sDAEC;AA9DY,QAAA,MAAM,GAAW;IAC5B,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,UAAU;IACf,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,UAAU;IAClB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,UAAU;IAChB,IAAI,EAAE,SAAS;IACf,GAAG,EAAE,SAAS;CACf,CAAC;AAEF,SAAgB,aAAa;IAC3B,OAAO,CACL,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;QAC7B,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;QAC/B,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC3B,OAAO,CAAC,GAAG,CAAC,IAAI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AG,OAAO,CAAC,GAAG,CAAC,IAAI,oCAAoC,CAAC;AACjE,CAAC"}
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AACA;;;;;;;GAOG;AAy0BH,wBAAsB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,iBAoI5C"}
|