agent-afk 5.175.0 → 5.176.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/tools/handlers/index.d.ts +2 -1
- package/dist/agent/tools/handlers/web-request.d.ts +14 -0
- package/dist/agent/tools/schemas.d.ts +1 -0
- package/dist/cli.mjs +639 -639
- package/dist/config/env.d.ts +1249 -179
- package/dist/index.mjs +233 -233
- package/dist/telegram.mjs +312 -312
- package/dist/web/web-request.d.ts +47 -0
- package/package.json +1 -1
package/dist/config/env.d.ts
CHANGED
|
@@ -11,185 +11,1255 @@ export interface EnvVarMeta {
|
|
|
11
11
|
readonly describedTodo?: boolean;
|
|
12
12
|
readonly secret?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare const ENV_REGISTRY: readonly
|
|
15
|
-
|
|
16
|
-
readonly
|
|
17
|
-
readonly
|
|
18
|
-
readonly
|
|
19
|
-
readonly
|
|
20
|
-
readonly
|
|
21
|
-
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly
|
|
28
|
-
|
|
29
|
-
readonly
|
|
30
|
-
readonly
|
|
31
|
-
readonly
|
|
32
|
-
readonly
|
|
33
|
-
readonly
|
|
34
|
-
readonly
|
|
35
|
-
|
|
36
|
-
readonly
|
|
37
|
-
readonly
|
|
38
|
-
readonly
|
|
39
|
-
readonly
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
|
|
43
|
-
readonly
|
|
44
|
-
readonly
|
|
45
|
-
readonly
|
|
46
|
-
readonly
|
|
47
|
-
readonly
|
|
48
|
-
readonly
|
|
49
|
-
readonly
|
|
50
|
-
|
|
51
|
-
readonly
|
|
52
|
-
readonly
|
|
53
|
-
readonly
|
|
54
|
-
readonly
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly
|
|
65
|
-
readonly
|
|
66
|
-
|
|
67
|
-
readonly
|
|
68
|
-
readonly
|
|
69
|
-
readonly
|
|
70
|
-
readonly
|
|
71
|
-
readonly
|
|
72
|
-
readonly
|
|
73
|
-
readonly
|
|
74
|
-
|
|
75
|
-
readonly
|
|
76
|
-
readonly
|
|
77
|
-
readonly
|
|
78
|
-
readonly
|
|
79
|
-
readonly
|
|
80
|
-
readonly
|
|
81
|
-
readonly
|
|
82
|
-
|
|
83
|
-
readonly
|
|
84
|
-
readonly
|
|
85
|
-
readonly
|
|
86
|
-
readonly
|
|
87
|
-
readonly
|
|
88
|
-
readonly
|
|
89
|
-
|
|
90
|
-
readonly
|
|
91
|
-
readonly
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
94
|
-
readonly
|
|
95
|
-
readonly
|
|
96
|
-
readonly
|
|
97
|
-
|
|
98
|
-
readonly
|
|
99
|
-
readonly
|
|
100
|
-
readonly
|
|
101
|
-
readonly
|
|
102
|
-
readonly
|
|
103
|
-
readonly
|
|
104
|
-
readonly
|
|
105
|
-
|
|
106
|
-
readonly
|
|
107
|
-
readonly
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
113
|
-
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
116
|
-
readonly
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
119
|
-
readonly
|
|
120
|
-
readonly
|
|
121
|
-
|
|
122
|
-
readonly
|
|
123
|
-
readonly
|
|
124
|
-
readonly
|
|
125
|
-
readonly
|
|
126
|
-
readonly
|
|
127
|
-
readonly
|
|
128
|
-
readonly
|
|
129
|
-
|
|
130
|
-
readonly
|
|
131
|
-
readonly
|
|
132
|
-
readonly
|
|
133
|
-
readonly
|
|
134
|
-
readonly
|
|
135
|
-
readonly
|
|
136
|
-
|
|
137
|
-
readonly
|
|
138
|
-
readonly
|
|
139
|
-
readonly
|
|
140
|
-
readonly
|
|
141
|
-
readonly
|
|
142
|
-
readonly
|
|
143
|
-
readonly
|
|
144
|
-
|
|
145
|
-
readonly
|
|
146
|
-
readonly
|
|
147
|
-
readonly
|
|
148
|
-
readonly
|
|
149
|
-
readonly
|
|
150
|
-
readonly
|
|
151
|
-
readonly
|
|
152
|
-
|
|
153
|
-
readonly
|
|
154
|
-
readonly
|
|
155
|
-
readonly
|
|
156
|
-
readonly
|
|
157
|
-
readonly
|
|
158
|
-
readonly
|
|
159
|
-
|
|
160
|
-
readonly
|
|
161
|
-
readonly
|
|
162
|
-
readonly
|
|
163
|
-
readonly
|
|
164
|
-
readonly
|
|
165
|
-
readonly
|
|
166
|
-
readonly
|
|
167
|
-
|
|
168
|
-
readonly
|
|
169
|
-
readonly
|
|
170
|
-
readonly
|
|
171
|
-
readonly
|
|
172
|
-
readonly
|
|
173
|
-
readonly
|
|
174
|
-
readonly
|
|
175
|
-
|
|
176
|
-
readonly
|
|
177
|
-
readonly
|
|
178
|
-
readonly
|
|
179
|
-
readonly
|
|
180
|
-
readonly
|
|
181
|
-
readonly
|
|
182
|
-
readonly
|
|
183
|
-
|
|
184
|
-
readonly
|
|
185
|
-
readonly
|
|
186
|
-
readonly
|
|
187
|
-
readonly
|
|
188
|
-
readonly
|
|
189
|
-
readonly
|
|
190
|
-
readonly
|
|
191
|
-
|
|
14
|
+
export declare const ENV_REGISTRY: readonly [{
|
|
15
|
+
readonly name: "AFK_COMPACT_KEEP_LAST_TURNS";
|
|
16
|
+
readonly description: "Number of recent turns the compactor keeps verbatim during /compact. Default tuned in compact-handler.ts.";
|
|
17
|
+
readonly type: "number";
|
|
18
|
+
readonly required: false;
|
|
19
|
+
readonly example: "6";
|
|
20
|
+
readonly category: "model";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "AFK_COMPACT_MODEL";
|
|
23
|
+
readonly description: "Override the model used by the /compact summarizer. Falls back to a cheap default (haiku-class).";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly required: false;
|
|
26
|
+
readonly example: "claude-haiku-4-5";
|
|
27
|
+
readonly category: "model";
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "AFK_COMPACT_SHRINK_FRACTION";
|
|
30
|
+
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).";
|
|
31
|
+
readonly type: "number";
|
|
32
|
+
readonly required: false;
|
|
33
|
+
readonly example: "0.8";
|
|
34
|
+
readonly category: "model";
|
|
35
|
+
}, {
|
|
36
|
+
readonly name: "AFK_DEFAULT_SUBAGENT_MODEL";
|
|
37
|
+
readonly description: "Override the default model used when a subagent is dispatched without an explicit model.";
|
|
38
|
+
readonly type: "string";
|
|
39
|
+
readonly required: false;
|
|
40
|
+
readonly example: "sonnet";
|
|
41
|
+
readonly category: "model";
|
|
42
|
+
}, {
|
|
43
|
+
readonly name: "AFK_DIAGNOSE_BASELINE";
|
|
44
|
+
readonly description: "Kill switch for /diagnose reproducer baseline execution. When set to '0', the /diagnose skill skips executing the detected reproducer command for a ground-truth baseline; default enabled (runs). Set to '0' to disable.";
|
|
45
|
+
readonly type: "boolean";
|
|
46
|
+
readonly required: false;
|
|
47
|
+
readonly default: "1";
|
|
48
|
+
readonly example: "0";
|
|
49
|
+
readonly category: "debug";
|
|
50
|
+
}, {
|
|
51
|
+
readonly name: "AFK_DISABLE_PROMPT_CACHE";
|
|
52
|
+
readonly description: "Disable Anthropic prompt caching when set to 1/true/yes/on. Unset = caching enabled.";
|
|
53
|
+
readonly type: "boolean";
|
|
54
|
+
readonly required: false;
|
|
55
|
+
readonly default: "0";
|
|
56
|
+
readonly example: "1";
|
|
57
|
+
readonly category: "model";
|
|
58
|
+
}, {
|
|
59
|
+
readonly name: "AFK_DISABLE_BASH_INTERPRETER_GUARD";
|
|
60
|
+
readonly description: string;
|
|
61
|
+
readonly type: "boolean";
|
|
62
|
+
readonly required: false;
|
|
63
|
+
readonly default: "0";
|
|
64
|
+
readonly example: "1";
|
|
65
|
+
readonly category: "process";
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "AFK_DISABLE_PATH_APPROVAL";
|
|
68
|
+
readonly description: string;
|
|
69
|
+
readonly type: "boolean";
|
|
70
|
+
readonly required: false;
|
|
71
|
+
readonly default: "0";
|
|
72
|
+
readonly example: "1";
|
|
73
|
+
readonly category: "process";
|
|
74
|
+
}, {
|
|
75
|
+
readonly name: "AFK_FORCE_BASH_INTERPRETER_GUARD";
|
|
76
|
+
readonly description: string;
|
|
77
|
+
readonly type: "boolean";
|
|
78
|
+
readonly required: false;
|
|
79
|
+
readonly default: "0";
|
|
80
|
+
readonly example: "1";
|
|
81
|
+
readonly category: "process";
|
|
82
|
+
}, {
|
|
83
|
+
readonly name: "AFK_EFFORT";
|
|
84
|
+
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.";
|
|
85
|
+
readonly type: "string";
|
|
86
|
+
readonly required: false;
|
|
87
|
+
readonly example: "medium";
|
|
88
|
+
readonly category: "model";
|
|
89
|
+
}, {
|
|
90
|
+
readonly name: "AFK_MAX_BUDGET_USD";
|
|
91
|
+
readonly description: "Cumulative USD budget ceiling for the session. Aborts the turn when the running cost crosses this.";
|
|
92
|
+
readonly type: "number";
|
|
93
|
+
readonly required: false;
|
|
94
|
+
readonly default: "5.00";
|
|
95
|
+
readonly example: "10.00";
|
|
96
|
+
readonly category: "model";
|
|
97
|
+
}, {
|
|
98
|
+
readonly name: "AFK_MAX_CONCURRENT_SAFE_TOOL_CALLS";
|
|
99
|
+
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.";
|
|
100
|
+
readonly type: "number";
|
|
101
|
+
readonly required: false;
|
|
102
|
+
readonly default: "8";
|
|
103
|
+
readonly example: "4";
|
|
104
|
+
readonly category: "model";
|
|
105
|
+
}, {
|
|
106
|
+
readonly name: "AFK_MAX_CONCURRENT_SUBAGENT_CALLS";
|
|
107
|
+
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.";
|
|
108
|
+
readonly type: "number";
|
|
109
|
+
readonly required: false;
|
|
110
|
+
readonly default: "8";
|
|
111
|
+
readonly example: "2";
|
|
112
|
+
readonly category: "model";
|
|
113
|
+
}, {
|
|
114
|
+
readonly name: "AFK_MAX_CONCURRENT_BACKGROUND_JOBS";
|
|
115
|
+
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.";
|
|
116
|
+
readonly type: "number";
|
|
117
|
+
readonly required: false;
|
|
118
|
+
readonly default: "10";
|
|
119
|
+
readonly example: "5";
|
|
120
|
+
readonly category: "model";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "AFK_MAX_NESTING_DEPTH";
|
|
123
|
+
readonly description: string;
|
|
124
|
+
readonly type: "number";
|
|
125
|
+
readonly required: false;
|
|
126
|
+
readonly default: "3";
|
|
127
|
+
readonly example: "2";
|
|
128
|
+
readonly category: "model";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "AFK_MAX_OUTPUT_TOKENS";
|
|
131
|
+
readonly description: string;
|
|
132
|
+
readonly type: "number";
|
|
133
|
+
readonly required: false;
|
|
134
|
+
readonly example: "8192";
|
|
135
|
+
readonly category: "model";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "AFK_MAX_TOKENS";
|
|
138
|
+
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.";
|
|
139
|
+
readonly type: "number";
|
|
140
|
+
readonly required: false;
|
|
141
|
+
readonly default: "4096";
|
|
142
|
+
readonly example: "8192";
|
|
143
|
+
readonly category: "model";
|
|
144
|
+
}, {
|
|
145
|
+
readonly name: "AFK_MAX_TOOL_USE_ITERATIONS";
|
|
146
|
+
readonly description: string;
|
|
147
|
+
readonly type: "number";
|
|
148
|
+
readonly required: false;
|
|
149
|
+
readonly default: "0";
|
|
150
|
+
readonly example: "150";
|
|
151
|
+
readonly category: "model";
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "AFK_MEMORY_EVIDENCE_GATE";
|
|
154
|
+
readonly description: string;
|
|
155
|
+
readonly type: "boolean";
|
|
156
|
+
readonly required: false;
|
|
157
|
+
readonly example: "1";
|
|
158
|
+
readonly category: "misc";
|
|
159
|
+
}, {
|
|
160
|
+
readonly name: "AFK_MICROCOMPACT_KEEP_LAST";
|
|
161
|
+
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.";
|
|
162
|
+
readonly type: "number";
|
|
163
|
+
readonly required: false;
|
|
164
|
+
readonly default: "4";
|
|
165
|
+
readonly example: "3";
|
|
166
|
+
readonly category: "model";
|
|
167
|
+
}, {
|
|
168
|
+
readonly name: "AFK_MICROCOMPACT_TOOL_RESULT_BYTES";
|
|
169
|
+
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).";
|
|
170
|
+
readonly type: "number";
|
|
171
|
+
readonly required: false;
|
|
172
|
+
readonly default: "2048";
|
|
173
|
+
readonly example: "4096";
|
|
174
|
+
readonly category: "model";
|
|
175
|
+
}, {
|
|
176
|
+
readonly name: "AFK_MODEL";
|
|
177
|
+
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.";
|
|
178
|
+
readonly type: "string";
|
|
179
|
+
readonly required: false;
|
|
180
|
+
readonly default: "medium";
|
|
181
|
+
readonly example: "claude-opus-5";
|
|
182
|
+
readonly category: "model";
|
|
183
|
+
}, {
|
|
184
|
+
readonly name: "AFK_MODEL_TTFB_TIMEOUT_MS";
|
|
185
|
+
readonly description: string;
|
|
186
|
+
readonly type: "number";
|
|
187
|
+
readonly required: false;
|
|
188
|
+
readonly default: "180000";
|
|
189
|
+
readonly example: "120000";
|
|
190
|
+
readonly category: "model";
|
|
191
|
+
}, {
|
|
192
|
+
readonly name: "AFK_MODEL_STALL_TIMEOUT_MS";
|
|
193
|
+
readonly description: string;
|
|
194
|
+
readonly type: "number";
|
|
195
|
+
readonly required: false;
|
|
196
|
+
readonly default: "1200000";
|
|
197
|
+
readonly example: "600000";
|
|
198
|
+
readonly category: "model";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "AFK_SUBAGENT_TIMEOUT_MS";
|
|
201
|
+
readonly description: string;
|
|
202
|
+
readonly type: "number";
|
|
203
|
+
readonly required: false;
|
|
204
|
+
readonly default: "2700000";
|
|
205
|
+
readonly example: "3600000";
|
|
206
|
+
readonly category: "model";
|
|
207
|
+
}, {
|
|
208
|
+
readonly name: "AFK_SUBAGENT_IDLE_TIMEOUT_MS";
|
|
209
|
+
readonly description: string;
|
|
210
|
+
readonly type: "number";
|
|
211
|
+
readonly required: false;
|
|
212
|
+
readonly default: "480000";
|
|
213
|
+
readonly example: "300000";
|
|
214
|
+
readonly category: "model";
|
|
215
|
+
}, {
|
|
216
|
+
readonly name: "AFK_VISION_MODELS";
|
|
217
|
+
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.";
|
|
218
|
+
readonly type: "string";
|
|
219
|
+
readonly required: false;
|
|
220
|
+
readonly example: "qwen2.5-vl,!gpt-4o-mini";
|
|
221
|
+
readonly category: "model";
|
|
222
|
+
}, {
|
|
223
|
+
readonly name: "AFK_MODEL_LOCAL";
|
|
224
|
+
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.";
|
|
225
|
+
readonly type: "string";
|
|
226
|
+
readonly required: false;
|
|
227
|
+
readonly example: "llama3.2:3b";
|
|
228
|
+
readonly category: "model";
|
|
229
|
+
}, {
|
|
230
|
+
readonly name: "AFK_MODEL_LOCAL_API_KEY";
|
|
231
|
+
readonly description: "Per-slot API key for the \"local\" tier. Overrides global credentials for this tier only.";
|
|
232
|
+
readonly type: "string";
|
|
233
|
+
readonly required: false;
|
|
234
|
+
readonly category: "model";
|
|
235
|
+
readonly secret: true;
|
|
236
|
+
}, {
|
|
237
|
+
readonly name: "AFK_MODEL_LOCAL_BASE_URL";
|
|
238
|
+
readonly description: "Per-slot endpoint base URL for the \"local\" tier. Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
readonly required: false;
|
|
241
|
+
readonly example: "http://localhost:11434/v1";
|
|
242
|
+
readonly category: "model";
|
|
243
|
+
}, {
|
|
244
|
+
readonly name: "AFK_MODEL_LARGE";
|
|
245
|
+
readonly description: "Bind the \"large\" capability tier (most capable) to a model id/alias. Overrides afk.config.json models.large.";
|
|
246
|
+
readonly type: "string";
|
|
247
|
+
readonly required: false;
|
|
248
|
+
readonly example: "claude-opus-5";
|
|
249
|
+
readonly category: "model";
|
|
250
|
+
}, {
|
|
251
|
+
readonly name: "AFK_MODEL_LARGE_API_KEY";
|
|
252
|
+
readonly description: "Per-slot API key for the \"large\" tier (Stage 2). Overrides global credentials for this tier only.";
|
|
253
|
+
readonly type: "string";
|
|
254
|
+
readonly required: false;
|
|
255
|
+
readonly category: "model";
|
|
256
|
+
readonly secret: true;
|
|
257
|
+
}, {
|
|
258
|
+
readonly name: "AFK_MODEL_LARGE_BASE_URL";
|
|
259
|
+
readonly description: "Per-slot endpoint base URL for the \"large\" tier (Stage 2). Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
260
|
+
readonly type: "string";
|
|
261
|
+
readonly required: false;
|
|
262
|
+
readonly example: "http://localhost:8080/v1";
|
|
263
|
+
readonly category: "model";
|
|
264
|
+
}, {
|
|
265
|
+
readonly name: "AFK_MODEL_MEDIUM";
|
|
266
|
+
readonly description: "Bind the \"medium\" capability tier (general-use) to a model id/alias. Overrides afk.config.json models.medium.";
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
readonly required: false;
|
|
269
|
+
readonly example: "claude-sonnet-5";
|
|
270
|
+
readonly category: "model";
|
|
271
|
+
}, {
|
|
272
|
+
readonly name: "AFK_MODEL_MEDIUM_API_KEY";
|
|
273
|
+
readonly description: "Per-slot API key for the \"medium\" tier (Stage 2). Overrides global credentials for this tier only.";
|
|
274
|
+
readonly type: "string";
|
|
275
|
+
readonly required: false;
|
|
276
|
+
readonly category: "model";
|
|
277
|
+
readonly secret: true;
|
|
278
|
+
}, {
|
|
279
|
+
readonly name: "AFK_MODEL_MEDIUM_BASE_URL";
|
|
280
|
+
readonly description: "Per-slot endpoint base URL for the \"medium\" tier (Stage 2). Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
281
|
+
readonly type: "string";
|
|
282
|
+
readonly required: false;
|
|
283
|
+
readonly example: "http://localhost:8080/v1";
|
|
284
|
+
readonly category: "model";
|
|
285
|
+
}, {
|
|
286
|
+
readonly name: "AFK_MODEL_SMALL";
|
|
287
|
+
readonly description: "Bind the \"small\" capability tier (cheap/fast) to a model id/alias. Overrides afk.config.json models.small.";
|
|
288
|
+
readonly type: "string";
|
|
289
|
+
readonly required: false;
|
|
290
|
+
readonly example: "gpt-4o-mini";
|
|
291
|
+
readonly category: "model";
|
|
292
|
+
}, {
|
|
293
|
+
readonly name: "AFK_MODEL_SMALL_API_KEY";
|
|
294
|
+
readonly description: "Per-slot API key for the \"small\" tier (Stage 2). Overrides global credentials for this tier only.";
|
|
295
|
+
readonly type: "string";
|
|
296
|
+
readonly required: false;
|
|
297
|
+
readonly category: "model";
|
|
298
|
+
readonly secret: true;
|
|
299
|
+
}, {
|
|
300
|
+
readonly name: "AFK_MODEL_SMALL_BASE_URL";
|
|
301
|
+
readonly description: "Per-slot endpoint base URL for the \"small\" tier (Stage 2). Anthropic Messages base or OpenAI-compatible base per the tier provider.";
|
|
302
|
+
readonly type: "string";
|
|
303
|
+
readonly required: false;
|
|
304
|
+
readonly example: "http://localhost:8080/v1";
|
|
305
|
+
readonly category: "model";
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "AFK_OVERLOAD_PAUSE_MS";
|
|
308
|
+
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.";
|
|
309
|
+
readonly type: "number";
|
|
310
|
+
readonly required: false;
|
|
311
|
+
readonly example: "600000";
|
|
312
|
+
readonly category: "model";
|
|
313
|
+
}, {
|
|
314
|
+
readonly name: "AFK_PROMPT_CACHE_TTL";
|
|
315
|
+
readonly description: "TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.";
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly required: false;
|
|
318
|
+
readonly default: "1h";
|
|
319
|
+
readonly example: "1h";
|
|
320
|
+
readonly category: "model";
|
|
321
|
+
}, {
|
|
322
|
+
readonly name: "AFK_SUGGEST_ENABLED";
|
|
323
|
+
readonly description: "Enable the LLM-backed ghost-text suggestion tier in the interactive REPL. Set to 1/true/yes/on to activate. Off by default.";
|
|
324
|
+
readonly type: "boolean";
|
|
325
|
+
readonly required: false;
|
|
326
|
+
readonly category: "model";
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "AFK_SUGGEST_PROMPT";
|
|
329
|
+
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. Set to 1/true/yes/on to activate. Off by default. Requires AFK_SUGGEST_ENABLED (it reuses the same suggestion model and provider).";
|
|
330
|
+
readonly type: "boolean";
|
|
331
|
+
readonly required: false;
|
|
332
|
+
readonly category: "model";
|
|
333
|
+
}, {
|
|
334
|
+
readonly name: "AFK_SUGGEST_GHOST";
|
|
335
|
+
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.";
|
|
336
|
+
readonly type: "boolean";
|
|
337
|
+
readonly required: false;
|
|
338
|
+
readonly default: "1";
|
|
339
|
+
readonly example: "0";
|
|
340
|
+
readonly category: "model";
|
|
341
|
+
}, {
|
|
342
|
+
readonly name: "AFK_SUGGEST_MODEL";
|
|
343
|
+
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.";
|
|
344
|
+
readonly type: "string";
|
|
345
|
+
readonly required: false;
|
|
346
|
+
readonly category: "model";
|
|
347
|
+
}, {
|
|
348
|
+
readonly name: "AFK_TASK_BUDGET";
|
|
349
|
+
readonly description: "Per-task token budget ceiling. Aborts when cumulative usage would exceed it.";
|
|
350
|
+
readonly type: "number";
|
|
351
|
+
readonly required: false;
|
|
352
|
+
readonly default: "100000";
|
|
353
|
+
readonly example: "200000";
|
|
354
|
+
readonly category: "model";
|
|
355
|
+
}, {
|
|
356
|
+
readonly name: "AFK_TEMPERATURE";
|
|
357
|
+
readonly description: "Numeric temperature override for model sampling. Provider default if unset.";
|
|
358
|
+
readonly type: "number";
|
|
359
|
+
readonly required: false;
|
|
360
|
+
readonly example: "0.7";
|
|
361
|
+
readonly category: "model";
|
|
362
|
+
}, {
|
|
363
|
+
readonly name: "AFK_THINKING";
|
|
364
|
+
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).";
|
|
365
|
+
readonly type: "string";
|
|
366
|
+
readonly required: false;
|
|
367
|
+
readonly default: "adaptive";
|
|
368
|
+
readonly example: "adaptive";
|
|
369
|
+
readonly category: "model";
|
|
370
|
+
}, {
|
|
371
|
+
readonly name: "AFK_THINKING_UI";
|
|
372
|
+
readonly description: string;
|
|
373
|
+
readonly type: "string";
|
|
374
|
+
readonly required: false;
|
|
375
|
+
readonly default: "live";
|
|
376
|
+
readonly example: "digest";
|
|
377
|
+
readonly category: "misc";
|
|
378
|
+
}, {
|
|
379
|
+
readonly name: "AFK_TIMEOUT_MS";
|
|
380
|
+
readonly description: "Per-turn timeout in milliseconds. Provider/SDK default if unset.";
|
|
381
|
+
readonly type: "number";
|
|
382
|
+
readonly required: false;
|
|
383
|
+
readonly example: "120000";
|
|
384
|
+
readonly category: "model";
|
|
385
|
+
}, {
|
|
386
|
+
readonly name: "AFK_WORKSPACE_DISABLED";
|
|
387
|
+
readonly description: string;
|
|
388
|
+
readonly type: "boolean";
|
|
389
|
+
readonly required: false;
|
|
390
|
+
readonly default: "0";
|
|
391
|
+
readonly example: "1";
|
|
392
|
+
readonly category: "model";
|
|
393
|
+
}, {
|
|
394
|
+
readonly name: "CLAUDE_MODEL";
|
|
395
|
+
readonly description: "Legacy alias for AFK_MODEL — supported for back-compat with pre-AFK_* deployments.";
|
|
396
|
+
readonly type: "string";
|
|
397
|
+
readonly required: false;
|
|
398
|
+
readonly example: "sonnet";
|
|
399
|
+
readonly category: "model";
|
|
400
|
+
}, {
|
|
401
|
+
readonly name: "AFK_SYSTEM_PROMPT";
|
|
402
|
+
readonly description: "Raw operator-overlay prompt. Highest-priority overlay (over afk.config.json and AFK.md). Appended on top of the framework base (prompts/system-prompt.md) under an \"# Operator configuration\" header — it augments, never replaces, the base.";
|
|
403
|
+
readonly type: "string";
|
|
404
|
+
readonly required: false;
|
|
405
|
+
readonly example: "You are a helpful agent.";
|
|
406
|
+
readonly category: "model";
|
|
407
|
+
}, {
|
|
408
|
+
readonly name: "AFK_DUMP_PROMPT";
|
|
409
|
+
readonly description: "Write the resolved system prompt to a file at startup. Accepts a path or 1 for default location.";
|
|
410
|
+
readonly type: "string";
|
|
411
|
+
readonly required: false;
|
|
412
|
+
readonly example: "/tmp/afk-prompt.txt";
|
|
413
|
+
readonly category: "debug";
|
|
414
|
+
}, {
|
|
415
|
+
readonly name: "ANTHROPIC_API_KEY";
|
|
416
|
+
readonly description: "Anthropic API key. Tier-1 credential — overrides keychain OAuth and CLAUDE_CODE_OAUTH_TOKEN.";
|
|
417
|
+
readonly type: "string";
|
|
418
|
+
readonly required: false;
|
|
419
|
+
readonly category: "auth";
|
|
420
|
+
readonly secret: true;
|
|
421
|
+
}, {
|
|
422
|
+
readonly name: "CLAUDE_CODE_OAUTH_TOKEN";
|
|
423
|
+
readonly description: "Claude Code OAuth token. Tier-2 credential — used when ANTHROPIC_API_KEY is unset; falls back to keychain.";
|
|
424
|
+
readonly type: "string";
|
|
425
|
+
readonly required: false;
|
|
426
|
+
readonly category: "auth";
|
|
427
|
+
readonly secret: true;
|
|
428
|
+
}, {
|
|
429
|
+
readonly name: "OPENAI_API_KEY";
|
|
430
|
+
readonly description: "OpenAI API key for the openai-compatible provider (gpt-*, o1*, o3*, o4* models).";
|
|
431
|
+
readonly type: "string";
|
|
432
|
+
readonly required: false;
|
|
433
|
+
readonly category: "auth";
|
|
434
|
+
readonly secret: true;
|
|
435
|
+
}, {
|
|
436
|
+
readonly name: "CODEX_API_KEY";
|
|
437
|
+
readonly description: "Fallback OpenAI API key for the openai-compatible provider, read after OPENAI_API_KEY. Legacy name from the removed @openai/codex-sdk integration — prefer OPENAI_API_KEY.";
|
|
438
|
+
readonly type: "string";
|
|
439
|
+
readonly required: false;
|
|
440
|
+
readonly category: "auth";
|
|
441
|
+
readonly secret: true;
|
|
442
|
+
}, {
|
|
443
|
+
readonly name: "XAI_API_KEY";
|
|
444
|
+
readonly description: "xAI API key for the xai provider (Grok models) in API-key mode. Metered; distinct from SuperGrok / SuperGrok Heavy / X Premium+ OAuth.";
|
|
445
|
+
readonly type: "string";
|
|
446
|
+
readonly required: false;
|
|
447
|
+
readonly category: "auth";
|
|
448
|
+
readonly secret: true;
|
|
449
|
+
}, {
|
|
450
|
+
readonly name: "AFK_XAI_BASE_URL";
|
|
451
|
+
readonly description: "Base URL for xAI API-key mode. Default https://api.x.ai/v1. The OpenAI SDK appends /chat/completions.";
|
|
452
|
+
readonly type: "string";
|
|
453
|
+
readonly required: false;
|
|
454
|
+
readonly example: "https://api.x.ai/v1";
|
|
455
|
+
readonly category: "model";
|
|
456
|
+
}, {
|
|
457
|
+
readonly name: "AFK_XAI_OAUTH_BASE_URL";
|
|
458
|
+
readonly description: "Base URL for xAI SuperGrok / SuperGrok Heavy / X Premium+ OAuth inference. Default https://cli-chat-proxy.grok.com/v1 (subscription path). Some accounts work on https://api.x.ai/v1 with OAuth — override if needed. Distinct from AFK_XAI_BASE_URL (API-key mode).";
|
|
459
|
+
readonly type: "string";
|
|
460
|
+
readonly required: false;
|
|
461
|
+
readonly example: "https://cli-chat-proxy.grok.com/v1";
|
|
462
|
+
readonly category: "model";
|
|
463
|
+
}, {
|
|
464
|
+
readonly name: "AFK_XAI_GROK_CLIENT_VERSION";
|
|
465
|
+
readonly description: "Override the semver sent as x-grok-client-version to the xAI OAuth CLI chat proxy. Use only if the proxy raises its required Grok CLI version before agent-afk is updated; invalid values fall back to the official Grok Build version file or built-in compatible default.";
|
|
466
|
+
readonly type: "string";
|
|
467
|
+
readonly required: false;
|
|
468
|
+
readonly example: "1.0.6";
|
|
469
|
+
readonly category: "model";
|
|
470
|
+
}, {
|
|
471
|
+
readonly name: "AFK_LOCAL_API_KEY";
|
|
472
|
+
readonly description: "Placeholder API key for local Anthropic-compatible servers (vllm-mlx, etc.). Set when AFK_LOCAL_BASE_URL is configured.";
|
|
473
|
+
readonly type: "string";
|
|
474
|
+
readonly required: false;
|
|
475
|
+
readonly default: "local";
|
|
476
|
+
readonly example: "local";
|
|
477
|
+
readonly category: "auth";
|
|
478
|
+
readonly secret: true;
|
|
479
|
+
}, {
|
|
480
|
+
readonly name: "AFK_LOCAL_BASE_URL";
|
|
481
|
+
readonly description: "Base URL for a self-hosted Anthropic-compatible server. When set, routes traffic away from api.anthropic.com.";
|
|
482
|
+
readonly type: "string";
|
|
483
|
+
readonly required: false;
|
|
484
|
+
readonly example: "http://127.0.0.1:8080";
|
|
485
|
+
readonly category: "model";
|
|
486
|
+
}, {
|
|
487
|
+
readonly name: "AFK_OPENAI_BASE_URL";
|
|
488
|
+
readonly description: "Base URL override for the OpenAI-compatible provider. Used for local shims (mlx_lm.server, Ollama, vLLM, LM Studio). The OpenAI SDK appends `/chat/completions` itself — a value ending in `/chat/completions` will be stripped at config-load time with a one-shot warning.";
|
|
489
|
+
readonly type: "string";
|
|
490
|
+
readonly required: false;
|
|
491
|
+
readonly example: "http://127.0.0.1:8000/v1";
|
|
492
|
+
readonly category: "model";
|
|
493
|
+
}, {
|
|
494
|
+
readonly name: "AFK_OPENAI_USE_RESPONSES";
|
|
495
|
+
readonly description: "Opt the OpenAI-compatible provider into the OpenAI Responses API instead of Chat Completions for API-key sessions. Truthy values: 1, true, yes, on. The ChatGPT-subscription OAuth path uses Responses automatically regardless of this flag.";
|
|
496
|
+
readonly type: "boolean";
|
|
497
|
+
readonly required: false;
|
|
498
|
+
readonly example: "1";
|
|
499
|
+
readonly category: "model";
|
|
500
|
+
}, {
|
|
501
|
+
readonly name: "AFK_OPENAI_CHATGPT_OAUTH";
|
|
502
|
+
readonly description: "Opt into using ChatGPT-subscription OAuth credentials from ~/.codex/auth.json (auth_mode: chatgpt) as OpenAI provider auth. Off by default. READ-ONLY: AFK never refreshes these tokens — re-run `codex` when the access token expires. Routes requests over the Responses API to the private ChatGPT backend (chatgpt.com/backend-api).";
|
|
503
|
+
readonly type: "boolean";
|
|
504
|
+
readonly required: false;
|
|
505
|
+
readonly example: "1";
|
|
506
|
+
readonly category: "model";
|
|
507
|
+
}, {
|
|
508
|
+
readonly name: "AFK_PROVIDER";
|
|
509
|
+
readonly description: "Force provider selection (anthropic | anthropic-direct | openai | openai-compatible | openai-codex | xai | xai-oauth). Overrides the model-name heuristic. Same surface as the --provider CLI flag; CLI flag wins when both are set.";
|
|
510
|
+
readonly type: "string";
|
|
511
|
+
readonly required: false;
|
|
512
|
+
readonly example: "openai-compatible";
|
|
513
|
+
readonly category: "model";
|
|
514
|
+
}, {
|
|
515
|
+
readonly name: "EXA_API_KEY";
|
|
516
|
+
readonly description: "Exa (exa.ai) search API key, enabling web_scrape search mode. Free tier (20k requests/month) available at https://exa.ai. When unset, search mode returns an actionable error; markdown and raw modes are unaffected.";
|
|
517
|
+
readonly type: "string";
|
|
518
|
+
readonly required: false;
|
|
519
|
+
readonly category: "auth";
|
|
520
|
+
readonly secret: true;
|
|
521
|
+
}, {
|
|
522
|
+
readonly name: "TELEGRAM_BOT_TOKEN";
|
|
523
|
+
readonly description: "Telegram bot token from @BotFather. Required to run the Telegram bot surface.";
|
|
524
|
+
readonly type: "string";
|
|
525
|
+
readonly required: false;
|
|
526
|
+
readonly category: "telegram";
|
|
527
|
+
readonly secret: true;
|
|
528
|
+
}, {
|
|
529
|
+
readonly name: "AFK_TELEGRAM_BOT_TOKEN";
|
|
530
|
+
readonly description: "Alternative env var name for the Telegram bot token, accepted by the setup wizard.";
|
|
531
|
+
readonly type: "string";
|
|
532
|
+
readonly required: false;
|
|
533
|
+
readonly category: "telegram";
|
|
534
|
+
readonly secret: true;
|
|
535
|
+
}, {
|
|
536
|
+
readonly name: "AFK_TELEGRAM_ALLOWED_CHAT_IDS";
|
|
537
|
+
readonly description: "Comma-separated list of Telegram chat IDs allowed to interact with the bot. Required when the bot is running.";
|
|
538
|
+
readonly type: "string";
|
|
539
|
+
readonly required: false;
|
|
540
|
+
readonly example: "123456789,987654321";
|
|
541
|
+
readonly category: "telegram";
|
|
542
|
+
}, {
|
|
543
|
+
readonly name: "AFK_TELEGRAM_TAG_ONLY_CHAT_IDS";
|
|
544
|
+
readonly description: "Comma-separated list of Telegram chat IDs where the bot answers only when addressed (a reply to the bot, an @mention of the bot, or a text_mention resolving to the bot). Slash-commands are unaffected; chats not listed behave as usual. The afk.config.json telegram.tagOnlyChats block takes precedence. Requires Telegram privacy mode OFF (BotFather /setprivacy Disable) for non-addressed group messages to reach the bot.";
|
|
545
|
+
readonly type: "string";
|
|
546
|
+
readonly required: false;
|
|
547
|
+
readonly example: "-100987654321,123456789";
|
|
548
|
+
readonly category: "telegram";
|
|
549
|
+
}, {
|
|
550
|
+
readonly name: "AFK_TELEGRAM_PRIMARY_CHAT_ID";
|
|
551
|
+
readonly description: "Default chat ID for outbound notifications (primary-mode routing). When unset, notifications go to the first private/DM chat in AFK_TELEGRAM_ALLOWED_CHAT_IDS. The afk.config.json telegram.notify block takes precedence.";
|
|
552
|
+
readonly type: "string";
|
|
553
|
+
readonly required: false;
|
|
554
|
+
readonly example: "123456789";
|
|
555
|
+
readonly category: "telegram";
|
|
556
|
+
}, {
|
|
557
|
+
readonly name: "AFK_TELEGRAM_NOTIFY_MODE";
|
|
558
|
+
readonly description: "Outbound notification fan-out: primary (default — one chat), broadcast (every allowed chat), or custom (afk.config.json telegram.notify.targets). The afk.config.json telegram.notify.mode takes precedence.";
|
|
559
|
+
readonly type: "string";
|
|
560
|
+
readonly required: false;
|
|
561
|
+
readonly example: "broadcast";
|
|
562
|
+
readonly category: "telegram";
|
|
563
|
+
}, {
|
|
564
|
+
readonly name: "TELEGRAM_DATA_DIR";
|
|
565
|
+
readonly description: "Override the directory where Telegram bot state is stored. Defaults to ~/.afk/state/telegram/.";
|
|
566
|
+
readonly type: "string";
|
|
567
|
+
readonly required: false;
|
|
568
|
+
readonly category: "telegram";
|
|
569
|
+
}, {
|
|
570
|
+
readonly name: "TELEGRAM_VERBOSE";
|
|
571
|
+
readonly description: "Set to a truthy value ('1'/'true'/'yes'/'on', case-insensitive) to log per-message details from the Telegram bot — chat IDs, message text, latency.";
|
|
572
|
+
readonly type: "boolean";
|
|
573
|
+
readonly required: false;
|
|
574
|
+
readonly example: "true";
|
|
575
|
+
readonly category: "telegram";
|
|
576
|
+
}, {
|
|
577
|
+
readonly name: "TMUX";
|
|
578
|
+
readonly description: string;
|
|
579
|
+
readonly type: "string";
|
|
580
|
+
readonly required: false;
|
|
581
|
+
readonly example: "/tmp/tmux-501/default,12345,0";
|
|
582
|
+
readonly category: "process";
|
|
583
|
+
}, {
|
|
584
|
+
readonly name: "AFK_TELEGRAM_TRACE";
|
|
585
|
+
readonly description: "Set to 1 to dump raw bridge traffic between the agent and the Telegram bot — debugging only.";
|
|
586
|
+
readonly type: "boolean";
|
|
587
|
+
readonly required: false;
|
|
588
|
+
readonly example: "1";
|
|
589
|
+
readonly category: "debug";
|
|
590
|
+
}, {
|
|
591
|
+
readonly name: "AFK_TELEGRAM_CWD";
|
|
592
|
+
readonly description: "Override the working directory used by the Telegram bot when spawning agent sessions.";
|
|
593
|
+
readonly type: "string";
|
|
594
|
+
readonly required: false;
|
|
595
|
+
readonly category: "telegram";
|
|
596
|
+
}, {
|
|
597
|
+
readonly name: "AFK_HOME";
|
|
598
|
+
readonly description: "Override the AFK home directory. Default: ~/.afk/.";
|
|
599
|
+
readonly type: "string";
|
|
600
|
+
readonly required: false;
|
|
601
|
+
readonly default: "~/.afk";
|
|
602
|
+
readonly example: "/opt/afk";
|
|
603
|
+
readonly category: "paths";
|
|
604
|
+
}, {
|
|
605
|
+
readonly name: "AFK_STATE_DIR";
|
|
606
|
+
readonly description: "Override the entire AFK state tier (sessions/, todos/, transcripts/, memory/, daemon/, etc.), not just one subdirectory. Must be an absolute path (not /). Default: $AFK_HOME/state/.";
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly required: false;
|
|
609
|
+
readonly category: "paths";
|
|
610
|
+
}, {
|
|
611
|
+
readonly name: "AFK_FRAMEWORK_DIR";
|
|
612
|
+
readonly description: "Override the AFK agent-framework directory used for telemetry and briefs. Default: $AFK_HOME/agent-framework/.";
|
|
613
|
+
readonly type: "string";
|
|
614
|
+
readonly required: false;
|
|
615
|
+
readonly category: "paths";
|
|
616
|
+
}, {
|
|
617
|
+
readonly name: "AFK_COMPANION_PRIMER";
|
|
618
|
+
readonly description: "Opt-in: absolute path to a single companion-primer file. When set, its content is bounded (capped, fenced as <companion-primer>) and appended to the system prompt at session start for top-level sessions (chat/REPL/telegram/daemon), as lower-authority \"reflections, not facts\" context. Unset (default) = no-op. Only the one named file is ever read — never a directory or repo walk.";
|
|
619
|
+
readonly type: "string";
|
|
620
|
+
readonly required: false;
|
|
621
|
+
readonly example: "/Users/me/Projects/afk-companion/PRIMER.md";
|
|
622
|
+
readonly category: "paths";
|
|
623
|
+
}, {
|
|
624
|
+
readonly name: "HOME";
|
|
625
|
+
readonly description: "Standard Unix home directory. Used as the fallback when AFK_HOME is unset.";
|
|
626
|
+
readonly type: "string";
|
|
627
|
+
readonly required: false;
|
|
628
|
+
readonly category: "process";
|
|
629
|
+
}, {
|
|
630
|
+
readonly name: "PATH";
|
|
631
|
+
readonly description: "System PATH. Read for executable resolution (git, gh, etc.) in tool handlers.";
|
|
632
|
+
readonly type: "string";
|
|
633
|
+
readonly required: false;
|
|
634
|
+
readonly category: "process";
|
|
635
|
+
}, {
|
|
636
|
+
readonly name: "APPDATA";
|
|
637
|
+
readonly description: "Windows %APPDATA% (Roaming). Used for VS Code/Cursor settings discovery and credential denylist paths.";
|
|
638
|
+
readonly type: "string";
|
|
639
|
+
readonly required: false;
|
|
640
|
+
readonly category: "process";
|
|
641
|
+
}, {
|
|
642
|
+
readonly name: "LOCALAPPDATA";
|
|
643
|
+
readonly description: "Windows %LOCALAPPDATA%. Used for browser credential denylist paths (Chrome, Firefox, Edge, etc.).";
|
|
644
|
+
readonly type: "string";
|
|
645
|
+
readonly required: false;
|
|
646
|
+
readonly category: "process";
|
|
647
|
+
}, {
|
|
648
|
+
readonly name: "USERPROFILE";
|
|
649
|
+
readonly description: "Windows %USERPROFILE%. Used for credential denylist paths (.ssh, .aws, .gnupg) on win32.";
|
|
650
|
+
readonly type: "string";
|
|
651
|
+
readonly required: false;
|
|
652
|
+
readonly category: "process";
|
|
653
|
+
}, {
|
|
654
|
+
readonly name: "AFK_DAEMON_CWD";
|
|
655
|
+
readonly description: "Working directory used by the daemon process for spawned agent sessions.";
|
|
656
|
+
readonly type: "string";
|
|
657
|
+
readonly required: false;
|
|
658
|
+
readonly category: "daemon";
|
|
659
|
+
}, {
|
|
660
|
+
readonly name: "AFK_DAEMON_TASK";
|
|
661
|
+
readonly description: "Default task description for the daemon. Falls back to afk.config.json daemon.task.";
|
|
662
|
+
readonly type: "string";
|
|
663
|
+
readonly required: false;
|
|
664
|
+
readonly category: "daemon";
|
|
665
|
+
}, {
|
|
666
|
+
readonly name: "AFK_DAEMON_TASK_ID";
|
|
667
|
+
readonly description: "Task identifier the daemon uses to scope its state directory and telemetry.";
|
|
668
|
+
readonly type: "string";
|
|
669
|
+
readonly required: false;
|
|
670
|
+
readonly category: "daemon";
|
|
671
|
+
}, {
|
|
672
|
+
readonly name: "AFK_DAEMON_HOST";
|
|
673
|
+
readonly description: "Bind address for the daemon control HTTP surface. Defaults to 127.0.0.1 (loopback only). The control surface is unauthenticated, so bind a non-loopback address such as 0.0.0.0 only on a trusted or firewalled network. Overridden by the --host flag.";
|
|
674
|
+
readonly type: "string";
|
|
675
|
+
readonly required: false;
|
|
676
|
+
readonly category: "daemon";
|
|
677
|
+
}, {
|
|
678
|
+
readonly name: "AFK_SESSIONSTART_COOLDOWN_MS";
|
|
679
|
+
readonly description: "Cooldown in milliseconds between SessionStart trigger fires in the daemon. Prevents thundering-herd on rapid restarts.";
|
|
680
|
+
readonly type: "number";
|
|
681
|
+
readonly required: false;
|
|
682
|
+
readonly category: "daemon";
|
|
683
|
+
}, {
|
|
684
|
+
readonly name: "AFK_WEB_PORT";
|
|
685
|
+
readonly description: "Port for the `afk web` browser surface. Defaults to 4141; falls back to an ephemeral port when taken. Overridden by --port.";
|
|
686
|
+
readonly type: "number";
|
|
687
|
+
readonly required: false;
|
|
688
|
+
readonly example: "4141";
|
|
689
|
+
readonly category: "daemon";
|
|
690
|
+
}, {
|
|
691
|
+
readonly name: "AFK_WEB_HOST";
|
|
692
|
+
readonly description: "Bind address for the `afk web` browser surface. Defaults to 127.0.0.1. Unlike the daemon control surface, a non-loopback bind is REFUSED unless AFK_WEB_TOKEN (or --token) is also set, because this surface can submit prompts and approve tool use. Overridden by --host.";
|
|
693
|
+
readonly type: "string";
|
|
694
|
+
readonly required: false;
|
|
695
|
+
readonly example: "127.0.0.1";
|
|
696
|
+
readonly category: "daemon";
|
|
697
|
+
}, {
|
|
698
|
+
readonly name: "AFK_WEB_TOKEN";
|
|
699
|
+
readonly description: "Bearer token for the `afk web` surface. When unset, a random per-run token is minted and printed in the startup URL. Setting this explicitly is also what permits a non-loopback bind.";
|
|
700
|
+
readonly type: "string";
|
|
701
|
+
readonly required: false;
|
|
702
|
+
readonly category: "daemon";
|
|
703
|
+
readonly secret: true;
|
|
704
|
+
}, {
|
|
705
|
+
readonly name: "AFK_WORKTREE_AUTONAME";
|
|
706
|
+
readonly description: "Auto-rename worktree branches based on the first user message in interactive mode. 1 = on (default), 0 = off.";
|
|
707
|
+
readonly type: "boolean";
|
|
708
|
+
readonly required: false;
|
|
709
|
+
readonly default: "1";
|
|
710
|
+
readonly example: "0";
|
|
711
|
+
readonly category: "worktree";
|
|
712
|
+
}, {
|
|
713
|
+
readonly name: "AFK_WORKTREE_BRANCH_PREFIX";
|
|
714
|
+
readonly description: "Branch-name prefix for AFK-managed worktrees. Default afk/. Set to empty string to drop the prefix.";
|
|
715
|
+
readonly type: "string";
|
|
716
|
+
readonly required: false;
|
|
717
|
+
readonly default: "afk/";
|
|
718
|
+
readonly example: "wt/";
|
|
719
|
+
readonly category: "worktree";
|
|
720
|
+
}, {
|
|
721
|
+
readonly name: "AFK_WORKTREE_BASE";
|
|
722
|
+
readonly description: "Override the base git ref for worktrees created with --worktree. By default AFK bases worktrees on the remote's default branch (e.g. origin/main), fetched fresh. Set this to pin a different ref, or to HEAD to base on the local checkout. Overridden per-session by --worktree-base.";
|
|
723
|
+
readonly type: "string";
|
|
724
|
+
readonly required: false;
|
|
725
|
+
readonly example: "origin/main";
|
|
726
|
+
readonly category: "worktree";
|
|
727
|
+
}, {
|
|
728
|
+
readonly name: "AFK_WORKTREE_ON_EXIT";
|
|
729
|
+
readonly description: "Clean-worktree quit policy for interactive --worktree sessions: ask, keep, or remove.";
|
|
730
|
+
readonly type: "string";
|
|
731
|
+
readonly required: false;
|
|
732
|
+
readonly example: "ask";
|
|
733
|
+
readonly category: "worktree";
|
|
734
|
+
}, {
|
|
735
|
+
readonly name: "AFK_WORKTREE_BOOT_PRUNE";
|
|
736
|
+
readonly description: "When set, the daemon prunes stale worktrees at boot in addition to the cron-driven sweep.";
|
|
737
|
+
readonly type: "boolean";
|
|
738
|
+
readonly required: false;
|
|
739
|
+
readonly category: "worktree";
|
|
740
|
+
}, {
|
|
741
|
+
readonly name: "AFK_WORKTREE_PRUNE_DISABLE";
|
|
742
|
+
readonly description: "Disable the worktree prune job entirely. Useful for long-running tests.";
|
|
743
|
+
readonly type: "boolean";
|
|
744
|
+
readonly required: false;
|
|
745
|
+
readonly category: "worktree";
|
|
746
|
+
}, {
|
|
747
|
+
readonly name: "AFK_WORKTREE_MAX_AGE_CLEAN";
|
|
748
|
+
readonly description: "Maximum age (in days) before a clean worktree is auto-pruned. Default 14.";
|
|
749
|
+
readonly type: "number";
|
|
750
|
+
readonly required: false;
|
|
751
|
+
readonly default: "14";
|
|
752
|
+
readonly category: "worktree";
|
|
753
|
+
}, {
|
|
754
|
+
readonly name: "AFK_WORKTREE_MAX_AGE_DIRTY";
|
|
755
|
+
readonly description: "Maximum age (in days) before a dirty worktree is auto-pruned. Default 30.";
|
|
756
|
+
readonly type: "number";
|
|
757
|
+
readonly required: false;
|
|
758
|
+
readonly default: "30";
|
|
759
|
+
readonly category: "worktree";
|
|
760
|
+
}, {
|
|
761
|
+
readonly name: "AFK_WORKTREE_SWEEP_ROOT";
|
|
762
|
+
readonly description: "Override the root directory under which AFK worktrees are tracked for pruning.";
|
|
763
|
+
readonly type: "string";
|
|
764
|
+
readonly required: false;
|
|
765
|
+
readonly category: "worktree";
|
|
766
|
+
}, {
|
|
767
|
+
readonly name: "AFK_ALLOW_PROJECT_MCP";
|
|
768
|
+
readonly description: "Opt-in to loading + spawning MCP servers declared in <cwd>/.mcp.json. Fail-closed: when unset (or 0), project-local servers are NOT spawned; set to a truthy value (1/true/yes/on) to load them. A project-local .mcp.json spawns arbitrary commands on session start, so it is off by default to prevent code execution when entering an untrusted repo (issue #571). Skipped servers are listed in a startup warning with the opt-in instruction.";
|
|
769
|
+
readonly type: "boolean";
|
|
770
|
+
readonly required: false;
|
|
771
|
+
readonly example: "1";
|
|
772
|
+
readonly category: "mcp";
|
|
773
|
+
}, {
|
|
774
|
+
readonly name: "AFK_AUTO_ROUTING";
|
|
775
|
+
readonly description: "Auto-route bare slash inputs to matching skills. Applies to interactive, chat, telegram, and daemon surfaces.";
|
|
776
|
+
readonly type: "boolean";
|
|
777
|
+
readonly required: false;
|
|
778
|
+
readonly example: "true";
|
|
779
|
+
readonly category: "routing";
|
|
780
|
+
}, {
|
|
781
|
+
readonly name: "AFK_INTERNAL";
|
|
782
|
+
readonly description: "Tier gate. Set to exactly `1` to unlock — only the literal string \"1\" unlocks (other truthy values like \"true\"/\"yes\" leave the tier locked). When unlocked, skills tagged `audience: 'internal'` (e.g. /audit-fit, harvest/distill plugins) become visible at end-user surfaces (slash-command list, --help, tab-complete, system-prompt skill manifest). Default unset = public tier — internal skills are hidden. Not an access-control boundary; it gates surfacing, not the underlying registry.";
|
|
783
|
+
readonly type: "boolean";
|
|
784
|
+
readonly required: false;
|
|
785
|
+
readonly example: "1";
|
|
786
|
+
readonly category: "routing";
|
|
787
|
+
}, {
|
|
788
|
+
readonly name: "AFK_SHELL_PASSTHROUGH";
|
|
789
|
+
readonly description: "Enable the interactive REPL `!cmd` / `!&cmd` shell-passthrough feature. On by default. Set to 0, false, off, or no (case-insensitive) to disable, so inputs beginning with ! are sent to the model as literal text instead of being executed as shell commands. Equivalent to the --no-shell-passthrough flag.";
|
|
790
|
+
readonly type: "boolean";
|
|
791
|
+
readonly required: false;
|
|
792
|
+
readonly default: "1";
|
|
793
|
+
readonly example: "0";
|
|
794
|
+
readonly category: "misc";
|
|
795
|
+
}, {
|
|
796
|
+
readonly name: "AFK_BG_AUTO_DELIVER";
|
|
797
|
+
readonly description: "Auto-deliver background subagent results into the model context on the next user turn (interactive REPL). On by default. Set to 0, false, off, or no (case-insensitive) to disable, restoring the manual /bgsub:join retrieval flow.";
|
|
798
|
+
readonly type: "boolean";
|
|
799
|
+
readonly required: false;
|
|
800
|
+
readonly default: "1";
|
|
801
|
+
readonly example: "0";
|
|
802
|
+
readonly category: "misc";
|
|
803
|
+
}, {
|
|
804
|
+
readonly name: "AFK_BANNER_PLAIN";
|
|
805
|
+
readonly description: "Suppress the ANSI-colored banner at REPL startup. Useful for non-TTY captures and CI logs.";
|
|
806
|
+
readonly type: "boolean";
|
|
807
|
+
readonly required: false;
|
|
808
|
+
readonly example: "1";
|
|
809
|
+
readonly category: "misc";
|
|
810
|
+
}, {
|
|
811
|
+
readonly name: "AFK_PLAIN_OUTPUT";
|
|
812
|
+
readonly description: string;
|
|
813
|
+
readonly type: "boolean";
|
|
814
|
+
readonly required: false;
|
|
815
|
+
readonly example: "1";
|
|
816
|
+
readonly category: "misc";
|
|
817
|
+
}, {
|
|
818
|
+
readonly name: "AFK_SPINNER_TIPS";
|
|
819
|
+
readonly description: "Show rotating tips in the loading spinner during long calls. 1 = on, 0 = off.";
|
|
820
|
+
readonly type: "boolean";
|
|
821
|
+
readonly required: false;
|
|
822
|
+
readonly category: "misc";
|
|
823
|
+
}, {
|
|
824
|
+
readonly name: "AFK_GOBLIN_SPINNER";
|
|
825
|
+
readonly description: "Goblin-themed working spinner (olive frames + goblin verbs) while the agent runs tools. 1 = on (default), 0 = classic dim spinner.";
|
|
826
|
+
readonly type: "boolean";
|
|
827
|
+
readonly required: false;
|
|
828
|
+
readonly example: "0";
|
|
829
|
+
readonly category: "misc";
|
|
830
|
+
}, {
|
|
831
|
+
readonly name: "AFK_GOBLIN_MASCOT";
|
|
832
|
+
readonly description: "Reacting goblin mini-sprite in the reserved footer band while the agent runs tools (3 rows, animated). 1 = on, unset/0 = off (default). Claims terminal rows, so it is opt-in.";
|
|
833
|
+
readonly type: "boolean";
|
|
834
|
+
readonly required: false;
|
|
835
|
+
readonly example: "1";
|
|
836
|
+
readonly category: "misc";
|
|
837
|
+
}, {
|
|
838
|
+
readonly name: "AFK_TERM_TITLE";
|
|
839
|
+
readonly description: "Set the terminal/tab title (OSC 2) to reflect afk state — \"afk — <cwd> · running\" during a turn, \"afk — <cwd>\" when idle, cleared on exit. 1 = on (default when stdout is a TTY), 0 = leave the title alone. TTY-only.";
|
|
840
|
+
readonly type: "boolean";
|
|
841
|
+
readonly required: false;
|
|
842
|
+
readonly example: "0";
|
|
843
|
+
readonly category: "misc";
|
|
844
|
+
}, {
|
|
845
|
+
readonly name: "AFK_NOTIFY";
|
|
846
|
+
readonly description: "Emit a desktop completion notification (OSC 9) on turn completion, for terminals that map OSC 9 to system notifications (iTerm2, kitty, WezTerm). Opt-in and off by default (intrusive). 1 = on. TTY-only.";
|
|
847
|
+
readonly type: "boolean";
|
|
848
|
+
readonly required: false;
|
|
849
|
+
readonly example: "1";
|
|
850
|
+
readonly category: "misc";
|
|
851
|
+
}, {
|
|
852
|
+
readonly name: "AFK_SHOW_DIFFS";
|
|
853
|
+
readonly description: "Show inline diffs in the tool-lane output for edit/write tool calls. 1 = on, 0 = off.";
|
|
854
|
+
readonly type: "boolean";
|
|
855
|
+
readonly required: false;
|
|
856
|
+
readonly category: "misc";
|
|
857
|
+
}, {
|
|
858
|
+
readonly name: "AFK_SKILL_STREAM_VERBOSE";
|
|
859
|
+
readonly description: "Verbose streaming output when a skill is dispatched. Logs sub-agent setup, intermediate events, and final result.";
|
|
860
|
+
readonly type: "boolean";
|
|
861
|
+
readonly required: false;
|
|
862
|
+
readonly category: "debug";
|
|
863
|
+
}, {
|
|
864
|
+
readonly name: "FORCE_COLOR";
|
|
865
|
+
readonly description: "Standard Node convention. Force-enable ANSI color output even when stdout is not a TTY.";
|
|
866
|
+
readonly type: "string";
|
|
867
|
+
readonly required: false;
|
|
868
|
+
readonly example: "1";
|
|
869
|
+
readonly category: "process";
|
|
870
|
+
}, {
|
|
871
|
+
readonly name: "NO_COLOR";
|
|
872
|
+
readonly description: "Standard convention (https://no-color.org). When set to any non-empty value, disables ANSI color output.";
|
|
873
|
+
readonly type: "string";
|
|
874
|
+
readonly required: false;
|
|
875
|
+
readonly example: "1";
|
|
876
|
+
readonly category: "process";
|
|
877
|
+
}, {
|
|
878
|
+
readonly name: "AFK_THEME";
|
|
879
|
+
readonly description: string;
|
|
880
|
+
readonly type: "string";
|
|
881
|
+
readonly required: false;
|
|
882
|
+
readonly default: "dark";
|
|
883
|
+
readonly example: "light";
|
|
884
|
+
readonly category: "misc";
|
|
885
|
+
}, {
|
|
886
|
+
readonly name: "AFK_TEXT_MEASURE";
|
|
887
|
+
readonly description: string;
|
|
888
|
+
readonly type: "string";
|
|
889
|
+
readonly required: false;
|
|
890
|
+
readonly default: "100";
|
|
891
|
+
readonly example: "full";
|
|
892
|
+
readonly category: "misc";
|
|
893
|
+
}, {
|
|
894
|
+
readonly name: "COLORFGBG";
|
|
895
|
+
readonly description: string;
|
|
896
|
+
readonly type: "string";
|
|
897
|
+
readonly required: false;
|
|
898
|
+
readonly example: "15;0";
|
|
899
|
+
readonly category: "process";
|
|
900
|
+
}, {
|
|
901
|
+
readonly name: "COLORTERM";
|
|
902
|
+
readonly description: string;
|
|
903
|
+
readonly type: "string";
|
|
904
|
+
readonly required: false;
|
|
905
|
+
readonly example: "truecolor";
|
|
906
|
+
readonly category: "process";
|
|
907
|
+
}, {
|
|
908
|
+
readonly name: "AFK_DEBUG";
|
|
909
|
+
readonly description: "Enable verbose debug logging across the codebase. Accepts 1 to enable.";
|
|
910
|
+
readonly type: "boolean";
|
|
911
|
+
readonly required: false;
|
|
912
|
+
readonly example: "1";
|
|
913
|
+
readonly category: "debug";
|
|
914
|
+
}, {
|
|
915
|
+
readonly name: "AFK_DEBUG_CLIPBOARD";
|
|
916
|
+
readonly description: "Debug bracketed-paste and image-paste handling in the interactive REPL.";
|
|
917
|
+
readonly type: "boolean";
|
|
918
|
+
readonly required: false;
|
|
919
|
+
readonly category: "debug";
|
|
920
|
+
}, {
|
|
921
|
+
readonly name: "AFK_DEBUG_COMPOSITOR";
|
|
922
|
+
readonly description: "Gate compositor phase-boundary traces to stderr; any truthy value enables.";
|
|
923
|
+
readonly type: "boolean";
|
|
924
|
+
readonly required: false;
|
|
925
|
+
readonly category: "debug";
|
|
926
|
+
}, {
|
|
927
|
+
readonly name: "AFK_TRACE_DISABLED";
|
|
928
|
+
readonly description: "Disable the agent trace subsystem entirely. Set to 1 to skip trace file writes.";
|
|
929
|
+
readonly type: "boolean";
|
|
930
|
+
readonly required: false;
|
|
931
|
+
readonly example: "1";
|
|
932
|
+
readonly category: "debug";
|
|
933
|
+
}, {
|
|
934
|
+
readonly name: "AFK_WITNESS_RETENTION_DISABLE";
|
|
935
|
+
readonly description: "Disable the witness-tree retention sweep entirely, so no session directory is ever evicted.";
|
|
936
|
+
readonly type: "boolean";
|
|
937
|
+
readonly required: false;
|
|
938
|
+
readonly example: "1";
|
|
939
|
+
readonly category: "debug";
|
|
940
|
+
}, {
|
|
941
|
+
readonly name: "AFK_WITNESS_MAX_AGE_DAYS";
|
|
942
|
+
readonly description: "Evict a witness session directory once its newest content is older than this many days. Default 30.";
|
|
943
|
+
readonly type: "number";
|
|
944
|
+
readonly required: false;
|
|
945
|
+
readonly default: "30";
|
|
946
|
+
readonly category: "debug";
|
|
947
|
+
}, {
|
|
948
|
+
readonly name: "AFK_WITNESS_MAX_BYTES";
|
|
949
|
+
readonly description: "Aggregate byte cap for the witness tree; oldest session directories are evicted first once exceeded. Default 2147483648 (2 GiB).";
|
|
950
|
+
readonly type: "number";
|
|
951
|
+
readonly required: false;
|
|
952
|
+
readonly default: "2147483648";
|
|
953
|
+
readonly category: "debug";
|
|
954
|
+
}, {
|
|
955
|
+
readonly name: "AFK_SESSION_RETENTION_DISABLE";
|
|
956
|
+
readonly description: "Disable the session sidecar retention sweep entirely, so no state/sessions/*.json file is ever evicted.";
|
|
957
|
+
readonly type: "boolean";
|
|
958
|
+
readonly required: false;
|
|
959
|
+
readonly example: "1";
|
|
960
|
+
readonly category: "debug";
|
|
961
|
+
}, {
|
|
962
|
+
readonly name: "AFK_SESSION_MAX_AGE_DAYS";
|
|
963
|
+
readonly description: "Evict a session sidecar file once it is older than this many days (based on savedAt). Default 30.";
|
|
964
|
+
readonly type: "number";
|
|
965
|
+
readonly required: false;
|
|
966
|
+
readonly default: "30";
|
|
967
|
+
readonly category: "debug";
|
|
968
|
+
}, {
|
|
969
|
+
readonly name: "AFK_SESSION_MAX_COUNT";
|
|
970
|
+
readonly description: "Count-based safety valve: evict oldest session sidecars first once the total exceeds this number. Default 1000.";
|
|
971
|
+
readonly type: "number";
|
|
972
|
+
readonly required: false;
|
|
973
|
+
readonly default: "1000";
|
|
974
|
+
readonly category: "debug";
|
|
975
|
+
}, {
|
|
976
|
+
readonly name: "AFK_WAVE_MANIFEST_DISABLED";
|
|
977
|
+
readonly description: string;
|
|
978
|
+
readonly type: "boolean";
|
|
979
|
+
readonly required: false;
|
|
980
|
+
readonly default: "0";
|
|
981
|
+
readonly example: "1";
|
|
982
|
+
readonly category: "misc";
|
|
983
|
+
}, {
|
|
984
|
+
readonly name: "AFK_WAVE_MANIFEST_TTL_HOURS";
|
|
985
|
+
readonly description: string;
|
|
986
|
+
readonly type: "number";
|
|
987
|
+
readonly required: false;
|
|
988
|
+
readonly default: "48";
|
|
989
|
+
readonly example: "24";
|
|
990
|
+
readonly category: "misc";
|
|
991
|
+
}, {
|
|
992
|
+
readonly name: "AFK_WAVE_RESUME_UNATTENDED";
|
|
993
|
+
readonly description: string;
|
|
994
|
+
readonly type: "boolean";
|
|
995
|
+
readonly required: false;
|
|
996
|
+
readonly default: "0";
|
|
997
|
+
readonly example: "1";
|
|
998
|
+
readonly category: "misc";
|
|
999
|
+
}, {
|
|
1000
|
+
readonly name: "AFK_SESSION_LEDGER_DISABLED";
|
|
1001
|
+
readonly description: string;
|
|
1002
|
+
readonly type: "boolean";
|
|
1003
|
+
readonly required: false;
|
|
1004
|
+
readonly example: "1";
|
|
1005
|
+
readonly category: "debug";
|
|
1006
|
+
}, {
|
|
1007
|
+
readonly name: "AFK_RUN_RECEIPT_DISABLED";
|
|
1008
|
+
readonly description: string;
|
|
1009
|
+
readonly type: "boolean";
|
|
1010
|
+
readonly required: false;
|
|
1011
|
+
readonly example: "1";
|
|
1012
|
+
readonly category: "debug";
|
|
1013
|
+
}, {
|
|
1014
|
+
readonly name: "AFK_CAPTURE_SUBAGENT_PROMPTS";
|
|
1015
|
+
readonly description: string;
|
|
1016
|
+
readonly type: "boolean";
|
|
1017
|
+
readonly required: false;
|
|
1018
|
+
readonly example: "1";
|
|
1019
|
+
readonly category: "debug";
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly name: "AFK_CAPTURE_SUBAGENT_OUTPUT";
|
|
1022
|
+
readonly description: string;
|
|
1023
|
+
readonly type: "boolean";
|
|
1024
|
+
readonly required: false;
|
|
1025
|
+
readonly example: "1";
|
|
1026
|
+
readonly category: "debug";
|
|
1027
|
+
}, {
|
|
1028
|
+
readonly name: "AFK_SUBAGENT_LOG";
|
|
1029
|
+
readonly description: string;
|
|
1030
|
+
readonly type: "boolean";
|
|
1031
|
+
readonly required: false;
|
|
1032
|
+
readonly example: "1";
|
|
1033
|
+
readonly category: "debug";
|
|
1034
|
+
}, {
|
|
1035
|
+
readonly name: "DEBUG";
|
|
1036
|
+
readonly description: "Standard Node `debug`-package convention. When set to 1, enables verbose logging in several modules alongside AFK_DEBUG.";
|
|
1037
|
+
readonly type: "string";
|
|
1038
|
+
readonly required: false;
|
|
1039
|
+
readonly category: "debug";
|
|
1040
|
+
}, {
|
|
1041
|
+
readonly name: "AGENT_AFK_ASCII";
|
|
1042
|
+
readonly description: "Force the interactive REPL tool-lane renderer to ASCII-only glyphs instead of the default Unicode box-drawing set. Accepts 1/true/yes (case-insensitive). Useful for terminals whose font lacks ┃├╰├ glyphs.";
|
|
1043
|
+
readonly type: "boolean";
|
|
1044
|
+
readonly required: false;
|
|
1045
|
+
readonly example: "1";
|
|
1046
|
+
readonly category: "debug";
|
|
1047
|
+
}, {
|
|
1048
|
+
readonly name: "AGENT_SURFACE";
|
|
1049
|
+
readonly description: "Internal surface marker propagated to subprocesses. Identifies which AFK surface (cli, telegram, daemon) spawned the process.";
|
|
1050
|
+
readonly type: "string";
|
|
1051
|
+
readonly required: false;
|
|
1052
|
+
readonly example: "cli";
|
|
1053
|
+
readonly category: "process";
|
|
1054
|
+
}, {
|
|
1055
|
+
readonly name: "CI";
|
|
1056
|
+
readonly description: "Standard CI-detection convention. Auto-set by GitHub Actions, CircleCI, etc. Used to switch off TTY-only UX.";
|
|
1057
|
+
readonly type: "string";
|
|
1058
|
+
readonly required: false;
|
|
1059
|
+
readonly example: "true";
|
|
1060
|
+
readonly category: "process";
|
|
1061
|
+
}, {
|
|
1062
|
+
readonly name: "NODE_ENV";
|
|
1063
|
+
readonly description: "Standard Node environment marker. test | development | production. Used by routing-telemetry.ts to suppress test-time writes.";
|
|
1064
|
+
readonly type: "string";
|
|
1065
|
+
readonly required: false;
|
|
1066
|
+
readonly example: "production";
|
|
1067
|
+
readonly category: "process";
|
|
1068
|
+
}, {
|
|
1069
|
+
readonly name: "VITEST";
|
|
1070
|
+
readonly description: "Set automatically by Vitest. Used at runtime to short-circuit code paths that should not fire in tests.";
|
|
1071
|
+
readonly type: "string";
|
|
1072
|
+
readonly required: false;
|
|
1073
|
+
readonly category: "process";
|
|
1074
|
+
}, {
|
|
1075
|
+
readonly name: "NO_UPDATE_NOTIFIER";
|
|
1076
|
+
readonly description: "Disable the update-available notifier on CLI startup. Standard convention shared with many Node CLIs.";
|
|
1077
|
+
readonly type: "boolean";
|
|
1078
|
+
readonly required: false;
|
|
1079
|
+
readonly category: "process";
|
|
1080
|
+
}, {
|
|
1081
|
+
readonly name: "AFK_BROWSER_HEADLESS";
|
|
1082
|
+
readonly description: string;
|
|
1083
|
+
readonly type: "boolean";
|
|
1084
|
+
readonly required: false;
|
|
1085
|
+
readonly example: "1";
|
|
1086
|
+
readonly category: "browser";
|
|
1087
|
+
}, {
|
|
1088
|
+
readonly name: "AFK_BROWSER_ALLOWED_DOMAINS";
|
|
1089
|
+
readonly description: string;
|
|
1090
|
+
readonly type: "string";
|
|
1091
|
+
readonly required: false;
|
|
1092
|
+
readonly example: "github.com,*.atlassian.net";
|
|
1093
|
+
readonly category: "browser";
|
|
1094
|
+
}, {
|
|
1095
|
+
readonly name: "AFK_BROWSER_BLOCKED_DOMAINS";
|
|
1096
|
+
readonly description: string;
|
|
1097
|
+
readonly type: "string";
|
|
1098
|
+
readonly required: false;
|
|
1099
|
+
readonly example: "*.ads.example.com";
|
|
1100
|
+
readonly category: "browser";
|
|
1101
|
+
}, {
|
|
1102
|
+
readonly name: "AFK_BROWSER_DOM_SNAPSHOTS";
|
|
1103
|
+
readonly description: string;
|
|
1104
|
+
readonly type: "boolean";
|
|
1105
|
+
readonly required: false;
|
|
1106
|
+
readonly example: "1";
|
|
1107
|
+
readonly category: "browser";
|
|
1108
|
+
}, {
|
|
1109
|
+
readonly name: "AFK_BROWSER_BACKEND";
|
|
1110
|
+
readonly description: string;
|
|
1111
|
+
readonly type: "string";
|
|
1112
|
+
readonly required: false;
|
|
1113
|
+
readonly default: "auto";
|
|
1114
|
+
readonly example: "agent-browser";
|
|
1115
|
+
readonly category: "browser";
|
|
1116
|
+
}, {
|
|
1117
|
+
readonly name: "AFK_BROWSER_CONFIG";
|
|
1118
|
+
readonly description: string;
|
|
1119
|
+
readonly type: "string";
|
|
1120
|
+
readonly required: false;
|
|
1121
|
+
readonly example: "/path/to/browser.json";
|
|
1122
|
+
readonly category: "browser";
|
|
1123
|
+
}, {
|
|
1124
|
+
readonly name: "AFK_BROWSER_DEFAULT_PROFILE";
|
|
1125
|
+
readonly description: string;
|
|
1126
|
+
readonly type: "string";
|
|
1127
|
+
readonly required: false;
|
|
1128
|
+
readonly example: "work";
|
|
1129
|
+
readonly category: "browser";
|
|
1130
|
+
}, {
|
|
1131
|
+
readonly name: "AFK_WRITE_DENYLIST";
|
|
1132
|
+
readonly description: "Comma-separated list of additional path globs that the write_file tool refuses to write to.";
|
|
1133
|
+
readonly type: "string";
|
|
1134
|
+
readonly required: false;
|
|
1135
|
+
readonly example: "**/.env,**/secrets/**";
|
|
1136
|
+
readonly category: "misc";
|
|
1137
|
+
}, {
|
|
1138
|
+
readonly name: "AFK_READ_DENYLIST";
|
|
1139
|
+
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.";
|
|
1140
|
+
readonly type: "string";
|
|
1141
|
+
readonly required: false;
|
|
1142
|
+
readonly example: "/Users/me/project/.env:/Users/me/secrets";
|
|
1143
|
+
readonly category: "misc";
|
|
1144
|
+
}, {
|
|
1145
|
+
readonly name: "AFK_WRITE_DIFF";
|
|
1146
|
+
readonly description: "Show a diff preview before each write_file tool call. Defaults provider-controlled when unset.";
|
|
1147
|
+
readonly type: "boolean";
|
|
1148
|
+
readonly required: false;
|
|
1149
|
+
readonly category: "misc";
|
|
1150
|
+
}, {
|
|
1151
|
+
readonly name: "AFK_RATE_LIMIT_ADMISSION_DISABLED";
|
|
1152
|
+
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.";
|
|
1153
|
+
readonly type: "boolean";
|
|
1154
|
+
readonly required: false;
|
|
1155
|
+
readonly default: "0";
|
|
1156
|
+
readonly example: "1";
|
|
1157
|
+
readonly category: "model";
|
|
1158
|
+
}, {
|
|
1159
|
+
readonly name: "AFK_RATE_LIMIT_STAGGER_MAX_MS";
|
|
1160
|
+
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.";
|
|
1161
|
+
readonly type: "number";
|
|
1162
|
+
readonly required: false;
|
|
1163
|
+
readonly default: "500";
|
|
1164
|
+
readonly example: "0";
|
|
1165
|
+
readonly category: "model";
|
|
1166
|
+
}, {
|
|
1167
|
+
readonly name: "AFK_WEB_ALLOW_PRIVATE_HOSTS";
|
|
1168
|
+
readonly description: string;
|
|
1169
|
+
readonly type: "boolean";
|
|
1170
|
+
readonly required: false;
|
|
1171
|
+
readonly example: "1";
|
|
1172
|
+
readonly category: "misc";
|
|
1173
|
+
}, {
|
|
1174
|
+
readonly name: "AFK_DEMO_CLEAN";
|
|
1175
|
+
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.";
|
|
1176
|
+
readonly type: "boolean";
|
|
1177
|
+
readonly required: false;
|
|
1178
|
+
readonly example: "1";
|
|
1179
|
+
readonly category: "misc";
|
|
1180
|
+
}, {
|
|
1181
|
+
readonly name: "SCRIPT";
|
|
1182
|
+
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.";
|
|
1183
|
+
readonly type: "string";
|
|
1184
|
+
readonly required: false;
|
|
1185
|
+
readonly example: "/tmp/typescript";
|
|
1186
|
+
readonly category: "process";
|
|
1187
|
+
}, {
|
|
1188
|
+
readonly name: "ASCIINEMA_REC";
|
|
1189
|
+
readonly description: "Set to 1 by asciinema rec while a session is being recorded. Triggers capture-mode.";
|
|
1190
|
+
readonly type: "boolean";
|
|
1191
|
+
readonly required: false;
|
|
1192
|
+
readonly example: "1";
|
|
1193
|
+
readonly category: "process";
|
|
1194
|
+
}, {
|
|
1195
|
+
readonly name: "AFK_SESSION_ID";
|
|
1196
|
+
readonly description: string;
|
|
1197
|
+
readonly type: "string";
|
|
1198
|
+
readonly required: false;
|
|
1199
|
+
readonly default: "default";
|
|
1200
|
+
readonly example: "session-abc123";
|
|
1201
|
+
readonly category: "browser";
|
|
1202
|
+
}, {
|
|
1203
|
+
readonly name: "SHELL";
|
|
1204
|
+
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.";
|
|
1205
|
+
readonly type: "string";
|
|
1206
|
+
readonly required: false;
|
|
1207
|
+
readonly example: "/bin/zsh";
|
|
1208
|
+
readonly category: "process";
|
|
1209
|
+
}, {
|
|
1210
|
+
readonly name: "PAGER";
|
|
1211
|
+
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.";
|
|
1212
|
+
readonly type: "string";
|
|
1213
|
+
readonly required: false;
|
|
1214
|
+
readonly example: "less -R";
|
|
1215
|
+
readonly category: "process";
|
|
1216
|
+
}, {
|
|
1217
|
+
readonly name: "VISUAL";
|
|
1218
|
+
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.";
|
|
1219
|
+
readonly type: "string";
|
|
1220
|
+
readonly required: false;
|
|
1221
|
+
readonly example: "nvim";
|
|
1222
|
+
readonly category: "process";
|
|
1223
|
+
}, {
|
|
1224
|
+
readonly name: "EDITOR";
|
|
1225
|
+
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.";
|
|
1226
|
+
readonly type: "string";
|
|
1227
|
+
readonly required: false;
|
|
1228
|
+
readonly example: "vim";
|
|
1229
|
+
readonly category: "process";
|
|
1230
|
+
}, {
|
|
1231
|
+
readonly name: "AFK_DIFF_LINES";
|
|
1232
|
+
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.";
|
|
1233
|
+
readonly type: "number";
|
|
1234
|
+
readonly required: false;
|
|
1235
|
+
readonly example: "50";
|
|
1236
|
+
readonly category: "misc";
|
|
1237
|
+
}, {
|
|
1238
|
+
readonly name: "AFK_SHELL_WRAPPER";
|
|
1239
|
+
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.";
|
|
1240
|
+
readonly type: "boolean";
|
|
1241
|
+
readonly required: false;
|
|
1242
|
+
readonly example: "1";
|
|
1243
|
+
readonly category: "process";
|
|
1244
|
+
}, {
|
|
1245
|
+
readonly name: "AFK_USER_CARD_MAX_ROWS";
|
|
1246
|
+
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.";
|
|
1247
|
+
readonly type: "number";
|
|
1248
|
+
readonly required: false;
|
|
1249
|
+
readonly example: "24";
|
|
1250
|
+
readonly category: "misc";
|
|
1251
|
+
}, {
|
|
1252
|
+
readonly name: "AFK_LEASE_TTL_MS";
|
|
1253
|
+
readonly description: string;
|
|
1254
|
+
readonly type: "number";
|
|
1255
|
+
readonly required: false;
|
|
1256
|
+
readonly example: "600000";
|
|
1257
|
+
readonly category: "misc";
|
|
1258
|
+
}];
|
|
1259
|
+
export type EnvObject = {
|
|
1260
|
+
readonly [K in (typeof ENV_REGISTRY)[number]['name']]: string | undefined;
|
|
192
1261
|
};
|
|
1262
|
+
export declare const env: EnvObject;
|
|
193
1263
|
export declare function isPlainOutputRequested(): boolean;
|
|
194
|
-
export type EnvVarName = keyof
|
|
1264
|
+
export type EnvVarName = keyof EnvObject;
|
|
195
1265
|
export { getEnvVarMeta, getMissingRequiredEnvVars, isEnvVarSet, getEnvVarValue, } from './env-helpers.js';
|