agent-afk 5.308.12 → 5.309.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/README.md +1 -1
- package/dist/agent/preexisting-ledger/reader.d.ts +1 -0
- package/dist/agent/risk-classifier.d.ts +5 -0
- package/dist/agent/risk-classifier.paths.d.ts +12 -0
- package/dist/cli.mjs +412 -404
- package/dist/index.mjs +173 -173
- package/dist/paths.d.ts +1 -0
- package/dist/service/version-skew.d.ts +20 -0
- package/dist/telegram.mjs +191 -189
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -55,7 +55,7 @@ Codex imports use `CODEX_HOME` when set (otherwise `~/.codex`) and also discover
|
|
|
55
55
|
|
|
56
56
|
## What only afk does
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
**`afk whatif` behavioural impact predictor.** Before changing a prompt, model, skill, or memory rule, predict how the agent's behaviour will shift without touching your real config. Run `afk whatif --append "Always ask a clarifying question before using tools." --verify` and the engine diffs the system prompts, predicts labelled behaviour shifts, then optionally verifies empirically by running sandboxed episodes and measuring rates. No real writes happen during the run. Source: `src/whatif/`, `docs/whatif.md`.
|
|
59
59
|
|
|
60
60
|
**Jev calibrated judgment.** Jev is an external cross-family judge you configure as an MCP server in `~/.afk/config/mcp.json`. When present, `afk whatif --judge auto` selects Jev to grade verification episodes; it returns calibrated probabilities and removes Anthropic self-preference bias in verdicts. Falls back to Claude when Jev is not configured. Use `--judge claude` to keep all episode data within Anthropic. Source: `src/whatif/judge/jev-connect.ts`, `docs/whatif.md`.
|
|
61
61
|
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
export type RiskLevel = 'safe' | 'medium' | 'high';
|
|
2
|
+
export interface RiskVerdict {
|
|
3
|
+
level: RiskLevel;
|
|
4
|
+
reason?: string;
|
|
5
|
+
}
|
|
2
6
|
export interface RiskContext {
|
|
3
7
|
cwd: string;
|
|
4
8
|
workspaceRoot?: string;
|
|
5
9
|
daemonTaskId?: string;
|
|
6
10
|
}
|
|
7
11
|
export declare function classifyRisk(toolName: string, input: unknown, ctx: RiskContext): RiskLevel;
|
|
12
|
+
export declare function classifyRiskDetailed(toolName: string, input: unknown, ctx: RiskContext): RiskVerdict;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
import type { RiskContext, RiskVerdict } from './risk-classifier.js';
|
|
3
|
+
export declare function isPrivateTempRoot(st: {
|
|
4
|
+
isDirectory(): boolean;
|
|
5
|
+
isSymbolicLink(): boolean;
|
|
6
|
+
uid: number;
|
|
7
|
+
mode: number;
|
|
8
|
+
}, uid: number | undefined, platform: NodeJS.Platform): boolean;
|
|
9
|
+
export declare function getTempRoots(): readonly string[];
|
|
10
|
+
export declare function isOutsideRoot(root: string, target: string, pathImpl?: Pick<typeof path, 'relative' | 'isAbsolute'>): boolean;
|
|
11
|
+
export declare function classifyFilePath(filePath: string, ctx: RiskContext): RiskVerdict;
|
|
12
|
+
export declare function classifyPatchApply(input: unknown, ctx: RiskContext): RiskVerdict;
|