agent-afk 5.324.3 → 5.325.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/providers/openai-compatible/query/wind-down-final.d.ts +2 -1
- package/dist/agent/providers/shared/tool-loop-cap.d.ts +1 -0
- package/dist/agent/session/agent-session.lifecycle.d.ts +1 -0
- package/dist/agent/tools/git-read.policy.d.ts +1 -1
- package/dist/agent/tools/subagent-executor.dispatch-intent.d.ts +1 -0
- package/dist/cli/terminal-compositor.reflow-shift.d.ts +45 -0
- package/dist/cli.mjs +398 -395
- package/dist/config/env.d.ts +22 -0
- package/dist/config/env.telegram.d.ts +22 -0
- package/dist/index.mjs +203 -203
- package/dist/telegram/audio-transcriber.d.ts +34 -0
- package/dist/telegram/bot.audio-handler.d.ts +6 -0
- package/dist/telegram/bot.d.ts +2 -0
- package/dist/telegram/handlers/voice.d.ts +8 -0
- package/dist/telegram.mjs +221 -221
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { WIND_DOWN_NO_ANSWER_PLACEHOLDER } from '../../shared/tool-loop-cap.js';
|
|
2
|
+
export { WIND_DOWN_NO_ANSWER_PLACEHOLDER };
|
|
2
3
|
export declare function stripToolCallMarkup(text: string): string;
|
|
3
4
|
export declare function windDownFinalText(roundText: string): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const TOOL_USE_LOOP_CAPPED = "tool_use_loop_capped";
|
|
2
2
|
export declare const DEFAULT_MAX_TOOL_USE_ITERATIONS = 0;
|
|
3
|
+
export declare const WIND_DOWN_NO_ANSWER_PLACEHOLDER: string;
|
|
3
4
|
export declare const WIND_DOWN_NOTE: string;
|
|
4
5
|
export declare function resolveMaxToolIterations(configured: number | undefined): number;
|
|
5
6
|
export declare function shouldWindDown(completedRounds: number, maxIterations: number): boolean;
|
|
@@ -46,6 +46,7 @@ export interface BuildInitPromiseOptions {
|
|
|
46
46
|
setProviderIterator: (i: AsyncIterator<ProviderEvent>) => void;
|
|
47
47
|
getProviderIterator: () => AsyncIterator<ProviderEvent>;
|
|
48
48
|
getInputStream: () => QueryInputStream;
|
|
49
|
+
getProviderQuery: () => ProviderQuery;
|
|
49
50
|
isClosed: () => boolean;
|
|
50
51
|
abortSignal: AbortSignal;
|
|
51
52
|
accounting: AccountingAccumulator;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const GIT_READ_SUBCOMMANDS: readonly ["status", "log", "diff", "show", "grep", "tag", "branch", "blame", "ls-files", "rev-parse"];
|
|
1
|
+
export declare const GIT_READ_SUBCOMMANDS: readonly ["status", "log", "diff", "show", "grep", "tag", "branch", "blame", "ls-files", "rev-parse", "merge-base", "rev-list", "reflog", "for-each-ref", "describe", "shortlog", "cat-file", "remote", "stash", "worktree"];
|
|
2
2
|
export type GitReadSubcommand = (typeof GIT_READ_SUBCOMMANDS)[number];
|
|
3
3
|
export interface GitReadRequest {
|
|
4
4
|
subcommand: unknown;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { RegisteredAgent } from '../agents/index.js';
|
|
2
2
|
import type { ToolResult } from './types.js';
|
|
3
|
+
export declare function stripQuotedContent(prompt: string): string;
|
|
3
4
|
export declare function classifyDispatchIntent(prompt: string): string | undefined;
|
|
4
5
|
export declare function checkReadOnlyDispatchIntent(childWriteCapable: boolean, namedAgent: RegisteredAgent | undefined, prompt: string, classifyFn: (p: string) => string | undefined): ToolResult | undefined;
|
|
5
6
|
export declare function checkComposeReadOnlyDispatchIntent(nodes: ReadonlyArray<{
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { BandRowMeta } from './terminal-compositor.types.js';
|
|
2
|
+
import { type BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
3
|
+
export interface ReflowLine {
|
|
4
|
+
row: number;
|
|
5
|
+
width: number;
|
|
6
|
+
hard: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare function computeReflowShift(lines: readonly ReflowLine[], oldCols: number, newCols: number): number | null;
|
|
9
|
+
export declare function setReflowShiftGateForTests(gate: (() => boolean) | null): void;
|
|
10
|
+
export interface ReflowHost {
|
|
11
|
+
readonly stdout: NodeJS.WriteStream;
|
|
12
|
+
lastKnownCols: number;
|
|
13
|
+
lastMeasuredFrameBottom: number;
|
|
14
|
+
anchorRow: number | undefined;
|
|
15
|
+
committedBand: string[];
|
|
16
|
+
committedBandMeta: BandRowMeta[];
|
|
17
|
+
committedBandTopRow: number;
|
|
18
|
+
committedBandBottomRow: number;
|
|
19
|
+
committedBandPaintedRows: number;
|
|
20
|
+
committedBandArchivedPrefix: number;
|
|
21
|
+
bandReflowCache: BandReflowCache | null;
|
|
22
|
+
pendingResizeErase: {
|
|
23
|
+
top: number;
|
|
24
|
+
bottom: number;
|
|
25
|
+
origin?: 'width-only' | 'expand';
|
|
26
|
+
} | null;
|
|
27
|
+
}
|
|
28
|
+
export type SnapshotHost = Omit<ReflowHost, 'bandReflowCache'>;
|
|
29
|
+
export interface BandSnapshot {
|
|
30
|
+
rows: readonly string[];
|
|
31
|
+
marginCols: number;
|
|
32
|
+
}
|
|
33
|
+
export interface ReflowPrediction {
|
|
34
|
+
n: number;
|
|
35
|
+
lines: readonly ReflowLine[];
|
|
36
|
+
oldCols: number;
|
|
37
|
+
newCols: number;
|
|
38
|
+
band?: BandSnapshot;
|
|
39
|
+
}
|
|
40
|
+
export declare function recordRenderedFrame(self: object, text: string, bottom: number, cols: number): void;
|
|
41
|
+
export declare function noteResizeForReflow(self: SnapshotHost, newCols: number, freshBurst: boolean, rowShrink?: boolean): void;
|
|
42
|
+
export declare function takeReflowPrediction(self: object): ReflowPrediction | null;
|
|
43
|
+
export declare function historyRows(bandTop: number, delta: number, n: number): number;
|
|
44
|
+
export declare function wholeRowsInHistory(rows: readonly string[], marginCols: number, oldCols: number, newCols: number, hist: number): number | null;
|
|
45
|
+
export declare function applyReflowShift(self: ReflowHost, pred: ReflowPrediction, delta: number, preBandTop: number): boolean;
|