agent-afk 5.224.4 → 5.224.6

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.
@@ -1,6 +1,6 @@
1
1
  export { createHookRegistry } from './hook-registry.js';
2
2
  import type { SubagentTrace } from './subagent/result.js';
3
- import type { GrantManager } from '../cli/slash/commands/allow-dir.js';
3
+ import type { GrantManager } from './tools/grant-manager.js';
4
4
  export type HarnessHookEvent = 'SessionStart' | 'SessionEnd' | 'SubagentStart' | 'SubagentStop' | 'PreToolUse' | 'PostToolUse' | 'PreCompact' | 'PostToolUseFailure' | 'Stop' | 'UserPromptSubmit';
5
5
  export interface HookDecision {
6
6
  continue?: boolean;
@@ -10,7 +10,7 @@ import type { ComposeExecutor } from '../../tools/compose-executor.js';
10
10
  import type { TraceSink } from '../../trace/index.js';
11
11
  import type { AnthropicToolDef, ToolHandler } from '../../tools/types.js';
12
12
  import type { CustomToolDef } from '../../tools/custom-tool.js';
13
- import type { GrantManager } from '../../../cli/slash/commands/allow-dir.js';
13
+ import type { GrantManager } from '../../tools/grant-manager.js';
14
14
  import type { RuntimeStateSource } from '../../awareness/index.js';
15
15
  import type { SpawnedPidRegistry } from '../../tools/handlers/pid-registry.js';
16
16
  import { SessionToolDispatcher } from '../../tools/dispatcher.js';
@@ -6,7 +6,7 @@ import type { SkillExecutor } from './skill-executor.js';
6
6
  import type { ComposeExecutor } from './compose-executor.js';
7
7
  import type { ToolHandler, ToolHandlerContext } from './types.js';
8
8
  import type { TraceSink } from '../trace/index.js';
9
- import type { GrantManager } from '../../cli/slash/commands/allow-dir.js';
9
+ import type { GrantManager } from './grant-manager.js';
10
10
  import type { PreDispatchGateDeps } from './dispatcher.pre-dispatch-gates.js';
11
11
  export interface CoreExecDeps {
12
12
  handlers: Map<string, ToolHandler>;
@@ -11,8 +11,7 @@ import type { ToolActivityReporter } from '../providers/shared/tool-activity.js'
11
11
  import type { SpawnedPidRegistry } from './handlers/pid-registry.js';
12
12
  import type { ToolPermissionConfig } from './permissions.js';
13
13
  import type { CanUseTool } from '../types/sdk-types.js';
14
- import { type GrantSnapshot } from './grant-manager.js';
15
- import type { GrantManager } from '../../cli/slash/commands/allow-dir.js';
14
+ import { type GrantSnapshot, type GrantManager } from './grant-manager.js';
16
15
  import type { TraceSink } from '../trace/index.js';
17
16
  export { defaultConcurrencyClassifier } from './dispatch-batching.js';
18
17
  export declare const REPEAT_CIRCUIT_BREAKER_THRESHOLD = 8;
@@ -5,7 +5,7 @@ import type { HookRegistry } from '../hooks.js';
5
5
  import type { ToolCall, ToolResult } from '../providers/anthropic-direct/types.js';
6
6
  import type { CanUseTool } from '../types/sdk-types.js';
7
7
  import type { TraceSink } from '../trace/index.js';
8
- import type { GrantManager } from '../../cli/slash/commands/allow-dir.js';
8
+ import type { GrantManager } from './grant-manager.js';
9
9
  export interface PreDispatchGateMutableState {
10
10
  repeatBreaker: {
11
11
  fingerprint: string;
@@ -1,3 +1,14 @@
1
+ export interface GrantManager {
2
+ addReadRoot(absPath: string, source: 'slash' | 'tool', sessionId?: string): void;
3
+ addWriteRoot(absPath: string, source: 'slash' | 'tool', sessionId?: string): void;
4
+ revokeRoot(absPath: string, source: 'slash' | 'tool', sessionId?: string): void;
5
+ getGrants(): {
6
+ resolveBase: string | undefined;
7
+ readRoots: string[];
8
+ writeRoots: string[];
9
+ allowAll?: boolean;
10
+ };
11
+ }
1
12
  export type GrantAuditAction = 'grant-read' | 'grant-write' | 'revoke';
2
13
  export type GrantSource = 'slash' | 'tool';
3
14
  export interface GrantSnapshot {
@@ -1,7 +1,7 @@
1
1
  import type { HookContext, HookDecision } from '../../hooks.js';
2
2
  export declare const SENSITIVE_PATH_SIGNAL: RegExp;
3
3
  export interface BashRestrictionHookOptions {
4
- getGrantManager?: () => (import('../../../cli/slash/commands/allow-dir.js').GrantManager | undefined);
4
+ getGrantManager?: () => (import('../grant-manager.js').GrantManager | undefined);
5
5
  disableInterpreterGuard?: boolean;
6
6
  forceInterpreterGuard?: boolean;
7
7
  }
@@ -1,4 +1,4 @@
1
- import type { GrantManager } from '../../../cli/slash/commands/allow-dir.js';
1
+ import type { GrantManager } from '../grant-manager.js';
2
2
  import type { HookHandler } from '../../hooks.js';
3
3
  export type PathApprovalSurface = 'repl' | 'telegram' | 'web' | 'unknown';
4
4
  export interface PathApprovalHookOptions {
@@ -1,14 +1,5 @@
1
1
  import type { SlashCommand } from '../types.js';
2
- export interface GrantManager {
3
- addReadRoot(absPath: string, source: 'slash' | 'tool', sessionId?: string): void;
4
- addWriteRoot(absPath: string, source: 'slash' | 'tool', sessionId?: string): void;
5
- revokeRoot(absPath: string, source: 'slash' | 'tool', sessionId?: string): void;
6
- getGrants(): {
7
- resolveBase: string | undefined;
8
- readRoots: string[];
9
- writeRoots: string[];
10
- allowAll?: boolean;
11
- };
12
- }
2
+ import type { GrantManager } from '../../../agent/tools/grant-manager.js';
3
+ export type { GrantManager };
13
4
  export declare function setAllowDirDispatcher(manager: GrantManager): void;
14
5
  export declare const allowDirCmd: SlashCommand;