omnara 0.1.10 → 0.2.0

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.
Files changed (45) hide show
  1. package/bin/omnara.js +2 -2
  2. package/dist/auth/auth-provider.d.ts +9 -2
  3. package/dist/auth/cli-auth-service.d.ts +0 -1
  4. package/dist/auth/credential-manager.d.ts +10 -1
  5. package/dist/auth/credentials-store.d.ts +4 -1
  6. package/dist/auth/ensure-cli-credentials.d.ts +13 -0
  7. package/dist/cli.js +5132 -1478
  8. package/dist/cli.js.map +4 -4
  9. package/dist/commands/agent.d.ts +3 -2
  10. package/dist/commands/daemon.d.ts +2 -0
  11. package/dist/commands/index.d.ts +2 -1
  12. package/dist/config/omnara-config.d.ts +2 -17
  13. package/dist/daemon/config-store.d.ts +37 -0
  14. package/dist/daemon/daemon-client.d.ts +26 -0
  15. package/dist/daemon/daemon-launcher.d.ts +30 -0
  16. package/dist/daemon/daemon-service.d.ts +30 -0
  17. package/dist/daemon/directory-registry.d.ts +17 -0
  18. package/dist/daemon/file-logger.d.ts +24 -0
  19. package/dist/daemon/local-control-server.d.ts +37 -0
  20. package/dist/daemon/machine-supervisor.d.ts +60 -0
  21. package/dist/daemon/paths.d.ts +9 -0
  22. package/dist/daemon/run-daemon.d.ts +1 -0
  23. package/dist/daemon/session-log-manager.d.ts +10 -0
  24. package/dist/daemon/session-pid-registry.d.ts +5 -0
  25. package/dist/daemon/session-runner.d.ts +28 -0
  26. package/dist/daemon/state-store.d.ts +14 -0
  27. package/dist/http/machines.d.ts +3 -0
  28. package/dist/http/user-sessions.d.ts +5 -2
  29. package/dist/http/workspaces.d.ts +4 -0
  30. package/dist/orchestrator/agent-orchestrator.d.ts +7 -1
  31. package/dist/orchestrator/ai-client.d.ts +3 -0
  32. package/dist/orchestrator/orchestrator-prompt.md +171 -43
  33. package/dist/orchestrator/utils/completions-manager.d.ts +8 -0
  34. package/dist/orchestrator/utils/worktree-manager.d.ts +30 -1
  35. package/dist/orchestrator/worker-manager.d.ts +9 -4
  36. package/dist/orchestrator-prompt.md +171 -43
  37. package/dist/package-info.d.ts +3 -0
  38. package/dist/relay/relay-bridge.d.ts +12 -0
  39. package/dist/schemas/index.d.ts +2 -2
  40. package/dist/utils/claude-code-check.d.ts +1 -20
  41. package/dist/utils/version-check.d.ts +1 -5
  42. package/package.json +6 -4
  43. package/scripts/copy-assets.mjs +41 -0
  44. package/dist/repl/terminal-repl.d.ts +0 -9
  45. package/dist/voice/voice-service.d.ts +0 -19
@@ -1,7 +1,8 @@
1
- import { Command } from 'commander';
2
- export declare function buildAgentCommand(): Command;
3
1
  export interface OrchestratorOptions {
4
2
  backendUrl?: string;
5
3
  frontendUrl?: string;
4
+ workspaceId?: string;
5
+ userSessionId?: string;
6
+ agentSessionId?: string;
6
7
  }
7
8
  export declare function runAgentOrchestrator(options?: OrchestratorOptions): Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare function buildDaemonCommand(): Command;
@@ -1,2 +1,3 @@
1
- export { buildAgentCommand, runAgentOrchestrator, type OrchestratorOptions } from './agent.js';
1
+ export { runAgentOrchestrator, type OrchestratorOptions } from './agent.js';
2
2
  export { buildAuthCommand } from './auth.js';
3
+ export { buildDaemonCommand } from './daemon.js';
@@ -1,22 +1,7 @@
1
1
  import * as z from 'zod';
2
+ import type { WorkspaceConfigSchema } from '@omnara/shared-js/schemas';
3
+ declare const OmnaraConfig: z.ZodType<WorkspaceConfigSchema.WorkspaceConfig>;
2
4
  export type OmnaraConfig = z.infer<typeof OmnaraConfig>;
