agent-afk 5.263.0 → 5.264.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.
@@ -13,3 +13,9 @@ export { readRecord, writeRecord, listRecords, upsertVotes, appendArtifacts } fr
13
13
  export { createOutcomeSessionEndHook } from './session-end-hook.js';
14
14
  export { createChildAttributionHook } from './child-attribution.js';
15
15
  export { lfReask, normalizeTokens, jaccardSimilarity, REASK_THRESHOLD } from './lf-reask.js';
16
+ export type { ExecFnCi } from './lf-ci.js';
17
+ export { lfCi, realExecFnCi } from './lf-ci.js';
18
+ export type { ExecFnFof } from './lf-fof.js';
19
+ export { lfFixOfFix as lfFixOfFixDelayed, realExecFnFof } from './lf-fof.js';
20
+ export type { RelabelDeps, RelabelJobOptions, RelabelJobResult, ProcessResult } from './relabel-job.js';
21
+ export { runRelabelJob, processRecord, realRelabelDeps } from './relabel-job.js';
@@ -0,0 +1,7 @@
1
+ import type { Vote } from './schema.js';
2
+ export type ExecFnCi = (file: string, args: string[]) => Promise<{
3
+ stdout: string;
4
+ stderr: string;
5
+ }>;
6
+ export declare function lfCi(prUrls: string[], execFn: ExecFnCi, now: string, cache?: Map<string, 'passed' | 'failed' | 'pending' | 'none' | 'error'>): Promise<Vote[]>;
7
+ export declare const realExecFnCi: ExecFnCi;
@@ -0,0 +1,7 @@
1
+ import type { Vote } from './schema.js';
2
+ export type ExecFnFof = (file: string, args: string[]) => Promise<{
3
+ stdout: string;
4
+ stderr: string;
5
+ }>;
6
+ export declare function lfFixOfFix(prUrls: string[], settlesAfter: string | null, execFn: ExecFnFof, now: string, nowDate?: Date): Promise<Vote[]>;
7
+ export declare const realExecFnFof: ExecFnFof;
@@ -0,0 +1,32 @@
1
+ import type { FetchPrState, CheckAncestor, CheckRevert } from './lf-delayed.js';
2
+ import type { ExecFnCi } from './lf-ci.js';
3
+ import type { ExecFnFof } from './lf-fof.js';
4
+ export interface RelabelDeps {
5
+ fetchPrState: FetchPrState;
6
+ checkAncestor: CheckAncestor;
7
+ checkRevert: CheckRevert;
8
+ execFnCi: ExecFnCi;
9
+ execFnFof: ExecFnFof;
10
+ now: () => Date;
11
+ outcomesDir?: string;
12
+ }
13
+ export declare const realRelabelDeps: RelabelDeps;
14
+ export interface RelabelJobOptions {
15
+ limit?: number;
16
+ dryRun?: boolean;
17
+ deps?: RelabelDeps;
18
+ outcomesDir?: string;
19
+ }
20
+ export interface RelabelJobResult {
21
+ scanned: number;
22
+ settled: number;
23
+ updated: number;
24
+ skipped: number;
25
+ errors: number;
26
+ }
27
+ export interface ProcessResult {
28
+ status: 'settled' | 'updated' | 'skipped' | 'error';
29
+ reason?: string;
30
+ }
31
+ export declare function processRecord(sessionId: string, deps: RelabelDeps, dryRun: boolean, outcomesDir?: string): Promise<ProcessResult>;
32
+ export declare function runRelabelJob(opts?: RelabelJobOptions): Promise<RelabelJobResult>;