Merge ticket 052: allow clearing all params and re-extracting from ingested logs
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XFUNZwCvz3kcod3352ZR2o
This commit is contained in:
@@ -292,6 +292,21 @@ export function declareParam(request: ParamDeclaration): Promise<ParamDeclaratio
|
||||
return postJson('/api/params', request)
|
||||
}
|
||||
|
||||
export interface ClearParamsResult {
|
||||
/** How many param declarations (manual + auto-derived) were removed. */
|
||||
removed: number
|
||||
/** How many params were immediately re-derived from log text still retained by the engine. */
|
||||
reextracted: number
|
||||
/** How many retained log lines were re-scanned — lines already evicted by `max_logs` before the clear can't regain their params, so this can be smaller than the total lines ever ingested. */
|
||||
logs_considered: number
|
||||
}
|
||||
|
||||
// Clears every declared param (ticket 052) and re-derives whatever the engine's still-retained log
|
||||
// text supports — see `ClearParamsResult`'s fields for what came back.
|
||||
export function clearParams(): Promise<ClearParamsResult> {
|
||||
return sendJson('/api/params', 'DELETE')
|
||||
}
|
||||
|
||||
export function fetchMetricDeclarations(): Promise<MetricDeclaration[]> {
|
||||
return getJson('/api/metrics')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user