awb-agent-manager 1.6.198 → 1.6.199

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.
@@ -0,0 +1,60 @@
1
+ import { type AwbConfig } from './rest.js';
2
+ export interface AgentSessionRequest {
3
+ session_id: string;
4
+ workspace_id: string;
5
+ agent_id: string;
6
+ owner_user_id: string;
7
+ op: 'open' | 'prompt' | 'permission' | 'cancel' | 'set_mode' | 'close';
8
+ runtime: string;
9
+ cwd: string;
10
+ native_session_id: string | null;
11
+ permission_policy: string;
12
+ turn_id?: string;
13
+ text?: string;
14
+ request_id?: string;
15
+ option_id?: string | null;
16
+ mode_id?: string;
17
+ issued_at: string;
18
+ }
19
+ export interface AgentSessionAgentContext {
20
+ agent_id: string;
21
+ workspace_id: string;
22
+ api_key: string;
23
+ cwd: string;
24
+ cli: string;
25
+ cli_home_dir: string;
26
+ extra_env?: Record<string, string>;
27
+ model?: string | null;
28
+ runtime_config?: {
29
+ extra?: Record<string, unknown>;
30
+ } | null;
31
+ }
32
+ export interface ResolvedAcpCommand {
33
+ command: string;
34
+ args: string[];
35
+ }
36
+ export interface AgentSessionRunnerOptions {
37
+ idleMinutes?: number;
38
+ permissionTimeoutMs?: number;
39
+ requestTimeoutMs?: number;
40
+ promptTimeoutMs?: number;
41
+ flushIntervalMs?: number;
42
+ commandResolver?: (runtime: string, ctx: AgentSessionAgentContext) => Promise<ResolvedAcpCommand>;
43
+ baseEnv?: NodeJS.ProcessEnv;
44
+ clientVersion?: string;
45
+ }
46
+ export declare function resolveAcpCommandForRuntime(runtime: string, ctx: AgentSessionAgentContext): Promise<ResolvedAcpCommand>;
47
+ export declare class AgentSessionRunner {
48
+ #private;
49
+ constructor(config: AwbConfig, options?: AgentSessionRunnerOptions);
50
+ _snapshot(): Array<{
51
+ session_id: string;
52
+ agent_id: string;
53
+ runtime: string;
54
+ busy: boolean;
55
+ pid: number | null;
56
+ }>;
57
+ countInFlight(): number;
58
+ handle(request: AgentSessionRequest, ctx: AgentSessionAgentContext | undefined): Promise<void>;
59
+ stopAll(reason?: string): Promise<void>;
60
+ }