agent-afk 5.199.0 → 5.200.1

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.
@@ -25,4 +25,5 @@ export declare function writeHandoff(record: HandoffRecord, handoffsDir?: string
25
25
  export declare function readHandoff(taskId: string, handoffsDir?: string): Promise<HandoffRecord | null>;
26
26
  export declare function deleteHandoff(taskId: string, handoffsDir?: string): Promise<void>;
27
27
  export declare function listPendingHandoffs(handoffsDir?: string): Promise<HandoffRecord[]>;
28
+ export declare function withHandoffLock<T>(taskId: string, handoffsDir: string, cb: () => Promise<T>): Promise<T | null>;
28
29
  export declare function updateHandoffAnswer(taskId: string, answer: unknown, source: string, handoffsDir?: string): Promise<UpdateHandoffResult>;
@@ -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';
@@ -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
  }