agent-afk 5.306.1 → 5.306.2

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 CHANGED
@@ -26,6 +26,9 @@ npm install -g agent-afk # Node 22.22.2+, 24.15+, or 26+
26
26
  afk login # authenticate (auto-detects Claude Code / Codex creds)
27
27
  afk doctor # verify everything works
28
28
  afk chat "hello" # first real conversation
29
+
30
+ # Preview a behaviour change before applying it
31
+ afk whatif --append "Always ask a clarifying question before using tools." --verify
29
32
  ```
30
33
 
31
34
  That's it. You're in.
@@ -50,6 +53,12 @@ Codex imports use `CODEX_HOME` when set (otherwise `~/.codex`) and also discover
50
53
  - **Cross-session memory** — Claude remembers preferences, decisions, and procedures across runs. See [Memory](#memory) below.
51
54
  - **Background subagent jobs** — dispatch a subagent with `mode:'background'`; results auto-deliver into the model's context when they finish. `/bgsub` lists running and completed jobs, `/bgsub:join <id>` replays a result manually.
52
55
 
56
+ ## What only afk does
57
+
58
+ **`/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 first." --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
+
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
+
53
62
  ## How it compares
54
63
 
55
64
  | | Claude Code | Agent AFK |
@@ -0,0 +1,26 @@
1
+ import type { ParsedSource } from './source.js';
2
+ import * as git from './git.js';
3
+ export declare function isLink(path: string): boolean;
4
+ export declare function removeDest(dest: string): void;
5
+ export declare function defaultGitName(parsed: Extract<ParsedSource, {
6
+ type: 'git' | 'github';
7
+ }>): string;
8
+ export declare function hasNonDefaultRef(dest: string, ref: string, gitOpts: git.GitOptions): Promise<boolean>;
9
+ export interface CheckoutResult {
10
+ targetRef: string;
11
+ commit: string;
12
+ changed: boolean;
13
+ pickedSemverTag: boolean;
14
+ checkoutRef: string;
15
+ }
16
+ export interface AdvanceCachedCheckoutOptions {
17
+ explicitRef?: string;
18
+ storedRef: string | null | undefined;
19
+ pinnedRef: boolean | undefined;
20
+ isPinned: (defaultBranch: string) => boolean;
21
+ }
22
+ export declare function advanceCachedCheckout(dir: string, opts: AdvanceCachedCheckoutOptions, gitOpts: git.GitOptions, label: string, name: string): Promise<CheckoutResult>;
23
+ export declare function prepareCachedCheckout(dest: string, explicitRef: string | undefined, gitOpts: git.GitOptions): Promise<{
24
+ ref: string;
25
+ commit: string;
26
+ }>;