agent-afk 5.33.0 → 5.33.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.
- package/dist/agent/hooks.d.ts +3 -0
- package/dist/agent/tools/dispatcher.d.ts +3 -0
- package/dist/cli.mjs +7 -7
- package/dist/index.mjs +4 -4
- package/dist/telegram.mjs +6 -6
- package/package.json +1 -1
package/dist/agent/hooks.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SubagentTrace } from './subagent/result.js';
|
|
2
|
+
import type { GrantManager } from '../cli/slash/commands/allow-dir.js';
|
|
2
3
|
export type HarnessHookEvent = 'SessionStart' | 'SessionEnd' | 'SubagentStart' | 'SubagentStop' | 'PreToolUse' | 'PostToolUse' | 'PreCompact' | 'PostToolUseFailure' | 'Stop' | 'UserPromptSubmit';
|
|
3
4
|
export interface HookDecision {
|
|
4
5
|
continue?: boolean;
|
|
@@ -41,6 +42,7 @@ export interface PreToolUseContext {
|
|
|
41
42
|
cwd?: string;
|
|
42
43
|
toolName: string;
|
|
43
44
|
input?: unknown;
|
|
45
|
+
grantManager?: GrantManager;
|
|
44
46
|
}
|
|
45
47
|
export interface PostToolUseContext {
|
|
46
48
|
event: 'PostToolUse';
|
|
@@ -50,6 +52,7 @@ export interface PostToolUseContext {
|
|
|
50
52
|
toolName: string;
|
|
51
53
|
input?: unknown;
|
|
52
54
|
output?: unknown;
|
|
55
|
+
grantManager?: GrantManager;
|
|
53
56
|
}
|
|
54
57
|
export interface PreCompactContext {
|
|
55
58
|
event: 'PreCompact';
|
|
@@ -9,6 +9,7 @@ import type { ToolHandler, ConcurrencyClassifier } from './types.js';
|
|
|
9
9
|
import { type ToolPermissionConfig } from './permissions.js';
|
|
10
10
|
import type { CanUseTool } from '../types/sdk-types.js';
|
|
11
11
|
import { type GrantSnapshot } from './grant-manager.js';
|
|
12
|
+
import type { GrantManager } from '../../cli/slash/commands/allow-dir.js';
|
|
12
13
|
import type { TraceWriter } from '../trace/index.js';
|
|
13
14
|
export { defaultConcurrencyClassifier } from './dispatch-batching.js';
|
|
14
15
|
export declare const REPEAT_CIRCUIT_BREAKER_THRESHOLD = 8;
|
|
@@ -31,6 +32,7 @@ export interface SessionToolDispatcherOptions {
|
|
|
31
32
|
env?: Record<string, string>;
|
|
32
33
|
sessionId?: string;
|
|
33
34
|
parentSessionId?: string;
|
|
35
|
+
sessionGrantManager?: GrantManager;
|
|
34
36
|
traceWriter?: TraceWriter;
|
|
35
37
|
readOnlyBash?: boolean;
|
|
36
38
|
}
|
|
@@ -52,6 +54,7 @@ export declare class SessionToolDispatcher implements ToolDispatcher {
|
|
|
52
54
|
private readonly _env;
|
|
53
55
|
private readonly sessionId;
|
|
54
56
|
private readonly parentSessionId;
|
|
57
|
+
private readonly sessionGrantManager;
|
|
55
58
|
private readonly traceWriter;
|
|
56
59
|
private readonly readOnlyBash;
|
|
57
60
|
private repeatBreaker;
|