agent-afk 5.305.4 → 5.305.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.
@@ -5,6 +5,7 @@ export interface ResolvedComposeAgent {
5
5
  systemPrompt?: string;
6
6
  namedAgentModel?: string;
7
7
  canUseTool?: CanUseTool;
8
+ readOnlyBash?: true;
8
9
  }
9
10
  export declare function buildAllowlistCanUseTool(allowed: string[]): CanUseTool;
10
11
  export declare function resolveComposeNodeAgent(agentType: string | undefined, agentRegistry: AgentRegistry | undefined): ResolvedComposeAgent;
@@ -1,6 +1,11 @@
1
1
  import type { ModelProvider } from '../provider.js';
2
2
  import type { WorkspaceStore } from '../workspace/workspace-store.js';
3
+ import type { CanUseTool } from '../types.js';
3
4
  import type { AgentModelInput } from '../types/model-types.js';
4
- export declare function resolveComposeNodeProvider(nodeModel: AgentModelInput, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl: string | undefined): {
5
+ export interface ComposeNodeRestrictions {
6
+ canUseTool?: CanUseTool;
7
+ readOnlyBash?: boolean;
8
+ }
9
+ export declare function resolveComposeNodeProvider(nodeModel: AgentModelInput, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl: string | undefined, restrictions?: ComposeNodeRestrictions): {
5
10
  provider: ModelProvider;
6
11
  } | Record<string, never>;
@@ -1,6 +1,6 @@
1
1
  import type { IAgentSession } from '../types.js';
2
2
  import type { ModelProvider } from '../provider.js';
3
- import type { AgentModelInput } from '../types.js';
3
+ import type { AgentModelInput, CanUseTool } from '../types.js';
4
4
  import type { Surface } from '../awareness/types.js';
5
5
  import type { ReadScopeInputs } from '../subagent-read-scope.js';
6
6
  import type { JournalParent } from '../subagent/fork-types.js';
@@ -33,7 +33,7 @@ export interface CreateChildProviderFactoryOptions {
33
33
  }
34
34
  export declare function createChildProviderFactory(opts?: CreateChildProviderFactoryOptions): (args: ChildProviderFactoryArgs) => ModelProvider;
35
35
  export declare function buildReadOnlyReconProvider(model: AgentModelInput | undefined, openaiBaseUrl?: string, allowedTools?: readonly string[]): ModelProvider;
36
- export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore, openaiBaseUrl?: string, readOnlyBash?: boolean): ModelProvider;
36
+ export declare function buildComposeNodeProvider(model: AgentModelInput | undefined, workspaceStore: WorkspaceStore | undefined, openaiBaseUrl?: string, readOnlyBash?: boolean, canUseTool?: CanUseTool): ModelProvider;
37
37
  export declare function createChildSkillExecutorFactory(defaultModel: AgentModelInput, apiKey: string | undefined, childProviderFactory: (args: ChildProviderFactoryArgs) => ModelProvider, baseUrl?: string, traceWriter?: TraceSink, backgroundRegistry?: BackgroundAgentRegistry, cwd?: string, resolveApiKeyForModel?: (model: string) => string | undefined, surface?: Surface, defaultSubagentModel?: AgentModelInput, agentRegistry?: AgentRegistry, openaiBaseUrl?: string, xaiBaseUrl?: string, workspaceStore?: WorkspaceStore, delegationBudget?: import('./delegation-budget.js').DelegationBudget): (depth: number, maxDepth: number, signal: AbortSignal, inheritedCwd?: string, inheritedReadScope?: ReadScopeInputs, skillDispatchName?: string, journalParent?: JournalParent, rootSessionId?: string) => SkillExecutor;
38
38
  export type PhaseRole = 'read-only' | 'read-write';
39
39
  export declare function buildSkillRestrictedProvider(allowedTools: string[], model: AgentModelInput | undefined, readOnlyBash?: boolean, openaiBaseUrl?: string, workspaceStore?: WorkspaceStore): ModelProvider;
@@ -0,0 +1,7 @@
1
+ export interface ChildSessionSignals {
2
+ parentSessionId: string | undefined;
3
+ subagentId: string | undefined;
4
+ }
5
+ export declare function isChildDispatcherSession(s: ChildSessionSignals): boolean;
6
+ export declare function isPeerToolBlocked(toolName: string, s: ChildSessionSignals): boolean;
7
+ export declare function peerToolChildDenial(toolName: string): string;
@@ -0,0 +1 @@
1
+ export declare const CPR_REPLY_RE: RegExp;
@@ -1 +1,6 @@
1
1
  export declare function emitKeypressEventsImmediateEscape(stream: NodeJS.ReadableStream): void;
2
+ export declare const CPR_KEYPRESS_GRACE_MS = 500;
3
+ export declare function armCprKeypressGuard(stdin: NodeJS.ReadableStream, durationMs: number): void;
4
+ export declare function isCprKeypressGuardActive(stdin: NodeJS.ReadableStream): boolean;
5
+ export declare function isCprSequence(stdin: NodeJS.ReadableStream, sequence: string): boolean;
6
+ export declare function __resetCprKeypressGuardForTests(): void;
@@ -5,7 +5,10 @@ export declare function parseCprReply(s: string): {
5
5
  } | null;
6
6
  export declare const CPR_REQUEST = "\u001B[6n";
7
7
  export declare const CPR_TIMEOUT_MS = 120;
8
+ export declare const CPR_RTT_SCALE = 4;
9
+ export declare const CPR_TIMEOUT_CEILING_MS = 1500;
8
10
  export declare const CPR_MAX_REQUERY = 8;
11
+ export declare function __resetCprRttForTests(): void;
9
12
  export interface CprHost {
10
13
  readonly stdout: NodeJS.WriteStream;
11
14
  readonly stdin: NodeJS.ReadStream;