agent-afk 5.198.1 → 5.200.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/scheduler.d.ts +4 -0
- package/dist/agent/daemon.d.ts +4 -0
- package/dist/agent/trace/events.d.ts +4 -0
- package/dist/agent/trace/types.d.ts +1 -0
- package/dist/cli.mjs +571 -571
- package/dist/index.mjs +220 -220
- package/dist/telegram.mjs +285 -285
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { TraceWriter } from '../trace/index.js';
|
|
2
2
|
import type { AgentSession } from '../session/agent-session.js';
|
|
3
3
|
import type { AgentConfig } from '../types.js';
|
|
4
|
+
import type { Telegraf } from 'telegraf';
|
|
4
5
|
import { ScheduledTask } from './triggers.js';
|
|
5
6
|
export { resolveWorktreePruneRoot } from './worktree-prune-task.js';
|
|
6
7
|
export { daemonTraceLabel } from './session-spawn.js';
|
|
@@ -18,6 +19,9 @@ export interface SchedulerOptions {
|
|
|
18
19
|
responseText: string;
|
|
19
20
|
successfulToolNames: readonly string[];
|
|
20
21
|
}) => boolean;
|
|
22
|
+
bot?: Telegraf;
|
|
23
|
+
primaryChatId?: number;
|
|
24
|
+
primaryThreadId?: number;
|
|
21
25
|
}
|
|
22
26
|
export type TelemetryTrigger = 'cron' | 'sessionstart' | 'pull';
|
|
23
27
|
export type TelemetryStatus = 'success' | 'error' | 'skipped';
|
package/dist/agent/daemon.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentConfig } from './types.js';
|
|
2
|
+
import type { Telegraf } from 'telegraf';
|
|
2
3
|
import { CronScheduler, type SchedulerOptions, type TelemetryRecord } from './daemon/scheduler.js';
|
|
3
4
|
import type { ScheduledTask } from './daemon/triggers.js';
|
|
4
5
|
export interface DaemonOptions {
|
|
@@ -15,6 +16,9 @@ export interface DaemonOptions {
|
|
|
15
16
|
pullPollIntervalMs?: number;
|
|
16
17
|
queueDir?: string;
|
|
17
18
|
writePortFile?: boolean;
|
|
19
|
+
bot?: Telegraf;
|
|
20
|
+
primaryChatId?: number;
|
|
21
|
+
primaryThreadId?: number;
|
|
18
22
|
oauthRefresher?: () => Promise<unknown>;
|
|
19
23
|
oauthRefreshIntervalMs?: number;
|
|
20
24
|
}
|
|
@@ -6,6 +6,7 @@ export declare const ToolCallStartedPayloadSchema: z.ZodObject<{
|
|
|
6
6
|
name: z.ZodString;
|
|
7
7
|
inputBytes: z.ZodNumber;
|
|
8
8
|
argsFingerprint: z.ZodOptional<z.ZodString>;
|
|
9
|
+
resourceFingerprint: z.ZodOptional<z.ZodString>;
|
|
9
10
|
subagentId: z.ZodOptional<z.ZodString>;
|
|
10
11
|
}, z.core.$strip>;
|
|
11
12
|
export declare const ToolFailureClassSchema: z.ZodEnum<{
|
|
@@ -53,6 +54,7 @@ export declare const ToolCallPayloadSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
53
54
|
name: z.ZodString;
|
|
54
55
|
inputBytes: z.ZodNumber;
|
|
55
56
|
argsFingerprint: z.ZodOptional<z.ZodString>;
|
|
57
|
+
resourceFingerprint: z.ZodOptional<z.ZodString>;
|
|
56
58
|
subagentId: z.ZodOptional<z.ZodString>;
|
|
57
59
|
}, z.core.$strip>, z.ZodObject<{
|
|
58
60
|
phase: z.ZodLiteral<"completed">;
|
|
@@ -591,6 +593,7 @@ export declare const TraceEventInputSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
591
593
|
name: z.ZodString;
|
|
592
594
|
inputBytes: z.ZodNumber;
|
|
593
595
|
argsFingerprint: z.ZodOptional<z.ZodString>;
|
|
596
|
+
resourceFingerprint: z.ZodOptional<z.ZodString>;
|
|
594
597
|
subagentId: z.ZodOptional<z.ZodString>;
|
|
595
598
|
}, z.core.$strip>, z.ZodObject<{
|
|
596
599
|
phase: z.ZodLiteral<"completed">;
|
|
@@ -934,6 +937,7 @@ export declare const TraceEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
934
937
|
name: z.ZodString;
|
|
935
938
|
inputBytes: z.ZodNumber;
|
|
936
939
|
argsFingerprint: z.ZodOptional<z.ZodString>;
|
|
940
|
+
resourceFingerprint: z.ZodOptional<z.ZodString>;
|
|
937
941
|
subagentId: z.ZodOptional<z.ZodString>;
|
|
938
942
|
}, z.core.$strip>, z.ZodObject<{
|
|
939
943
|
phase: z.ZodLiteral<"completed">;
|
|
@@ -5,6 +5,7 @@ export interface ToolCallStartedPayload {
|
|
|
5
5
|
name: string;
|
|
6
6
|
inputBytes: number;
|
|
7
7
|
argsFingerprint?: string;
|
|
8
|
+
resourceFingerprint?: string;
|
|
8
9
|
subagentId?: string;
|
|
9
10
|
}
|
|
10
11
|
export declare const TOOL_FAILURE_CLASSES: readonly ["policy-refusal", "timeout", "budget", "permission-denied", "hook-block", "abort", "elicitation-declined", "denial-breaker", "repeat-failure", "no-such-target"];
|