agent-afk 5.239.0 → 5.240.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/schedule-store.d.ts +2 -0
- package/dist/agent/tools/handlers/index.d.ts +2 -2
- package/dist/agent/tools/handlers/schedules.d.ts +1 -0
- package/dist/agent/tools/schemas.d.ts +2 -4
- package/dist/agent/tools/schemas.schedule.d.ts +6 -0
- package/dist/cli/markdown-stream-buffer.d.ts +43 -0
- package/dist/cli/markdown-stream.d.ts +1 -5
- package/dist/cli/terminal-compositor.frame.d.ts +1 -1
- package/dist/cli/terminal-compositor.frame.layout.d.ts +21 -0
- package/dist/cli/terminal-compositor.frame.lines.d.ts +3 -0
- package/dist/cli/terminal-compositor.frame.position.d.ts +7 -0
- package/dist/cli/terminal-compositor.lifecycle.d.ts +1 -1
- package/dist/cli/terminal-compositor.lifecycle.mode.d.ts +5 -0
- package/dist/cli/terminal-compositor.lifecycle.resize.d.ts +3 -0
- package/dist/cli/terminal-compositor.lifecycle.teardown.d.ts +3 -0
- package/dist/cli.mjs +249 -250
- package/dist/index.mjs +110 -110
- package/dist/telegram.mjs +127 -127
- package/package.json +1 -1
|
@@ -17,6 +17,8 @@ export declare function saveSchedules(configs: ScheduledTaskConfig[], path?: str
|
|
|
17
17
|
export declare function addSchedule(config: Omit<ScheduledTaskConfig, 'id' | 'createdAt' | 'updatedAt'>, path?: string): ScheduledTaskConfig;
|
|
18
18
|
export declare function removeSchedule(id: string, path?: string): boolean;
|
|
19
19
|
export declare function getSchedule(id: string, path?: string): ScheduledTaskConfig | undefined;
|
|
20
|
+
export type SchedulePatch = Partial<Omit<ScheduledTaskConfig, 'id' | 'createdAt' | 'updatedAt'>>;
|
|
21
|
+
export declare function updateSchedule(id: string, patch: SchedulePatch, path?: string): ScheduledTaskConfig | undefined;
|
|
20
22
|
export declare function toggleScheduleEnabled(id: string, enabled: boolean, path?: string): ScheduledTaskConfig | undefined;
|
|
21
23
|
export declare function slugify(name: string): string;
|
|
22
24
|
export declare function resolveSlugCollision(base: string, existing: string[]): string;
|
|
@@ -10,7 +10,7 @@ import { listDirectoryHandler } from './list-directory.js';
|
|
|
10
10
|
import { sendTelegramHandler } from './send-telegram.js';
|
|
11
11
|
import { webScrapeHandler } from './web-scrape.js';
|
|
12
12
|
import { webRequestHandler } from './web-request.js';
|
|
13
|
-
import { createScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler } from './schedules.js';
|
|
13
|
+
import { createScheduleHandler, updateScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler } from './schedules.js';
|
|
14
14
|
import { terminalFontSizeHandler } from './terminal-font-size.js';
|
|
15
15
|
import { createWorktreeHandler } from './worktree.js';
|
|
16
16
|
import { configGetHandler, configSetHandler } from './config-ops.js';
|
|
@@ -27,4 +27,4 @@ import { getFacetHandler } from './get-facet.js';
|
|
|
27
27
|
import { jsonQueryHandler, createJsonQueryHandler } from './json-query.js';
|
|
28
28
|
import { clipboardWriteHandler, clipboardReadHandler, createClipboardWriteHandler, createClipboardReadHandler } from './clipboard.js';
|
|
29
29
|
export declare function createBuiltinHandlers(permissionMode?: string, cwd?: string): Map<string, ToolHandler>;
|
|
30
|
-
export { bashHandler, readFileHandler, extractDocumentHandler, writeFileHandler, editFileHandler, globHandler, grepHandler, listDirectoryHandler, sendTelegramHandler, webScrapeHandler, webRequestHandler, createScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler, terminalFontSizeHandler, createWorktreeHandler, configGetHandler, configSetHandler, askQuestionHandler, waitForHandler, patchApplyHandler, browserOpenHandler, browserObserveHandler, browserActHandler, browserScreenshotHandler, browserCloseHandler, testRunHandler, getFacetHandler, jsonQueryHandler, createJsonQueryHandler, clipboardWriteHandler, clipboardReadHandler, createClipboardWriteHandler, createClipboardReadHandler, };
|
|
30
|
+
export { bashHandler, readFileHandler, extractDocumentHandler, writeFileHandler, editFileHandler, globHandler, grepHandler, listDirectoryHandler, sendTelegramHandler, webScrapeHandler, webRequestHandler, createScheduleHandler, updateScheduleHandler, listSchedulesHandler, getScheduleHistoryHandler, cancelScheduleHandler, terminalFontSizeHandler, createWorktreeHandler, configGetHandler, configSetHandler, askQuestionHandler, waitForHandler, patchApplyHandler, browserOpenHandler, browserObserveHandler, browserActHandler, browserScreenshotHandler, browserCloseHandler, testRunHandler, getFacetHandler, jsonQueryHandler, createJsonQueryHandler, clipboardWriteHandler, clipboardReadHandler, createClipboardWriteHandler, createClipboardReadHandler, };
|
|
@@ -2,6 +2,7 @@ import type { ToolHandler } from '../types.js';
|
|
|
2
2
|
import { type DaemonSyncResult } from '../../daemon/http-client.js';
|
|
3
3
|
export type { DaemonSyncResult };
|
|
4
4
|
export declare const createScheduleHandler: ToolHandler;
|
|
5
|
+
export declare const updateScheduleHandler: ToolHandler;
|
|
5
6
|
export declare const listSchedulesHandler: ToolHandler;
|
|
6
7
|
export declare const getScheduleHistoryHandler: ToolHandler;
|
|
7
8
|
export declare const cancelScheduleHandler: ToolHandler;
|
|
@@ -15,10 +15,8 @@ export declare const webRequestTool: AnthropicToolDef;
|
|
|
15
15
|
export declare const agentTool: AnthropicToolDef;
|
|
16
16
|
export declare const skillTool: AnthropicToolDef;
|
|
17
17
|
export declare const composeTool: AnthropicToolDef;
|
|
18
|
-
|
|
19
|
-
export
|
|
20
|
-
export declare const getScheduleHistoryTool: AnthropicToolDef;
|
|
21
|
-
export declare const cancelScheduleTool: AnthropicToolDef;
|
|
18
|
+
import { createScheduleTool, updateScheduleTool, listSchedulesTool, getScheduleHistoryTool, cancelScheduleTool } from './schemas.schedule.js';
|
|
19
|
+
export { createScheduleTool, updateScheduleTool, listSchedulesTool, getScheduleHistoryTool, cancelScheduleTool, };
|
|
22
20
|
export declare const worktreeTool: AnthropicToolDef;
|
|
23
21
|
export declare const terminalFontSizeTool: AnthropicToolDef;
|
|
24
22
|
export declare const configGetTool: AnthropicToolDef;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { AnthropicToolDef } from './types.js';
|
|
2
|
+
export declare const createScheduleTool: AnthropicToolDef;
|
|
3
|
+
export declare const updateScheduleTool: AnthropicToolDef;
|
|
4
|
+
export declare const listSchedulesTool: AnthropicToolDef;
|
|
5
|
+
export declare const getScheduleHistoryTool: AnthropicToolDef;
|
|
6
|
+
export declare const cancelScheduleTool: AnthropicToolDef;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface InputBufferState {
|
|
2
|
+
inputBuffer: string;
|
|
3
|
+
inputBufferTimer: NodeJS.Timeout | null;
|
|
4
|
+
lastInputFlushTime: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function createInputBufferState(): InputBufferState;
|
|
7
|
+
export interface PipelineCallbacks {
|
|
8
|
+
onBatch(batched: string): void;
|
|
9
|
+
}
|
|
10
|
+
export declare function pushChunk(state: InputBufferState, chunk: string, bufferMs: number, callbacks: PipelineCallbacks): void;
|
|
11
|
+
export declare function drainInputBuffer(state: InputBufferState, callbacks: PipelineCallbacks): void;
|
|
12
|
+
export declare function discardInputBuffer(state: InputBufferState): void;
|
|
13
|
+
export interface ParsePipelineCallbacks {
|
|
14
|
+
onPreCommit(newBuffer: string): void;
|
|
15
|
+
onCommitBlock(blockText: string): void;
|
|
16
|
+
onScheduleRepaint(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function runParsePipeline(buffer: string, chunk: string, callbacks: ParsePipelineCallbacks): string;
|
|
19
|
+
export interface LogUpdateFunction {
|
|
20
|
+
(str: string): void;
|
|
21
|
+
clear: () => void;
|
|
22
|
+
}
|
|
23
|
+
export interface RepaintParams {
|
|
24
|
+
flushing: boolean;
|
|
25
|
+
overlayComposer: OverlayComposerLike | null | undefined;
|
|
26
|
+
compositor: CompositorLike | null;
|
|
27
|
+
logUpdate: LogUpdateFunction | null;
|
|
28
|
+
renderPending(): string;
|
|
29
|
+
initLogUpdate(): Promise<LogUpdateFunction | null>;
|
|
30
|
+
onLogUpdateReady(fn: LogUpdateFunction | null): void;
|
|
31
|
+
}
|
|
32
|
+
export declare function executeRepaint(p: RepaintParams): Promise<void>;
|
|
33
|
+
export interface CompositorLike {
|
|
34
|
+
setOverlay(str: string): void;
|
|
35
|
+
}
|
|
36
|
+
export interface OverlayComposerLike {
|
|
37
|
+
markDirty(slot: string): void;
|
|
38
|
+
flush(): void;
|
|
39
|
+
}
|
|
40
|
+
export declare function clearOverlay(overlayComposer: OverlayComposerLike | null | undefined, compositor: CompositorLike | null, logUpdate: {
|
|
41
|
+
clear(): void;
|
|
42
|
+
} | null): void;
|
|
43
|
+
export declare function syncPendingOverlay(overlayComposer: OverlayComposerLike | null | undefined, compositor: CompositorLike | null, renderPending: () => string): void;
|
|
@@ -23,9 +23,7 @@ export declare class StreamingMarkdownRenderer {
|
|
|
23
23
|
private overlayComposer;
|
|
24
24
|
private resizeUnsub;
|
|
25
25
|
private bufferMs;
|
|
26
|
-
private
|
|
27
|
-
private inputBufferTimer;
|
|
28
|
-
private lastInputFlushTime;
|
|
26
|
+
private inputState;
|
|
29
27
|
constructor(opts?: StreamingMarkdownRendererOptions);
|
|
30
28
|
private initLogUpdate;
|
|
31
29
|
private commitBlock;
|
|
@@ -34,8 +32,6 @@ export declare class StreamingMarkdownRenderer {
|
|
|
34
32
|
private syncPendingOverlay;
|
|
35
33
|
private repaint;
|
|
36
34
|
push(chunk: string): void;
|
|
37
|
-
private drainInputBuffer;
|
|
38
|
-
private discardInputBuffer;
|
|
39
35
|
private pushDirect;
|
|
40
36
|
flush(): Promise<void>;
|
|
41
37
|
getCommittedOutput(): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type ImageAttachment } from './input/attachments.js';
|
|
2
1
|
import type { SpinnerController } from './input/spinner.js';
|
|
3
2
|
import type { BandRowMeta, CompositorInputMode, CompositorScrollRegionGuard, FramePlacementMode, LogUpdateFn, PickerController } from './terminal-compositor.types.js';
|
|
4
3
|
import { type BandReflowCache } from './terminal-compositor.band-reflow.js';
|
|
4
|
+
import { type ImageAttachment } from './input/attachments.js';
|
|
5
5
|
export interface FrameHost {
|
|
6
6
|
flushResizeGhostErase(): void;
|
|
7
7
|
renderInputLine(): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type ImageAttachment } from './input/attachments.js';
|
|
2
|
+
import type { SpinnerController } from './input/spinner.js';
|
|
3
|
+
import type { CompositorScrollRegionGuard } from './terminal-compositor.types.js';
|
|
4
|
+
export interface ChromeRows {
|
|
5
|
+
overlayLines: string[];
|
|
6
|
+
spinnerRow: string | null;
|
|
7
|
+
tipRow: string | null;
|
|
8
|
+
attachmentRow: string | null;
|
|
9
|
+
}
|
|
10
|
+
export declare function gatherChromeRows(overlay: string, spinnerController: SpinnerController, attachments: ImageAttachment[], clipboardFailureMsgRef: {
|
|
11
|
+
value: string | null;
|
|
12
|
+
}, cols: number): ChromeRows;
|
|
13
|
+
export interface ViewportLayout {
|
|
14
|
+
maxLines: number;
|
|
15
|
+
gapRows: number;
|
|
16
|
+
trimmedOverlay: string[];
|
|
17
|
+
renderGap: boolean;
|
|
18
|
+
extraRows: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function computeViewportLayout(chrome: ChromeRows, dropdownLength: number, hasHintRow: boolean, rows: number, scrollRegion: CompositorScrollRegionGuard | undefined): ViewportLayout;
|
|
21
|
+
export declare function computePickerViewportLayout(chrome: ChromeRows, pickerRowCount: number, rows: number, scrollRegion: CompositorScrollRegionGuard | undefined): Omit<ViewportLayout, 'gapRows'>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ChromeRows } from './terminal-compositor.frame.layout.js';
|
|
2
|
+
export declare function buildFrameLines(chrome: ChromeRows, trimmedOverlay: string[], renderGap: boolean, dropdownRows: string[], hintRow: string | null, inputLine: string): string[];
|
|
3
|
+
export declare function buildPickerFrameLines(chrome: ChromeRows, trimmedOverlay: string[], renderGap: boolean, pickerRows: string[]): string[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { LogUpdateFn, FramePlacementMode } from './terminal-compositor.types.js';
|
|
2
|
+
export interface FramePosition {
|
|
3
|
+
desiredTopRow: number;
|
|
4
|
+
targetBottomRow: number;
|
|
5
|
+
physicalRows: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function computeFramePosition(frame: string, frameLines: string[], absoluteBottom: number, placementMode: FramePlacementMode, anchorRow: number | undefined, logUpdate: LogUpdateFn): FramePosition;
|
|
@@ -4,6 +4,7 @@ import type { CaretBlinkController } from './input/caret-blink.js';
|
|
|
4
4
|
import type { SuggestEngine } from './terminal-compositor.types.js';
|
|
5
5
|
import type { BandRowMeta, CompositorScrollRegionGuard, KeyInfo, LogUpdateFn } from './terminal-compositor.types.js';
|
|
6
6
|
import type { KeyDispatchHost } from './terminal-compositor.input-dispatch.js';
|
|
7
|
+
export { endTurnFlush } from './terminal-compositor.lifecycle.teardown.js';
|
|
7
8
|
export interface LifecycleHost {
|
|
8
9
|
repaint(): void;
|
|
9
10
|
resetState(): void;
|
|
@@ -44,4 +45,3 @@ export declare function suspendInput(self: LifecycleHost): void;
|
|
|
44
45
|
export declare function resumeInput(self: LifecycleHost): void;
|
|
45
46
|
export declare function arm(self: LifecycleHost & KeyDispatchHost): Promise<void>;
|
|
46
47
|
export declare function disarm(self: LifecycleHost): void;
|
|
47
|
-
export declare function endTurnFlush(self: LifecycleHost): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { LifecycleHost } from './terminal-compositor.lifecycle.js';
|
|
2
|
+
export declare function enterRawMode(self: LifecycleHost): void;
|
|
3
|
+
export declare function exitRawMode(self: LifecycleHost): void;
|
|
4
|
+
export declare function enableBracketedPasteAndScrollKey(self: LifecycleHost): void;
|
|
5
|
+
export declare function disableBracketedPasteAndScrollKey(self: LifecycleHost): void;
|