agent-afk 5.18.0 → 5.19.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.
@@ -10,6 +10,7 @@ import { sendTelegramHandler } from './send-telegram.js';
10
10
  import { webScrapeHandler } from './web-scrape.js';
11
11
  import { createScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler } from './schedules.js';
12
12
  import { terminalFontSizeHandler } from './terminal-font-size.js';
13
+ import { createWorktreeHandler } from './worktree.js';
13
14
  import { configGetHandler, configSetHandler } from './config-ops.js';
14
15
  import { askQuestionHandler } from './ask-question.js';
15
16
  import { browserOpenHandler } from './browser-open.js';
@@ -18,4 +19,4 @@ import { browserActHandler } from './browser-act.js';
18
19
  import { browserScreenshotHandler } from './browser-screenshot.js';
19
20
  import { browserCloseHandler } from './browser-close.js';
20
21
  export declare function createBuiltinHandlers(permissionMode?: string, cwd?: string): Map<string, ToolHandler>;
21
- export { bashHandler, readFileHandler, writeFileHandler, editFileHandler, globHandler, grepHandler, listDirectoryHandler, sendTelegramHandler, webScrapeHandler, createScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler, terminalFontSizeHandler, configGetHandler, configSetHandler, askQuestionHandler, browserOpenHandler, browserObserveHandler, browserActHandler, browserScreenshotHandler, browserCloseHandler, };
22
+ export { bashHandler, readFileHandler, writeFileHandler, editFileHandler, globHandler, grepHandler, listDirectoryHandler, sendTelegramHandler, webScrapeHandler, createScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler, terminalFontSizeHandler, createWorktreeHandler, configGetHandler, configSetHandler, askQuestionHandler, browserOpenHandler, browserObserveHandler, browserActHandler, browserScreenshotHandler, browserCloseHandler, };
@@ -0,0 +1,6 @@
1
+ import type { ToolHandler } from '../types.js';
2
+ import type { ExecFileFn } from '../../worktree-sweep.js';
3
+ export interface WorktreeHandlerDeps {
4
+ execFile?: ExecFileFn;
5
+ }
6
+ export declare function createWorktreeHandler(cwd?: string, deps?: WorktreeHandlerDeps): ToolHandler;
@@ -15,6 +15,7 @@ export declare const createScheduleTool: AnthropicToolDef;
15
15
  export declare const listSchedulesTool: AnthropicToolDef;
16
16
  export declare const getScheduleHistoryTool: AnthropicToolDef;
17
17
  export declare const cancelScheduleTool: AnthropicToolDef;
18
+ export declare const worktreeTool: AnthropicToolDef;
18
19
  export declare const terminalFontSizeTool: AnthropicToolDef;
19
20
  export declare const configGetTool: AnthropicToolDef;
20
21
  export declare const configSetTool: AnthropicToolDef;
@@ -32,6 +32,8 @@ export interface PromotedSubagentInfo {
32
32
  export interface SubagentControl {
33
33
  hasPromotableForeground(): boolean;
34
34
  promoteActiveForeground(): Promise<PromotedSubagentInfo[]>;
35
+ hasActiveForeground(): boolean;
36
+ cancelActiveForeground(): Promise<number>;
35
37
  }
36
38
  export declare class SubagentExecutor implements SubagentControl {
37
39
  private readonly ctx;
@@ -39,7 +41,10 @@ export declare class SubagentExecutor implements SubagentControl {
39
41
  constructor(ctx: SubagentExecutorContext);
40
42
  setCwd(cwd: string): void;
41
43
  private readonly promotionTriggers;
44
+ private readonly activeForegroundHandles;
42
45
  hasPromotableForeground(): boolean;
46
+ hasActiveForeground(): boolean;
47
+ cancelActiveForeground(): Promise<number>;
43
48
  promoteActiveForeground(): Promise<PromotedSubagentInfo[]>;
44
49
  getSubagentsLite(): {
45
50
  active: Array<{
@@ -0,0 +1,2 @@
1
+ export declare function worktreeRootFor(cwd: string): string | undefined;
2
+ export declare function touchWorktreeOccupancy(cwd: string): Promise<void>;