agent-afk 5.295.9 → 5.296.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.
@@ -446,6 +446,22 @@ export declare const ENV_REGISTRY: readonly [{
446
446
  readonly required: false;
447
447
  readonly example: "sonnet";
448
448
  readonly category: "model";
449
+ }, {
450
+ readonly name: "AFK_MEMORY_GC_SWEEP_ENABLE";
451
+ readonly description: string;
452
+ readonly type: "boolean";
453
+ readonly required: false;
454
+ readonly default: "0";
455
+ readonly example: "1";
456
+ readonly category: "misc";
457
+ }, {
458
+ readonly name: "AFK_MEMORY_GC_MIN_AGE_DAYS";
459
+ readonly description: string;
460
+ readonly type: "number";
461
+ readonly required: false;
462
+ readonly default: "90";
463
+ readonly example: "60";
464
+ readonly category: "misc";
449
465
  }, {
450
466
  readonly name: "AFK_SYSTEM_PROMPT";
451
467
  readonly description: "Raw operator-overlay prompt. Highest-priority overlay (over afk.config.json and AFK.md). Appended on top of the framework base (system-prompt.md) under an \"# Operator configuration\" header — it augments, never replaces, the base.";
@@ -767,6 +783,18 @@ export declare const ENV_REGISTRY: readonly [{
767
783
  readonly type: "string";
768
784
  readonly required: false;
769
785
  readonly category: "process";
786
+ }, {
787
+ readonly name: "SystemRoot";
788
+ readonly description: "Windows system root directory (typically C:\\Windows). Used to identify WSL bash.exe shim paths in resolve-shell.ts.";
789
+ readonly type: "string";
790
+ readonly required: false;
791
+ readonly category: "process";
792
+ }, {
793
+ readonly name: "MSYSTEM";
794
+ readonly description: "Set by Git Bash environments (e.g. MINGW64). Signals that bash.exe is already on PATH in resolve-shell.ts.";
795
+ readonly type: "string";
796
+ readonly required: false;
797
+ readonly category: "process";
770
798
  }, {
771
799
  readonly name: "AFK_DAEMON_BUDGET_GATE_DISABLED";
772
800
  readonly description: "Set to 1 to disable the subscription-usage budget gate for daemon/cron agent tasks. When unset (default) the daemon checks Claude subscription utilization before starting each agent task and skips the run if any window is at or above AFK_DAEMON_BUDGET_SKIP_PCT. Shell and builtin tasks are never gated regardless of this setting.";
@@ -0,0 +1,17 @@
1
+ export declare const MEMORY_GC_ENV_REGISTRY: readonly [{
2
+ readonly name: "AFK_MEMORY_GC_SWEEP_ENABLE";
3
+ readonly description: string;
4
+ readonly type: "boolean";
5
+ readonly required: false;
6
+ readonly default: "0";
7
+ readonly example: "1";
8
+ readonly category: "misc";
9
+ }, {
10
+ readonly name: "AFK_MEMORY_GC_MIN_AGE_DAYS";
11
+ readonly description: string;
12
+ readonly type: "number";
13
+ readonly required: false;
14
+ readonly default: "90";
15
+ readonly example: "60";
16
+ readonly category: "misc";
17
+ }];
@@ -73,4 +73,16 @@ export declare const PATHS_ENV_REGISTRY: readonly [{
73
73
  readonly type: "string";
74
74
  readonly required: false;
75
75
  readonly category: "process";
76
+ }, {
77
+ readonly name: "SystemRoot";
78
+ readonly description: "Windows system root directory (typically C:\\Windows). Used to identify WSL bash.exe shim paths in resolve-shell.ts.";
79
+ readonly type: "string";
80
+ readonly required: false;
81
+ readonly category: "process";
82
+ }, {
83
+ readonly name: "MSYSTEM";
84
+ readonly description: "Set by Git Bash environments (e.g. MINGW64). Signals that bash.exe is already on PATH in resolve-shell.ts.";
85
+ readonly type: "string";
86
+ readonly required: false;
87
+ readonly category: "process";
76
88
  }];
@@ -1,25 +1,8 @@
1
- import { type SessionRead } from '../scan/reader.js';
2
- import type { EvalCheck, EvalCheckStatus, EvalRunEvidenceRef, FailurePattern } from '../schemas.js';
3
- export interface ContractProbeResult {
4
- checks: EvalCheck[];
5
- evidence: EvalRunEvidenceRef[];
6
- }
7
- export interface EvalContract {
8
- id: string;
9
- patternId: FailurePattern;
10
- title: string;
11
- run: () => Promise<ContractProbeResult>;
12
- }
13
- export declare function snapshot(value: unknown): string;
14
- export declare function makeCheck(args: {
15
- name: string;
16
- description: string;
17
- pass: boolean;
18
- expected: string;
19
- actual: string;
20
- status?: EvalCheckStatus;
21
- }): EvalCheck;
22
- export declare function buildToolFailureClassificationCorpus(): SessionRead[];
1
+ import type { FailurePattern } from '../schemas.js';
2
+ import { type EvalContract } from './contracts.types.js';
3
+ export type { ContractProbeResult, EvalContract } from './contracts.types.js';
4
+ export { makeCheck, snapshot } from './contracts.types.js';
5
+ export { buildToolFailureClassificationCorpus } from './contracts.tfd.js';
23
6
  export declare function resolveContract(patternId: FailurePattern): EvalContract | undefined;
24
7
  export declare function supportedContractPatterns(): readonly FailurePattern[];
25
8
  export declare function knownContractIds(): readonly string[];
@@ -0,0 +1,4 @@
1
+ import { type SessionRead } from '../scan/reader.js';
2
+ import { type ContractProbeResult } from './contracts.types.js';
3
+ export declare function buildToolFailureClassificationCorpus(): SessionRead[];
4
+ export declare function runToolFailureDensityContract(): Promise<ContractProbeResult>;
@@ -0,0 +1,20 @@
1
+ import type { EvalCheck, EvalCheckStatus, EvalRunEvidenceRef, FailurePattern } from '../schemas.js';
2
+ export interface ContractProbeResult {
3
+ checks: EvalCheck[];
4
+ evidence: EvalRunEvidenceRef[];
5
+ }
6
+ export interface EvalContract {
7
+ id: string;
8
+ patternId: FailurePattern;
9
+ title: string;
10
+ run: () => Promise<ContractProbeResult>;
11
+ }
12
+ export declare function snapshot(value: unknown): string;
13
+ export declare function makeCheck(args: {
14
+ name: string;
15
+ description: string;
16
+ pass: boolean;
17
+ expected: string;
18
+ actual: string;
19
+ status?: EvalCheckStatus;
20
+ }): EvalCheck;
@@ -1,6 +1,8 @@
1
1
  import { type EvalCase, type EvalCheck, type EvalRun, type EvalRunStatus } from '../schemas.js';
2
2
  import type { IdContext } from '../eval-gen/writer.js';
3
3
  import { type LoopDriver } from './replay.js';
4
+ export type { EvalRunListEntry } from './runner.render.js';
5
+ export { listEvalRuns, getEvalRun, renderEvalRunMarkdown } from './runner.render.js';
4
6
  export declare const EVAL_RUN_RUNNER_VERSION = "eval-run@v1";
5
7
  export declare function generateEvalRunId(cardSlug: string, ctx?: IdContext): string;
6
8
  export interface RunEvalCaseContext {
@@ -23,15 +25,3 @@ export interface WriteEvalRunOutcome {
23
25
  markdownPath: string;
24
26
  }
25
27
  export declare function writeEvalRun(evalRun: EvalRun): WriteEvalRunOutcome;
26
- export declare function renderEvalRunMarkdown(run: EvalRun): string;
27
- export interface EvalRunListEntry {
28
- evalRunId: string;
29
- evalCaseId: string;
30
- cardSlug: string;
31
- patternId: EvalRun['patternId'];
32
- contract: string | null;
33
- status: EvalRunStatus;
34
- createdAt: string;
35
- }
36
- export declare function listEvalRuns(): EvalRunListEntry[];
37
- export declare function getEvalRun(evalRunId: string): EvalRun | undefined;
@@ -0,0 +1,13 @@
1
+ import { type EvalRun, type EvalRunStatus } from '../schemas.js';
2
+ export declare function renderEvalRunMarkdown(run: EvalRun): string;
3
+ export interface EvalRunListEntry {
4
+ evalRunId: string;
5
+ evalCaseId: string;
6
+ cardSlug: string;
7
+ patternId: EvalRun['patternId'];
8
+ contract: string | null;
9
+ status: EvalRunStatus;
10
+ createdAt: string;
11
+ }
12
+ export declare function listEvalRuns(): EvalRunListEntry[];
13
+ export declare function getEvalRun(evalRunId: string): EvalRun | undefined;
@@ -1,7 +1,9 @@
1
1
  import { type FailureCard, type ImprovementProposal, type LikelyFile, type Severity } from '../schemas.js';
2
+ import { closureAdviceFor as _closureAdviceFor } from './template-engine.templates-density.js';
2
3
  export interface TemplateContext {
3
4
  proposalId: string;
4
5
  now?: () => Date;
5
6
  }
6
7
  export declare function proposeFromCard(card: FailureCard, ctx: TemplateContext): ImprovementProposal;
7
8
  export declare function deriveRiskLevel(floor: Severity, files: readonly LikelyFile[]): Severity;
9
+ export { _closureAdviceFor as closureAdviceFor };
@@ -0,0 +1,14 @@
1
+ import type { FailureCard, LikelyFile, ValidationPlan } from '../schemas.js';
2
+ import type { RootCauseClass, Severity } from '../schemas.js';
3
+ interface PatternTemplate {
4
+ rootCauseClass: RootCauseClass;
5
+ hypothesis(card: FailureCard): string;
6
+ fixSketch(card: FailureCard): string;
7
+ likelyFiles: readonly LikelyFile[];
8
+ riskFloor: Severity;
9
+ validationPlan: ValidationPlan;
10
+ }
11
+ export declare const toolFailureDensityTemplate: PatternTemplate;
12
+ export declare function closureAdviceFor(reason: string): string;
13
+ export declare const closureAnomalyTemplate: PatternTemplate;
14
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { FailureCard, LikelyFile, ValidationPlan } from '../schemas.js';
2
+ import type { RootCauseClass, Severity } from '../schemas.js';
3
+ interface PatternTemplate {
4
+ rootCauseClass: RootCauseClass;
5
+ hypothesis(card: FailureCard): string;
6
+ fixSketch(card: FailureCard): string;
7
+ likelyFiles: readonly LikelyFile[];
8
+ riskFloor: Severity;
9
+ validationPlan: ValidationPlan;
10
+ }
11
+ export declare const repeatedToolUseTemplate: PatternTemplate;
12
+ export declare const subagentBlockTemplate: PatternTemplate;
13
+ export declare const subagentReadDenialTemplate: PatternTemplate;
14
+ export {};