{"_id":"@ban-dal/os-bridge","_rev":"4-60a18567dd27b2387bab37ce28e6df49","name":"@ban-dal/os-bridge","dist-tags":{"latest":"1.1.2"},"versions":{"1.0.0":{"name":"@ban-dal/os-bridge","version":"1.0.0","keywords":["os-bridge","native-os","native-permissions","notification-permission","notification-permissions","notification-status","system-permissions","desktop-permissions","electron","electron-notifications","node-native","native-addon","node-addon","node-api","napi-rs","NAPI","N-API","Rust","macos","windows"],"license":"MIT","_id":"@ban-dal/os-bridge@1.0.0","maintainers":[{"name":"ban-dal","email":"bandal2dev@gmail.com"}],"homepage":"https://github.com/ban-dal/os-bridge#readme","bugs":{"url":"https://github.com/ban-dal/os-bridge/issues"},"ava":{"timeout":"2m","extensions":["ts"],"nodeArguments":["--import","@oxc-node/core/register"],"workerThreads":false,"environmentVariables":{"OXC_TSCONFIG_PATH":"./__test__/tsconfig.json"}},"dist":{"shasum":"b325902a40d5e001d620b5722fdf7f6dad2debbc","tarball":"https://registry.npmjs.org/@ban-dal/os-bridge/-/os-bridge-1.0.0.tgz","fileCount":5,"integrity":"sha512-o3lXXWLmK18NeWCb7zErHJFKLKDr1kJQPw2ove4e+w5mCIbFFMbZPkFaBwlVzK3OmNOgmh34f06Ny+1al1paPw==","signatures":[{"sig":"MEUCIHJpp8kC6aojMWWsX4drASs6bEq/Hq288pSxb9syq9JEAiEA5Jvu2TDlDNJcChwf4O6HBf7G0mlxHCiAPU7dJ+BSmQY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ban-dal%2fos-bridge@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":32846},"main":"index.js","napi":{"targets":["x86_64-pc-windows-msvc","x86_64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-apple-darwin"],"constEnum":false,"binaryName":"os-bridge"},"types":"index.d.ts","engines":{"node":">= 18.17.0 < 19 || >= 20.3.0 < 21 || >= 21.1.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js","require":"./index.js"}},"gitHead":"83a53c06fcfdd9c5bdaec6660b7d7be636e0df99","scripts":{"lint":"oxlint .","test":"ava","bench":"node --import @oxc-node/core/register benchmark/bench.ts","build":"napi build --platform --release","format":"run-p format:prettier format:rs format:toml","prepare":"husky","version":"napi version","artifacts":"napi artifacts","format:rs":"cargo fmt","preversion":"napi build --platform && git add .","build:debug":"napi build --platform","format:toml":"taplo format","prepublishOnly":"napi prepublish -t npm","format:prettier":"prettier . -w"},"_npmUser":{"name":"ban-dal","email":"bandal2dev@gmail.com"},"prettier":{"semi":false,"printWidth":120,"arrowParens":"always","singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+ssh://git@github.com/ban-dal/os-bridge.git","type":"git"},"_npmVersion":"11.11.0","description":"Native OS capability bridge for Node.js and Electron. Check notification permission status on macOS and Windows.","directories":{},"lint-staged":{"*.toml":["taplo format"],"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"]},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.28.1","devDependencies":{"ava":"^8.0.0","chalk":"^5.6.2","husky":"^9.1.7","oxlint":"^1.14.0","prettier":"^3.6.2","tinybench":"^6.0.0","@taplo/cli":"^0.7.0","typescript":"^6.0.0","lint-staged":"^16.1.6","@emnapi/core":"^1.5.0","@napi-rs/cli":"^3.2.0","npm-run-all2":"^8.0.4","@oxc-node/core":"^0.1.0","@emnapi/runtime":"^1.5.0","@tybys/wasm-util":"^0.10.0"},"optionalDependencies":{"@ban-dal/os-bridge-darwin-x64":"1.0.0","@ban-dal/os-bridge-darwin-arm64":"1.0.0","@ban-dal/os-bridge-linux-x64-gnu":"1.0.0","@ban-dal/os-bridge-win32-x64-msvc":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/os-bridge_1.0.0_1778134210891_0.6260094205136608","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ban-dal/os-bridge","version":"1.1.0","keywords":["os-bridge","native-os","native-permissions","notification-permission","notification-permissions","notification-status","system-permissions","desktop-permissions","electron","electron-notifications","node-native","native-addon","node-addon","node-api","napi-rs","NAPI","N-API","Rust","macos","windows"],"license":"MIT","_id":"@ban-dal/os-bridge@1.1.0","maintainers":[{"name":"ban-dal","email":"bandal2dev@gmail.com"}],"homepage":"https://github.com/ban-dal/os-bridge#readme","bugs":{"url":"https://github.com/ban-dal/os-bridge/issues"},"ava":{"timeout":"2m","extensions":["ts"],"nodeArguments":["--import","@oxc-node/core/register"],"workerThreads":false,"environmentVariables":{"OXC_TSCONFIG_PATH":"./__test__/tsconfig.json"}},"dist":{"shasum":"be7be7c80d927043a288e483559fbe14c071e6e1","tarball":"https://registry.npmjs.org/@ban-dal/os-bridge/-/os-bridge-1.1.0.tgz","fileCount":5,"integrity":"sha512-d0saVnrVNQhapyvbpJapRVKMeri9wR/ZXCPvBiBOKW4WyIUit5eQkKjzwKMU8TkRnPtarLQG41fiow2A8+pFwA==","signatures":[{"sig":"MEUCIQDq9/ViV7qkMeMTjdhi5QFm2JRx1KA1+5XgxMNC5gCjYgIgWLXvGcufyNul+jhX2hRfrODBeuRpZg/pkWUuP8o1Mf8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ban-dal%2fos-bridge@1.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":39458},"main":"index.js","napi":{"targets":["x86_64-pc-windows-msvc","x86_64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-apple-darwin"],"constEnum":false,"binaryName":"os-bridge"},"types":"index.d.ts","engines":{"node":">= 18.17.0 < 19 || >= 20.3.0 < 21 || >= 21.1.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js","require":"./index.js"}},"gitHead":"51bd14ecdfc897c6b3f151e6e5a23baa90ef6ff9","scripts":{"lint":"oxlint .","test":"ava","bench":"node --import @oxc-node/core/register benchmark/bench.ts","build":"napi build --platform --release","format":"run-p format:prettier format:rs format:toml","prepare":"husky","version":"napi version","artifacts":"napi artifacts","format:rs":"cargo fmt","preversion":"napi build --platform && git add .","build:debug":"napi build --platform","format:toml":"taplo format","prepublishOnly":"napi prepublish -t npm","format:prettier":"prettier . -w"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:03bd0bc0-14ad-4b91-9c9c-ba79f7b05554"}},"prettier":{"semi":false,"printWidth":120,"arrowParens":"always","singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+ssh://git@github.com/ban-dal/os-bridge.git","type":"git"},"_npmVersion":"11.11.0","description":"Native OS capability bridge for Node.js and Electron. Diagnose notification capability on macOS and Windows.","directories":{},"lint-staged":{"*.toml":["taplo format"],"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"]},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.28.1","devDependencies":{"ava":"^8.0.0","chalk":"^5.6.2","husky":"^9.1.7","oxlint":"^1.14.0","prettier":"^3.6.2","tinybench":"^6.0.0","@taplo/cli":"^0.7.0","typescript":"^6.0.0","lint-staged":"^16.1.6","@emnapi/core":"^1.5.0","@napi-rs/cli":"^3.2.0","npm-run-all2":"^8.0.4","@oxc-node/core":"^0.1.0","@emnapi/runtime":"^1.5.0","@tybys/wasm-util":"^0.10.0"},"optionalDependencies":{"@ban-dal/os-bridge-darwin-x64":"1.1.0","@ban-dal/os-bridge-darwin-arm64":"1.1.0","@ban-dal/os-bridge-linux-x64-gnu":"1.1.0","@ban-dal/os-bridge-win32-x64-msvc":"1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/os-bridge_1.1.0_1778325008631_0.23801745121539364","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@ban-dal/os-bridge","version":"1.1.1","keywords":["os-bridge","native-os","native-permissions","notification-permission","notification-permissions","notification-status","system-permissions","desktop-permissions","electron","electron-notifications","node-native","native-addon","node-addon","node-api","napi-rs","NAPI","N-API","Rust","macos","windows"],"license":"MIT","_id":"@ban-dal/os-bridge@1.1.1","maintainers":[{"name":"ban-dal","email":"bandal2dev@gmail.com"}],"homepage":"https://github.com/ban-dal/os-bridge#readme","bugs":{"url":"https://github.com/ban-dal/os-bridge/issues"},"ava":{"timeout":"2m","extensions":["ts"],"nodeArguments":["--import","@oxc-node/core/register"],"workerThreads":false,"environmentVariables":{"OXC_TSCONFIG_PATH":"./__test__/tsconfig.json"}},"dist":{"shasum":"4de007f7619df7e2eac1064f2aff8c4c69688f73","tarball":"https://registry.npmjs.org/@ban-dal/os-bridge/-/os-bridge-1.1.1.tgz","fileCount":6,"integrity":"sha512-YKBOqWwi958kv5eQQeZdLdvnvQ6f4cUlt9pvB9I9mR8egBmA9HaGejpfMZUw9dk5MnaP+xkPJYI8eyyXfR/QaA==","signatures":[{"sig":"MEUCIBQU81PS8U/Lek+5PxwA2iTSLU+0BAuSmiysLcIdfNaCAiEAxF69+kHn0W4nE51VNoQVsuJbhucKufHA/OS7L6t+Cpc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ban-dal%2fos-bridge@1.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":50216},"main":"index.js","napi":{"targets":["x86_64-pc-windows-msvc","x86_64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-apple-darwin"],"constEnum":false,"binaryName":"os-bridge"},"types":"index.d.ts","engines":{"node":">= 18.17.0 < 19 || >= 20.3.0 < 21 || >= 21.1.0"},"exports":{".":{"types":"./index.d.ts","default":"./index.js","require":"./index.js"}},"gitHead":"0c04dc851634011a3c29c75a19d38f90b9d87422","scripts":{"lint":"oxlint .","test":"ava","bench":"node --import @oxc-node/core/register benchmark/bench.ts","build":"napi build --platform --release","format":"run-p format:prettier format:rs format:toml","prepare":"husky","version":"napi version","artifacts":"napi artifacts","format:rs":"cargo fmt","preversion":"napi build --platform && git add .","build:debug":"napi build --platform","format:toml":"taplo format","prepublishOnly":"napi prepublish -t npm","format:prettier":"prettier . -w"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:03bd0bc0-14ad-4b91-9c9c-ba79f7b05554"}},"prettier":{"semi":false,"printWidth":120,"arrowParens":"always","singleQuote":true,"trailingComma":"all"},"repository":{"url":"git+ssh://git@github.com/ban-dal/os-bridge.git","type":"git"},"_npmVersion":"11.11.0","description":"Native OS capability bridge for Node.js and Electron. Diagnose notification capability on macOS and Windows.","directories":{},"lint-staged":{"*.toml":["taplo format"],"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"]},"_nodeVersion":"24.14.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.28.1","devDependencies":{"ava":"^8.0.0","chalk":"^5.6.2","husky":"^9.1.7","oxlint":"^1.14.0","prettier":"^3.6.2","tinybench":"^6.0.0","@taplo/cli":"^0.7.0","typescript":"^6.0.0","lint-staged":"^16.1.6","@emnapi/core":"^1.5.0","@napi-rs/cli":"^3.2.0","npm-run-all2":"^8.0.4","@oxc-node/core":"^0.1.0","@emnapi/runtime":"^1.5.0","@tybys/wasm-util":"^0.10.0"},"optionalDependencies":{"@ban-dal/os-bridge-darwin-x64":"1.1.1","@ban-dal/os-bridge-darwin-arm64":"1.1.1","@ban-dal/os-bridge-linux-x64-gnu":"1.1.1","@ban-dal/os-bridge-win32-x64-msvc":"1.1.1"},"_npmOperationalInternal":{"tmp":"tmp/os-bridge_1.1.1_1778328169952_0.637789750903736","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@ban-dal/os-bridge","version":"1.1.2","description":"Typed native notification diagnostics for Node.js and Electron on macOS and Windows.","main":"index.js","types":"index.d.ts","exports":{".":{"types":"./index.d.ts","require":"./index.js","default":"./index.js"}},"repository":{"type":"git","url":"git+ssh://git@github.com/ban-dal/os-bridge.git"},"homepage":"https://github.com/ban-dal/os-bridge#readme","bugs":{"url":"https://github.com/ban-dal/os-bridge/issues"},"license":"MIT","keywords":["notification","notifications","notification-permission","notification-status","permission","focus-mode","do-not-disturb","electron","nodejs","native-addon","napi-rs","macos","windows"],"optionalDependencies":{"@ban-dal/os-bridge-darwin-arm64":"1.1.2","@ban-dal/os-bridge-darwin-x64":"1.1.2","@ban-dal/os-bridge-linux-x64-gnu":"1.1.2","@ban-dal/os-bridge-win32-x64-msvc":"1.1.2"},"napi":{"binaryName":"os-bridge","constEnum":false,"targets":["x86_64-pc-windows-msvc","x86_64-apple-darwin","x86_64-unknown-linux-gnu","aarch64-apple-darwin"]},"engines":{"node":">= 18.17.0 < 19 || >= 20.3.0 < 21 || >= 21.1.0"},"publishConfig":{"registry":"https://registry.npmjs.org/","access":"public"},"scripts":{"artifacts":"napi artifacts","bench":"node --import @oxc-node/core/register benchmark/bench.ts","build":"napi build --platform --release","build:debug":"napi build --platform","format":"run-p format:prettier format:rs format:toml","format:prettier":"prettier . -w","format:toml":"taplo format","format:rs":"cargo fmt","lint":"oxlint .","prepublishOnly":"napi prepublish -t npm","test":"ava","preversion":"napi build --platform && git add .","version":"napi version","prepare":"husky"},"devDependencies":{"@emnapi/core":"^1.5.0","@emnapi/runtime":"^1.5.0","@napi-rs/cli":"^3.2.0","@oxc-node/core":"^0.1.0","@taplo/cli":"^0.7.0","@tybys/wasm-util":"^0.10.0","ava":"^8.0.0","chalk":"^5.6.2","husky":"^9.1.7","lint-staged":"^16.1.6","npm-run-all2":"^8.0.4","oxlint":"^1.14.0","prettier":"^3.6.2","tinybench":"^6.0.0","typescript":"^6.0.0"},"lint-staged":{"*.@(js|ts|tsx)":["oxlint --fix"],"*.@(js|ts|tsx|yml|yaml|md|json)":["prettier --write"],"*.toml":["taplo format"]},"ava":{"extensions":["ts"],"timeout":"2m","workerThreads":false,"environmentVariables":{"OXC_TSCONFIG_PATH":"./__test__/tsconfig.json"},"nodeArguments":["--import","@oxc-node/core/register"]},"prettier":{"printWidth":120,"semi":false,"trailingComma":"all","singleQuote":true,"arrowParens":"always"},"packageManager":"pnpm@10.28.1","gitHead":"e554439593a903544a1478e047d281a348ffa65d","_id":"@ban-dal/os-bridge@1.1.2","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-7orPudeAUkQkRpW6mVX3/poC/PG+0SkMsGvCq6lt9WGh8Su594g0BVQ8UIoLIYUiAZ2MHy9tIp9LBpHvhRl2Mg==","shasum":"74363d4b0bdfbb75ff83e52697259fb743464a34","tarball":"https://registry.npmjs.org/@ban-dal/os-bridge/-/os-bridge-1.1.2.tgz","fileCount":6,"unpackedSize":50040,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ban-dal%2fos-bridge@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAtfQOz8Tf72oQTlJr0HCKphdsVBAMZIn4GASAaOCmlEAiEAvzwzS1RlC98bgtzr5oZijUt73+5LwNuP+WJpuUG8Elk="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:03bd0bc0-14ad-4b91-9c9c-ba79f7b05554"}},"directories":{},"maintainers":[{"name":"ban-dal","email":"bandal2dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/os-bridge_1.1.2_1778332226004_0.9890745151379405"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T06:10:10.767Z","modified":"2026-05-09T13:10:26.416Z","1.0.0":"2026-05-07T06:10:11.022Z","1.1.0":"2026-05-09T11:10:08.765Z","1.1.1":"2026-05-09T12:02:50.092Z","1.1.2":"2026-05-09T13:10:26.152Z"},"bugs":{"url":"https://github.com/ban-dal/os-bridge/issues"},"license":"MIT","homepage":"https://github.com/ban-dal/os-bridge#readme","keywords":["notification","notifications","notification-permission","notification-status","permission","focus-mode","do-not-disturb","electron","nodejs","native-addon","napi-rs","macos","windows"],"repository":{"type":"git","url":"git+ssh://git@github.com/ban-dal/os-bridge.git"},"description":"Typed native notification diagnostics for Node.js and Electron on macOS and Windows.","maintainers":[{"name":"ban-dal","email":"bandal2dev@gmail.com"}],"readme":"# @ban-dal/os-bridge\n\nTyped native OS APIs for Node.js and Electron, powered by napi-rs.\n\nEN | [한국어](README.ko.md)\n\n## Install\n\n```bash\nnpm install @ban-dal/os-bridge\n```\n\n```bash\npnpm add @ban-dal/os-bridge\n```\n\n```bash\nyarn add @ban-dal/os-bridge\n```\n\n## Runtime\n\nUse this package from Node.js, the Electron main process, or a trusted preload script.\n\n| Platform        | Package                             | Status                         |\n| --------------- | ----------------------------------- | ------------------------------ |\n| macOS arm64     | `@ban-dal/os-bridge-darwin-arm64`   | Supported                      |\n| macOS x64       | `@ban-dal/os-bridge-darwin-x64`     | Supported                      |\n| Windows x64     | `@ban-dal/os-bridge-win32-x64-msvc` | Supported                      |\n| Linux x64 glibc | `@ban-dal/os-bridge-linux-x64-gnu`  | Fallback-only for current APIs |\n\nPlatform packages are optional dependencies. Always import from `@ban-dal/os-bridge`.\n\n## Feature Index\n\n| Feature                         | API                                  | macOS     | Windows       | Linux         |\n| ------------------------------- | ------------------------------------ | --------- | ------------- | ------------- |\n| Notification permission status  | `getNotificationPermissionStatus`    | Supported | Supported     | `unsupported` |\n| macOS notification permission   | `requestMacNotificationPermission`   | Supported | Status only   | `unsupported` |\n| Notification interruption level | `getNotificationInterruptionLevel`   | Supported | Supported     | `unsupported` |\n| macOS Focus Status access       | `requestMacFocusStatusAuthorization` | Supported | `unsupported` | `unsupported` |\n| Notification capability summary | `getNotificationCapability`          | Supported | Supported     | `unsupported` |\n\n## Usage\n\n```ts\nimport { getNotificationCapability, type NotificationCapability } from '@ban-dal/os-bridge'\n\nconst capability: NotificationCapability = getNotificationCapability()\n```\n\n## Features\n\n### getNotificationPermissionStatus\n\n`macOS` `Windows`\n\n```ts\nfunction getNotificationPermissionStatus(options?: NotificationDiagnosticsOptions): NotificationPermissionStatus\n```\n\n```ts\ntype NotificationPermissionStatus = 'granted' | 'denied' | 'not-determined' | 'limited' | 'unsupported' | 'unknown'\n```\n\n| Platform | Behavior                                                                                                                                                                              |\n| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| macOS    | Returns `unknown` when called outside an app bundle.                                                                                                                                  |\n| Windows  | Looks up notification permission by app user model id.<br>Windows defaults to allowed when no app-specific deny state exists.<br>Returns `unknown` if the app id is missing or empty. |\n| Linux    | Returns `unsupported`.                                                                                                                                                                |\n\n```ts\nimport { getNotificationPermissionStatus } from '@ban-dal/os-bridge'\n\nconst status = getNotificationPermissionStatus({ appUserModelId: 'com.example.my-app' })\n```\n\nFor Windows Electron apps, pass the same app user model id used with `app.setAppUserModelId(...)`.\n\n`getPermissionStatus(appUserModelId?)` remains available as the low-level compatibility alias.\n\n### requestMacNotificationPermission\n\n`macOS` `Windows status only`\n\n```ts\nfunction requestMacNotificationPermission(options?: NotificationDiagnosticsOptions): NotificationPermissionStatus\n```\n\nRequests notification authorization on macOS and returns the resulting permission status.\n\nWindows does not provide an OS API for requesting app notification permission. Its default notification state is allowed, so use `getNotificationPermissionStatus` or `getNotificationCapability` for Windows diagnostics.\n\n```ts\nimport { requestMacNotificationPermission } from '@ban-dal/os-bridge'\n\nconst status = requestMacNotificationPermission()\n```\n\n### getNotificationInterruptionLevel\n\n`macOS` `Windows`\n\n```ts\nfunction getNotificationInterruptionLevel(): NotificationInterruptionLevel\n```\n\n```ts\ntype NotificationInterruptionLevel = 'normal' | 'limited' | 'unsupported' | 'unknown'\n```\n\n```ts\ntype NotificationDiagnosticsOptions = {\n  appUserModelId?: string\n}\n```\n\nReturns whether the OS is currently in a normal or limited notification-delivery context.\n`limited` is diagnostic context only. It does not prove that this app's notifications will be suppressed.\n\n#### macOS\n\nOn macOS, the following conditions are required:\n\n1. Communication Notifications enabled for the App ID in Apple Developer > Identifiers.\n2. A bundled app code-signed with that account, not ad-hoc signing.\n3. The app enabled in System Settings > Privacy & Security > Focus. You can prompt the user for this with `requestMacFocusStatusAuthorization()`.\n\nEven when Focus or Do Not Disturb is enabled, the result is `normal` if the app is included in the allowed apps for the current Focus.\n\n#### Windows\n\nOn Windows, the interruption level comes from `ToastNotificationManager.GetDefault().NotificationMode()`.\n\n- `Unrestricted` returns `normal`.\n- `PriorityOnly` and `AlarmsOnly` return `limited`.\n\nWindows does not expose whether this app is included in the user's priority app list. Therefore, `limited` means the system is limiting notifications, not that this app is definitely blocked.\n\n### requestMacFocusStatusAuthorization\n\n`macOS`\n\n```ts\nfunction requestMacFocusStatusAuthorization(): NotificationInterruptionLevel\n```\n\nRequests permission to share Focus Status with this app, then returns the current interruption level.\n\nIf the request has already been handled by the OS, the system may not show another alert.\n\n### getNotificationCapability\n\n`macOS` `Windows`\n\n```ts\nfunction getNotificationCapability(options?: NotificationDiagnosticsOptions): NotificationCapability\n```\n\n```ts\ntype NotificationCapability = {\n  canNotify: boolean\n  permission: NotificationPermissionStatus\n  interruptionLevel: NotificationInterruptionLevel\n  reasons: NotificationUnavailableReason[]\n}\n\ntype NotificationUnavailableReason =\n  | 'permission-denied'\n  | 'permission-not-determined'\n  | 'missing-app-user-model-id'\n  | 'invalid-app-user-model-id'\n  | 'unsupported-platform'\n  | 'unknown'\n```\n\n`canNotify` is based on platform support, notification permission, and platform-specific requirements.\nFor example, Windows also needs a valid app user model id.\n\nThe interruption level is returned as diagnostic context. It is not treated as a definitive notification-blocking reason.\n\n#### Electron\n\n```ts\n// main.ts\nimport { app, ipcMain } from 'electron'\nimport { getNotificationCapability } from '@ban-dal/os-bridge'\n\nconst appUserModelId = 'com.example.my-app'\n\nif (process.platform === 'win32') {\n  app.setAppUserModelId(appUserModelId)\n}\n\nipcMain.handle('notification:getCapability', () => {\n  return getNotificationCapability({ appUserModelId })\n})\n```\n\n```ts\n// preload.ts\nimport { contextBridge, ipcRenderer } from 'electron'\nimport type { NotificationCapability } from '@ban-dal/os-bridge'\n\ncontextBridge.exposeInMainWorld('osBridge', {\n  getNotificationCapability: (): Promise<NotificationCapability> => {\n    return ipcRenderer.invoke('notification:getCapability')\n  },\n})\n```\n\n```ts\n// renderer.ts\nconst capability = await window.osBridge.getNotificationCapability()\n```\n\n## Adding Feature Documentation\n\n- Add one row to `Feature Index`.\n- Add one `### Feature Name` section under `Features`.\n- Include the signature, exported types, platform notes, and an Electron example only when needed.\n\n## Development\n\n```bash\npnpm install\npnpm build\npnpm test\n```\n\n### Manual Electron Probe\n\nUse `electron-probe/` when you need to physically compare this package's diagnostics with the current OS notification and Focus state.\n\n```bash\npnpm build\ncd electron-probe\ncp .env.example .env\npnpm install\npnpm dev\n```\n\nFor macOS app-bundle testing:\n\n```bash\ncd electron-probe\npnpm pack:mac\n```\n\nThe probe can request macOS Focus Status access. It includes `NSFocusStatusUsageDescription` in the packaged app.\n\nThe macOS probe package is ad-hoc signed locally for manual testing.\n","readmeFilename":"README.md"}