agent-afk 5.332.0 → 5.334.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/daemon.read-body.d.ts +2 -0
- package/dist/agent/memory/estimate-tokens.d.ts +1 -0
- package/dist/agent/memory/index.d.ts +2 -1
- package/dist/agent/memory/memory-store.d.ts +2 -1
- package/dist/agent/outcomes/combine-v2.d.ts +1 -0
- package/dist/agent/outcomes/relabel-job.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query/auth-retry-tier.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/complete-wire.d.ts +0 -1
- package/dist/agent/session/accounting-accumulator.d.ts +4 -0
- package/dist/agent/session/model-slots.d.ts +4 -4
- package/dist/agent/session/model-slots.hints.d.ts +1 -1
- package/dist/agent/session/model-slots.output-override.d.ts +1 -0
- package/dist/cli/_lib/stream-renderer-contexts.d.ts +2 -0
- package/dist/cli/_lib/stream-renderer-lifecycle.d.ts +2 -0
- package/dist/cli/_lib/stream-renderer-options.d.ts +2 -0
- package/dist/cli/_lib/stream-renderer-process.d.ts +2 -0
- package/dist/cli/_lib/stream-renderer-source.d.ts +1 -0
- package/dist/cli/_lib/stream-renderer-subagent.d.ts +2 -0
- package/dist/cli/_lib/stream-renderer.d.ts +1 -0
- package/dist/cli/commands/interactive/shared.d.ts +1 -0
- package/dist/cli/commands/interactive/tool-lane.d.ts +2 -0
- package/dist/cli/commands/interactive/tool-lane.queries.d.ts +1 -0
- package/dist/cli/config/afk-md-tier.d.ts +6 -0
- package/dist/cli/config/types.d.ts +1 -0
- package/dist/cli/slash/commands/afk-md/targets.d.ts +1 -1
- package/dist/cli.mjs +426 -422
- package/dist/config/env.d.ts +49 -28
- package/dist/config/env.model-tiers.d.ts +19 -28
- package/dist/config/env.model-tiers.suggest.d.ts +31 -0
- package/dist/improve/eval-run/contracts.d.ts +1 -0
- package/dist/index.mjs +368 -364
- package/dist/telegram.mjs +381 -377
- package/package.json +1 -1
package/dist/config/env.d.ts
CHANGED
|
@@ -386,49 +386,40 @@ export declare const ENV_REGISTRY: readonly [{
|
|
|
386
386
|
readonly example: "http://localhost:8080/v1";
|
|
387
387
|
readonly category: "model";
|
|
388
388
|
}, {
|
|
389
|
-
readonly name: "
|
|
390
|
-
readonly description: "
|
|
391
|
-
readonly type: "number";
|
|
392
|
-
readonly required: false;
|
|
393
|
-
readonly example: "600000";
|
|
394
|
-
readonly category: "model";
|
|
395
|
-
}, {
|
|
396
|
-
readonly name: "AFK_PROMPT_CACHE_TTL";
|
|
397
|
-
readonly description: "TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.";
|
|
389
|
+
readonly name: "AFK_MODEL_SUBAGENT";
|
|
390
|
+
readonly description: "Bind the \"subagent\" routing slot to a model id/alias. When set, all dispatched subagents (agent/skill/compose forks without an explicit model) use this model instead of the medium tier. Use with AFK_MODEL_SUBAGENT_BASE_URL to route subagent inference to a different provider (Together, Fireworks, Groq, or self-hosted vLLM/SGLang). Overrides afk.config.json models.subagent.";
|
|
398
391
|
readonly type: "string";
|
|
399
392
|
readonly required: false;
|
|
400
|
-
readonly
|
|
401
|
-
readonly example: "1h";
|
|
393
|
+
readonly example: "Qwen/Qwen3-32B";
|
|
402
394
|
readonly category: "model";
|
|
403
395
|
}, {
|
|
404
|
-
readonly name: "
|
|
405
|
-
readonly description: "
|
|
406
|
-
readonly type: "
|
|
396
|
+
readonly name: "AFK_MODEL_SUBAGENT_API_KEY";
|
|
397
|
+
readonly description: "Per-slot API key for the \"subagent\" routing slot. Overrides global credentials for subagent forks only.";
|
|
398
|
+
readonly type: "string";
|
|
407
399
|
readonly required: false;
|
|
408
|
-
readonly default: "1";
|
|
409
|
-
readonly example: "0";
|
|
410
400
|
readonly category: "model";
|
|
401
|
+
readonly secret: true;
|
|
411
402
|
}, {
|
|
412
|
-
readonly name: "
|
|
413
|
-
readonly description: "
|
|
414
|
-
readonly type: "
|
|
403
|
+
readonly name: "AFK_MODEL_SUBAGENT_BASE_URL";
|
|
404
|
+
readonly description: "Per-slot endpoint base URL for the \"subagent\" routing slot. Point at Together (https://api.together.xyz/v1), Fireworks, Groq, or a self-hosted vLLM/SGLang endpoint to route subagent inference off Anthropic.";
|
|
405
|
+
readonly type: "string";
|
|
415
406
|
readonly required: false;
|
|
416
|
-
readonly
|
|
417
|
-
readonly example: "0";
|
|
407
|
+
readonly example: "https://api.together.xyz/v1";
|
|
418
408
|
readonly category: "model";
|
|
419
409
|
}, {
|
|
420
|
-
readonly name: "
|
|
421
|
-
readonly description: "
|
|
422
|
-
readonly type: "
|
|
410
|
+
readonly name: "AFK_OVERLOAD_PAUSE_MS";
|
|
411
|
+
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.";
|
|
412
|
+
readonly type: "number";
|
|
423
413
|
readonly required: false;
|
|
424
|
-
readonly
|
|
425
|
-
readonly example: "0";
|
|
414
|
+
readonly example: "600000";
|
|
426
415
|
readonly category: "model";
|
|
427
416
|
}, {
|
|
428
|
-
readonly name: "
|
|
429
|
-
readonly description: "
|
|
417
|
+
readonly name: "AFK_PROMPT_CACHE_TTL";
|
|
418
|
+
readonly description: "TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.";
|
|
430
419
|
readonly type: "string";
|
|
431
420
|
readonly required: false;
|
|
421
|
+
readonly default: "1h";
|
|
422
|
+
readonly example: "1h";
|
|
432
423
|
readonly category: "model";
|
|
433
424
|
}, {
|
|
434
425
|
readonly name: "AFK_TASK_BUDGET";
|
|
@@ -483,6 +474,36 @@ export declare const ENV_REGISTRY: readonly [{
|
|
|
483
474
|
readonly required: false;
|
|
484
475
|
readonly example: "sonnet";
|
|
485
476
|
readonly category: "model";
|
|
477
|
+
}, {
|
|
478
|
+
readonly name: "AFK_SUGGEST_ENABLED";
|
|
479
|
+
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.";
|
|
480
|
+
readonly type: "boolean";
|
|
481
|
+
readonly required: false;
|
|
482
|
+
readonly default: "1";
|
|
483
|
+
readonly example: "0";
|
|
484
|
+
readonly category: "model";
|
|
485
|
+
}, {
|
|
486
|
+
readonly name: "AFK_SUGGEST_PROMPT";
|
|
487
|
+
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).";
|
|
488
|
+
readonly type: "boolean";
|
|
489
|
+
readonly required: false;
|
|
490
|
+
readonly default: "1";
|
|
491
|
+
readonly example: "0";
|
|
492
|
+
readonly category: "model";
|
|
493
|
+
}, {
|
|
494
|
+
readonly name: "AFK_SUGGEST_GHOST";
|
|
495
|
+
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.";
|
|
496
|
+
readonly type: "boolean";
|
|
497
|
+
readonly required: false;
|
|
498
|
+
readonly default: "1";
|
|
499
|
+
readonly example: "0";
|
|
500
|
+
readonly category: "model";
|
|
501
|
+
}, {
|
|
502
|
+
readonly name: "AFK_SUGGEST_MODEL";
|
|
503
|
+
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.";
|
|
504
|
+
readonly type: "string";
|
|
505
|
+
readonly required: false;
|
|
506
|
+
readonly category: "model";
|
|
486
507
|
}, {
|
|
487
508
|
readonly name: "AFK_MEMORY_GC_SWEEP_ENABLE";
|
|
488
509
|
readonly description: string;
|
|
@@ -138,49 +138,40 @@ export declare const MODEL_TIERS_ENV_REGISTRY: readonly [{
|
|
|
138
138
|
readonly example: "http://localhost:8080/v1";
|
|
139
139
|
readonly category: "model";
|
|
140
140
|
}, {
|
|
141
|
-
readonly name: "
|
|
142
|
-
readonly description: "
|
|
143
|
-
readonly type: "number";
|
|
144
|
-
readonly required: false;
|
|
145
|
-
readonly example: "600000";
|
|
146
|
-
readonly category: "model";
|
|
147
|
-
}, {
|
|
148
|
-
readonly name: "AFK_PROMPT_CACHE_TTL";
|
|
149
|
-
readonly description: "TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.";
|
|
141
|
+
readonly name: "AFK_MODEL_SUBAGENT";
|
|
142
|
+
readonly description: "Bind the \"subagent\" routing slot to a model id/alias. When set, all dispatched subagents (agent/skill/compose forks without an explicit model) use this model instead of the medium tier. Use with AFK_MODEL_SUBAGENT_BASE_URL to route subagent inference to a different provider (Together, Fireworks, Groq, or self-hosted vLLM/SGLang). Overrides afk.config.json models.subagent.";
|
|
150
143
|
readonly type: "string";
|
|
151
144
|
readonly required: false;
|
|
152
|
-
readonly
|
|
153
|
-
readonly example: "1h";
|
|
145
|
+
readonly example: "Qwen/Qwen3-32B";
|
|
154
146
|
readonly category: "model";
|
|
155
147
|
}, {
|
|
156
|
-
readonly name: "
|
|
157
|
-
readonly description: "
|
|
158
|
-
readonly type: "
|
|
148
|
+
readonly name: "AFK_MODEL_SUBAGENT_API_KEY";
|
|
149
|
+
readonly description: "Per-slot API key for the \"subagent\" routing slot. Overrides global credentials for subagent forks only.";
|
|
150
|
+
readonly type: "string";
|
|
159
151
|
readonly required: false;
|
|
160
|
-
readonly default: "1";
|
|
161
|
-
readonly example: "0";
|
|
162
152
|
readonly category: "model";
|
|
153
|
+
readonly secret: true;
|
|
163
154
|
}, {
|
|
164
|
-
readonly name: "
|
|
165
|
-
readonly description: "
|
|
166
|
-
readonly type: "
|
|
155
|
+
readonly name: "AFK_MODEL_SUBAGENT_BASE_URL";
|
|
156
|
+
readonly description: "Per-slot endpoint base URL for the \"subagent\" routing slot. Point at Together (https://api.together.xyz/v1), Fireworks, Groq, or a self-hosted vLLM/SGLang endpoint to route subagent inference off Anthropic.";
|
|
157
|
+
readonly type: "string";
|
|
167
158
|
readonly required: false;
|
|
168
|
-
readonly
|
|
169
|
-
readonly example: "0";
|
|
159
|
+
readonly example: "https://api.together.xyz/v1";
|
|
170
160
|
readonly category: "model";
|
|
171
161
|
}, {
|
|
172
|
-
readonly name: "
|
|
173
|
-
readonly description: "
|
|
174
|
-
readonly type: "
|
|
162
|
+
readonly name: "AFK_OVERLOAD_PAUSE_MS";
|
|
163
|
+
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.";
|
|
164
|
+
readonly type: "number";
|
|
175
165
|
readonly required: false;
|
|
176
|
-
readonly
|
|
177
|
-
readonly example: "0";
|
|
166
|
+
readonly example: "600000";
|
|
178
167
|
readonly category: "model";
|
|
179
168
|
}, {
|
|
180
|
-
readonly name: "
|
|
181
|
-
readonly description: "
|
|
169
|
+
readonly name: "AFK_PROMPT_CACHE_TTL";
|
|
170
|
+
readonly description: "TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.";
|
|
182
171
|
readonly type: "string";
|
|
183
172
|
readonly required: false;
|
|
173
|
+
readonly default: "1h";
|
|
174
|
+
readonly example: "1h";
|
|
184
175
|
readonly category: "model";
|
|
185
176
|
}, {
|
|
186
177
|
readonly name: "AFK_TASK_BUDGET";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const SUGGEST_ENV_REGISTRY: readonly [{
|
|
2
|
+
readonly name: "AFK_SUGGEST_ENABLED";
|
|
3
|
+
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.";
|
|
4
|
+
readonly type: "boolean";
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly default: "1";
|
|
7
|
+
readonly example: "0";
|
|
8
|
+
readonly category: "model";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "AFK_SUGGEST_PROMPT";
|
|
11
|
+
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).";
|
|
12
|
+
readonly type: "boolean";
|
|
13
|
+
readonly required: false;
|
|
14
|
+
readonly default: "1";
|
|
15
|
+
readonly example: "0";
|
|
16
|
+
readonly category: "model";
|
|
17
|
+
}, {
|
|
18
|
+
readonly name: "AFK_SUGGEST_GHOST";
|
|
19
|
+
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.";
|
|
20
|
+
readonly type: "boolean";
|
|
21
|
+
readonly required: false;
|
|
22
|
+
readonly default: "1";
|
|
23
|
+
readonly example: "0";
|
|
24
|
+
readonly category: "model";
|
|
25
|
+
}, {
|
|
26
|
+
readonly name: "AFK_SUGGEST_MODEL";
|
|
27
|
+
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.";
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly required: false;
|
|
30
|
+
readonly category: "model";
|
|
31
|
+
}];
|
|
@@ -3,6 +3,7 @@ import { type EvalContract } from './contracts.types.js';
|
|
|
3
3
|
export type { ContractProbeResult, EvalContract } from './contracts.types.js';
|
|
4
4
|
export { makeCheck, snapshot } from './contracts.types.js';
|
|
5
5
|
export { buildToolFailureClassificationCorpus } from './contracts.tfd.js';
|
|
6
|
+
export { buildSubagentBlockCorpus } from './contracts.sab.js';
|
|
6
7
|
export declare function resolveContract(patternId: FailurePattern): EvalContract | undefined;
|
|
7
8
|
export declare function supportedContractPatterns(): readonly FailurePattern[];
|
|
8
9
|
export declare function knownContractIds(): readonly string[];
|