agent-afk 5.290.4 → 5.291.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/types.d.ts +4 -0
- package/dist/agent/daemon/budget-gate.d.ts +31 -0
- package/dist/agent/daemon/gates.d.ts +1 -1
- package/dist/agent/daemon/scheduler.d.ts +2 -0
- package/dist/agent/daemon/scheduler.overlap-guard.d.ts +2 -0
- package/dist/agent/daemon/tool-health-task.d.ts +17 -0
- package/dist/agent/daemon/triggers.d.ts +1 -1
- package/dist/agent/facets/schema.d.ts +10 -2
- package/dist/agent/outcomes/schema.d.ts +1 -1
- package/dist/agent/peer/admission-queue.d.ts +39 -0
- package/dist/agent/peer/inbox-store.d.ts +2 -0
- package/dist/agent/provider.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/auth.d.ts +2 -1
- package/dist/agent/providers/anthropic-direct/beta-headers.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/input-transformations.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/loop/round-request.d.ts +1 -1
- package/dist/agent/providers/anthropic-direct/query/turn-request.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/query-options.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/query-runtime.d.ts +3 -0
- package/dist/agent/providers/anthropic-direct/query-turn-driver.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/request-types.d.ts +8 -1
- package/dist/agent/providers/anthropic-direct/resolve-params.d.ts +4 -1
- package/dist/agent/providers/openai-compatible/complete-wire.d.ts +11 -0
- package/dist/agent/providers/openai-compatible/oneshot.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/client.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/query/overload-pause-tier.d.ts +1 -0
- package/dist/agent/providers/router/provider-router.d.ts +2 -0
- package/dist/agent/providers/router/provider-router.switch.d.ts +4 -0
- package/dist/agent/providers/shared/compaction.d.ts +4 -0
- package/dist/agent/providers/shared/rate-limit-bucket.d.ts +18 -0
- package/dist/agent/providers/shared/rate-limit-bucket.registry.d.ts +3 -0
- package/dist/agent/providers/shared/transient-retry.d.ts +18 -0
- package/dist/agent/providers/shared/transient-retry.trace.d.ts +3 -0
- package/dist/agent/session/model-slots.d.ts +1 -0
- package/dist/agent/state/state-store.d.ts +1 -0
- package/dist/agent/subagent/usage-limit-park-policy.d.ts +3 -0
- package/dist/agent/tools/dispatcher.batch-process.d.ts +4 -0
- package/dist/agent/tools/dispatcher.d.ts +1 -0
- package/dist/agent/tools/dispatcher.execute-batch.d.ts +2 -0
- package/dist/agent/tools/handlers/worktree-managed.d.ts +1 -0
- package/dist/agent/tools/tool-health-monitor.d.ts +26 -0
- package/dist/agent/tools/usage-notice.d.ts +8 -0
- package/dist/agent/trace/events.d.ts +13 -0
- package/dist/agent/trace/events.session-phase.d.ts +4 -0
- package/dist/agent/trace/types.d.ts +3 -13
- package/dist/agent/trace/types.session-phase.d.ts +12 -0
- package/dist/agent/types/session-types.d.ts +1 -0
- package/dist/agent/usage/codex-usage.d.ts +12 -0
- package/dist/agent/usage/usage-budget.d.ts +24 -0
- package/dist/agent/usage/usage-formatter.d.ts +52 -0
- package/dist/agent/usage/usage-http.d.ts +11 -0
- package/dist/agent/usage/usage-ledger.d.ts +13 -0
- package/dist/agent/usage/usage-record.d.ts +37 -0
- package/dist/agent/usage/usage-snapshot.d.ts +21 -0
- package/dist/cli/commands/daemon-builtin-tasks.d.ts +15 -0
- package/dist/cli/commands/interactive/interactive.cleanup.d.ts +6 -1
- package/dist/cli/commands/interactive/loop-iteration.boundary.d.ts +36 -0
- package/dist/cli/commands/interactive/peer-inbox-notifier.d.ts +11 -1
- package/dist/cli/commands/interactive/shared.d.ts +4 -1
- package/dist/cli/commands/interactive/surface-setup.suggest-config.d.ts +0 -1
- package/dist/cli/commands/usage.d.ts +9 -0
- package/dist/cli/config/json-tier-parse.daemon.d.ts +2 -0
- package/dist/cli/config/types.d.ts +8 -0
- package/dist/cli/constants.d.ts +0 -2
- package/dist/cli/input/suggest-credential.d.ts +10 -0
- package/dist/cli/input/suggest-types.d.ts +2 -1
- package/dist/cli/session-store.d.ts +6 -1
- package/dist/cli/tool-category.d.ts +1 -0
- package/dist/cli.mjs +491 -474
- package/dist/config/env.d.ts +38 -0
- package/dist/config/env.daemon.d.ts +22 -0
- package/dist/config/env.misc.d.ts +8 -0
- package/dist/config/env.model-tiers.d.ts +8 -0
- package/dist/index.mjs +216 -208
- package/dist/paths.daemon.d.ts +1 -0
- package/dist/telegram.mjs +189 -180
- package/dist/web-ui-assets/assets/{index-MIgeDul2.js → index-BtgJsRFJ.js} +1 -1
- package/dist/web-ui-assets/assets/index-gg5vv6YH.js +380 -0
- package/dist/web-ui-assets/index.html +1 -1
- package/package.json +2 -3
- package/dist/web-ui-assets/assets/index-CpbGrtNj.js +0 -380
package/dist/config/env.d.ts
CHANGED
|
@@ -241,6 +241,14 @@ export declare const ENV_REGISTRY: readonly [{
|
|
|
241
241
|
readonly default: "2700000";
|
|
242
242
|
readonly example: "3600000";
|
|
243
243
|
readonly category: "model";
|
|
244
|
+
}, {
|
|
245
|
+
readonly name: "AFK_SUBAGENT_AUTO_RESUME_ON_USAGE_LIMIT";
|
|
246
|
+
readonly description: string;
|
|
247
|
+
readonly type: "boolean";
|
|
248
|
+
readonly required: false;
|
|
249
|
+
readonly default: "0";
|
|
250
|
+
readonly example: "1";
|
|
251
|
+
readonly category: "model";
|
|
244
252
|
}, {
|
|
245
253
|
readonly name: "AFK_SUBAGENT_IDLE_TIMEOUT_MS";
|
|
246
254
|
readonly description: string;
|
|
@@ -759,6 +767,22 @@ export declare const ENV_REGISTRY: readonly [{
|
|
|
759
767
|
readonly type: "string";
|
|
760
768
|
readonly required: false;
|
|
761
769
|
readonly category: "process";
|
|
770
|
+
}, {
|
|
771
|
+
readonly name: "AFK_DAEMON_BUDGET_GATE_DISABLED";
|
|
772
|
+
readonly description: "Set to 1 to disable the subscription-usage budget gate for daemon/cron agent tasks. When unset (default) the daemon checks Claude subscription utilization before starting each agent task and skips the run if any window is at or above AFK_DAEMON_BUDGET_SKIP_PCT. Shell and builtin tasks are never gated regardless of this setting.";
|
|
773
|
+
readonly type: "boolean";
|
|
774
|
+
readonly required: false;
|
|
775
|
+
readonly default: "0";
|
|
776
|
+
readonly example: "1";
|
|
777
|
+
readonly category: "daemon";
|
|
778
|
+
}, {
|
|
779
|
+
readonly name: "AFK_DAEMON_BUDGET_SKIP_PCT";
|
|
780
|
+
readonly description: "Subscription-usage skip threshold (0–100 integer) for the daemon budget gate. When any Claude subscription window's utilization is at or above this percentage, scheduled agent tasks are skipped with a Telegram notice. Default 90 (90%). Set to 100 to disable the gate entirely (no usage fetch is made and every task passes). Requires AFK_DAEMON_BUDGET_GATE_DISABLED=0 (default).";
|
|
781
|
+
readonly type: "number";
|
|
782
|
+
readonly required: false;
|
|
783
|
+
readonly default: "90";
|
|
784
|
+
readonly example: "80";
|
|
785
|
+
readonly category: "daemon";
|
|
762
786
|
}, {
|
|
763
787
|
readonly name: "AFK_DAEMON_CWD";
|
|
764
788
|
readonly description: "Working directory used by the daemon process for spawned agent sessions.";
|
|
@@ -795,6 +819,12 @@ export declare const ENV_REGISTRY: readonly [{
|
|
|
795
819
|
readonly type: "number";
|
|
796
820
|
readonly required: false;
|
|
797
821
|
readonly category: "daemon";
|
|
822
|
+
}, {
|
|
823
|
+
readonly name: "AFK_TOOL_HEALTH_DISABLE";
|
|
824
|
+
readonly description: "Disable the tool-health daemon builtin entirely. Set to \"1\" to skip registration.";
|
|
825
|
+
readonly type: "boolean";
|
|
826
|
+
readonly required: false;
|
|
827
|
+
readonly category: "daemon";
|
|
798
828
|
}, {
|
|
799
829
|
readonly name: "AFK_WEB_PORT";
|
|
800
830
|
readonly description: "Port for the `afk web` browser surface. Defaults to 4141; falls back to an ephemeral port when taken. Overridden by --port.";
|
|
@@ -1372,6 +1402,14 @@ export declare const ENV_REGISTRY: readonly [{
|
|
|
1372
1402
|
readonly default: "0";
|
|
1373
1403
|
readonly example: "1";
|
|
1374
1404
|
readonly category: "model";
|
|
1405
|
+
}, {
|
|
1406
|
+
readonly name: "AFK_USAGE_LEDGER_DISABLED";
|
|
1407
|
+
readonly description: "Set to 1 to stop publishing/reading the cross-process usage ledger (namespace `usage` in state/kv/kv.db). Usage surfaces (`afk usage`, get_runtime_state, fan-out notice, daemon budget gate) then see only this process's in-memory quota cache. Default 0 (ledger active).";
|
|
1408
|
+
readonly type: "boolean";
|
|
1409
|
+
readonly required: false;
|
|
1410
|
+
readonly default: "0";
|
|
1411
|
+
readonly example: "1";
|
|
1412
|
+
readonly category: "model";
|
|
1375
1413
|
}, {
|
|
1376
1414
|
readonly name: "AFK_RATE_LIMIT_STAGGER_MAX_MS";
|
|
1377
1415
|
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.";
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
export declare const DAEMON_ENV_REGISTRY: readonly [{
|
|
2
|
+
readonly name: "AFK_DAEMON_BUDGET_GATE_DISABLED";
|
|
3
|
+
readonly description: "Set to 1 to disable the subscription-usage budget gate for daemon/cron agent tasks. When unset (default) the daemon checks Claude subscription utilization before starting each agent task and skips the run if any window is at or above AFK_DAEMON_BUDGET_SKIP_PCT. Shell and builtin tasks are never gated regardless of this setting.";
|
|
4
|
+
readonly type: "boolean";
|
|
5
|
+
readonly required: false;
|
|
6
|
+
readonly default: "0";
|
|
7
|
+
readonly example: "1";
|
|
8
|
+
readonly category: "daemon";
|
|
9
|
+
}, {
|
|
10
|
+
readonly name: "AFK_DAEMON_BUDGET_SKIP_PCT";
|
|
11
|
+
readonly description: "Subscription-usage skip threshold (0–100 integer) for the daemon budget gate. When any Claude subscription window's utilization is at or above this percentage, scheduled agent tasks are skipped with a Telegram notice. Default 90 (90%). Set to 100 to disable the gate entirely (no usage fetch is made and every task passes). Requires AFK_DAEMON_BUDGET_GATE_DISABLED=0 (default).";
|
|
12
|
+
readonly type: "number";
|
|
13
|
+
readonly required: false;
|
|
14
|
+
readonly default: "90";
|
|
15
|
+
readonly example: "80";
|
|
16
|
+
readonly category: "daemon";
|
|
17
|
+
}, {
|
|
2
18
|
readonly name: "AFK_DAEMON_CWD";
|
|
3
19
|
readonly description: "Working directory used by the daemon process for spawned agent sessions.";
|
|
4
20
|
readonly type: "string";
|
|
@@ -34,6 +50,12 @@ export declare const DAEMON_ENV_REGISTRY: readonly [{
|
|
|
34
50
|
readonly type: "number";
|
|
35
51
|
readonly required: false;
|
|
36
52
|
readonly category: "daemon";
|
|
53
|
+
}, {
|
|
54
|
+
readonly name: "AFK_TOOL_HEALTH_DISABLE";
|
|
55
|
+
readonly description: "Disable the tool-health daemon builtin entirely. Set to \"1\" to skip registration.";
|
|
56
|
+
readonly type: "boolean";
|
|
57
|
+
readonly required: false;
|
|
58
|
+
readonly category: "daemon";
|
|
37
59
|
}, {
|
|
38
60
|
readonly name: "AFK_WEB_PORT";
|
|
39
61
|
readonly description: "Port for the `afk web` browser surface. Defaults to 4141; falls back to an ephemeral port when taken. Overridden by --port.";
|
|
@@ -26,6 +26,14 @@ export declare const MISC_ENV_REGISTRY: readonly [{
|
|
|
26
26
|
readonly default: "0";
|
|
27
27
|
readonly example: "1";
|
|
28
28
|
readonly category: "model";
|
|
29
|
+
}, {
|
|
30
|
+
readonly name: "AFK_USAGE_LEDGER_DISABLED";
|
|
31
|
+
readonly description: "Set to 1 to stop publishing/reading the cross-process usage ledger (namespace `usage` in state/kv/kv.db). Usage surfaces (`afk usage`, get_runtime_state, fan-out notice, daemon budget gate) then see only this process's in-memory quota cache. Default 0 (ledger active).";
|
|
32
|
+
readonly type: "boolean";
|
|
33
|
+
readonly required: false;
|
|
34
|
+
readonly default: "0";
|
|
35
|
+
readonly example: "1";
|
|
36
|
+
readonly category: "model";
|
|
29
37
|
}, {
|
|
30
38
|
readonly name: "AFK_RATE_LIMIT_STAGGER_MAX_MS";
|
|
31
39
|
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.";
|
|
@@ -30,6 +30,14 @@ export declare const MODEL_TIERS_ENV_REGISTRY: readonly [{
|
|
|
30
30
|
readonly default: "2700000";
|
|
31
31
|
readonly example: "3600000";
|
|
32
32
|
readonly category: "model";
|
|
33
|
+
}, {
|
|
34
|
+
readonly name: "AFK_SUBAGENT_AUTO_RESUME_ON_USAGE_LIMIT";
|
|
35
|
+
readonly description: string;
|
|
36
|
+
readonly type: "boolean";
|
|
37
|
+
readonly required: false;
|
|
38
|
+
readonly default: "0";
|
|
39
|
+
readonly example: "1";
|
|
40
|
+
readonly category: "model";
|
|
33
41
|
}, {
|
|
34
42
|
readonly name: "AFK_SUBAGENT_IDLE_TIMEOUT_MS";
|
|
35
43
|
readonly description: string;
|