agent-afk 5.307.0 → 5.307.2
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/scheduler.d.ts +6 -1
- package/dist/agent/manifest/startup-reconcile.d.ts +1 -0
- package/dist/agent/providers/anthropic-direct/auth.d.ts +1 -1
- package/dist/agent/providers/openai-compatible/complete-wire.d.ts +1 -0
- package/dist/agent/providers/openai-compatible/oneshot.d.ts +1 -0
- package/dist/agent/providers/shared/h1-fetch.d.ts +1 -0
- package/dist/cli/commands/daemon.d.ts +7 -0
- package/dist/cli.mjs +453 -452
- package/dist/index.mjs +178 -177
- package/dist/telegram.mjs +274 -274
- package/dist/utils/fs.d.ts +1 -0
- package/dist/utils/json-file.d.ts +13 -0
- package/package.json +1 -1
|
@@ -56,7 +56,7 @@ export declare class CronScheduler {
|
|
|
56
56
|
private pullPollTimer;
|
|
57
57
|
private isDequeuing;
|
|
58
58
|
private readonly queueDir;
|
|
59
|
-
private readonly
|
|
59
|
+
private readonly inFlightTasks;
|
|
60
60
|
private readonly budgetAlerts;
|
|
61
61
|
private readonly overlapAlerts;
|
|
62
62
|
private readonly telemetryAlerts;
|
|
@@ -64,6 +64,11 @@ export declare class CronScheduler {
|
|
|
64
64
|
register(task: ScheduledTask): void;
|
|
65
65
|
unregister(taskId: string): void;
|
|
66
66
|
list(): ScheduledTask[];
|
|
67
|
+
getInFlightTasks(): Array<{
|
|
68
|
+
taskId: string;
|
|
69
|
+
commandHead: string;
|
|
70
|
+
elapsedMs: number;
|
|
71
|
+
}>;
|
|
67
72
|
tick(taskId: string): Promise<TelemetryRecord>;
|
|
68
73
|
fireOnStart(): Promise<TelemetryRecord[]>;
|
|
69
74
|
stop(): Promise<void>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare function runReplReconcile(sessionId: string): void;
|
|
2
2
|
export declare function runTelegramReconcile<Route>(sessionId: string, route: Route, sendText: (route: Route, text: string) => void | Promise<boolean>): void;
|
|
3
3
|
export declare function runNonInteractiveReconcile(sessionId: string): void;
|
|
4
|
+
export declare function runDaemonReconcile(sessionId: string): void;
|
|
@@ -13,7 +13,7 @@ export declare function buildClientOptions(token: string, mode: AuthMode, baseUr
|
|
|
13
13
|
apiKey: string;
|
|
14
14
|
}) & {
|
|
15
15
|
baseURL?: string;
|
|
16
|
-
fetch
|
|
16
|
+
fetch: typeof fetch;
|
|
17
17
|
maxRetries: 0;
|
|
18
18
|
};
|
|
19
19
|
export declare function buildRequestHeaders(mode: AuthMode, sessionId: string, requestId: string, withEffort?: boolean, extendedCacheTtl?: boolean, withFast?: boolean, withThinkingBindingControls?: boolean): Record<string, string>;
|
|
@@ -6,6 +6,7 @@ export interface CompleteWireClientOptions {
|
|
|
6
6
|
baseURL?: string;
|
|
7
7
|
defaultHeaders?: Record<string, string>;
|
|
8
8
|
maxRetries: number;
|
|
9
|
+
fetch: typeof globalThis.fetch;
|
|
9
10
|
}
|
|
10
11
|
export type CompleteWireClientFactory = (opts: CompleteWireClientOptions) => OpenAI;
|
|
11
12
|
export declare function completeWithWire(input: OpenAIOneShotInput, clientFactory?: CompleteWireClientFactory): Promise<string>;
|
|
@@ -9,6 +9,7 @@ export type OneShotOpenAIClientFactory = (opts: {
|
|
|
9
9
|
baseURL?: string;
|
|
10
10
|
defaultHeaders?: Record<string, string>;
|
|
11
11
|
maxRetries: number;
|
|
12
|
+
fetch: typeof globalThis.fetch;
|
|
12
13
|
}) => OpenAI;
|
|
13
14
|
export declare function __setOpenAIOneShotClientFactory(factory: OneShotOpenAIClientFactory | null): void;
|
|
14
15
|
export interface OpenAIOneShotInput {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const h1ModelFetch: typeof fetch;
|
|
@@ -4,4 +4,11 @@ export type { BuildDaemonSessionFactoryOpts } from './daemon-session-factory.js'
|
|
|
4
4
|
export { buildDaemonSessionFactory } from './daemon-session-factory.js';
|
|
5
5
|
export declare function resolveNotifyChatTarget(notifyChat: number | string | undefined, taskId: string): number | undefined;
|
|
6
6
|
export declare function formatTaskCompletion(record: TelemetryRecord, details?: TaskCompletionDetails, verifyDone?: boolean): string;
|
|
7
|
+
export declare function _resetDaemonCrashHandlersForTest(): void;
|
|
8
|
+
export interface InFlightTaskSnapshot {
|
|
9
|
+
taskId: string;
|
|
10
|
+
commandHead: string;
|
|
11
|
+
elapsedMs: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function registerDaemonCrashHandlers(getInFlightTasks?: () => InFlightTaskSnapshot[]): void;
|
|
7
14
|
export declare function registerDaemonCommand(program: Command): void;
|