agent-afk 5.303.9 → 5.303.10
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/tools/dispatcher.d.ts +1 -0
- package/dist/agent/tools/dispatcher.pre-dispatch-gates.d.ts +1 -0
- package/dist/agent/tools/pre-tool-context.d.ts +7 -0
- package/dist/cli.mjs +344 -341
- package/dist/index.mjs +146 -143
- package/dist/telegram.mjs +169 -166
- package/package.json +1 -1
|
@@ -93,6 +93,7 @@ export declare class SessionToolDispatcher implements ToolDispatcher {
|
|
|
93
93
|
setAllowAll(allow: boolean): void;
|
|
94
94
|
setResolveBase(newCwd: string): void;
|
|
95
95
|
get toolDefs(): readonly AnthropicToolDef[];
|
|
96
|
+
private readonly preToolContext;
|
|
96
97
|
private gateDeps;
|
|
97
98
|
private coreExecDeps;
|
|
98
99
|
private runPreDispatchGates;
|
|
@@ -31,6 +31,7 @@ export interface PreDispatchGateDeps {
|
|
|
31
31
|
resolveBase: string | undefined;
|
|
32
32
|
traceWriter: TraceSink | undefined;
|
|
33
33
|
isRegisteredTool: (toolName: string) => boolean;
|
|
34
|
+
capturePreToolContext?: (call: ToolCall, context: string) => void;
|
|
34
35
|
denialReason: (toolName: string, permissionReason: string | undefined) => string;
|
|
35
36
|
}
|
|
36
37
|
export declare function emitPreToolUseBlock(blockedTool: string, reason: string, deps: PreDispatchGateDeps): Promise<void>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ToolCall, ToolResult } from '../providers/anthropic-direct/types.js';
|
|
2
|
+
import type { TraceSink } from '../trace/index.js';
|
|
3
|
+
export declare class PreToolContext {
|
|
4
|
+
private readonly pending;
|
|
5
|
+
capture(call: ToolCall, context: string): void;
|
|
6
|
+
deliver(call: ToolCall, result: ToolResult, writer?: TraceSink): Promise<ToolResult>;
|
|
7
|
+
}
|