agent-afk 5.286.2 → 5.287.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/awareness/presence.d.ts +5 -0
- package/dist/agent/awareness/presence.peer.d.ts +7 -0
- package/dist/agent/peer/envelope.d.ts +18 -0
- package/dist/agent/peer/guards.d.ts +18 -0
- package/dist/agent/peer/inbound-mode.d.ts +2 -0
- package/dist/agent/peer/inbox-store.d.ts +27 -0
- package/dist/agent/peer/send.d.ts +18 -0
- package/dist/agent/tools/handlers/index.d.ts +2 -1
- package/dist/agent/tools/handlers/peer.d.ts +4 -0
- package/dist/agent/tools/schemas.d.ts +1 -0
- package/dist/agent/tools/schemas.peer.d.ts +4 -0
- package/dist/agent/tools/system-prompt.d.ts +2 -1
- package/dist/agent/trace/emit.d.ts +2 -1
- package/dist/agent/trace/events.d.ts +45 -0
- package/dist/agent/trace/index.d.ts +3 -2
- package/dist/agent/trace/types.d.ts +16 -1
- package/dist/cli/commands/interactive/bootstrap-resume.d.ts +11 -0
- package/dist/cli/commands/interactive/bootstrap-sidebands.d.ts +3 -0
- package/dist/cli/commands/interactive/footer-painters.d.ts +12 -0
- package/dist/cli/commands/interactive/footer-subsystems.d.ts +2 -0
- package/dist/cli/commands/interactive/footer-subsystems.peer.d.ts +3 -0
- package/dist/cli/commands/interactive/loop-iteration.drain.d.ts +3 -0
- package/dist/cli/commands/interactive/loop-iteration.hooks.d.ts +7 -0
- package/dist/cli/commands/interactive/loop-iteration.injections.d.ts +6 -0
- package/dist/cli/commands/interactive/loop-iteration.shell-branch.d.ts +7 -0
- package/dist/cli/commands/interactive/loop-iteration.slash-branch.d.ts +19 -0
- package/dist/cli/commands/interactive/loop-iteration.turn-run.d.ts +12 -0
- package/dist/cli/commands/interactive/peer-inbox-notifier.d.ts +48 -0
- package/dist/cli/commands/interactive/peer-inbox-scan.d.ts +18 -0
- package/dist/cli/commands/interactive/peer-inbox-startup-sweep.d.ts +1 -0
- package/dist/cli/commands/interactive/shared.d.ts +3 -0
- package/dist/cli/commands/trace-event-render.d.ts +8 -0
- package/dist/cli/commands/trace-lifecycle-render.d.ts +3 -0
- package/dist/cli/commands/trace-peer-format.d.ts +2 -0
- package/dist/cli/commands/trace-phase-render.d.ts +2 -0
- package/dist/cli/commands/trace-summary-render.d.ts +13 -0
- package/dist/cli/commands/trace.d.ts +2 -7
- package/dist/cli/slash/commands/inbox.d.ts +4 -0
- package/dist/cli/slash/commands/name.d.ts +2 -0
- package/dist/cli/slash/commands/peers.d.ts +2 -0
- package/dist/cli.mjs +416 -409
- package/dist/config/env.auth.d.ts +141 -0
- package/dist/config/env.d.ts +72 -49
- package/dist/config/env.daemon.d.ts +166 -0
- package/dist/config/env.debug.d.ts +162 -0
- package/dist/config/env.misc.d.ts +136 -0
- package/dist/config/env.model-tiers.d.ts +230 -0
- package/dist/config/env.model.d.ts +199 -0
- package/dist/config/env.paths.d.ts +42 -0
- package/dist/config/env.peer.d.ts +31 -0
- package/dist/config/env.telegram.d.ts +77 -0
- package/dist/config/env.ui.d.ts +112 -0
- package/dist/index.mjs +158 -156
- package/dist/paths.d.ts +1 -0
- package/dist/paths.peer.d.ts +2 -0
- package/dist/telegram.mjs +199 -197
- package/package.json +1 -1
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
export declare const MISC_ENV_REGISTRY: readonly [{
|
|
2
|
+
readonly name: "AFK_WRITE_DENYLIST";
|
|
3
|
+
readonly description: "Comma-separated list of additional path globs that the write_file tool refuses to write to.";
|
|
4
|
+
readonly type: "string";
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly example: "**/.env,**/secrets/**";
|
|
7
|
+
readonly category: "misc";
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "AFK_READ_DENYLIST";
|
|
10
|
+
readonly description: "Colon-separated list of additional absolute paths the read_file/grep/glob/list_directory tools refuse to read, and that the bash-restriction hook refuses to let a shell command reference on interactive surfaces (REPL, Telegram) — on headless surfaces (afk chat, daemon) bash fails open regardless of this list. A leading ~/ is expanded (~user/ is not — spell those absolutely). Built-in credential entries (~/.ssh, ~/.aws, ~/.afk/config, …) always apply on top and cannot be removed. One built-in exception exists: ~/.afk/config/mcp.json (the MCP registry) IS readable — paths listed here outrank that carve-out, so set this to ~/.afk/config/mcp.json if your registry holds inline secrets rather than ${VAR} placeholders.";
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly required: false;
|
|
13
|
+
readonly example: "/Users/me/project/.env:/Users/me/secrets";
|
|
14
|
+
readonly category: "misc";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "AFK_WRITE_DIFF";
|
|
17
|
+
readonly description: "Show a diff preview before each write_file tool call. Defaults provider-controlled when unset.";
|
|
18
|
+
readonly type: "boolean";
|
|
19
|
+
readonly required: false;
|
|
20
|
+
readonly category: "misc";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "AFK_RATE_LIMIT_ADMISSION_DISABLED";
|
|
23
|
+
readonly description: "Bypass the process-wide rate-limit admission gate (issue #941). Set to 1 to skip pre-request capacity checks. Default 0 (gate active). OAuth subscription accounts already pass through automatically when no per-minute headers are returned.";
|
|
24
|
+
readonly type: "boolean";
|
|
25
|
+
readonly required: false;
|
|
26
|
+
readonly default: "0";
|
|
27
|
+
readonly example: "1";
|
|
28
|
+
readonly category: "model";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "AFK_RATE_LIMIT_STAGGER_MAX_MS";
|
|
31
|
+
readonly description: "Jitter ceiling (ms) for the rate-limit admission bucket: each waiter at a window boundary wakes at reset + random(0..ceiling) to avoid re-storming the API. Default 500. Set to 0 in tests for deterministic timing.";
|
|
32
|
+
readonly type: "number";
|
|
33
|
+
readonly required: false;
|
|
34
|
+
readonly default: "500";
|
|
35
|
+
readonly example: "0";
|
|
36
|
+
readonly category: "model";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "AFK_WEB_ALLOW_PRIVATE_HOSTS";
|
|
39
|
+
readonly description: string;
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
readonly required: false;
|
|
42
|
+
readonly example: "1";
|
|
43
|
+
readonly category: "misc";
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "AFK_DEMO_CLEAN";
|
|
46
|
+
readonly description: "Explicit opt-in to capture-mode. When set to 1, suppresses high-frequency repaint drivers (spinner ticker, live thinking-preview) so recorded artifacts contain each state once instead of once per timer tick.";
|
|
47
|
+
readonly type: "boolean";
|
|
48
|
+
readonly required: false;
|
|
49
|
+
readonly example: "1";
|
|
50
|
+
readonly category: "misc";
|
|
51
|
+
}, {
|
|
52
|
+
readonly name: "SCRIPT";
|
|
53
|
+
readonly description: "Set by script(1) on BSD/macOS/Linux to the typescript filename while a terminal session is being recorded. Presence of a non-empty value triggers capture-mode.";
|
|
54
|
+
readonly type: "string";
|
|
55
|
+
readonly required: false;
|
|
56
|
+
readonly example: "/tmp/typescript";
|
|
57
|
+
readonly category: "process";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "ASCIINEMA_REC";
|
|
60
|
+
readonly description: "Set to 1 by asciinema rec while a session is being recorded. Triggers capture-mode.";
|
|
61
|
+
readonly type: "boolean";
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly example: "1";
|
|
64
|
+
readonly category: "process";
|
|
65
|
+
}, {
|
|
66
|
+
readonly name: "AFK_SESSION_ID";
|
|
67
|
+
readonly description: string;
|
|
68
|
+
readonly type: "string";
|
|
69
|
+
readonly required: false;
|
|
70
|
+
readonly default: "default";
|
|
71
|
+
readonly example: "session-abc123";
|
|
72
|
+
readonly category: "browser";
|
|
73
|
+
}, {
|
|
74
|
+
readonly name: "SHELL";
|
|
75
|
+
readonly description: "Standard POSIX env var pointing to the user's login shell binary. Used by shell-init and worktree commands to auto-detect the correct shell syntax for emitted wrapper code.";
|
|
76
|
+
readonly type: "string";
|
|
77
|
+
readonly required: false;
|
|
78
|
+
readonly example: "/bin/zsh";
|
|
79
|
+
readonly category: "process";
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "PAGER";
|
|
82
|
+
readonly description: "Standard POSIX env var naming the user's preferred pager (with optional flags). Used by /transcript to render the full session in a scrollable viewer; falls back to `less -R` when unset.";
|
|
83
|
+
readonly type: "string";
|
|
84
|
+
readonly required: false;
|
|
85
|
+
readonly example: "less -R";
|
|
86
|
+
readonly category: "process";
|
|
87
|
+
}, {
|
|
88
|
+
readonly name: "VISUAL";
|
|
89
|
+
readonly description: "Standard POSIX env var naming the user's preferred full-screen editor (with optional flags). Consulted FIRST by the /editor slash command (and its key chord) to compose a long prompt externally; takes precedence over EDITOR. No fallback editor is assumed — if neither VISUAL nor EDITOR is set, /editor prints a hint instead of guessing.";
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
readonly required: false;
|
|
92
|
+
readonly example: "nvim";
|
|
93
|
+
readonly category: "process";
|
|
94
|
+
}, {
|
|
95
|
+
readonly name: "EDITOR";
|
|
96
|
+
readonly description: "Standard POSIX env var naming the user's preferred editor (with optional flags). Consulted by the /editor slash command AFTER VISUAL, as the standard fallback. No default editor is assumed when both are unset — /editor prints a hint telling the user to set one.";
|
|
97
|
+
readonly type: "string";
|
|
98
|
+
readonly required: false;
|
|
99
|
+
readonly example: "vim";
|
|
100
|
+
readonly category: "process";
|
|
101
|
+
}, {
|
|
102
|
+
readonly name: "AFK_DIFF_LINES";
|
|
103
|
+
readonly description: "Maximum number of diff lines shown in the inline diff render during write_file tool calls. Set to 0 for no cap. Non-integer values are silently ignored and the default applies.";
|
|
104
|
+
readonly type: "number";
|
|
105
|
+
readonly required: false;
|
|
106
|
+
readonly example: "50";
|
|
107
|
+
readonly category: "misc";
|
|
108
|
+
}, {
|
|
109
|
+
readonly name: "AFK_SHELL_WRAPPER";
|
|
110
|
+
readonly description: "Set to 1 or true by the optional afk shell wrapper function (installed via `afk shell-init`). Signals that the parent shell has the wrapper active so the post-exit cd can fire.";
|
|
111
|
+
readonly type: "boolean";
|
|
112
|
+
readonly required: false;
|
|
113
|
+
readonly example: "1";
|
|
114
|
+
readonly category: "process";
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "AFK_USER_CARD_MAX_ROWS";
|
|
117
|
+
readonly description: "Maximum number of visual rows emitted by renderUserCard before collapsing the remainder into a dim \"…(N lines collapsed)\" summary row. Defaults to 24. Non-integer or non-positive values are silently ignored and the default applies.";
|
|
118
|
+
readonly type: "number";
|
|
119
|
+
readonly required: false;
|
|
120
|
+
readonly example: "24";
|
|
121
|
+
readonly category: "misc";
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "AFK_LEASE_TTL_MS";
|
|
124
|
+
readonly description: string;
|
|
125
|
+
readonly type: "number";
|
|
126
|
+
readonly required: false;
|
|
127
|
+
readonly example: "600000";
|
|
128
|
+
readonly category: "misc";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "AFK_PREEXISTING_LEDGER_DISABLE";
|
|
131
|
+
readonly description: string;
|
|
132
|
+
readonly type: "boolean";
|
|
133
|
+
readonly required: false;
|
|
134
|
+
readonly example: "1";
|
|
135
|
+
readonly category: "debug";
|
|
136
|
+
}];
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
export declare const MODEL_TIERS_ENV_REGISTRY: readonly [{
|
|
2
|
+
readonly name: "AFK_MODEL";
|
|
3
|
+
readonly description: "Default model for agent turns. Accepts slot names (local, small, medium, large), fixed-identity aliases (opus, sonnet, haiku, fable), or full model IDs. Migration: AFK_MODEL=sonnet now pins the fixed Sonnet identity rather than following a rebound medium tier.";
|
|
4
|
+
readonly type: "string";
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly default: "medium";
|
|
7
|
+
readonly example: "claude-opus-5-5";
|
|
8
|
+
readonly category: "model";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "AFK_MODEL_TTFB_TIMEOUT_MS";
|
|
11
|
+
readonly description: string;
|
|
12
|
+
readonly type: "number";
|
|
13
|
+
readonly required: false;
|
|
14
|
+
readonly default: "180000";
|
|
15
|
+
readonly example: "120000";
|
|
16
|
+
readonly category: "model";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "AFK_MODEL_STALL_TIMEOUT_MS";
|
|
19
|
+
readonly description: string;
|
|
20
|
+
readonly type: "number";
|
|
21
|
+
readonly required: false;
|
|
22
|
+
readonly default: "1200000";
|
|
23
|
+
readonly example: "600000";
|
|
24
|
+
readonly category: "model";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "AFK_SUBAGENT_TIMEOUT_MS";
|
|
27
|
+
readonly description: string;
|
|
28
|
+
readonly type: "number";
|
|
29
|
+
readonly required: false;
|
|
30
|
+
readonly default: "2700000";
|
|
31
|
+
readonly example: "3600000";
|
|
32
|
+
readonly category: "model";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "AFK_SUBAGENT_IDLE_TIMEOUT_MS";
|
|
35
|
+
readonly description: string;
|
|
36
|
+
readonly type: "number";
|
|
37
|
+
readonly required: false;
|
|
38
|
+
readonly default: "480000";
|
|
39
|
+
readonly example: "300000";
|
|
40
|
+
readonly category: "model";
|
|
41
|
+
}, {
|
|
42
|
+
readonly name: "AFK_VISION_MODELS";
|
|
43
|
+
readonly description: "Comma-separated override for image (vision) capability detection on the openai-compatible provider. Each token force-enables a model id by exact or substring match (e.g. \"qwen2.5-vl\" matches a local VL id); prefix a token with \"!\" to force-disable. Use to send images to a local vision-language model AFK does not recognise by name, or to blacklist a mis-detected id. Built-in detection already covers gpt-4o/4.1/5.x, o1/o3/o4-mini, Claude, and common VL families.";
|
|
44
|
+
readonly type: "string";
|
|
45
|
+
readonly required: false;
|
|
46
|
+
readonly example: "qwen2.5-vl,!gpt-4o-mini";
|
|
47
|
+
readonly category: "model";
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "AFK_MODEL_LOCAL";
|
|
50
|
+
readonly description: "Bind the \"local\" capability tier (cheapest/fastest, user-configured) to a model id. Overrides afk.config.json models.local. Point at a local Ollama, LM Studio, or any OpenAI-compatible shim.";
|
|
51
|
+
readonly type: "string";
|
|
52
|
+
readonly required: false;
|
|
53
|
+
readonly example: "llama3.2:3b";
|
|
54
|
+
readonly category: "model";
|
|
55
|
+
}, {
|
|
56
|
+
readonly name: "AFK_MODEL_LOCAL_API_KEY";
|
|
57
|
+
readonly description: "Per-slot API key for the \"local\" tier. Overrides global credentials for this tier only.";
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
readonly required: false;
|
|
60
|
+
readonly category: "model";
|
|
61
|
+
readonly secret: true;
|
|
62
|
+
}, {
|
|
63
|
+
readonly name: "AFK_MODEL_LOCAL_BASE_URL";
|
|
64
|
+
readonly description: "Per-slot endpoint base URL for the \"local\" tier. Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
65
|
+
readonly type: "string";
|
|
66
|
+
readonly required: false;
|
|
67
|
+
readonly example: "http://localhost:11434/v1";
|
|
68
|
+
readonly category: "model";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "AFK_MODEL_LARGE";
|
|
71
|
+
readonly description: "Bind the \"large\" capability tier (most capable) to a model id/alias. Overrides afk.config.json models.large.";
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
readonly example: "claude-opus-5-5";
|
|
75
|
+
readonly category: "model";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "AFK_MODEL_LARGE_API_KEY";
|
|
78
|
+
readonly description: "Per-slot API key for the \"large\" tier (Stage 2). Overrides global credentials for this tier only.";
|
|
79
|
+
readonly type: "string";
|
|
80
|
+
readonly required: false;
|
|
81
|
+
readonly category: "model";
|
|
82
|
+
readonly secret: true;
|
|
83
|
+
}, {
|
|
84
|
+
readonly name: "AFK_MODEL_LARGE_BASE_URL";
|
|
85
|
+
readonly description: "Per-slot endpoint base URL for the \"large\" tier (Stage 2). Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
86
|
+
readonly type: "string";
|
|
87
|
+
readonly required: false;
|
|
88
|
+
readonly example: "http://localhost:8080/v1";
|
|
89
|
+
readonly category: "model";
|
|
90
|
+
}, {
|
|
91
|
+
readonly name: "AFK_MODEL_MEDIUM";
|
|
92
|
+
readonly description: "Bind the \"medium\" capability tier (general-use) to a model id/alias. Overrides afk.config.json models.medium.";
|
|
93
|
+
readonly type: "string";
|
|
94
|
+
readonly required: false;
|
|
95
|
+
readonly example: "claude-sonnet-5";
|
|
96
|
+
readonly category: "model";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "AFK_MODEL_MEDIUM_API_KEY";
|
|
99
|
+
readonly description: "Per-slot API key for the \"medium\" tier (Stage 2). Overrides global credentials for this tier only.";
|
|
100
|
+
readonly type: "string";
|
|
101
|
+
readonly required: false;
|
|
102
|
+
readonly category: "model";
|
|
103
|
+
readonly secret: true;
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "AFK_MODEL_MEDIUM_BASE_URL";
|
|
106
|
+
readonly description: "Per-slot endpoint base URL for the \"medium\" tier (Stage 2). Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
107
|
+
readonly type: "string";
|
|
108
|
+
readonly required: false;
|
|
109
|
+
readonly example: "http://localhost:8080/v1";
|
|
110
|
+
readonly category: "model";
|
|
111
|
+
}, {
|
|
112
|
+
readonly name: "AFK_MODEL_SMALL";
|
|
113
|
+
readonly description: "Bind the \"small\" capability tier (cheap/fast) to a model id/alias. Overrides afk.config.json models.small.";
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly required: false;
|
|
116
|
+
readonly example: "gpt-4o-mini";
|
|
117
|
+
readonly category: "model";
|
|
118
|
+
}, {
|
|
119
|
+
readonly name: "AFK_MODEL_SMALL_API_KEY";
|
|
120
|
+
readonly description: "Per-slot API key for the \"small\" tier (Stage 2). Overrides global credentials for this tier only.";
|
|
121
|
+
readonly type: "string";
|
|
122
|
+
readonly required: false;
|
|
123
|
+
readonly category: "model";
|
|
124
|
+
readonly secret: true;
|
|
125
|
+
}, {
|
|
126
|
+
readonly name: "AFK_MODEL_SMALL_BASE_URL";
|
|
127
|
+
readonly description: "Per-slot endpoint base URL for the \"small\" tier (Stage 2). Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
128
|
+
readonly type: "string";
|
|
129
|
+
readonly required: false;
|
|
130
|
+
readonly example: "http://localhost:8080/v1";
|
|
131
|
+
readonly category: "model";
|
|
132
|
+
}, {
|
|
133
|
+
readonly name: "AFK_OVERLOAD_PAUSE_MS";
|
|
134
|
+
readonly description: "Wall-clock ceiling (ms) for the bounded pause after a mid-stream overload (529) exhausts its retry budget. Overrides the per-surface default for ALL surfaces: 0 disables the pause (fail fast). Interactive surfaces (cli/repl/telegram) default to 600000; daemon/cron default to 0 so an always-on runner never silently parks on upstream capacity.";
|
|
135
|
+
readonly type: "number";
|
|
136
|
+
readonly required: false;
|
|
137
|
+
readonly example: "600000";
|
|
138
|
+
readonly category: "model";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "AFK_PROMPT_CACHE_TTL";
|
|
141
|
+
readonly description: "TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.";
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly required: false;
|
|
144
|
+
readonly default: "1h";
|
|
145
|
+
readonly example: "1h";
|
|
146
|
+
readonly category: "model";
|
|
147
|
+
}, {
|
|
148
|
+
readonly name: "AFK_SUGGEST_ENABLED";
|
|
149
|
+
readonly description: "Enable the LLM-backed ghost-text suggestion tier in the interactive REPL. On by default. Set to 0/false/no/off to disable.";
|
|
150
|
+
readonly type: "boolean";
|
|
151
|
+
readonly required: false;
|
|
152
|
+
readonly default: "1";
|
|
153
|
+
readonly example: "0";
|
|
154
|
+
readonly category: "model";
|
|
155
|
+
}, {
|
|
156
|
+
readonly name: "AFK_SUGGEST_PROMPT";
|
|
157
|
+
readonly description: "Enable LLM-generated empty-prompt suggestions — a proposed next action shown as ghost text when the prompt is blank, accepted with Tab or Right-arrow. Fires only after a turn has completed in the session: the startup prompt (and the prompt right after /clear) is left clean because there is no session context to ground a proposal in. On by default. Set to 0/false/no/off to disable. Requires AFK_SUGGEST_ENABLED (it reuses the same suggestion model and provider).";
|
|
158
|
+
readonly type: "boolean";
|
|
159
|
+
readonly required: false;
|
|
160
|
+
readonly default: "1";
|
|
161
|
+
readonly example: "0";
|
|
162
|
+
readonly category: "model";
|
|
163
|
+
}, {
|
|
164
|
+
readonly name: "AFK_SUGGEST_GHOST";
|
|
165
|
+
readonly description: "Enable REPL ghost-text inline suggestions (Tier-1 history/dropdown + optional Tier-2 LLM). 1 = on (default), 0 = off. Set 0/false/off/no to disable all ghost text. Tier-2 LLM is separately gated by AFK_SUGGEST_ENABLED.";
|
|
166
|
+
readonly type: "boolean";
|
|
167
|
+
readonly required: false;
|
|
168
|
+
readonly default: "1";
|
|
169
|
+
readonly example: "0";
|
|
170
|
+
readonly category: "model";
|
|
171
|
+
}, {
|
|
172
|
+
readonly name: "AFK_SUGGEST_MODEL";
|
|
173
|
+
readonly description: "Override the small model used for REPL ghost-text suggestions. Falls back to AFK_COMPACT_MODEL or haiku-class for anthropic, or the session model for other providers.";
|
|
174
|
+
readonly type: "string";
|
|
175
|
+
readonly required: false;
|
|
176
|
+
readonly category: "model";
|
|
177
|
+
}, {
|
|
178
|
+
readonly name: "AFK_TASK_BUDGET";
|
|
179
|
+
readonly description: "Per-task token budget ceiling. Aborts when cumulative usage would exceed it.";
|
|
180
|
+
readonly type: "number";
|
|
181
|
+
readonly required: false;
|
|
182
|
+
readonly default: "100000";
|
|
183
|
+
readonly example: "200000";
|
|
184
|
+
readonly category: "model";
|
|
185
|
+
}, {
|
|
186
|
+
readonly name: "AFK_TEMPERATURE";
|
|
187
|
+
readonly description: "Numeric temperature override for model sampling. Provider default if unset.";
|
|
188
|
+
readonly type: "number";
|
|
189
|
+
readonly required: false;
|
|
190
|
+
readonly example: "0.7";
|
|
191
|
+
readonly category: "model";
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "AFK_THINKING";
|
|
194
|
+
readonly description: "Extended-thinking mode. Accepts adaptive | disabled | max | enabled:<N> | enabled:max. Defaults to the model-appropriate mode when unset (adaptive on current models).";
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly required: false;
|
|
197
|
+
readonly default: "adaptive";
|
|
198
|
+
readonly example: "adaptive";
|
|
199
|
+
readonly category: "model";
|
|
200
|
+
}, {
|
|
201
|
+
readonly name: "AFK_THINKING_UI";
|
|
202
|
+
readonly description: string;
|
|
203
|
+
readonly type: "string";
|
|
204
|
+
readonly required: false;
|
|
205
|
+
readonly default: "live";
|
|
206
|
+
readonly example: "digest";
|
|
207
|
+
readonly category: "misc";
|
|
208
|
+
}, {
|
|
209
|
+
readonly name: "AFK_TIMEOUT_MS";
|
|
210
|
+
readonly description: "Per-turn timeout in milliseconds. Provider/SDK default if unset.";
|
|
211
|
+
readonly type: "number";
|
|
212
|
+
readonly required: false;
|
|
213
|
+
readonly example: "120000";
|
|
214
|
+
readonly category: "model";
|
|
215
|
+
}, {
|
|
216
|
+
readonly name: "AFK_WORKSPACE_DISABLED";
|
|
217
|
+
readonly description: string;
|
|
218
|
+
readonly type: "boolean";
|
|
219
|
+
readonly required: false;
|
|
220
|
+
readonly default: "0";
|
|
221
|
+
readonly example: "1";
|
|
222
|
+
readonly category: "model";
|
|
223
|
+
}, {
|
|
224
|
+
readonly name: "CLAUDE_MODEL";
|
|
225
|
+
readonly description: "Legacy alias for AFK_MODEL — supported for back-compat with pre-AFK_* deployments.";
|
|
226
|
+
readonly type: "string";
|
|
227
|
+
readonly required: false;
|
|
228
|
+
readonly example: "sonnet";
|
|
229
|
+
readonly category: "model";
|
|
230
|
+
}];
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
export declare const MODEL_ENV_REGISTRY: readonly [{
|
|
2
|
+
readonly name: "AFK_COMPACT_KEEP_LAST_TURNS";
|
|
3
|
+
readonly description: "Number of recent turns the compactor keeps verbatim during /compact. Default tuned in compact-handler.ts.";
|
|
4
|
+
readonly type: "number";
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly example: "6";
|
|
7
|
+
readonly category: "model";
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "AFK_COMPACT_MODEL";
|
|
10
|
+
readonly description: "Model id or slot alias used by the /compact summarizer and auto-compaction. Accepts any model on any supported provider (anthropic, openai, xai). Cross-provider compaction is supported: set to a gpt-* id on a Claude session (or a claude-* id on an OpenAI session) and AFK will route the summarize call to that provider using its own credentials. The transcript is sent to the target provider — a one-time privacy warning is emitted on first cross-provider use. Requires that provider's credentials to be available (ANTHROPIC_API_KEY / OPENAI_API_KEY / XAI_API_KEY, or ChatGPT-subscription OAuth via AFK_OPENAI_CHATGPT_OAUTH). Falls back to a cheap haiku-class default when unset. Also drives ghost-text suggestions on Claude sessions (see AFK_SUGGEST_MODEL to override that independently).";
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly required: false;
|
|
13
|
+
readonly example: "gpt-6-luna";
|
|
14
|
+
readonly category: "model";
|
|
15
|
+
}, {
|
|
16
|
+
readonly name: "AFK_COMPACT_SHRINK_FRACTION";
|
|
17
|
+
readonly description: "Context-fullness fraction (0–1, exclusive) at/above which /compact and auto-compaction relax the keep-window so a short-but-full session (few turns, huge tool exchanges) can still be summarized instead of no-oping on turn count. Default 0.7 (see shared/compaction.ts DEFAULT_COMPACT_SHRINK_THRESHOLD).";
|
|
18
|
+
readonly type: "number";
|
|
19
|
+
readonly required: false;
|
|
20
|
+
readonly example: "0.8";
|
|
21
|
+
readonly category: "model";
|
|
22
|
+
}, {
|
|
23
|
+
readonly name: "AFK_DEFAULT_SUBAGENT_MODEL";
|
|
24
|
+
readonly description: "Override the default model used when a subagent is dispatched without an explicit model.";
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly required: false;
|
|
27
|
+
readonly example: "sonnet";
|
|
28
|
+
readonly category: "model";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "AFK_DISABLE_PROMPT_CACHE";
|
|
31
|
+
readonly description: "Disable Anthropic prompt caching when set to 1/true/yes/on. Unset = caching enabled.";
|
|
32
|
+
readonly type: "boolean";
|
|
33
|
+
readonly required: false;
|
|
34
|
+
readonly default: "0";
|
|
35
|
+
readonly example: "1";
|
|
36
|
+
readonly category: "model";
|
|
37
|
+
}, {
|
|
38
|
+
readonly name: "AFK_DISABLE_BASH_INTERPRETER_GUARD";
|
|
39
|
+
readonly description: string;
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
readonly required: false;
|
|
42
|
+
readonly default: "0";
|
|
43
|
+
readonly example: "1";
|
|
44
|
+
readonly category: "process";
|
|
45
|
+
}, {
|
|
46
|
+
readonly name: "AFK_DISABLE_PATH_APPROVAL";
|
|
47
|
+
readonly description: string;
|
|
48
|
+
readonly type: "boolean";
|
|
49
|
+
readonly required: false;
|
|
50
|
+
readonly default: "0";
|
|
51
|
+
readonly example: "1";
|
|
52
|
+
readonly category: "process";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "AFK_DISABLE_SPINE_UPDATE";
|
|
55
|
+
readonly description: string;
|
|
56
|
+
readonly type: "boolean";
|
|
57
|
+
readonly required: false;
|
|
58
|
+
readonly default: "0";
|
|
59
|
+
readonly example: "1";
|
|
60
|
+
readonly category: "misc";
|
|
61
|
+
}, {
|
|
62
|
+
readonly name: "AFK_FORCE_BASH_INTERPRETER_GUARD";
|
|
63
|
+
readonly description: string;
|
|
64
|
+
readonly type: "boolean";
|
|
65
|
+
readonly required: false;
|
|
66
|
+
readonly default: "0";
|
|
67
|
+
readonly example: "1";
|
|
68
|
+
readonly category: "process";
|
|
69
|
+
}, {
|
|
70
|
+
readonly name: "AFK_EFFORT";
|
|
71
|
+
readonly description: "Effort hint guiding adaptive-thinking depth, forwarded as Anthropic output_config.effort (model-gated; ignored where unsupported). Accepts low | medium | high | xhigh | max.";
|
|
72
|
+
readonly type: "string";
|
|
73
|
+
readonly required: false;
|
|
74
|
+
readonly example: "medium";
|
|
75
|
+
readonly category: "model";
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "AFK_EVAL_STALENESS_DAYS";
|
|
78
|
+
readonly description: string;
|
|
79
|
+
readonly type: "number";
|
|
80
|
+
readonly required: false;
|
|
81
|
+
readonly default: "7";
|
|
82
|
+
readonly example: "14";
|
|
83
|
+
readonly category: "misc";
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "AFK_MAX_BUDGET_USD";
|
|
86
|
+
readonly description: "Opt-in cumulative USD budget ceiling for the session. Aborts the turn when the running cost crosses this. Unset by default (no cap applied).";
|
|
87
|
+
readonly type: "number";
|
|
88
|
+
readonly required: false;
|
|
89
|
+
readonly example: "5.00";
|
|
90
|
+
readonly category: "model";
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "AFK_MAX_CONCURRENT_SAFE_TOOL_CALLS";
|
|
93
|
+
readonly description: "Maximum concurrency-safe tool calls run simultaneously within one dispatcher batch. Default 8; accepted range 1-32; out-of-range or unparseable input falls back to the default.";
|
|
94
|
+
readonly type: "number";
|
|
95
|
+
readonly required: false;
|
|
96
|
+
readonly default: "8";
|
|
97
|
+
readonly example: "4";
|
|
98
|
+
readonly category: "process";
|
|
99
|
+
}, {
|
|
100
|
+
readonly name: "AFK_MAX_CONCURRENT_SUBAGENT_CALLS";
|
|
101
|
+
readonly description: "Maximum subagent calls run simultaneously from one compose/DAG layer or skill wave. Default 8; accepted range 1-32; out-of-range or unparseable input falls back to the default.";
|
|
102
|
+
readonly type: "number";
|
|
103
|
+
readonly required: false;
|
|
104
|
+
readonly default: "8";
|
|
105
|
+
readonly example: "2";
|
|
106
|
+
readonly category: "process";
|
|
107
|
+
}, {
|
|
108
|
+
readonly name: "AFK_MAX_CONCURRENT_BACKGROUND_JOBS";
|
|
109
|
+
readonly description: "Maximum background subagent jobs running simultaneously in one registry. Default 10; accepted range 1-64; out-of-range or unparseable input falls back to the default.";
|
|
110
|
+
readonly type: "number";
|
|
111
|
+
readonly required: false;
|
|
112
|
+
readonly default: "10";
|
|
113
|
+
readonly example: "5";
|
|
114
|
+
readonly category: "process";
|
|
115
|
+
}, {
|
|
116
|
+
readonly name: "AFK_MAX_NESTING_DEPTH";
|
|
117
|
+
readonly description: string;
|
|
118
|
+
readonly type: "number";
|
|
119
|
+
readonly required: false;
|
|
120
|
+
readonly default: "3";
|
|
121
|
+
readonly example: "2";
|
|
122
|
+
readonly category: "model";
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "AFK_MAX_CONCURRENT_CHILDREN_PER_AGENT";
|
|
125
|
+
readonly description: string;
|
|
126
|
+
readonly type: "number";
|
|
127
|
+
readonly required: false;
|
|
128
|
+
readonly example: "4";
|
|
129
|
+
readonly category: "model";
|
|
130
|
+
}, {
|
|
131
|
+
readonly name: "AFK_MAX_CONCURRENT_AGENTS";
|
|
132
|
+
readonly description: string;
|
|
133
|
+
readonly type: "number";
|
|
134
|
+
readonly required: false;
|
|
135
|
+
readonly example: "16";
|
|
136
|
+
readonly category: "model";
|
|
137
|
+
}, {
|
|
138
|
+
readonly name: "AFK_MAX_TOTAL_AGENTS";
|
|
139
|
+
readonly description: string;
|
|
140
|
+
readonly type: "number";
|
|
141
|
+
readonly required: false;
|
|
142
|
+
readonly example: "48";
|
|
143
|
+
readonly category: "model";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "AFK_MAX_OUTPUT_TOKENS";
|
|
146
|
+
readonly description: string;
|
|
147
|
+
readonly type: "number";
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly example: "8192";
|
|
150
|
+
readonly category: "model";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "AFK_MAX_TOKENS";
|
|
153
|
+
readonly description: "Deprecated and inert: not read by the generation path. Use AFK_MAX_OUTPUT_TOKENS (or --max-output-tokens) to cap per-response output tokens; falls back to the model output ceiling when unset.";
|
|
154
|
+
readonly type: "number";
|
|
155
|
+
readonly required: false;
|
|
156
|
+
readonly default: "4096";
|
|
157
|
+
readonly example: "8192";
|
|
158
|
+
readonly category: "model";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "AFK_MAX_TOOL_USE_ITERATIONS";
|
|
161
|
+
readonly description: string;
|
|
162
|
+
readonly type: "number";
|
|
163
|
+
readonly required: false;
|
|
164
|
+
readonly default: "0";
|
|
165
|
+
readonly example: "150";
|
|
166
|
+
readonly category: "model";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "AFK_MEMORY_EVIDENCE_GATE";
|
|
169
|
+
readonly description: string;
|
|
170
|
+
readonly type: "boolean";
|
|
171
|
+
readonly required: false;
|
|
172
|
+
readonly default: "1";
|
|
173
|
+
readonly example: "0";
|
|
174
|
+
readonly category: "misc";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "AFK_MICROCOMPACT_KEEP_LAST";
|
|
177
|
+
readonly description: "Number of the most-recent tool_result blocks that tool-result microcompaction keeps intact regardless of size, so the agent does not lose the tool output it is actively reasoning over. Older results are the safe ones to trim. Default 4 (see shared/compaction.ts DEFAULT_MICROCOMPACT_KEEP_LAST). Values <= 0 protect nothing.";
|
|
178
|
+
readonly type: "number";
|
|
179
|
+
readonly required: false;
|
|
180
|
+
readonly default: "4";
|
|
181
|
+
readonly example: "3";
|
|
182
|
+
readonly category: "model";
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "AFK_MICROCOMPACT_TOOL_RESULT_BYTES";
|
|
185
|
+
readonly description: "Byte threshold (tool_result content length) at/above which a tool_result block becomes a microcompaction candidate. When /compact and auto-compaction would otherwise no-op on a short-but-full session, microcompaction clears large/old tool_result CONTENT in place (largest first) — replacing it with a short placeholder, never removing the block — to reclaim context deterministically (no LLM call). Blocks below this size are left intact. Default 2048 (see shared/compaction.ts DEFAULT_MICROCOMPACT_TOOL_RESULT_BYTES).";
|
|
186
|
+
readonly type: "number";
|
|
187
|
+
readonly required: false;
|
|
188
|
+
readonly default: "2048";
|
|
189
|
+
readonly example: "4096";
|
|
190
|
+
readonly category: "model";
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "AFK_MICROCOMPACT_DELEGATION_BYTES";
|
|
193
|
+
readonly description: "Byte threshold for delegation tool results (agent/compose/skill). These results carry pre-compressed subagent findings that are expensive to re-derive -- clearing them destroys irreplaceable synthesized knowledge. A delegation tool result must be at least this large before microcompaction considers clearing it. Default 16384 (16KB, vs 2KB for ordinary tools). Set to match AFK_MICROCOMPACT_TOOL_RESULT_BYTES to disable the elevated threshold.";
|
|
194
|
+
readonly type: "number";
|
|
195
|
+
readonly required: false;
|
|
196
|
+
readonly default: "16384";
|
|
197
|
+
readonly example: "32768";
|
|
198
|
+
readonly category: "model";
|
|
199
|
+
}];
|
|
@@ -31,4 +31,46 @@ export declare const PATHS_ENV_REGISTRY: readonly [{
|
|
|
31
31
|
readonly required: false;
|
|
32
32
|
readonly example: "/Users/me/Projects/afk-companion/PRIMER.md";
|
|
33
33
|
readonly category: "paths";
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "HOME";
|
|
36
|
+
readonly description: "Standard Unix home directory. Used as the fallback when AFK_HOME is unset.";
|
|
37
|
+
readonly type: "string";
|
|
38
|
+
readonly required: false;
|
|
39
|
+
readonly category: "process";
|
|
40
|
+
}, {
|
|
41
|
+
readonly name: "PATH";
|
|
42
|
+
readonly description: "System PATH. Read for executable resolution (git, gh, etc.) in tool handlers.";
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly required: false;
|
|
45
|
+
readonly category: "process";
|
|
46
|
+
}, {
|
|
47
|
+
readonly name: "APPDATA";
|
|
48
|
+
readonly description: "Windows %APPDATA% (Roaming). Used for VS Code/Cursor settings discovery and credential denylist paths.";
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
readonly required: false;
|
|
51
|
+
readonly category: "process";
|
|
52
|
+
}, {
|
|
53
|
+
readonly name: "LOCALAPPDATA";
|
|
54
|
+
readonly description: "Windows %LOCALAPPDATA%. Used for browser credential denylist paths (Chrome, Firefox, Edge, etc.).";
|
|
55
|
+
readonly type: "string";
|
|
56
|
+
readonly required: false;
|
|
57
|
+
readonly category: "process";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "USERPROFILE";
|
|
60
|
+
readonly description: "Windows %USERPROFILE%. Used for credential denylist paths (.ssh, .aws, .gnupg) on win32.";
|
|
61
|
+
readonly type: "string";
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly category: "process";
|
|
64
|
+
}, {
|
|
65
|
+
readonly name: "USER";
|
|
66
|
+
readonly description: "Unix login name of the current user. Used as a default approver identity in improve/approve.";
|
|
67
|
+
readonly type: "string";
|
|
68
|
+
readonly required: false;
|
|
69
|
+
readonly category: "process";
|
|
70
|
+
}, {
|
|
71
|
+
readonly name: "USERNAME";
|
|
72
|
+
readonly description: "Windows login name of the current user. Fallback after USER when identifying the approver.";
|
|
73
|
+
readonly type: "string";
|
|
74
|
+
readonly required: false;
|
|
75
|
+
readonly category: "process";
|
|
34
76
|
}];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const PEER_ENV_REGISTRY: readonly [{
|
|
2
|
+
readonly name: "TMUX";
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly type: "string";
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly example: "/tmp/tmux-501/default,12345,0";
|
|
7
|
+
readonly category: "process";
|
|
8
|
+
}, {
|
|
9
|
+
readonly name: "AFK_PEER_INBOUND";
|
|
10
|
+
readonly description: string;
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly required: false;
|
|
13
|
+
readonly default: "accept";
|
|
14
|
+
readonly example: "hold";
|
|
15
|
+
readonly category: "misc";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "AFK_PEER_POLL_MS";
|
|
18
|
+
readonly description: string;
|
|
19
|
+
readonly type: "number";
|
|
20
|
+
readonly required: false;
|
|
21
|
+
readonly default: "1000";
|
|
22
|
+
readonly example: "2000";
|
|
23
|
+
readonly category: "misc";
|
|
24
|
+
}, {
|
|
25
|
+
readonly name: "TMUX_PANE";
|
|
26
|
+
readonly description: string;
|
|
27
|
+
readonly type: "string";
|
|
28
|
+
readonly required: false;
|
|
29
|
+
readonly example: "%0";
|
|
30
|
+
readonly category: "process";
|
|
31
|
+
}];
|