interface IdbTerminateArgs { udid?: string; bundleId: string; } /** * Terminate running application - force-quit apps for clean state testing and debugging * * **What it does:** * Force-terminates running applications by bundle ID with immediate stop (no graceful shutdown). * Idempotent operation that succeeds even if app not running. Detects whether app was actually * running from output parsing to provide accurate status. Essential for resetting app state between * test runs and preparing for reinstallation. * * **Why you'd use it:** * - Reset app state between test runs for clean-slate testing without full reinstallation * - Stop apps before uninstall/reinstall workflows to avoid "app in use" errors * - Force-quit frozen or unresponsive apps during debugging sessions * - Idempotent operation safe to call multiple times - no error if app already stopped * * **Parameters:** * - bundleId (required): App bundle identifier to terminate * - udid (optional): Target identifier - auto-detects if omitted * * **Returns:** * Termination status with success indicator, bundle ID, wasRunning flag (parsed from output * to distinguish actual termination from no-op), command output, error details if failed, * and next steps guidance (relaunch, reinstall, verification). * * **Example:** * ```typescript * // Force-quit app before reinstall * const result = await idbTerminateTool({ * bundleId: 'com.example.MyApp' * }); * * // Stop app on specific device * await idbTerminateTool({ * bundleId: 'com.example.MyApp', * udid: 'DEVICE-UDID-123' * }); * ``` * * **Full documentation:** See idb/terminate.md for detailed parameters and behavior * * @param args Tool arguments with bundle ID and optional target UDID * @returns Tool result with termination status and wasRunning indicator */ export declare function idbTerminateTool(args: IdbTerminateArgs): Promise<{ content: { type: "text"; text: string; }[]; isError: boolean; }>; export declare const IDB_TERMINATE_DOCS = "\n# idb-terminate\n\nTerminate running application - force-quit apps for clean state testing and debugging.\n\n## Overview\n\nForce-terminates running applications by bundle ID with immediate stop (no graceful shutdown). Idempotent operation that succeeds even if app not running. Detects whether app was actually running from output parsing to provide accurate status. Essential for resetting app state between test runs and preparing for reinstallation.\n\n## Parameters\n\n### Required\n- **bundleId** (string): App bundle identifier to terminate\n\n### Optional\n- **udid** (string): Target identifier - auto-detects if omitted\n\n## Returns\n\nTermination status with success indicator, bundle ID, wasRunning flag (parsed from output to distinguish actual termination from no-op), command output, error details if failed, and next steps guidance (relaunch, reinstall, verification).\n\n## Examples\n\n### Force-quit app before reinstall\n```typescript\nconst result = await idbTerminateTool({\n bundleId: 'com.example.MyApp'\n});\n```\n\n### Stop app on specific device\n```typescript\nawait idbTerminateTool({\n bundleId: 'com.example.MyApp',\n udid: 'DEVICE-UDID-123'\n});\n```\n\n## Related Tools\n\n- idb-launch: Relaunch app after termination\n- idb-list-apps: Verify running status before/after termination\n- idb-uninstall: Remove app after termination for clean install\n\n## Notes\n\n- This is a force-kill operation (not graceful shutdown)\n- Idempotent - succeeds even if app not running\n- IDB terminate sends termination signal to running app\n- wasRunning flag indicates if app was actually terminated vs already stopped\n- Safe to call multiple times - no error if app already stopped\n"; export {}; //# sourceMappingURL=terminate.d.ts.map