agent-afk 5.264.0 → 5.265.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.
- package/dist/agent/outcomes/artifacts.d.ts +1 -0
- package/dist/agent/outcomes/index.d.ts +1 -0
- package/dist/agent/outcomes/verification-patterns.d.ts +3 -0
- package/dist/cli/slash/types.d.ts +1 -0
- package/dist/cli.mjs +319 -283
- package/dist/index.mjs +117 -117
- package/dist/telegram.mjs +136 -136
- package/dist/whatif/index.d.ts +1 -1
- package/dist/whatif/observability.d.ts +5 -0
- package/dist/whatif/report-verdict.d.ts +3 -0
- package/dist/whatif/trace-render.d.ts +2 -0
- package/dist/whatif/types.d.ts +6 -43
- package/dist/whatif/types.orchestration.d.ts +43 -0
- package/package.json +1 -1
package/dist/whatif/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { runWhatif, WhatifBudgetError } from './run.js';
|
|
2
2
|
export { computeStructuralImpact } from './structural.js';
|
|
3
|
-
export type { Change, ChangeKind, ChangeSpec, LaunchSettings, Environment, OperatorContext, ChangeOperator, RequestSnapshot, StructuralImpact, PredictionDirection, Confidence, Prediction, Episode, ToolRequest, EpisodeTrace, RunnerOptions, AgentRunner, EpisodeFeatures, JudgeQuestion, JudgeInput, JudgeResult, Judge, RateComparison, Verdict, VerifiedPrediction, PredictionScope, DiscoveredDifference, FeatureDelta, VerifyResult, WhatifReport, WhatifStage, WhatifProgress, CompleteFn, WhatifOptions, WhatifDeps, } from './types.js';
|
|
3
|
+
export type { Change, ChangeKind, ChangeSpec, LaunchSettings, Environment, OperatorContext, ChangeOperator, RequestSnapshot, StructuralImpact, PredictionDirection, Confidence, Prediction, PredictionObservable, Episode, ToolRequest, EpisodeTrace, RunnerOptions, AgentRunner, EpisodeFeatures, JudgeQuestion, JudgeInput, JudgeResult, Judge, RateComparison, Verdict, VerifiedPrediction, PredictionScope, DiscoveredDifference, FeatureDelta, VerifyResult, WhatifReport, WhatifStage, WhatifProgress, CompleteFn, WhatifOptions, WhatifDeps, } from './types.js';
|
|
4
4
|
export { renderTerminal, renderMarkdown } from './report.js';
|
|
5
5
|
export { createAfkRunner } from './runner/afk-runner.js';
|
|
6
6
|
export { createAnthropicComplete } from './complete.js';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Prediction, PredictionObservable } from './types.js';
|
|
2
|
+
export declare const INTERCEPTED_INTENT_RULE: string;
|
|
3
|
+
export declare const DEFAULT_DOWNSTREAM_REASON = "needs an intercepted action to complete; episodes stop at the first side-effecting request";
|
|
4
|
+
export declare function observabilityOf(prediction: Pick<Prediction, 'observable'>): PredictionObservable;
|
|
5
|
+
export declare function unobservableReason(prediction: Pick<Prediction, 'observable' | 'observabilityReason'>): string | undefined;
|
package/dist/whatif/types.d.ts
CHANGED
|
@@ -95,6 +95,7 @@ export interface StructuralImpact {
|
|
|
95
95
|
}
|
|
96
96
|
export type PredictionDirection = 'added' | 'removed' | 'strengthened' | 'weakened';
|
|
97
97
|
export type Confidence = 'high' | 'medium' | 'low';
|
|
98
|
+
export type PredictionObservable = 'decision' | 'downstream';
|
|
98
99
|
export interface Prediction {
|
|
99
100
|
id: string;
|
|
100
101
|
behavior: string;
|
|
@@ -103,6 +104,8 @@ export interface Prediction {
|
|
|
103
104
|
reason: string;
|
|
104
105
|
testQuestion: string;
|
|
105
106
|
probes: string[];
|
|
107
|
+
observable?: PredictionObservable;
|
|
108
|
+
observabilityReason?: string;
|
|
106
109
|
}
|
|
107
110
|
export interface Episode {
|
|
108
111
|
id: string;
|
|
@@ -174,7 +177,7 @@ export interface RateComparison {
|
|
|
174
177
|
candidate: number;
|
|
175
178
|
};
|
|
176
179
|
}
|
|
177
|
-
export type Verdict = 'confirmed' | 'refuted' | 'unclear';
|
|
180
|
+
export type Verdict = 'confirmed' | 'refuted' | 'unclear' | 'unobservable';
|
|
178
181
|
export interface PredictionScope {
|
|
179
182
|
episodes: {
|
|
180
183
|
baseline: string[];
|
|
@@ -188,6 +191,7 @@ export interface VerifiedPrediction {
|
|
|
188
191
|
rates: RateComparison;
|
|
189
192
|
verdict: Verdict;
|
|
190
193
|
scope?: PredictionScope;
|
|
194
|
+
unobservableReason?: string;
|
|
191
195
|
}
|
|
192
196
|
export interface DiscoveredDifference {
|
|
193
197
|
id: string;
|
|
@@ -226,45 +230,4 @@ export interface WhatifReport {
|
|
|
226
230
|
headline: string;
|
|
227
231
|
corpusExclusions?: import('./episodes.js').CorpusExclusions;
|
|
228
232
|
}
|
|
229
|
-
export type WhatifStage
|
|
230
|
-
export interface WhatifProgress {
|
|
231
|
-
stage: WhatifStage;
|
|
232
|
-
message: string;
|
|
233
|
-
done?: number;
|
|
234
|
-
total?: number;
|
|
235
|
-
}
|
|
236
|
-
export type CompleteFn = (req: {
|
|
237
|
-
system: string;
|
|
238
|
-
user: string;
|
|
239
|
-
maxTokens: number;
|
|
240
|
-
model: string;
|
|
241
|
-
signal?: AbortSignal;
|
|
242
|
-
}) => Promise<{
|
|
243
|
-
text: string;
|
|
244
|
-
costUsd: number;
|
|
245
|
-
}>;
|
|
246
|
-
export interface WhatifOptions {
|
|
247
|
-
spec: ChangeSpec;
|
|
248
|
-
realHome: string;
|
|
249
|
-
realCwd: string;
|
|
250
|
-
agentModel: string;
|
|
251
|
-
analystModel: string;
|
|
252
|
-
verify: boolean;
|
|
253
|
-
turns: number;
|
|
254
|
-
samples: number;
|
|
255
|
-
maxUsd: number;
|
|
256
|
-
judge: 'auto' | 'jev' | 'claude';
|
|
257
|
-
concurrency: number;
|
|
258
|
-
maxTurns: number;
|
|
259
|
-
episodeTimeoutMs: number;
|
|
260
|
-
keepSandboxes: boolean;
|
|
261
|
-
}
|
|
262
|
-
export interface WhatifDeps {
|
|
263
|
-
runner: AgentRunner;
|
|
264
|
-
complete: CompleteFn;
|
|
265
|
-
makeJudge(choice: WhatifOptions['judge']): Promise<Judge>;
|
|
266
|
-
makeCrossCheckJudge(): Promise<Judge | undefined>;
|
|
267
|
-
onProgress?: (p: WhatifProgress) => void;
|
|
268
|
-
signal?: AbortSignal;
|
|
269
|
-
now?: () => Date;
|
|
270
|
-
}
|
|
233
|
+
export type { WhatifStage, WhatifProgress, CompleteFn, WhatifOptions, WhatifDeps, } from './types.orchestration.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AgentRunner, ChangeSpec, Judge } from './types.js';
|
|
2
|
+
export type WhatifStage = 'compile' | 'sandbox' | 'snapshot' | 'predict' | 'episodes' | 'run' | 'judge' | 'discover' | 'report';
|
|
3
|
+
export interface WhatifProgress {
|
|
4
|
+
stage: WhatifStage;
|
|
5
|
+
message: string;
|
|
6
|
+
done?: number;
|
|
7
|
+
total?: number;
|
|
8
|
+
}
|
|
9
|
+
export type CompleteFn = (req: {
|
|
10
|
+
system: string;
|
|
11
|
+
user: string;
|
|
12
|
+
maxTokens: number;
|
|
13
|
+
model: string;
|
|
14
|
+
signal?: AbortSignal;
|
|
15
|
+
}) => Promise<{
|
|
16
|
+
text: string;
|
|
17
|
+
costUsd: number;
|
|
18
|
+
}>;
|
|
19
|
+
export interface WhatifOptions {
|
|
20
|
+
spec: ChangeSpec;
|
|
21
|
+
realHome: string;
|
|
22
|
+
realCwd: string;
|
|
23
|
+
agentModel: string;
|
|
24
|
+
analystModel: string;
|
|
25
|
+
verify: boolean;
|
|
26
|
+
turns: number;
|
|
27
|
+
samples: number;
|
|
28
|
+
maxUsd: number;
|
|
29
|
+
judge: 'auto' | 'jev' | 'claude';
|
|
30
|
+
concurrency: number;
|
|
31
|
+
maxTurns: number;
|
|
32
|
+
episodeTimeoutMs: number;
|
|
33
|
+
keepSandboxes: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface WhatifDeps {
|
|
36
|
+
runner: AgentRunner;
|
|
37
|
+
complete: CompleteFn;
|
|
38
|
+
makeJudge(choice: WhatifOptions['judge']): Promise<Judge>;
|
|
39
|
+
makeCrossCheckJudge(): Promise<Judge | undefined>;
|
|
40
|
+
onProgress?: (p: WhatifProgress) => void;
|
|
41
|
+
signal?: AbortSignal;
|
|
42
|
+
now?: () => Date;
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-afk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.265.0",
|
|
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",
|