agent-afk 5.257.1 → 5.257.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/agent/dag-subagent.d.ts +2 -0
- package/dist/agent/providers/anthropic-direct/loop/_many-image-guard.d.ts +4 -0
- package/dist/agent/providers/openai-compatible/query/fast-mode.d.ts +2 -1
- package/dist/agent/session/preamble-strip.d.ts +0 -1
- package/dist/agent/tools/handlers/glob-absolute.d.ts +2 -1
- package/dist/agent/types/session-types.d.ts +2 -1
- package/dist/cli/markdown-stream.d.ts +1 -0
- package/dist/cli/smoke-reveal.d.ts +1 -0
- package/dist/cli/smoke-reveal.frame.d.ts +8 -0
- package/dist/cli.mjs +274 -274
- package/dist/config/env.d.ts +2 -3
- package/dist/index.mjs +113 -113
- package/dist/telegram.mjs +137 -137
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,8 +83,8 @@ AFK_MODEL=sonnet
|
|
|
83
83
|
TELEGRAM_BOT_TOKEN=1234567890:ABC...
|
|
84
84
|
AFK_TELEGRAM_ALLOWED_CHAT_IDS=12345678
|
|
85
85
|
|
|
86
|
-
#
|
|
87
|
-
AFK_MAX_BUDGET_USD=5.00
|
|
86
|
+
# Optional per-session cost cap (unset = no limit)
|
|
87
|
+
# AFK_MAX_BUDGET_USD=5.00
|
|
88
88
|
```
|
|
89
89
|
|
|
90
90
|
**Project-scoped system prompt.** Drop an `AFK.md` at your project root and `afk` appends it to its built-in framework prompt whenever you run from that directory — your instructions layer on top of the base, they don't replace it. No frontmatter needed.
|
|
@@ -25,6 +25,8 @@ export interface SubagentDAGNode {
|
|
|
25
25
|
maxToolUseIterations?: number;
|
|
26
26
|
maxTurns?: number;
|
|
27
27
|
provider?: ModelProvider;
|
|
28
|
+
depth?: number;
|
|
29
|
+
maxDepth?: number;
|
|
28
30
|
buildPromptAsync?: (inputs: Record<string, unknown>) => Promise<string | ContentBlockParam[]>;
|
|
29
31
|
resolvedAttachments?: ImageBlockAttachment[];
|
|
30
32
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { FastModeController, FastTurnDecision } from '../../../fast-mode.js';
|
|
2
|
-
|
|
2
|
+
import { type CatalogReaderDeps } from '../models-catalog.js';
|
|
3
|
+
export declare function snapshotFastDecision(controller: FastModeController | undefined, model: string, hasCustomEndpoint: boolean, catalogDeps?: CatalogReaderDeps): FastTurnDecision | undefined;
|
|
3
4
|
export declare function isFastModeServiceTierError(error: unknown): boolean;
|
|
4
5
|
export declare function extractResponsesServiceTier(responseObj: Record<string, unknown> | null | undefined): string | undefined;
|
|
5
6
|
export declare function extractChatCompletionsServiceTier(chunk: Record<string, unknown> | null | undefined): string | undefined;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import path from 'path';
|
|
1
2
|
export interface SplitPattern {
|
|
2
3
|
base: string;
|
|
3
4
|
pattern: string;
|
|
4
5
|
}
|
|
5
|
-
export declare function splitAbsolutePattern(rawPattern: string): SplitPattern | null;
|
|
6
|
+
export declare function splitAbsolutePattern(rawPattern: string, pathModule?: Pick<typeof path, 'isAbsolute' | 'normalize'>): SplitPattern | null;
|
|
@@ -42,6 +42,7 @@ export interface PanelSpec {
|
|
|
42
42
|
title?: string;
|
|
43
43
|
body: string | string[];
|
|
44
44
|
}
|
|
45
|
+
export type NoticeKind = 'truncation' | 'refusal' | 'fast-tier';
|
|
45
46
|
export type OutputEvent = {
|
|
46
47
|
type: 'message';
|
|
47
48
|
message: Message;
|
|
@@ -71,7 +72,7 @@ export type OutputEvent = {
|
|
|
71
72
|
} | {
|
|
72
73
|
type: 'notice';
|
|
73
74
|
text: string;
|
|
74
|
-
kind:
|
|
75
|
+
kind: NoticeKind;
|
|
75
76
|
} | {
|
|
76
77
|
type: 'tool-activity';
|
|
77
78
|
activeCount: number;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const SMOKE_GLYPH_LEVELS: readonly (readonly string[])[];
|
|
2
|
+
export declare const LIFETIME_JITTER = 0.2;
|
|
3
|
+
export declare const TONE_JITTER = 0.04;
|
|
4
|
+
export declare function seedUnit(seed: number, lane: number): number;
|
|
5
|
+
export declare function charLifetime(seed: number, base: number): number;
|
|
6
|
+
export declare function smokeGlyph(p: number, seed: number): string;
|
|
7
|
+
export declare function smokeToneOffset(seed: number): number;
|
|
8
|
+
export declare function easeOutCubic(p: number): number;
|