agent-afk 5.268.0 → 5.268.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/dist/cli.mjs +364 -360
- package/dist/index.mjs +125 -125
- package/dist/telegram.mjs +143 -143
- package/dist/whatif/run.failures.d.ts +22 -0
- package/dist/whatif/run.persist.d.ts +2 -1
- package/dist/whatif/run.persist.grades.d.ts +10 -0
- package/dist/whatif/run.report.d.ts +2 -0
- package/dist/whatif/run.verify.d.ts +2 -0
- package/dist/whatif/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { EpisodeTrace } from './types.js';
|
|
2
|
+
export interface FailedEpisodeRecord {
|
|
3
|
+
episodeId: string;
|
|
4
|
+
arm: 'baseline' | 'candidate';
|
|
5
|
+
sample: number;
|
|
6
|
+
errorClass: 'timeout' | 'error';
|
|
7
|
+
errorMessage: string;
|
|
8
|
+
probe?: string;
|
|
9
|
+
durationMs: number;
|
|
10
|
+
}
|
|
11
|
+
export interface ArmImbalance {
|
|
12
|
+
baselineFailRate: number;
|
|
13
|
+
candidateFailRate: number;
|
|
14
|
+
rateDiff: number;
|
|
15
|
+
allInOneArm: boolean;
|
|
16
|
+
concentrationArm?: 'baseline' | 'candidate';
|
|
17
|
+
summary: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const IMBALANCE_RATE_THRESHOLD = 0.2;
|
|
20
|
+
export declare const IMBALANCE_MIN_FAILURES = 2;
|
|
21
|
+
export declare function buildFailedEpisodeRecords(traces: EpisodeTrace[], episodeTargets: Map<string, string>): FailedEpisodeRecord[];
|
|
22
|
+
export declare function detectArmImbalance(records: FailedEpisodeRecord[], baselineTotal: number, candidateTotal: number): ArmImbalance | undefined;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import type { EpisodeTrace, WhatifReport } from './types.js';
|
|
2
|
-
|
|
2
|
+
import type { JudgeResults } from './run.verify.scoring.js';
|
|
3
|
+
export declare function persistRun(runDir: string, report: WhatifReport, traces: EpisodeTrace[], judgeResults?: JudgeResults): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { EpisodeTrace } from './types.js';
|
|
2
|
+
import type { JudgeResults } from './run.verify.scoring.js';
|
|
3
|
+
export interface GradeEntry {
|
|
4
|
+
episodeId: string;
|
|
5
|
+
env: 'baseline' | 'candidate';
|
|
6
|
+
sample: number;
|
|
7
|
+
predictionId: string;
|
|
8
|
+
pYes: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function persistGrades(runDir: string, judgeResults: JudgeResults, traces: EpisodeTrace[], predictionIds: string[]): Promise<void>;
|
|
@@ -2,6 +2,7 @@ import type { ChangeSpec, EpisodeTrace, Judge, Prediction, VerifyResult, WhatifR
|
|
|
2
2
|
import type { DroppedProbe } from './probe-grounding.js';
|
|
3
3
|
import type { CorpusExclusions } from './episodes.js';
|
|
4
4
|
import type { StructuralImpact } from './types.js';
|
|
5
|
+
import type { JudgeResults } from './run.verify.scoring.js';
|
|
5
6
|
export interface VerifiedReportArgs {
|
|
6
7
|
spec: ChangeSpec;
|
|
7
8
|
structural: StructuralImpact;
|
|
@@ -14,5 +15,6 @@ export interface VerifiedReportArgs {
|
|
|
14
15
|
runDir: string;
|
|
15
16
|
resolvedJudge: Judge;
|
|
16
17
|
autoKeepContextHooks: boolean;
|
|
18
|
+
judgeResults: JudgeResults;
|
|
17
19
|
}
|
|
18
20
|
export declare function buildAndPersistVerifiedReport(args: VerifiedReportArgs): Promise<WhatifReport>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type JudgeResults } from './run.verify.scoring.js';
|
|
1
2
|
import type { AgentRunner, CompleteFn, Episode, EpisodeTrace, Environment, Judge, Prediction, StructuralImpact, VerifyResult, WhatifProgress } from './types.js';
|
|
2
3
|
export interface VerifyRunInput {
|
|
3
4
|
episodes: Episode[];
|
|
@@ -26,5 +27,6 @@ export interface VerifyRunOutput {
|
|
|
26
27
|
verifyResult: VerifyResult;
|
|
27
28
|
allTraces: EpisodeTrace[];
|
|
28
29
|
analystCostUsd: number;
|
|
30
|
+
judgeResults: JudgeResults;
|
|
29
31
|
}
|
|
30
32
|
export declare function verifyRun(input: VerifyRunInput): Promise<VerifyRunOutput>;
|
package/dist/whatif/types.d.ts
CHANGED
|
@@ -222,6 +222,8 @@ export interface VerifyResult {
|
|
|
222
222
|
truncatedByBudget: boolean;
|
|
223
223
|
failedEpisodes: number;
|
|
224
224
|
judgeFailures?: number;
|
|
225
|
+
failedEpisodeRecords?: import('./run.failures.js').FailedEpisodeRecord[];
|
|
226
|
+
armImbalance?: import('./run.failures.js').ArmImbalance;
|
|
225
227
|
}
|
|
226
228
|
export interface WhatifReport {
|
|
227
229
|
spec: ChangeSpec;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-afk",
|
|
3
|
-
"version": "5.268.
|
|
3
|
+
"version": "5.268.1",
|
|
4
4
|
"description": "Open-source coding-agent harness you can actually change — own the loop (prompts, gates, routing, skills, terminal states), use any model, run long tasks while you're away.",
|
|
5
5
|
"main": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|