claudeye 1.0.2 → 1.0.3-beta.1
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 +32 -0
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
- [`createApp()`](#createapp)
|
|
32
32
|
- [`app.condition(fn)`](#appconditionfn)
|
|
33
33
|
- [`app.queueCondition(fn, options?)`](#appqueueconditionfn-options)
|
|
34
|
+
- [`app.cacheInvalidation(fn)`](#appcacheinvalidationfn)
|
|
34
35
|
- [`app.eval(name, fn, options?)`](#appevalname-fn-options)
|
|
35
36
|
- [`app.enrich(name, fn, options?)`](#appenrichname-fn-options)
|
|
36
37
|
- [`app.action(name, fn, options?)`](#appactionname-fn-options)
|
|
@@ -121,6 +122,7 @@ Works with [Claude Code](https://docs.anthropic.com/en/docs/claude-code) session
|
|
|
121
122
|
- **Custom evals** - grade sessions with pass/fail results and 0-1 scores
|
|
122
123
|
- **Per-eval recompute** - re-run a single eval without reprocessing all others
|
|
123
124
|
- **Conditional evals** - gate evals globally or per-item, with session/subagent scope control
|
|
125
|
+
- **Cache invalidation hook** - register a custom function via `app.cacheInvalidation()` to invalidate stale cached results based on age, score, or any custom logic
|
|
124
126
|
|
|
125
127
|
### Utilize
|
|
126
128
|
|
|
@@ -358,6 +360,36 @@ Both can be set simultaneously. `app.queueCondition()` acts as a pre-filter for
|
|
|
358
360
|
|
|
359
361
|
---
|
|
360
362
|
|
|
363
|
+
### `app.cacheInvalidation(fn)`
|
|
364
|
+
|
|
365
|
+
Register a cache invalidation hook that runs before serving any cached eval or enrichment result. If the hook returns `true`, the cached entry is discarded and the item re-runs. Only affects evals and enrichments — actions, alerts, and conditions pass through unchanged.
|
|
366
|
+
|
|
367
|
+
```ts
|
|
368
|
+
app.cacheInvalidation((ctx) => boolean | Promise<boolean>);
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
The `ctx` object includes `itemName`, `itemKind` (`"evals"` or `"enrichments"`), `cachedAt` (ISO timestamp), `cachedValue` (the full cached result), `projectName`, `sessionId`, `contentHash`, and `itemCodeHash`.
|
|
372
|
+
|
|
373
|
+
```js
|
|
374
|
+
// Invalidate cache entries older than 24 hours
|
|
375
|
+
app.cacheInvalidation(({ cachedAt }) => {
|
|
376
|
+
const age = Date.now() - new Date(cachedAt).getTime();
|
|
377
|
+
return age > 24 * 60 * 60 * 1000;
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
// Re-run a specific eval when cached score is 0
|
|
381
|
+
app.cacheInvalidation((ctx) => {
|
|
382
|
+
if (ctx.itemKind === 'evals' && ctx.itemName === 'no-hallucination') {
|
|
383
|
+
return ctx.cachedValue.score === 0;
|
|
384
|
+
}
|
|
385
|
+
return false;
|
|
386
|
+
});
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
See [API Reference](docs/api-reference.md#appcacheinvalidationfn) for full documentation.
|
|
390
|
+
|
|
391
|
+
---
|
|
392
|
+
|
|
361
393
|
### `app.eval(name, fn, options?)`
|
|
362
394
|
|
|
363
395
|
Register an eval function. Evals grade sessions with a pass/fail result and an optional 0-1 score.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudeye",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3-beta.1",
|
|
4
4
|
"description": "Watchtower for Claude Code & Agents SDK — replay sessions, run custom evals, debug agent traces locally",
|
|
5
5
|
"bin": {
|
|
6
6
|
"claudeye": "./bin/claudeye.mjs"
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"optionalDependencies": {
|
|
51
|
-
"@claudeye/linux-x64": "1.0.
|
|
52
|
-
"@claudeye/linux-arm64": "1.0.
|
|
53
|
-
"@claudeye/darwin-x64": "1.0.
|
|
54
|
-
"@claudeye/darwin-arm64": "1.0.
|
|
55
|
-
"@claudeye/win32-x64": "1.0.
|
|
51
|
+
"@claudeye/linux-x64": "1.0.3-beta.1",
|
|
52
|
+
"@claudeye/linux-arm64": "1.0.3-beta.1",
|
|
53
|
+
"@claudeye/darwin-x64": "1.0.3-beta.1",
|
|
54
|
+
"@claudeye/darwin-arm64": "1.0.3-beta.1",
|
|
55
|
+
"@claudeye/win32-x64": "1.0.3-beta.1"
|
|
56
56
|
}
|
|
57
57
|
}
|