3
- declare const OmnaraConfig: z.ZodObject<{
4
- worktrees: z.ZodDefault<z.ZodObject<{
5
- enabled: z.ZodDefault<z.ZodBoolean>;
6
- }, "strip", z.ZodTypeAny, {
7
- enabled: boolean;
8
- }, {
9
- enabled?: boolean | undefined;
10
- }>>;
11
- }, "strip", z.ZodTypeAny, {
12
- worktrees: {
13
- enabled: boolean;
14
- };
15
- }, {
16
- worktrees?: {
17
- enabled?: boolean | undefined;
18
- } | undefined;
19
- }>;
20
5
  /**
21
6
  * Read and parse the omnara.jsonc configuration file
22
7
  *
@@ -0,0 +1,37 @@
1
+ export interface DirectoryEntry {
2
+ id: string;
3
+ path: string;
4
+ label?: string;
5
+ addedAt: string;
6
+ lastUsedAt?: string;
7
+ }
8
+ export interface MachineMetadata {
9
+ id?: string;
10
+ name?: string;
11
+ token?: string;
12
+ lastSeenAt?: string;
13
+ tokenExpiresAt?: string;
14
+ }
15
+ export interface DaemonSettings {
16
+ maxSessions?: number;
17
+ autoUpdateCheckSeconds?: number;
18
+ }
19
+ export interface DaemonConfigData {
20
+ machine?: MachineMetadata;
21
+ directories: DirectoryEntry[];
22
+ settings?: DaemonSettings;
23
+ }
24
+ export declare class DaemonConfigStore {
25
+ private readonly filePath;
26
+ constructor(filePath?: string);
27
+ load(): Promise<DaemonConfigData>;
28
+ save(config: DaemonConfigData): Promise<void>;
29
+ update(mutate: (config: DaemonConfigData) => void | DaemonConfigData): Promise<DaemonConfigData>;
30
+ ensureDirectory(absolutePath: string, options?: {
31
+ label?: string;
32
+ touch?: boolean;
33
+ }): Promise<{
34
+ entry: DirectoryEntry;
35
+ created: boolean;
36
+ }>;
37
+ }
@@ -0,0 +1,26 @@
1
+ import type { DirectoryEntry } from './config-store.js';
2
+ import type { DaemonStatusPayload, LaunchWorkspaceResult } from './local-control-server.js';
3
+ import { DaemonStateStore } from './state-store.js';
4
+ import type { MachineMessageSchema } from '../../../shared-js/dist/schemas/generated.js';
5
+ export declare class DaemonClient {
6
+ private readonly stateStore;
7
+ constructor(stateStore?: DaemonStateStore);
8
+ getStatus(): Promise<DaemonStatusPayload | null>;
9
+ addDirectory(directoryPath: string, label?: string): Promise<{
10
+ directory: DirectoryEntry;
11
+ created: boolean;
12
+ } | null>;
13
+ stop(status?: Exclude<MachineMessageSchema.MachineStatus, 'ONLINE'>): Promise<boolean>;
14
+ launchSession(options: {
15
+ path: string;
16
+ initialPrompt?: string;
17
+ userSessionId?: string;
18
+ }): Promise<LaunchWorkspaceResult | null>;
19
+ private getEndpoint;
20
+ private request;
21
+ }
22
+ export declare class HttpError extends Error {
23
+ readonly statusCode: number;
24
+ readonly body?: string | undefined;
25
+ constructor(message: string, statusCode: number, body?: string | undefined);
26
+ }
@@ -0,0 +1,30 @@
1
+ import type { Logger } from '../utils/logger.js';
2
+ export interface StartDaemonOptions {
3
+ waitForReady?: boolean;
4
+ reason?: string;
5
+ backendUrl?: string;
6
+ frontendUrl?: string;
7
+ logger?: Logger;
8
+ }
9
+ export interface StopDaemonOptions {
10
+ logger?: Logger;
11
+ }
12
+ export interface EnsureDaemonOptions {
13
+ cwd?: string;
14
+ label?: string;
15
+ reason?: string;
16
+ backendUrl?: string;
17
+ frontendUrl?: string;
18
+ logger?: Logger;
19
+ }
20
+ export interface StatusOptions {
21
+ logger?: Logger;
22
+ }
23
+ export interface KillAllOptions {
24
+ logger?: Logger;
25
+ }
26
+ export declare function ensureDaemonForSession(options?: EnsureDaemonOptions): Promise<void>;
27
+ export declare function startDaemon(options?: StartDaemonOptions): Promise<boolean>;
28
+ export declare function stopDaemon(options?: StopDaemonOptions): Promise<boolean>;
29
+ export declare function showDaemonStatus(options?: StatusOptions): Promise<void>;
30
+ export declare function killAllDaemonProcesses(options?: KillAllOptions): Promise<void>;
@@ -0,0 +1,30 @@
1
+ import type { Logger } from '../utils/logger.js';
2
+ import { DirectoryRegistry } from './directory-registry.js';
3
+ import { DaemonStateStore } from './state-store.js';
4
+ import { MachineSupervisor } from './machine-supervisor.js';
5
+ import type { MachineMessageSchema } from '../../../shared-js/dist/schemas/generated.js';
6
+ export interface DaemonServiceOptions {
7
+ directoryRegistry?: DirectoryRegistry;
8
+ stateStore?: DaemonStateStore;
9
+ machineSupervisor?: MachineSupervisor;
10
+ logger?: Logger;
11
+ }
12
+ export declare class DaemonService {
13
+ private readonly logger;
14
+ private readonly directoryRegistry;
15
+ private readonly stateStore;
16
+ private readonly machineSupervisor;
17
+ private controlHandle;
18
+ private startedAt;
19
+ private stopPromise;
20
+ private resolveStopPromise;
21
+ private stopping;
22
+ constructor(options?: DaemonServiceOptions);
23
+ start(): Promise<void>;
24
+ stop(status?: Exclude<MachineMessageSchema.MachineStatus, 'ONLINE'>): Promise<void>;
25
+ waitForShutdown(): Promise<void>;
26
+ private buildStatusPayload;
27
+ private handleLaunchRequest;
28
+ private persistState;
29
+ private cleanupState;
30
+ }
@@ -0,0 +1,17 @@
1
+ import { DaemonConfigStore, type DirectoryEntry } from './config-store.js';
2
+ export interface DirectoryEnsureOptions {
3
+ label?: string;
4
+ updateLastUsed?: boolean;
5
+ skipValidation?: boolean;
6
+ }
7
+ export declare class DirectoryRegistry {
8
+ private readonly store;
9
+ constructor(store?: DaemonConfigStore);
10
+ list(): Promise<DirectoryEntry[]>;
11
+ getEntry(directoryPath: string): Promise<DirectoryEntry | null>;
12
+ ensureDirectory(directoryPath: string, options?: DirectoryEnsureOptions): Promise<{
13
+ entry: DirectoryEntry;
14
+ created: boolean;
15
+ }>;
16
+ private assertDirectory;
17
+ }
@@ -0,0 +1,24 @@
1
+ import fs from 'node:fs';
2
+ import { ControlledLogger, LogLevel } from '../utils/logger.js';
3
+ export declare class FileBackedLogger extends ControlledLogger {
4
+ private readonly stream;
5
+ private closed;
6
+ constructor(stream: fs.WriteStream, options?: {
7
+ logLevel?: LogLevel;
8
+ forceOutput?: boolean;
9
+ });
10
+ log(...args: unknown[]): void;
11
+ info(...args: unknown[]): void;
12
+ debug(...args: unknown[]): void;
13
+ warn(...args: unknown[]): void;
14
+ error(...args: unknown[]): void;
15
+ trace(...args: unknown[]): void;
16
+ important(...args: unknown[]): void;
17
+ success(...args: unknown[]): void;
18
+ close(): Promise<void>;
19
+ private writeLine;
20
+ }
21
+ export declare function createDaemonFileLogger(): Promise<{
22
+ logger: FileBackedLogger;
23
+ logPath: string;
24
+ }>;
@@ -0,0 +1,37 @@
1
+ import type { Logger } from '../utils/logger.js';
2
+ import type { DirectoryEntry } from './config-store.js';
3
+ import { DirectoryRegistry } from './directory-registry.js';
4
+ import type { MachineMessageSchema } from '../../../shared-js/dist/schemas/generated.js';
5
+ export interface DaemonStatusPayload {
6
+ pid: number;
7
+ startedAt: string;
8
+ directories: DirectoryEntry[];
9
+ }
10
+ export interface LocalControlServerOptions {
11
+ directoryRegistry: DirectoryRegistry;
12
+ getStatus: () => Promise<DaemonStatusPayload>;
13
+ onStopRequested: (status: Exclude<MachineMessageSchema.MachineStatus, 'ONLINE'>) => Promise<void> | void;
14
+ onLaunchRequested?: (payload: LaunchWorkspacePayload) => Promise<LaunchWorkspaceResult>;
15
+ logger?: Logger;
16
+ }
17
+ export interface LocalControlServerHandle {
18
+ port: number;
19
+ token: string;
20
+ close(): Promise<void>;
21
+ }
22
+ export interface LaunchWorkspacePayload {
23
+ path: string;
24
+ initialPrompt?: string;
25
+ userSessionId?: string;
26
+ }
27
+ export interface LaunchWorkspaceSuccessPayload {
28
+ user_session_id: string;
29
+ workspace_id: string;
30
+ launch_id: string;
31
+ }
32
+ export interface LaunchWorkspaceResult {
33
+ status: 'ok' | 'error' | string;
34
+ payload?: LaunchWorkspaceSuccessPayload | null;
35
+ error?: string;
36
+ }
37
+ export declare function startLocalControlServer(options: LocalControlServerOptions): Promise<LocalControlServerHandle>;
@@ -0,0 +1,60 @@
1
+ import type { Logger } from '../utils/logger.js';
2
+ import { DirectoryRegistry } from './directory-registry.js';
3
+ import { DaemonConfigStore } from './config-store.js';
4
+ import type { AuthProvider } from '../auth/auth-provider.js';
5
+ import type { LaunchWorkspaceResult } from './local-control-server.js';
6
+ import type { MachineMessageSchema } from '../../../shared-js/dist/schemas/generated.js';
7
+ export interface MachineSupervisorOptions {
8
+ backendUrl: string;
9
+ frontendUrl?: string;
10
+ directoryRegistry: DirectoryRegistry;
11
+ configStore: DaemonConfigStore;
12
+ authProvider: AuthProvider;
13
+ logger?: Logger;
14
+ }
15
+ export declare class MachineSupervisor {
16
+ private readonly backendUrl;
17
+ private readonly frontendUrl?;
18
+ private readonly directoryRegistry;
19
+ private readonly configStore;
20
+ private readonly authProvider;
21
+ private readonly apiClient;
22
+ private readonly logger;
23
+ private readonly sessionManager;
24
+ private running;
25
+ private stopRequested;
26
+ private loopPromise;
27
+ private websocket;
28
+ private heartbeatTimer;
29
+ private waitingForLogin;
30
+ private machineRegistrationReady;
31
+ constructor(options: MachineSupervisorOptions);
32
+ start(): Promise<void>;
33
+ launchWorkspaceSessionLocal(options: {
34
+ path: string;
35
+ initialPrompt?: string;
36
+ userSessionId?: string;
37
+ }): Promise<LaunchWorkspaceResult>;
38
+ stop(status: Exclude<MachineMessageSchema.MachineStatus, 'ONLINE'>): Promise<void>;
39
+ private runLoop;
40
+ private registerMachine;
41
+ private runWebsocket;
42
+ private handleSocketMessage;
43
+ private handleRpcRequest;
44
+ private sendRpcResponse;
45
+ private launchWorkspaceSessionFromRpc;
46
+ private launchWorkspaceSession;
47
+ private ensureWorkspaceForDirectory;
48
+ private ensureWorkspaceWithRetry;
49
+ private ensureUserSessionForWorkspace;
50
+ private buildWorkspaceMetadata;
51
+ private getMachineId;
52
+ private waitForMachineRegistration;
53
+ private startHeartbeatTimer;
54
+ private clearHeartbeatTimer;
55
+ private sendHeartbeat;
56
+ private sendMessage;
57
+ private clearLoginWait;
58
+ private closeWebsocket;
59
+ private recoverMachineRegistration;
60
+ }
@@ -0,0 +1,9 @@
1
+ export declare const OMNARA_HOME_DIR: string;
2
+ export declare const DAEMON_CONFIG_PATH: string;
3
+ export declare const DAEMON_STATE_PATH: string;
4
+ export declare const DAEMON_LOG_DIR: string;
5
+ export declare const USER_SESSION_LOG_ROOT: string;
6
+ export declare const DEFAULT_DIR_MODE = 448;
7
+ export declare const DEFAULT_FILE_MODE = 384;
8
+ export declare function ensureOmnaraHome(): Promise<void>;
9
+ export declare function ensureDirectory(dirPath: string): Promise<void>;
@@ -0,0 +1 @@
1
+ export declare function runDaemonProcess(): Promise<void>;
@@ -0,0 +1,10 @@
1
+ import fs from 'node:fs';
2
+ export interface SessionLogHandle {
3
+ stream: fs.WriteStream;
4
+ logPath: string;
5
+ }
6
+ export declare function createSessionLog(handle: {
7
+ workspaceId: string;
8
+ launchId: string;
9
+ }): Promise<SessionLogHandle>;
10
+ export declare function writeSessionLog(stream: fs.WriteStream, level: string, args: unknown[]): void;
@@ -0,0 +1,5 @@
1
+ export interface SessionRegistry {
2
+ [userSessionId: string]: number;
3
+ }
4
+ export declare function withSessionRegistry<T>(fn: (registry: SessionRegistry) => Promise<[SessionRegistry, T]> | [SessionRegistry, T]): Promise<T>;
5
+ export declare function isProcessAlive(pid: number): Promise<boolean>;
@@ -0,0 +1,28 @@
1
+ import type { Logger } from '../utils/logger.js';
2
+ import type { WorkspaceConfig } from '@omnara/shared-js/schemas';
3
+ import { DirectoryRegistry } from './directory-registry.js';
4
+ export interface SessionManagerOptions {
5
+ backendUrl: string;
6
+ frontendUrl?: string;
7
+ directoryRegistry: DirectoryRegistry;
8
+ logger: Logger;
9
+ }
10
+ export interface SessionLaunchSpec {
11
+ launchId: string;
12
+ directory: string;
13
+ userSessionId: string;
14
+ workspaceId: string;
15
+ workspaceConfig?: WorkspaceConfig | null;
16
+ initialPrompt?: string | null;
17
+ metadata?: Record<string, unknown> | null;
18
+ }
19
+ export declare class SessionManager {
20
+ private readonly backendUrl;
21
+ private readonly frontendUrl?;
22
+ private readonly directoryRegistry;
23
+ private readonly logger;
24
+ private readonly runners;
25
+ constructor(options: SessionManagerOptions);
26
+ startSession(spec: SessionLaunchSpec): Promise<void>;
27
+ stopAll(): Promise<void>;
28
+ }
@@ -0,0 +1,14 @@
1
+ export interface DaemonStateData {
2
+ pid: number;
3
+ port: number;
4
+ token: string;
5
+ startedAt: string;
6
+ version?: string;
7
+ }
8
+ export declare class DaemonStateStore {
9
+ private readonly filePath;
10
+ constructor(filePath?: string);
11
+ load(): Promise<DaemonStateData | null>;
12
+ save(state: DaemonStateData): Promise<void>;
13
+ clear(): Promise<void>;
14
+ }
@@ -0,0 +1,3 @@
1
+ import { ApiClient } from './api-client.js';
2
+ import type { MachineRegisterRequest, MachineRegisterResponse } from '@omnara/shared-js/schemas';
3
+ export declare function registerMachine(client: ApiClient, accessToken: string, payload: MachineRegisterRequest): Promise<MachineRegisterResponse>;
@@ -7,7 +7,10 @@ export interface UserSessionDescriptor {
7
7
  name?: string | null;
8
8
  metadata?: Record<string, unknown> | null;
9
9
  }
10
- export declare function createUserSession(client: ApiClient, accessToken: string, options?: {
10
+ export interface EnsureUserSessionOptions {
11
+ workspaceId: string;
12
+ userSessionId?: string;
11
13
  name?: string;
12
14
  metadata?: Record<string, unknown>;
13
- }): Promise<UserSessionDescriptor>;
15
+ }
16
+ export declare function ensureUserSession(client: ApiClient, accessToken: string, options: EnsureUserSessionOptions): Promise<UserSessionDescriptor>;
@@ -0,0 +1,4 @@
1
+ import type { WorkspaceDescriptor, WorkspaceEnsureRequest, WorkspaceSessionLaunchRequest, WorkspaceSessionLaunchResponse } from '@omnara/shared-js/schemas';
2
+ import { ApiClient } from './api-client.js';
3
+ export declare function ensureWorkspace(client: ApiClient, accessToken: string, payload: WorkspaceEnsureRequest): Promise<WorkspaceDescriptor>;
4
+ export declare function launchWorkspaceSession(client: ApiClient, accessToken: string, workspaceId: string, payload: WorkspaceSessionLaunchRequest): Promise<WorkspaceSessionLaunchResponse>;
@@ -2,12 +2,15 @@ import { type AgentClient } from './ai-client.js';
2
2
  import { Session } from './session.js';
3
3
  import { WorkerManager } from './worker-manager.js';
4
4
  import type { InboundMessage, OutboundMessage } from './orchestrator-types.js';
5
- import type { McpServerConfig } from '@anthropic-ai/claude-agent-sdk';
5
+ import { type McpServerConfig } from '@anthropic-ai/claude-agent-sdk';
6
+ import type { ControlMessageSchema } from '@omnara/shared-js/schemas';
6
7
  interface AgentOrchestratorDependencies {
7
8
  createMainClient?: () => AgentClient;
8
9
  createWorkerClient?: (mcpServers?: Record<string, McpServerConfig>, cwd?: string) => AgentClient;
9
10
  workerManager?: WorkerManager;
10
11
  repoPath?: string;
12
+ worktreesEnabled?: boolean;
13
+ worktreesBaseRef?: string;
11
14
  }
12
15
  export interface AgentOrchestratorClientAdapter {
13
16
  send: (message: OutboundMessage) => void;
@@ -20,6 +23,7 @@ export interface AgentOrchestratorConnection {
20
23
  disconnect(): void;
21
24
  }
22
25
  export declare class AgentOrchestrator {
26
+ private readonly completionsManager;
23
27
  private readonly aiClient;
24
28
  private readonly workerManager;
25
29
  private readonly sessions;
@@ -36,6 +40,7 @@ export declare class AgentOrchestrator {
36
40
  addClient(adapter: AgentOrchestratorClientAdapter): AgentOrchestratorConnection;
37
41
  start(): Promise<void>;
38
42
  stop(): Promise<void>;
43
+ cancel(): Promise<void>;
39
44
  private handleDisconnect;
40
45
  private handleClientMessage;
41
46
  private handleSessionInit;
@@ -62,6 +67,7 @@ export declare class AgentOrchestrator {
62
67
  private broadcastToAll;
63
68
  private findSessionIdBySdkSession;
64
69
  private sendToConnection;
70
+ getCompletions(request: ControlMessageSchema.CompletionsRequest): Promise<ControlMessageSchema.CompletionsResponse>;
65
71
  }
66
72
  export declare function startAgentOrchestrator(dependencies?: AgentOrchestratorDependencies): Promise<AgentOrchestrator>;
67
73
  export {};
@@ -5,13 +5,16 @@ export interface AIClientConfig {
5
5
  export interface AgentClient {
6
6
  streamUserMessage(prompt: string, overrides?: Partial<Options>): AsyncIterable<SDKMessage>;
7
7
  createQuery(prompt: string | AsyncIterable<SDKUserMessage>, overrides?: Partial<Options>): Query;
8
+ cancel(): Promise<void>;
8
9
  }
9
10
  export declare const BASE_ALLOWED_ORCHESTRATOR_TOOLS: readonly ["Glob", "Grep", "LS", "Read", "WebFetch", "WebSearch", "TodoWrite"];
10
11
  export declare const BASE_ALLOWED_WORKER_TOOLS: readonly ["Task", "Bash", "Glob", "Grep", "LS", "ExitPlanMode", "Read", "Edit", "MultiEdit", "Write", "NotebookEdit", "WebFetch", "TodoWrite", "WebSearch", "BashOutput", "KillBash", "Skill", "SlashCommand"];
11
12
  export declare class AIClient implements AgentClient {
12
13
  private readonly baseOptions;
14
+ private runningQuery?;
13
15
  constructor(config?: AIClientConfig);
14
16
  streamUserMessage(prompt: string, overrides?: Partial<Options>): AsyncIterable<SDKMessage>;
15
17
  createQuery(prompt: string | AsyncIterable<SDKUserMessage>, overrides?: Partial<Options>): Query;
18
+ cancel(): Promise<void>;
16
19
  private ensureWorkingDirectory;
17
20
  }