@noldova/desktop.runtime 0.0.0-stage → 0.0.1
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.
- package/LICENSE +21 -0
- package/README.md +82 -2
- package/api/index.d.ts +16401 -0
- package/api/index.js +256 -0
- package/api/index.js.map +1 -0
- package/api/testing.d.ts +2128 -0
- package/api/testing.js +20 -0
- package/api/testing.js.map +1 -0
- package/enums/agent-control-failure.js +13 -0
- package/enums/agent-control-failure.js.map +1 -0
- package/enums/build-relation.js +14 -0
- package/enums/build-relation.js.map +1 -0
- package/enums/data-directory-state.js +14 -0
- package/enums/data-directory-state.js.map +1 -0
- package/enums/endpoint-kind.js +13 -0
- package/enums/endpoint-kind.js.map +1 -0
- package/enums/permission-decision.js +18 -0
- package/enums/permission-decision.js.map +1 -0
- package/enums/permission-detail-kind.js +15 -0
- package/enums/permission-detail-kind.js.map +1 -0
- package/enums/permission-option.js +16 -0
- package/enums/permission-option.js.map +1 -0
- package/enums/session-state.js +17 -0
- package/enums/session-state.js.map +1 -0
- package/enums/tool-abort-reason.js +16 -0
- package/enums/tool-abort-reason.js.map +1 -0
- package/enums/tool-content-kind.js +13 -0
- package/enums/tool-content-kind.js.map +1 -0
- package/enums/tool-failure-code.js +22 -0
- package/enums/tool-failure-code.js.map +1 -0
- package/enums/tool-risk.js +14 -0
- package/enums/tool-risk.js.map +1 -0
- package/enums/unknown-schema-failure.js +14 -0
- package/enums/unknown-schema-failure.js.map +1 -0
- package/enums/update-barrier-state.js +14 -0
- package/enums/update-barrier-state.js.map +1 -0
- package/enums/update-barrier-status.js +14 -0
- package/enums/update-barrier-status.js.map +1 -0
- package/enums/window-state-kind.js +13 -0
- package/enums/window-state-kind.js.map +1 -0
- package/exceptions/addon-incomplete.exception.js +17 -0
- package/exceptions/addon-incomplete.exception.js.map +1 -0
- package/exceptions/addon-load-failed.exception.js +17 -0
- package/exceptions/addon-load-failed.exception.js.map +1 -0
- package/exceptions/addon-load.exception.js +14 -0
- package/exceptions/addon-load.exception.js.map +1 -0
- package/exceptions/addon-missing.exception.js +19 -0
- package/exceptions/addon-missing.exception.js.map +1 -0
- package/exceptions/addon-unexpected-value.exception.js +17 -0
- package/exceptions/addon-unexpected-value.exception.js.map +1 -0
- package/exceptions/agent-control.exception.js +28 -0
- package/exceptions/agent-control.exception.js.map +1 -0
- package/exceptions/answerer-registered.exception.js +10 -0
- package/exceptions/answerer-registered.exception.js.map +1 -0
- package/exceptions/app-image-copy-unavailable.exception.js +17 -0
- package/exceptions/app-image-copy-unavailable.exception.js.map +1 -0
- package/exceptions/app-image-copy-unlisted.exception.js +17 -0
- package/exceptions/app-image-copy-unlisted.exception.js.map +1 -0
- package/exceptions/backup-verification.exception.js +15 -0
- package/exceptions/backup-verification.exception.js.map +1 -0
- package/exceptions/batch-argument-refused.exception.js +17 -0
- package/exceptions/batch-argument-refused.exception.js.map +1 -0
- package/exceptions/batch-system-root-missing.exception.js +15 -0
- package/exceptions/batch-system-root-missing.exception.js.map +1 -0
- package/exceptions/build-mismatch.exception.js +18 -0
- package/exceptions/build-mismatch.exception.js.map +1 -0
- package/exceptions/call-unanswered.exception.js +17 -0
- package/exceptions/call-unanswered.exception.js.map +1 -0
- package/exceptions/command-failed.exception.js +18 -0
- package/exceptions/command-failed.exception.js.map +1 -0
- package/exceptions/command-registered.exception.js +10 -0
- package/exceptions/command-registered.exception.js.map +1 -0
- package/exceptions/connection-closed.exception.js +16 -0
- package/exceptions/connection-closed.exception.js.map +1 -0
- package/exceptions/connection-refused.exception.js +14 -0
- package/exceptions/connection-refused.exception.js.map +1 -0
- package/exceptions/connection.exception.js +16 -0
- package/exceptions/connection.exception.js.map +1 -0
- package/exceptions/data-directory-owned.exception.js +18 -0
- package/exceptions/data-directory-owned.exception.js.map +1 -0
- package/exceptions/declaration-field-invalid.exception.js +10 -0
- package/exceptions/declaration-field-invalid.exception.js.map +1 -0
- package/exceptions/declaration-not-object.exception.js +8 -0
- package/exceptions/declaration-not-object.exception.js.map +1 -0
- package/exceptions/declarations-format.exception.js +14 -0
- package/exceptions/declarations-format.exception.js.map +1 -0
- package/exceptions/declarations-unreadable.exception.js +18 -0
- package/exceptions/declarations-unreadable.exception.js.map +1 -0
- package/exceptions/declarations-version-unsupported.exception.js +10 -0
- package/exceptions/declarations-version-unsupported.exception.js.map +1 -0
- package/exceptions/discovery-field-invalid.exception.js +10 -0
- package/exceptions/discovery-field-invalid.exception.js.map +1 -0
- package/exceptions/discovery-format.exception.js +14 -0
- package/exceptions/discovery-format.exception.js.map +1 -0
- package/exceptions/discovery-not-object.exception.js +8 -0
- package/exceptions/discovery-not-object.exception.js.map +1 -0
- package/exceptions/discovery-unreadable.exception.js +18 -0
- package/exceptions/discovery-unreadable.exception.js.map +1 -0
- package/exceptions/discovery-version-unsupported.exception.js +10 -0
- package/exceptions/discovery-version-unsupported.exception.js.map +1 -0
- package/exceptions/endpoint-unavailable.exception.js +15 -0
- package/exceptions/endpoint-unavailable.exception.js.map +1 -0
- package/exceptions/environment-unreadable.exception.js +15 -0
- package/exceptions/environment-unreadable.exception.js.map +1 -0
- package/exceptions/event-declared.exception.js +10 -0
- package/exceptions/event-declared.exception.js.map +1 -0
- package/exceptions/event-withdrawn.exception.js +10 -0
- package/exceptions/event-withdrawn.exception.js.map +1 -0
- package/exceptions/exit-code-unreadable.exception.js +17 -0
- package/exceptions/exit-code-unreadable.exception.js.map +1 -0
- package/exceptions/exit-wait-timed-out.exception.js +19 -0
- package/exceptions/exit-wait-timed-out.exception.js.map +1 -0
- package/exceptions/folder-not-private.exception.js +19 -0
- package/exceptions/folder-not-private.exception.js.map +1 -0
- package/exceptions/foreground-group-read-failed.exception.js +18 -0
- package/exceptions/foreground-group-read-failed.exception.js.map +1 -0
- package/exceptions/foreground-group-unreadable.exception.js +19 -0
- package/exceptions/foreground-group-unreadable.exception.js.map +1 -0
- package/exceptions/handshake-closed.exception.js +15 -0
- package/exceptions/handshake-closed.exception.js.map +1 -0
- package/exceptions/handshake-identity-mismatch.exception.js +15 -0
- package/exceptions/handshake-identity-mismatch.exception.js.map +1 -0
- package/exceptions/handshake-timed-out.exception.js +15 -0
- package/exceptions/handshake-timed-out.exception.js.map +1 -0
- package/exceptions/job-assignment-failed.exception.js +19 -0
- package/exceptions/job-assignment-failed.exception.js.map +1 -0
- package/exceptions/job-closed-before-exit.exception.js +17 -0
- package/exceptions/job-closed-before-exit.exception.js.map +1 -0
- package/exceptions/launch-descriptors-unavailable.exception.js +15 -0
- package/exceptions/launch-descriptors-unavailable.exception.js.map +1 -0
- package/exceptions/launch-limit-reached.exception.js +17 -0
- package/exceptions/launch-limit-reached.exception.js.map +1 -0
- package/exceptions/launch-shell-unavailable.exception.js +15 -0
- package/exceptions/launch-shell-unavailable.exception.js.map +1 -0
- package/exceptions/launch-start-failed.exception.js +17 -0
- package/exceptions/launch-start-failed.exception.js.map +1 -0
- package/exceptions/launch-timed-out.exception.js +15 -0
- package/exceptions/launch-timed-out.exception.js.map +1 -0
- package/exceptions/launch.exception.js +14 -0
- package/exceptions/launch.exception.js.map +1 -0
- package/exceptions/main-process-refused-again.exception.js +15 -0
- package/exceptions/main-process-refused-again.exception.js.map +1 -0
- package/exceptions/method-failure.exception.js +16 -0
- package/exceptions/method-failure.exception.js.map +1 -0
- package/exceptions/method-registered.exception.js +10 -0
- package/exceptions/method-registered.exception.js.map +1 -0
- package/exceptions/migration.exception.js +17 -0
- package/exceptions/migration.exception.js.map +1 -0
- package/exceptions/module-activation.exception.js +17 -0
- package/exceptions/module-activation.exception.js.map +1 -0
- package/exceptions/module-database.exception.js +17 -0
- package/exceptions/module-database.exception.js.map +1 -0
- package/exceptions/module-id-device.exception.js +10 -0
- package/exceptions/module-id-device.exception.js.map +1 -0
- package/exceptions/module-load.exception.js +15 -0
- package/exceptions/module-load.exception.js.map +1 -0
- package/exceptions/module-stopping.exception.js +19 -0
- package/exceptions/module-stopping.exception.js.map +1 -0
- package/exceptions/move-aside-refused.exception.js +17 -0
- package/exceptions/move-aside-refused.exception.js.map +1 -0
- package/exceptions/no-job-for-exit-code.exception.js +17 -0
- package/exceptions/no-job-for-exit-code.exception.js.map +1 -0
- package/exceptions/no-runtime.exception.js +17 -0
- package/exceptions/no-runtime.exception.js.map +1 -0
- package/exceptions/not-contributed.exception.js +14 -0
- package/exceptions/not-contributed.exception.js.map +1 -0
- package/exceptions/notification-command-not-allowed.exception.js +12 -0
- package/exceptions/notification-command-not-allowed.exception.js.map +1 -0
- package/exceptions/notification-kind-changed.exception.js +12 -0
- package/exceptions/notification-kind-changed.exception.js.map +1 -0
- package/exceptions/ownership-released.exception.js +15 -0
- package/exceptions/ownership-released.exception.js.map +1 -0
- package/exceptions/permission-access.exception.js +14 -0
- package/exceptions/permission-access.exception.js.map +1 -0
- package/exceptions/permissions-closed.exception.js +8 -0
- package/exceptions/permissions-closed.exception.js.map +1 -0
- package/exceptions/permissions-module-only.exception.js +10 -0
- package/exceptions/permissions-module-only.exception.js.map +1 -0
- package/exceptions/pre-shell-data-found.exception.js +18 -0
- package/exceptions/pre-shell-data-found.exception.js.map +1 -0
- package/exceptions/pre-shell-data.exception.js +19 -0
- package/exceptions/pre-shell-data.exception.js.map +1 -0
- package/exceptions/process-start-failed.exception.js +17 -0
- package/exceptions/process-start-failed.exception.js.map +1 -0
- package/exceptions/process-start.exception.js +14 -0
- package/exceptions/process-start.exception.js.map +1 -0
- package/exceptions/process-table-row-unreadable.exception.js +17 -0
- package/exceptions/process-table-row-unreadable.exception.js.map +1 -0
- package/exceptions/product-file.exception.js +18 -0
- package/exceptions/product-file.exception.js.map +1 -0
- package/exceptions/program-not-found.exception.js +17 -0
- package/exceptions/program-not-found.exception.js.map +1 -0
- package/exceptions/program-path-relative.exception.js +17 -0
- package/exceptions/program-path-relative.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-batch-refused.exception.js +17 -0
- package/exceptions/pseudo-terminal-batch-refused.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-command-line-batch-refused.exception.js +17 -0
- package/exceptions/pseudo-terminal-command-line-batch-refused.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-command-line-refused.exception.js +17 -0
- package/exceptions/pseudo-terminal-command-line-refused.exception.js.map +1 -0
- package/exceptions/pseudo-terminal-command-line-with-arguments.exception.js +17 -0
- package/exceptions/pseudo-terminal-command-line-with-arguments.exception.js.map +1 -0
- package/exceptions/pseudo-terminals-undeclared.exception.js +19 -0
- package/exceptions/pseudo-terminals-undeclared.exception.js.map +1 -0
- package/exceptions/registration.exception.js +14 -0
- package/exceptions/registration.exception.js.map +1 -0
- package/exceptions/runtime-exited-without-reason.exception.js +15 -0
- package/exceptions/runtime-exited-without-reason.exception.js.map +1 -0
- package/exceptions/runtime-exited.exception.js +17 -0
- package/exceptions/runtime-exited.exception.js.map +1 -0
- package/exceptions/runtime-handover.exception.js +18 -0
- package/exceptions/runtime-handover.exception.js.map +1 -0
- package/exceptions/runtime-unreachable.exception.js +17 -0
- package/exceptions/runtime-unreachable.exception.js.map +1 -0
- package/exceptions/runtime.exception.js +14 -0
- package/exceptions/runtime.exception.js.map +1 -0
- package/exceptions/secret-not-owned.exception.js +12 -0
- package/exceptions/secret-not-owned.exception.js.map +1 -0
- package/exceptions/service-access.exception.js +14 -0
- package/exceptions/service-access.exception.js.map +1 -0
- package/exceptions/service-missing.exception.js +10 -0
- package/exceptions/service-missing.exception.js.map +1 -0
- package/exceptions/service-not-allowed.exception.js +12 -0
- package/exceptions/service-not-allowed.exception.js.map +1 -0
- package/exceptions/service-not-owned.exception.js +12 -0
- package/exceptions/service-not-owned.exception.js.map +1 -0
- package/exceptions/service-published.exception.js +10 -0
- package/exceptions/service-published.exception.js.map +1 -0
- package/exceptions/service-type-mismatch.exception.js +12 -0
- package/exceptions/service-type-mismatch.exception.js.map +1 -0
- package/exceptions/setting-needs-device.exception.js +11 -0
- package/exceptions/setting-needs-device.exception.js.map +1 -0
- package/exceptions/setting-not-readable.exception.js +12 -0
- package/exceptions/setting-not-readable.exception.js.map +1 -0
- package/exceptions/setting-not-writable.exception.js +12 -0
- package/exceptions/setting-not-writable.exception.js.map +1 -0
- package/exceptions/setting-scope-not-allowed.exception.js +13 -0
- package/exceptions/setting-scope-not-allowed.exception.js.map +1 -0
- package/exceptions/setting-scope-not-owned.exception.js +12 -0
- package/exceptions/setting-scope-not-owned.exception.js.map +1 -0
- package/exceptions/setting-unknown.exception.js +11 -0
- package/exceptions/setting-unknown.exception.js.map +1 -0
- package/exceptions/setting-value-invalid.exception.js +11 -0
- package/exceptions/setting-value-invalid.exception.js.map +1 -0
- package/exceptions/setting.exception.js +14 -0
- package/exceptions/setting.exception.js.map +1 -0
- package/exceptions/stop-refused.exception.js +17 -0
- package/exceptions/stop-refused.exception.js.map +1 -0
- package/exceptions/stop-timed-out.exception.js +15 -0
- package/exceptions/stop-timed-out.exception.js.map +1 -0
- package/exceptions/system-command.exception.js +14 -0
- package/exceptions/system-command.exception.js.map +1 -0
- package/exceptions/system-root-missing.exception.js +15 -0
- package/exceptions/system-root-missing.exception.js.map +1 -0
- package/exceptions/tool-endpoint.exception.js +15 -0
- package/exceptions/tool-endpoint.exception.js.map +1 -0
- package/exceptions/tool-failure.exception.js +16 -0
- package/exceptions/tool-failure.exception.js.map +1 -0
- package/exceptions/tool-registered.exception.js +10 -0
- package/exceptions/tool-registered.exception.js.map +1 -0
- package/exceptions/unknown-schema.exception.js +30 -0
- package/exceptions/unknown-schema.exception.js.map +1 -0
- package/exceptions/update-in-progress.exception.js +19 -0
- package/exceptions/update-in-progress.exception.js.map +1 -0
- package/exceptions/update-preparing.exception.js +19 -0
- package/exceptions/update-preparing.exception.js.map +1 -0
- package/exceptions/user-identity-unreadable.exception.js +17 -0
- package/exceptions/user-identity-unreadable.exception.js.map +1 -0
- package/exceptions/verbatim-batch-refused.exception.js +17 -0
- package/exceptions/verbatim-batch-refused.exception.js.map +1 -0
- package/exceptions/web-view-failure.exception.js +17 -0
- package/exceptions/web-view-failure.exception.js.map +1 -0
- package/exceptions/work-in-progress.exception.js +17 -0
- package/exceptions/work-in-progress.exception.js.map +1 -0
- package/interfaces/i-app-shortcuts.js +9 -0
- package/interfaces/i-app-shortcuts.js.map +1 -0
- package/interfaces/i-app-windows.js +9 -0
- package/interfaces/i-app-windows.js.map +1 -0
- package/interfaces/i-environment-source.js +9 -0
- package/interfaces/i-environment-source.js.map +1 -0
- package/interfaces/i-event-sink.js +9 -0
- package/interfaces/i-event-sink.js.map +1 -0
- package/interfaces/i-file-share-options.js +9 -0
- package/interfaces/i-file-share-options.js.map +1 -0
- package/interfaces/i-folder-protector.js +9 -0
- package/interfaces/i-folder-protector.js.map +1 -0
- package/interfaces/i-idle-participant.js +9 -0
- package/interfaces/i-idle-participant.js.map +1 -0
- package/interfaces/i-issued-grant.js +9 -0
- package/interfaces/i-issued-grant.js.map +1 -0
- package/interfaces/i-line-process-listener.js +9 -0
- package/interfaces/i-line-process-listener.js.map +1 -0
- package/interfaces/i-line-process-starter.js +9 -0
- package/interfaces/i-line-process-starter.js.map +1 -0
- package/interfaces/i-line-process.js +9 -0
- package/interfaces/i-line-process.js.map +1 -0
- package/interfaces/i-main-process-check.js +9 -0
- package/interfaces/i-main-process-check.js.map +1 -0
- package/interfaces/i-method-handler.js +9 -0
- package/interfaces/i-method-handler.js.map +1 -0
- package/interfaces/i-module-database.js +9 -0
- package/interfaces/i-module-database.js.map +1 -0
- package/interfaces/i-module-log.js +9 -0
- package/interfaces/i-module-log.js.map +1 -0
- package/interfaces/i-module-secrets.js +9 -0
- package/interfaces/i-module-secrets.js.map +1 -0
- package/interfaces/i-module-settings.js +9 -0
- package/interfaces/i-module-settings.js.map +1 -0
- package/interfaces/i-peer-process-api.js +9 -0
- package/interfaces/i-peer-process-api.js.map +1 -0
- package/interfaces/i-permission-answerer.js +9 -0
- package/interfaces/i-permission-answerer.js.map +1 -0
- package/interfaces/i-permission-detail.js +9 -0
- package/interfaces/i-permission-detail.js.map +1 -0
- package/interfaces/i-permission-request.js +9 -0
- package/interfaces/i-permission-request.js.map +1 -0
- package/interfaces/i-permissions-context.js +9 -0
- package/interfaces/i-permissions-context.js.map +1 -0
- package/interfaces/i-posix-process-addon.js +9 -0
- package/interfaces/i-posix-process-addon.js.map +1 -0
- package/interfaces/i-posix-process-api.js +9 -0
- package/interfaces/i-posix-process-api.js.map +1 -0
- package/interfaces/i-posix-process-table-api.js +9 -0
- package/interfaces/i-posix-process-table-api.js.map +1 -0
- package/interfaces/i-process-ender.js +9 -0
- package/interfaces/i-process-ender.js.map +1 -0
- package/interfaces/i-process-starter.js +9 -0
- package/interfaces/i-process-starter.js.map +1 -0
- package/interfaces/i-process-table.reader.js +9 -0
- package/interfaces/i-process-table.reader.js.map +1 -0
- package/interfaces/i-profile-watch.js +9 -0
- package/interfaces/i-profile-watch.js.map +1 -0
- package/interfaces/i-pseudo-terminal-exit.js +9 -0
- package/interfaces/i-pseudo-terminal-exit.js.map +1 -0
- package/interfaces/i-pseudo-terminal-handle.js +9 -0
- package/interfaces/i-pseudo-terminal-handle.js.map +1 -0
- package/interfaces/i-pseudo-terminal-library.js +9 -0
- package/interfaces/i-pseudo-terminal-library.js.map +1 -0
- package/interfaces/i-pseudo-terminal-options.js +9 -0
- package/interfaces/i-pseudo-terminal-options.js.map +1 -0
- package/interfaces/i-pseudo-terminal-start-options.js +9 -0
- package/interfaces/i-pseudo-terminal-start-options.js.map +1 -0
- package/interfaces/i-pseudo-terminal-subscription.js +9 -0
- package/interfaces/i-pseudo-terminal-subscription.js.map +1 -0
- package/interfaces/i-resolved-file.js +9 -0
- package/interfaces/i-resolved-file.js.map +1 -0
- package/interfaces/i-runtime-client-listener.js +9 -0
- package/interfaces/i-runtime-client-listener.js.map +1 -0
- package/interfaces/i-runtime-discovery-json.js +9 -0
- package/interfaces/i-runtime-discovery-json.js.map +1 -0
- package/interfaces/i-runtime-files.js +9 -0
- package/interfaces/i-runtime-files.js.map +1 -0
- package/interfaces/i-runtime-part-context.js +9 -0
- package/interfaces/i-runtime-part-context.js.map +1 -0
- package/interfaces/i-runtime-part-loader.js +9 -0
- package/interfaces/i-runtime-part-loader.js.map +1 -0
- package/interfaces/i-runtime-part.js +9 -0
- package/interfaces/i-runtime-part.js.map +1 -0
- package/interfaces/i-runtime-web-views.js +9 -0
- package/interfaces/i-runtime-web-views.js.map +1 -0
- package/interfaces/i-secret-backend.js +9 -0
- package/interfaces/i-secret-backend.js.map +1 -0
- package/interfaces/i-session-listener.js +9 -0
- package/interfaces/i-session-listener.js.map +1 -0
- package/interfaces/i-tool-call-options.js +9 -0
- package/interfaces/i-tool-call-options.js.map +1 -0
- package/interfaces/i-tool-call-permissions.js +9 -0
- package/interfaces/i-tool-call-permissions.js.map +1 -0
- package/interfaces/i-tool-deadline.js +9 -0
- package/interfaces/i-tool-deadline.js.map +1 -0
- package/interfaces/i-tool-descriptor.js +9 -0
- package/interfaces/i-tool-descriptor.js.map +1 -0
- package/interfaces/i-tool-endpoint-handler.js +9 -0
- package/interfaces/i-tool-endpoint-handler.js.map +1 -0
- package/interfaces/i-tool-endpoint.js +9 -0
- package/interfaces/i-tool-endpoint.js.map +1 -0
- package/interfaces/i-tool-handler.js +9 -0
- package/interfaces/i-tool-handler.js.map +1 -0
- package/interfaces/i-tool-hints.js +9 -0
- package/interfaces/i-tool-hints.js.map +1 -0
- package/interfaces/i-tool-limits.js +9 -0
- package/interfaces/i-tool-limits.js.map +1 -0
- package/interfaces/i-tool-risk-range.js +9 -0
- package/interfaces/i-tool-risk-range.js.map +1 -0
- package/interfaces/i-tool-schema.validator.js +2 -0
- package/interfaces/i-tool-schema.validator.js.map +1 -0
- package/interfaces/i-tool-session-host.js +9 -0
- package/interfaces/i-tool-session-host.js.map +1 -0
- package/interfaces/i-tools-context.js +9 -0
- package/interfaces/i-tools-context.js.map +1 -0
- package/interfaces/i-web-view-relay.js +9 -0
- package/interfaces/i-web-view-relay.js.map +1 -0
- package/interfaces/i-windows-peer-addon.js +9 -0
- package/interfaces/i-windows-peer-addon.js.map +1 -0
- package/interfaces/i-windows-process-addon.js +9 -0
- package/interfaces/i-windows-process-addon.js.map +1 -0
- package/interfaces/i-windows-process-api.js +9 -0
- package/interfaces/i-windows-process-api.js.map +1 -0
- package/interfaces/i-windows-signature.js +9 -0
- package/interfaces/i-windows-signature.js.map +1 -0
- package/models/app-image-copy-record.js +49 -0
- package/models/app-image-copy-record.js.map +1 -0
- package/models/app-image-source.js +48 -0
- package/models/app-image-source.js.map +1 -0
- package/models/attach-options.js +16 -0
- package/models/attach-options.js.map +1 -0
- package/models/capability-token.js +29 -0
- package/models/capability-token.js.map +1 -0
- package/models/caught-failure.js +15 -0
- package/models/caught-failure.js.map +1 -0
- package/models/client-closure.js +16 -0
- package/models/client-closure.js.map +1 -0
- package/models/client-settings.js +26 -0
- package/models/client-settings.js.map +1 -0
- package/models/connected-client.js +16 -0
- package/models/connected-client.js.map +1 -0
- package/models/data-directory-inspection.js +16 -0
- package/models/data-directory-inspection.js.map +1 -0
- package/models/endpoint.js +46 -0
- package/models/endpoint.js.map +1 -0
- package/models/event-channel.js +25 -0
- package/models/event-channel.js.map +1 -0
- package/models/granted-file.js +41 -0
- package/models/granted-file.js.map +1 -0
- package/models/image-size.js +22 -0
- package/models/image-size.js.map +1 -0
- package/models/kept-program.js +16 -0
- package/models/kept-program.js.map +1 -0
- package/models/launch-settings.js +44 -0
- package/models/launch-settings.js.map +1 -0
- package/models/migration.js +22 -0
- package/models/migration.js.map +1 -0
- package/models/module-activation.js +23 -0
- package/models/module-activation.js.map +1 -0
- package/models/module-declaration.js +203 -0
- package/models/module-declaration.js.map +1 -0
- package/models/notification-handle.js +24 -0
- package/models/notification-handle.js.map +1 -0
- package/models/owned-process.js +42 -0
- package/models/owned-process.js.map +1 -0
- package/models/packaged-path.js +14 -0
- package/models/packaged-path.js.map +1 -0
- package/models/peer-process.js +18 -0
- package/models/peer-process.js.map +1 -0
- package/models/pending-call.js +28 -0
- package/models/pending-call.js.map +1 -0
- package/models/permission-outcome.js +22 -0
- package/models/permission-outcome.js.map +1 -0
- package/models/permission-question.js +23 -0
- package/models/permission-question.js.map +1 -0
- package/models/permission-record.js +23 -0
- package/models/permission-record.js.map +1 -0
- package/models/permission-revocation.js +18 -0
- package/models/permission-revocation.js.map +1 -0
- package/models/process-ending.js +24 -0
- package/models/process-ending.js.map +1 -0
- package/models/process-exit.js +24 -0
- package/models/process-exit.js.map +1 -0
- package/models/process-killing.js +20 -0
- package/models/process-killing.js.map +1 -0
- package/models/process-launch-command.js +46 -0
- package/models/process-launch-command.js.map +1 -0
- package/models/process-launch.js +21 -0
- package/models/process-launch.js.map +1 -0
- package/models/process-record.js +41 -0
- package/models/process-record.js.map +1 -0
- package/models/process-request.js +40 -0
- package/models/process-request.js.map +1 -0
- package/models/process-settings.js +31 -0
- package/models/process-settings.js.map +1 -0
- package/models/process-table-entry.js +30 -0
- package/models/process-table-entry.js.map +1 -0
- package/models/process-table.js +55 -0
- package/models/process-table.js.map +1 -0
- package/models/product-info.js +68 -0
- package/models/product-info.js.map +1 -0
- package/models/pseudo-terminal-console.js +41 -0
- package/models/pseudo-terminal-console.js.map +1 -0
- package/models/pseudo-terminal-exit.js +24 -0
- package/models/pseudo-terminal-exit.js.map +1 -0
- package/models/pseudo-terminal-request.js +44 -0
- package/models/pseudo-terminal-request.js.map +1 -0
- package/models/pseudo-terminal.js +104 -0
- package/models/pseudo-terminal.js.map +1 -0
- package/models/refusal.js +16 -0
- package/models/refusal.js.map +1 -0
- package/models/registered-tool.js +22 -0
- package/models/registered-tool.js.map +1 -0
- package/models/registration.js +17 -0
- package/models/registration.js.map +1 -0
- package/models/remembered-permission.js +26 -0
- package/models/remembered-permission.js.map +1 -0
- package/models/request-context.js +27 -0
- package/models/request-context.js.map +1 -0
- package/models/running-process.js +25 -0
- package/models/running-process.js.map +1 -0
- package/models/running-program.js +26 -0
- package/models/running-program.js.map +1 -0
- package/models/running-tool-call.js +111 -0
- package/models/running-tool-call.js.map +1 -0
- package/models/runtime-build.js +17 -0
- package/models/runtime-build.js.map +1 -0
- package/models/runtime-command.js +39 -0
- package/models/runtime-command.js.map +1 -0
- package/models/runtime-discovery.js +85 -0
- package/models/runtime-discovery.js.map +1 -0
- package/models/runtime-options.js +63 -0
- package/models/runtime-options.js.map +1 -0
- package/models/server-settings.js +34 -0
- package/models/server-settings.js.map +1 -0
- package/models/started-runtime.js +29 -0
- package/models/started-runtime.js.map +1 -0
- package/models/system-error-code.js +29 -0
- package/models/system-error-code.js.map +1 -0
- package/models/terminal-size.js +19 -0
- package/models/terminal-size.js.map +1 -0
- package/models/tool-call.js +65 -0
- package/models/tool-call.js.map +1 -0
- package/models/tool-content.js +44 -0
- package/models/tool-content.js.map +1 -0
- package/models/tool-descriptor.js +104 -0
- package/models/tool-descriptor.js.map +1 -0
- package/models/tool-failure.js +39 -0
- package/models/tool-failure.js.map +1 -0
- package/models/tool-result.js +22 -0
- package/models/tool-result.js.map +1 -0
- package/models/tool-session.js +29 -0
- package/models/tool-session.js.map +1 -0
- package/models/tool-turns.js +31 -0
- package/models/tool-turns.js.map +1 -0
- package/models/update-barrier.js +39 -0
- package/models/update-barrier.js.map +1 -0
- package/models/watched-pseudo-terminal-handle.js +118 -0
- package/models/watched-pseudo-terminal-handle.js.map +1 -0
- package/models/web-view-protocol-event.js +20 -0
- package/models/web-view-protocol-event.js.map +1 -0
- package/models/windows-device-names.js +15 -0
- package/models/windows-device-names.js.map +1 -0
- package/models/work-item.js +29 -0
- package/models/work-item.js.map +1 -0
- package/native/darwin-arm64/posix-process.node +0 -0
- package/native/darwin-x64/posix-process.node +0 -0
- package/native/linux-arm64/posix-process.node +0 -0
- package/native/linux-x64/posix-process.node +0 -0
- package/native/win32-arm64/windows-process.node +0 -0
- package/native/win32-x64/windows-process.node +0 -0
- package/package.json +53 -3
- package/resources.js +1784 -0
- package/resources.js.map +1 -0
- package/services/app-surface/app-shortcuts-changed-method.js +24 -0
- package/services/app-surface/app-shortcuts-changed-method.js.map +1 -0
- package/services/app-surface/app-surface.js +57 -0
- package/services/app-surface/app-surface.js.map +1 -0
- package/services/app-surface/app-windows-changed-method.js +24 -0
- package/services/app-surface/app-windows-changed-method.js.map +1 -0
- package/services/app-surface/main-window-changed-method.js +24 -0
- package/services/app-surface/main-window-changed-method.js.map +1 -0
- package/services/app-surface/main-window-method.js +10 -0
- package/services/app-surface/main-window-method.js.map +1 -0
- package/services/app-surface/module-app-shortcuts.js +27 -0
- package/services/app-surface/module-app-shortcuts.js.map +1 -0
- package/services/app-surface/module-app-windows.js +24 -0
- package/services/app-surface/module-app-windows.js.map +1 -0
- package/services/app-surface/reported-list.js +61 -0
- package/services/app-surface/reported-list.js.map +1 -0
- package/services/client/app-image-copy-launch.js +187 -0
- package/services/client/app-image-copy-launch.js.map +1 -0
- package/services/client/app-image-extraction.js +39 -0
- package/services/client/app-image-extraction.js.map +1 -0
- package/services/client/app-image-keepalive.js +63 -0
- package/services/client/app-image-keepalive.js.map +1 -0
- package/services/client/build-comparer.js +25 -0
- package/services/client/build-comparer.js.map +1 -0
- package/services/client/runtime-client.js +203 -0
- package/services/client/runtime-client.js.map +1 -0
- package/services/client/runtime-launcher.js +259 -0
- package/services/client/runtime-launcher.js.map +1 -0
- package/services/commands/shell-commands.js +18 -0
- package/services/commands/shell-commands.js.map +1 -0
- package/services/commands/system-command.js +31 -0
- package/services/commands/system-command.js.map +1 -0
- package/services/data-directory/data-directory-inspector.js +49 -0
- package/services/data-directory/data-directory-inspector.js.map +1 -0
- package/services/data-directory/data-directory-locator.js +25 -0
- package/services/data-directory/data-directory-locator.js.map +1 -0
- package/services/data-directory/data-directory.js +85 -0
- package/services/data-directory/data-directory.js.map +1 -0
- package/services/database/backup-guard.js +64 -0
- package/services/database/backup-guard.js.map +1 -0
- package/services/database/database-backup.js +122 -0
- package/services/database/database-backup.js.map +1 -0
- package/services/database/migrated-database.js +198 -0
- package/services/database/migrated-database.js.map +1 -0
- package/services/database/module-database.js +21 -0
- package/services/database/module-database.js.map +1 -0
- package/services/database/shell-database.js +25 -0
- package/services/database/shell-database.js.map +1 -0
- package/services/database/shell-migrations.js +22 -0
- package/services/database/shell-migrations.js.map +1 -0
- package/services/database/update-backup.js +57 -0
- package/services/database/update-backup.js.map +1 -0
- package/services/diagnostics/diagnostic-redactor.js +75 -0
- package/services/diagnostics/diagnostic-redactor.js.map +1 -0
- package/services/diagnostics/log-file.js +56 -0
- package/services/diagnostics/log-file.js.map +1 -0
- package/services/diagnostics/log-text.js +15 -0
- package/services/diagnostics/log-text.js.map +1 -0
- package/services/diagnostics/standard-error-cap.js +107 -0
- package/services/diagnostics/standard-error-cap.js.map +1 -0
- package/services/discovery/discovery-publisher.js +64 -0
- package/services/discovery/discovery-publisher.js.map +1 -0
- package/services/discovery/discovery.reader.js +44 -0
- package/services/discovery/discovery.reader.js.map +1 -0
- package/services/discovery/folder-protector-factory.js +19 -0
- package/services/discovery/folder-protector-factory.js.map +1 -0
- package/services/discovery/mac-folder-protector.js +37 -0
- package/services/discovery/mac-folder-protector.js.map +1 -0
- package/services/discovery/posix-folder-protector.js +15 -0
- package/services/discovery/posix-folder-protector.js.map +1 -0
- package/services/discovery/windows-folder-protector.js +57 -0
- package/services/discovery/windows-folder-protector.js.map +1 -0
- package/services/endpoint/client-closures.js +27 -0
- package/services/endpoint/client-closures.js.map +1 -0
- package/services/endpoint/client-session.js +120 -0
- package/services/endpoint/client-session.js.map +1 -0
- package/services/endpoint/main-process-check.js +48 -0
- package/services/endpoint/main-process-check.js.map +1 -0
- package/services/endpoint/runtime-server.js +355 -0
- package/services/endpoint/runtime-server.js.map +1 -0
- package/services/endpoint/window-closed-method.js +19 -0
- package/services/endpoint/window-closed-method.js.map +1 -0
- package/services/environment/current-environment.js +43 -0
- package/services/environment/current-environment.js.map +1 -0
- package/services/environment/line-process-starter.js +21 -0
- package/services/environment/line-process-starter.js.map +1 -0
- package/services/environment/line-process.js +83 -0
- package/services/environment/line-process.js.map +1 -0
- package/services/environment/login-shell-environment.js +162 -0
- package/services/environment/login-shell-environment.js.map +1 -0
- package/services/environment/profile-watch.js +247 -0
- package/services/environment/profile-watch.js.map +1 -0
- package/services/environment/windows-environment.js +181 -0
- package/services/environment/windows-environment.js.map +1 -0
- package/services/files/discard-file-grants-method.js +24 -0
- package/services/files/discard-file-grants-method.js.map +1 -0
- package/services/files/end-file-grants-method.js +25 -0
- package/services/files/end-file-grants-method.js.map +1 -0
- package/services/files/file-grant-table.js +154 -0
- package/services/files/file-grant-table.js.map +1 -0
- package/services/files/file-identity.js +14 -0
- package/services/files/file-identity.js.map +1 -0
- package/services/files/file-presence.js +26 -0
- package/services/files/file-presence.js.map +1 -0
- package/services/files/file-renamer.js +35 -0
- package/services/files/file-renamer.js.map +1 -0
- package/services/files/folder-watch.js +117 -0
- package/services/files/folder-watch.js.map +1 -0
- package/services/files/grant-file-method.js +24 -0
- package/services/files/grant-file-method.js.map +1 -0
- package/services/files/module-files.js +68 -0
- package/services/files/module-files.js.map +1 -0
- package/services/files/resolve-file-share-method.js +23 -0
- package/services/files/resolve-file-share-method.js.map +1 -0
- package/services/installation/device-folder.js +24 -0
- package/services/installation/device-folder.js.map +1 -0
- package/services/installation/installation.js +207 -0
- package/services/installation/installation.js.map +1 -0
- package/services/installation/process-presence.js +45 -0
- package/services/installation/process-presence.js.map +1 -0
- package/services/lifetime/app-image-copy-cleanup.js +78 -0
- package/services/lifetime/app-image-copy-cleanup.js.map +1 -0
- package/services/lifetime/idle-monitor.js +47 -0
- package/services/lifetime/idle-monitor.js.map +1 -0
- package/services/lifetime/move-aside-method.js +18 -0
- package/services/lifetime/move-aside-method.js.map +1 -0
- package/services/lifetime/quit-answered-method.js +19 -0
- package/services/lifetime/quit-answered-method.js.map +1 -0
- package/services/lifetime/quit-method.js +17 -0
- package/services/lifetime/quit-method.js.map +1 -0
- package/services/lifetime/quit-relay.js +91 -0
- package/services/lifetime/quit-relay.js.map +1 -0
- package/services/lifetime/runtime-host.js +405 -0
- package/services/lifetime/runtime-host.js.map +1 -0
- package/services/lifetime/runtime-log.js +74 -0
- package/services/lifetime/runtime-log.js.map +1 -0
- package/services/lifetime/stop-method.js +39 -0
- package/services/lifetime/stop-method.js.map +1 -0
- package/services/lifetime/update-method.js +24 -0
- package/services/lifetime/update-method.js.map +1 -0
- package/services/lifetime/update-preparation.js +167 -0
- package/services/lifetime/update-preparation.js.map +1 -0
- package/services/lifetime/update-saved-method.js +19 -0
- package/services/lifetime/update-saved-method.js.map +1 -0
- package/services/modules/commands-method.js +17 -0
- package/services/modules/commands-method.js.map +1 -0
- package/services/modules/dependency-states.js +33 -0
- package/services/modules/dependency-states.js.map +1 -0
- package/services/modules/module-context.js +206 -0
- package/services/modules/module-context.js.map +1 -0
- package/services/modules/module-declaration.reader.js +46 -0
- package/services/modules/module-declaration.reader.js.map +1 -0
- package/services/modules/module-host.js +287 -0
- package/services/modules/module-host.js.map +1 -0
- package/services/modules/module-log.js +25 -0
- package/services/modules/module-log.js.map +1 -0
- package/services/modules/modules-method.js +17 -0
- package/services/modules/modules-method.js.map +1 -0
- package/services/modules/package-runtime-part-loader.js +33 -0
- package/services/modules/package-runtime-part-loader.js.map +1 -0
- package/services/modules/run-command-method.js +28 -0
- package/services/modules/run-command-method.js.map +1 -0
- package/services/native/native-addon.js +65 -0
- package/services/native/native-addon.js.map +1 -0
- package/services/notifications/clear-notifications-method.js +18 -0
- package/services/notifications/clear-notifications-method.js.map +1 -0
- package/services/notifications/dismiss-notification-method.js +19 -0
- package/services/notifications/dismiss-notification-method.js.map +1 -0
- package/services/notifications/mark-notifications-read-method.js +18 -0
- package/services/notifications/mark-notifications-read-method.js.map +1 -0
- package/services/notifications/notification-center.js +87 -0
- package/services/notifications/notification-center.js.map +1 -0
- package/services/notifications/notification-policy.js +54 -0
- package/services/notifications/notification-policy.js.map +1 -0
- package/services/notifications/notification-settings.js +32 -0
- package/services/notifications/notification-settings.js.map +1 -0
- package/services/notifications/notifications-method.js +21 -0
- package/services/notifications/notifications-method.js.map +1 -0
- package/services/notifications/post-notification-method.js +26 -0
- package/services/notifications/post-notification-method.js.map +1 -0
- package/services/ownership/ownership-lock.js +73 -0
- package/services/ownership/ownership-lock.js.map +1 -0
- package/services/permissions/module-permissions.js +36 -0
- package/services/permissions/module-permissions.js.map +1 -0
- package/services/permissions/permission-center.js +172 -0
- package/services/permissions/permission-center.js.map +1 -0
- package/services/permissions/permission-request-checker.js +146 -0
- package/services/permissions/permission-request-checker.js.map +1 -0
- package/services/permissions/remembered-permission-store.js +52 -0
- package/services/permissions/remembered-permission-store.js.map +1 -0
- package/services/process/batch-command-line.js +32 -0
- package/services/process/batch-command-line.js.map +1 -0
- package/services/process/child-process-starter.js +68 -0
- package/services/process/child-process-starter.js.map +1 -0
- package/services/process/foreground-process-group.reader.js +64 -0
- package/services/process/foreground-process-group.reader.js.map +1 -0
- package/services/process/linux-process-folder.js +55 -0
- package/services/process/linux-process-folder.js.map +1 -0
- package/services/process/posix-peer-process-api.js +95 -0
- package/services/process/posix-peer-process-api.js.map +1 -0
- package/services/process/posix-process-api.js +50 -0
- package/services/process/posix-process-api.js.map +1 -0
- package/services/process/posix-process-ender.js +199 -0
- package/services/process/posix-process-ender.js.map +1 -0
- package/services/process/posix-process-table.reader.js +24 -0
- package/services/process/posix-process-table.reader.js.map +1 -0
- package/services/process/posix-responsibility-api.js +38 -0
- package/services/process/posix-responsibility-api.js.map +1 -0
- package/services/process/process-clock.js +38 -0
- package/services/process/process-clock.js.map +1 -0
- package/services/process/process-ender-factory.js +22 -0
- package/services/process/process-ender-factory.js.map +1 -0
- package/services/process/process-environment.js +53 -0
- package/services/process/process-environment.js.map +1 -0
- package/services/process/process-record-store.js +35 -0
- package/services/process/process-record-store.js.map +1 -0
- package/services/process/process-signals.js +56 -0
- package/services/process/process-signals.js.map +1 -0
- package/services/process/process-supervisor.js +489 -0
- package/services/process/process-supervisor.js.map +1 -0
- package/services/process/program-launch-resolver.js +88 -0
- package/services/process/program-launch-resolver.js.map +1 -0
- package/services/process/program-locator.js +95 -0
- package/services/process/program-locator.js.map +1 -0
- package/services/process/programs-method.js +17 -0
- package/services/process/programs-method.js.map +1 -0
- package/services/process/windows-peer-process-api.js +52 -0
- package/services/process/windows-peer-process-api.js.map +1 -0
- package/services/process/windows-process-api.js +69 -0
- package/services/process/windows-process-api.js.map +1 -0
- package/services/process/windows-process-ender.js +137 -0
- package/services/process/windows-process-ender.js.map +1 -0
- package/services/process/windows-process-job.js +63 -0
- package/services/process/windows-process-job.js.map +1 -0
- package/services/process/windows-process-killer.js +58 -0
- package/services/process/windows-process-killer.js.map +1 -0
- package/services/process/windows-process-table.reader.js +46 -0
- package/services/process/windows-process-table.reader.js.map +1 -0
- package/services/recent-commands/recent-commands-method.js +18 -0
- package/services/recent-commands/recent-commands-method.js.map +1 -0
- package/services/recent-commands/recent-commands-store.js +29 -0
- package/services/recent-commands/recent-commands-store.js.map +1 -0
- package/services/recent-commands/record-command-method.js +21 -0
- package/services/recent-commands/record-command-method.js.map +1 -0
- package/services/registry/command-registry.js +51 -0
- package/services/registry/command-registry.js.map +1 -0
- package/services/registry/event-registry.js +34 -0
- package/services/registry/event-registry.js.map +1 -0
- package/services/registry/method-registry.js +26 -0
- package/services/registry/method-registry.js.map +1 -0
- package/services/registry/service-registry.js +26 -0
- package/services/registry/service-registry.js.map +1 -0
- package/services/runtime-entry.js +87 -0
- package/services/runtime-entry.js.map +1 -0
- package/services/secrets/machine-secret-backend.js +121 -0
- package/services/secrets/machine-secret-backend.js.map +1 -0
- package/services/secrets/module-secrets.js +37 -0
- package/services/secrets/module-secrets.js.map +1 -0
- package/services/secrets/remove-secret-method.js +19 -0
- package/services/secrets/remove-secret-method.js.map +1 -0
- package/services/secrets/save-secret-method.js +20 -0
- package/services/secrets/save-secret-method.js.map +1 -0
- package/services/secrets/secret-answered-method.js +19 -0
- package/services/secrets/secret-answered-method.js.map +1 -0
- package/services/secrets/secret-status-method.js +18 -0
- package/services/secrets/secret-status-method.js.map +1 -0
- package/services/secrets/secret-table.js +26 -0
- package/services/secrets/secret-table.js.map +1 -0
- package/services/settings/module-settings.js +69 -0
- package/services/settings/module-settings.js.map +1 -0
- package/services/settings/setting-read-method.js +18 -0
- package/services/settings/setting-read-method.js.map +1 -0
- package/services/settings/setting-reset-method.js +20 -0
- package/services/settings/setting-reset-method.js.map +1 -0
- package/services/settings/setting-write-method.js +20 -0
- package/services/settings/setting-write-method.js.map +1 -0
- package/services/settings/settings-read-method.js +18 -0
- package/services/settings/settings-read-method.js.map +1 -0
- package/services/settings/settings.service.js +162 -0
- package/services/settings/settings.service.js.map +1 -0
- package/services/settings/shell-settings.js +78 -0
- package/services/settings/shell-settings.js.map +1 -0
- package/services/tools/agent-control.js +49 -0
- package/services/tools/agent-control.js.map +1 -0
- package/services/tools/image-size.reader.js +35 -0
- package/services/tools/image-size.reader.js.map +1 -0
- package/services/tools/image-size.resources.js +24 -0
- package/services/tools/image-size.resources.js.map +1 -0
- package/services/tools/module-tools.js +77 -0
- package/services/tools/module-tools.js.map +1 -0
- package/services/tools/tool-endpoint.js +131 -0
- package/services/tools/tool-endpoint.js.map +1 -0
- package/services/tools/tool-registry.js +386 -0
- package/services/tools/tool-registry.js.map +1 -0
- package/services/tools/tool-result.validator.js +93 -0
- package/services/tools/tool-result.validator.js.map +1 -0
- package/services/tools/tool-schema.resources.js +45 -0
- package/services/tools/tool-schema.resources.js.map +1 -0
- package/services/tools/tool-schema.validator.js +232 -0
- package/services/tools/tool-schema.validator.js.map +1 -0
- package/services/web-views/module-web-view-relay.js +33 -0
- package/services/web-views/module-web-view-relay.js.map +1 -0
- package/services/web-views/module-web-views.js +46 -0
- package/services/web-views/module-web-views.js.map +1 -0
- package/services/web-views/web-view-answered-method.js +19 -0
- package/services/web-views/web-view-answered-method.js.map +1 -0
- package/services/web-views/web-view-center.js +119 -0
- package/services/web-views/web-view-center.js.map +1 -0
- package/services/web-views/web-view-events-method.js +19 -0
- package/services/web-views/web-view-events-method.js.map +1 -0
- package/services/window-state/window-state-read-method.js +20 -0
- package/services/window-state/window-state-read-method.js.map +1 -0
- package/services/window-state/window-state-store.js +24 -0
- package/services/window-state/window-state-store.js.map +1 -0
- package/services/window-state/window-state-write-method.js +22 -0
- package/services/window-state/window-state-write-method.js.map +1 -0
- package/services/work/work-method.js +17 -0
- package/services/work/work-method.js.map +1 -0
- package/services/work/work-tracker.js +56 -0
- package/services/work/work-tracker.js.map +1 -0
- package/testing/models/fake-app-shortcuts.js +18 -0
- package/testing/models/fake-app-shortcuts.js.map +1 -0
- package/testing/models/fake-app-windows.js +17 -0
- package/testing/models/fake-app-windows.js.map +1 -0
- package/testing/models/fake-module-database.js +17 -0
- package/testing/models/fake-module-database.js.map +1 -0
- package/testing/models/fake-module-log.js +12 -0
- package/testing/models/fake-module-log.js.map +1 -0
- package/testing/models/fake-module-secrets.js +15 -0
- package/testing/models/fake-module-secrets.js.map +1 -0
- package/testing/models/fake-module-settings.js +23 -0
- package/testing/models/fake-module-settings.js.map +1 -0
- package/testing/models/fake-permissions-context.js +28 -0
- package/testing/models/fake-permissions-context.js.map +1 -0
- package/testing/models/fake-runtime-files.js +13 -0
- package/testing/models/fake-runtime-files.js.map +1 -0
- package/testing/models/fake-runtime-part-context.js +70 -0
- package/testing/models/fake-runtime-part-context.js.map +1 -0
- package/testing/models/fake-runtime-web-views.js +26 -0
- package/testing/models/fake-runtime-web-views.js.map +1 -0
- package/testing/models/fake-tools-context.js +72 -0
- package/testing/models/fake-tools-context.js.map +1 -0
- package/testing/models/fake-web-view-relay.js +17 -0
- package/testing/models/fake-web-view-relay.js.map +1 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { Notification, NotificationList, NotificationPost } from "@noldova/desktop.protocol";
|
|
10
|
+
import { NotificationKindChangedException } from "../../exceptions/notification-kind-changed.exception.js";
|
|
11
|
+
import { Resources } from "../../resources.js";
|
|
12
|
+
export class NotificationCenter {
|
|
13
|
+
publish;
|
|
14
|
+
now;
|
|
15
|
+
createId;
|
|
16
|
+
entries = [];
|
|
17
|
+
lastSequence = 0;
|
|
18
|
+
constructor(publish, now, createId) {
|
|
19
|
+
this.publish = publish;
|
|
20
|
+
this.now = now;
|
|
21
|
+
this.createId = createId;
|
|
22
|
+
}
|
|
23
|
+
get list() {
|
|
24
|
+
return new NotificationList(this.entries);
|
|
25
|
+
}
|
|
26
|
+
get sequence() {
|
|
27
|
+
return this.lastSequence;
|
|
28
|
+
}
|
|
29
|
+
find(id) {
|
|
30
|
+
return this.entries.find(t => t.id === id);
|
|
31
|
+
}
|
|
32
|
+
post(post) {
|
|
33
|
+
const replaced = Object.isNull(post.key) ? undefined : this.entries.find(t => t.post.kind.text === post.kind.text && t.post.key === post.key);
|
|
34
|
+
const id = replaced?.id ?? this.createId();
|
|
35
|
+
const posted = new Notification(id, ++this.lastSequence, post, this.now().toISOString(), false);
|
|
36
|
+
this.entries = NotificationCenter.trim([posted, ...this.entries.filter(t => t.id !== id)]);
|
|
37
|
+
this.publish(this.list);
|
|
38
|
+
return id;
|
|
39
|
+
}
|
|
40
|
+
update(id, post) {
|
|
41
|
+
const current = this.find(id);
|
|
42
|
+
if (Object.isUndefined(current))
|
|
43
|
+
return false;
|
|
44
|
+
if (current.post.kind.text !== post.kind.text)
|
|
45
|
+
throw new NotificationKindChangedException(id, current.post.kind.text);
|
|
46
|
+
this.entries = this.entries.map(t => t.id === id ? new Notification(id, t.sequence, post, t.postedAt, t.isRead) : t);
|
|
47
|
+
this.publish(this.list);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
republish() {
|
|
51
|
+
this.publish(this.list);
|
|
52
|
+
}
|
|
53
|
+
markAllRead() {
|
|
54
|
+
if (this.entries.every(t => t.isRead))
|
|
55
|
+
return;
|
|
56
|
+
this.entries = this.entries.map(t => t.isRead ? t : new Notification(t.id, t.sequence, t.post, t.postedAt, true));
|
|
57
|
+
this.publish(this.list);
|
|
58
|
+
}
|
|
59
|
+
clearFinished() {
|
|
60
|
+
this.remove(t => !NotificationCenter.isInProgress(t));
|
|
61
|
+
}
|
|
62
|
+
dismiss(id) {
|
|
63
|
+
this.remove(t => t.id === id);
|
|
64
|
+
}
|
|
65
|
+
dismissOwnedBy(moduleId) {
|
|
66
|
+
this.remove(t => t.post.kind.owner === moduleId);
|
|
67
|
+
}
|
|
68
|
+
remove(isRemoved) {
|
|
69
|
+
const kept = this.entries.filter(t => !isRemoved(t));
|
|
70
|
+
if (kept.length === this.entries.length)
|
|
71
|
+
return;
|
|
72
|
+
this.entries = kept;
|
|
73
|
+
this.publish(this.list);
|
|
74
|
+
}
|
|
75
|
+
static trim(entries) {
|
|
76
|
+
const excess = entries.length - Resources.notificationLimit;
|
|
77
|
+
if (excess <= 0)
|
|
78
|
+
return entries;
|
|
79
|
+
const dropped = new Set(entries.filter(t => !NotificationCenter.isInProgress(t)).slice(-excess).map(t => t.id));
|
|
80
|
+
return entries.filter(t => !dropped.has(t.id));
|
|
81
|
+
}
|
|
82
|
+
static isInProgress(notification) {
|
|
83
|
+
const progress = notification.post.progress;
|
|
84
|
+
return progress === NotificationPost.indeterminate || (Object.isNumber(progress) && progress < 1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=notification-center.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-center.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/notifications/notification-center.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7F,OAAO,EAAE,gCAAgC,EAAE,MAAM,yDAAyD,CAAC;AAC3G,OAAO,EAAE,SAAS,EAAE,MAAM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AM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC;QAC5D,IAAI,MAAM,IAAI,CAAC;YACb,OAAO,OAAO,CAAC;QACjB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjD,CAAC;IAEO,MAAM,CAAC,YAAY,CAAC,YAA0B;QACpD,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC5C,OAAO,QAAQ,KAAK,gBAAgB,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC;IACpG,CAAC;CACF"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { ShellNotifications } from "@noldova/desktop.protocol";
|
|
10
|
+
import { NotContributedException } from "../../exceptions/not-contributed.exception.js";
|
|
11
|
+
import { NotificationCommandNotAllowedException } from "../../exceptions/notification-command-not-allowed.exception.js";
|
|
12
|
+
import { Resources } from "../../resources.js";
|
|
13
|
+
export class NotificationPolicy {
|
|
14
|
+
static COMMANDLESS_KINDS = [ShellNotifications.saveFailed, ShellNotifications.saveUnfinished];
|
|
15
|
+
declarations;
|
|
16
|
+
isActive;
|
|
17
|
+
constructor(declarations, isActive) {
|
|
18
|
+
this.declarations = declarations;
|
|
19
|
+
this.isActive = isActive;
|
|
20
|
+
}
|
|
21
|
+
findRefusal(post) {
|
|
22
|
+
if (post.kind.isShell)
|
|
23
|
+
return NotificationPolicy.findShellRefusal(post);
|
|
24
|
+
const declaration = this.declarations.find(t => t.id === post.kind.owner);
|
|
25
|
+
if (Object.isUndefined(declaration) || !this.isActive(declaration.id))
|
|
26
|
+
return Resources.formatNotificationModuleInactive(post.kind.owner, post.kind.text);
|
|
27
|
+
const refusal = NotificationPolicy.findDeclaredRefusal(declaration, post);
|
|
28
|
+
return Object.isNull(refusal) ? null : refusal.message;
|
|
29
|
+
}
|
|
30
|
+
requireDeclared(declaration, post) {
|
|
31
|
+
const refusal = NotificationPolicy.findDeclaredRefusal(declaration, post);
|
|
32
|
+
if (!Object.isNull(refusal))
|
|
33
|
+
throw refusal;
|
|
34
|
+
}
|
|
35
|
+
static findShellRefusal(post) {
|
|
36
|
+
if (!ShellNotifications.all.some(t => t.text === post.kind.text))
|
|
37
|
+
return Resources.formatShellNotificationUnknown(post.kind.text);
|
|
38
|
+
const commands = NotificationPolicy.commandsOf(post);
|
|
39
|
+
if (NotificationPolicy.COMMANDLESS_KINDS.some(t => t.text === post.kind.text))
|
|
40
|
+
return commands.length === 0 ? null : Resources.formatShellNotificationCommand(post.kind.text);
|
|
41
|
+
const refused = commands.find(t => !t.name.isShell);
|
|
42
|
+
return Object.isUndefined(refused) ? null : Resources.formatShellNotificationModuleCommand(post.kind.text, refused.name.text);
|
|
43
|
+
}
|
|
44
|
+
static findDeclaredRefusal(declaration, post) {
|
|
45
|
+
if (!declaration.listContributions(Resources.notificationsKind).includes(post.kind.text))
|
|
46
|
+
return new NotContributedException(declaration.id, Resources.notificationsKind, post.kind.text);
|
|
47
|
+
const refused = NotificationPolicy.commandsOf(post).find(t => t.name.owner !== declaration.id && !declaration.dependencies.includes(t.name.owner));
|
|
48
|
+
return Object.isUndefined(refused) ? null : new NotificationCommandNotAllowedException(declaration.id, refused.name.text);
|
|
49
|
+
}
|
|
50
|
+
static commandsOf(post) {
|
|
51
|
+
return [...Object.isNull(post.open) ? [] : [post.open], ...post.actions.map(t => t.command)];
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=notification-policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-policy.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/notifications/notification-policy.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAA8D,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE3H,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,sCAAsC,EAAE,MAAM,gEAAgE,CAAC;AAGxH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,OAAO,kBAAkB;IACrB,MAAM,CAAU,iBAAiB,GAA6B,CAAC,kBAAkB,CAAC,UAAU,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAExH,YAAY,CAA+B;IAC3C,QAAQ,CAAgC;IAEzD,YAAmB,YAA0C,EAAE,QAAuC;QACpG,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,WAAW,CAAC,IAAsB;QACvC,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO;YACnB,OAAO,kBAAkB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACnD,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC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AAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/F,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { SettingKey } from "@noldova/desktop.protocol";
|
|
10
|
+
import { ShellSettings } from "../settings/shell-settings.js";
|
|
11
|
+
export class NotificationSettings {
|
|
12
|
+
settings;
|
|
13
|
+
constructor(settings) {
|
|
14
|
+
this.settings = settings;
|
|
15
|
+
}
|
|
16
|
+
get quietDevices() {
|
|
17
|
+
if (Object.isNull(this.settings))
|
|
18
|
+
return [];
|
|
19
|
+
return [...this.settings.readDevices(ShellSettings.doNotDisturb)].filter(([, value]) => value === true).map(([device]) => device).sort();
|
|
20
|
+
}
|
|
21
|
+
get mutedModules() {
|
|
22
|
+
const value = Object.isNull(this.settings) ? [] : this.settings.read(new SettingKey(ShellSettings.mutedModules));
|
|
23
|
+
return Array.isArray(value) ? value.filter(t => Object.isString(t)) : [];
|
|
24
|
+
}
|
|
25
|
+
isQuiet(device) {
|
|
26
|
+
return !Object.isNull(this.settings) && this.settings.read(new SettingKey(ShellSettings.doNotDisturb, null, device)) === true;
|
|
27
|
+
}
|
|
28
|
+
isNotificationSetting(name) {
|
|
29
|
+
return name === ShellSettings.doNotDisturb.text || name === ShellSettings.mutedModules.text;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=notification-settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notification-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,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,aAAa,CAAC,YAAY,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,CAAC;IAChI,CAAC;IAEM,qBAAqB,CAAC,IAAY;QACvC,OAAO,IAAI,KAAK,aAAa,CAAC,YAAY,CAAC,IAAI,IAAI,IAAI,KAAK,aAAa,CAAC,YAAY,CAAC,IAAI,CAAC;IAC9F,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { NotificationState, NotificationsQuery } from "@noldova/desktop.protocol";
|
|
9
|
+
export class NotificationsMethod {
|
|
10
|
+
notifications;
|
|
11
|
+
settings;
|
|
12
|
+
constructor(notifications, settings) {
|
|
13
|
+
this.notifications = notifications;
|
|
14
|
+
this.settings = settings;
|
|
15
|
+
}
|
|
16
|
+
async handleAsync(context) {
|
|
17
|
+
const query = NotificationsQuery.fromJson(context.payload);
|
|
18
|
+
return new NotificationState(this.notifications.list.notifications, this.settings.isQuiet(query.device), this.settings.mutedModules, this.notifications.sequence).toJson();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=notifications-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notifications-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/notifications/notifications-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAOlF,MAAM,OAAO,mBAAmB;IACb,aAAa,CAAqB;IAClC,QAAQ,CAAuB;IAEhD,YAAmB,aAAiC,EAAE,QAA8B;QAClF,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAuB;QAC9C,MAAM,KAAK,GAAG,kBAAkB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAC3D,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7K,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import "@noldova/context.core";
|
|
9
|
+
import { Failure, FailureCode, NotificationPost, NotificationReference } from "@noldova/desktop.protocol";
|
|
10
|
+
import { MethodFailureException } from "../../exceptions/method-failure.exception.js";
|
|
11
|
+
export class PostNotificationMethod {
|
|
12
|
+
notifications;
|
|
13
|
+
policy;
|
|
14
|
+
constructor(notifications, policy) {
|
|
15
|
+
this.notifications = notifications;
|
|
16
|
+
this.policy = policy;
|
|
17
|
+
}
|
|
18
|
+
async handleAsync(context) {
|
|
19
|
+
const post = NotificationPost.fromJson(context.payload);
|
|
20
|
+
const refusal = this.policy.findRefusal(post);
|
|
21
|
+
if (!Object.isNull(refusal))
|
|
22
|
+
throw new MethodFailureException(new Failure(FailureCode.InvalidParams, refusal));
|
|
23
|
+
return new NotificationReference(this.notifications.post(post)).toJson();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=post-notification-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"post-notification-method.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/notifications/post-notification-method.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAE1G,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAMtF,MAAM,OAAO,sBAAsB;IAChB,aAAa,CAAqB;IAClC,MAAM,CAAqB;IAE5C,YAAmB,aAAiC,EAAE,MAA0B;QAC9E,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,OAAuB;QAC9C,MAAM,IAAI,GAAG,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACxD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC9C,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC;YACzB,MAAM,IAAI,sBAAsB,CAAC,IAAI,OAAO,CAAC,WAAW,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;QACpF,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAC3E,CAAC;CACF"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { existsSync, mkdirSync } from "node:fs";
|
|
9
|
+
import { DatabaseSync } from "node:sqlite";
|
|
10
|
+
import "@noldova/context.core";
|
|
11
|
+
import { ExceptionOptions } from "@noldova/context.exceptions";
|
|
12
|
+
import { DataDirectoryOwnedException } from "../../exceptions/data-directory-owned.exception.js";
|
|
13
|
+
import { OwnershipReleasedException } from "../../exceptions/ownership-released.exception.js";
|
|
14
|
+
import { Resources } from "../../resources.js";
|
|
15
|
+
export class OwnershipLock {
|
|
16
|
+
connection;
|
|
17
|
+
dataDirectory;
|
|
18
|
+
constructor(dataDirectory, connection) {
|
|
19
|
+
this.connection = connection;
|
|
20
|
+
this.dataDirectory = dataDirectory;
|
|
21
|
+
}
|
|
22
|
+
static acquire(dataDirectory) {
|
|
23
|
+
mkdirSync(dataDirectory.root, { recursive: true });
|
|
24
|
+
const connection = new DatabaseSync(dataDirectory.ownershipDatabase, { timeout: Resources.ownershipWaitMilliseconds });
|
|
25
|
+
try {
|
|
26
|
+
connection.exec(Resources.acquireOwnershipStatement);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
connection.close();
|
|
30
|
+
throw OwnershipLock.isBusy(error) ? new DataDirectoryOwnedException(dataDirectory.root, new ExceptionOptions(error)) : error;
|
|
31
|
+
}
|
|
32
|
+
return new OwnershipLock(dataDirectory, connection);
|
|
33
|
+
}
|
|
34
|
+
static isOwned(dataDirectory) {
|
|
35
|
+
if (!existsSync(dataDirectory.ownershipDatabase))
|
|
36
|
+
return false;
|
|
37
|
+
const connection = new DatabaseSync(dataDirectory.ownershipDatabase);
|
|
38
|
+
try {
|
|
39
|
+
connection.exec(Resources.acquireOwnershipStatement);
|
|
40
|
+
connection.exec(Resources.rollbackStatement);
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
if (OwnershipLock.isBusy(error))
|
|
45
|
+
return true;
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
|
48
|
+
finally {
|
|
49
|
+
connection.close();
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
get isHeld() {
|
|
53
|
+
return !Object.isNull(this.connection);
|
|
54
|
+
}
|
|
55
|
+
requireHeld() {
|
|
56
|
+
if (!this.isHeld)
|
|
57
|
+
throw new OwnershipReleasedException();
|
|
58
|
+
}
|
|
59
|
+
release() {
|
|
60
|
+
if (Object.isNull(this.connection))
|
|
61
|
+
return;
|
|
62
|
+
this.connection.exec(Resources.rollbackStatement);
|
|
63
|
+
this.connection.close();
|
|
64
|
+
this.connection = null;
|
|
65
|
+
}
|
|
66
|
+
[Symbol.dispose]() {
|
|
67
|
+
this.release();
|
|
68
|
+
}
|
|
69
|
+
static isBusy(error) {
|
|
70
|
+
return Object.isObject(error) && Resources.errorCodeField in error && error[Resources.errorCodeField] === Resources.busyErrorCode;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=ownership-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ownership-lock.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/ownership/ownership-lock.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,OAAO,EAAE,0BAA0B,EAAE,MAAM,kDAAkD,CAAC;AAC9F,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAG/C,MAAM,OAAO,aAAa;IAChB,UAAU,CAAsB;IAExB,aAAa,CAAgB;IAE7C,YAAoB,aAA4B,EAAE,UAAwB;QACxE,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;Q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,CAAC;YACP,UAAU,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;IAED,IAAW,MAAM;QACf,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACzC,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,IAAI,CAAC,MAAM;YACd,MAAM,IAAI,0BAA0B,EAAE,CAAC;IAC3C,CAAC;IAEM,OAAO;QACZ,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC;YAChC,OAAO;QAET,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;QAClD,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACxB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IAEM,CAAC,MAAM,CAAC,OAAO,CAAC;QACrB,IAAI,CAAC,OAAO,EAAE,CAAC;IACjB,CAAC;IAEO,MAAM,CAAC,MAAM,CAAC,KAAc;QAClC,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,SAAS,CAAC,cAAc,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,KAAK,SAAS,CAAC,aAAa,CAAC;IACpI,CAAC;CACF"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
export class ModulePermissions {
|
|
9
|
+
moduleId;
|
|
10
|
+
center;
|
|
11
|
+
log;
|
|
12
|
+
registrations;
|
|
13
|
+
constructor(moduleId, center, log, registrations) {
|
|
14
|
+
this.moduleId = moduleId;
|
|
15
|
+
this.center = center;
|
|
16
|
+
this.log = log;
|
|
17
|
+
this.registrations = registrations;
|
|
18
|
+
}
|
|
19
|
+
registerAnswerer(answerer) {
|
|
20
|
+
const registration = this.center.registerAnswerer(this.moduleId, answerer, this.log);
|
|
21
|
+
this.registrations.push(registration);
|
|
22
|
+
return registration;
|
|
23
|
+
}
|
|
24
|
+
listRemembered() {
|
|
25
|
+
return this.center.listRemembered(this.moduleId);
|
|
26
|
+
}
|
|
27
|
+
revoke(id) {
|
|
28
|
+
return this.center.revoke(this.moduleId, id);
|
|
29
|
+
}
|
|
30
|
+
onRevoked(listener) {
|
|
31
|
+
const registration = this.center.onRevoked(this.moduleId, listener, this.log);
|
|
32
|
+
this.registrations.push(registration);
|
|
33
|
+
return registration;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=module-permissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-permissions.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/permissions/module-permissions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,MAAM,OAAO,iBAAiB;IACX,QAAQ,CAAS;IACjB,MAAM,CAAmB;IACzB,GAAG,CAAa;IAChB,aAAa,CAAe;IAE7C,YAAmB,QAAgB,EAAE,MAAwB,EAAE,GAAe,EAAE,aAA2B;QACzG,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;QACzB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;IACrC,CAAC;IAEM,gBAAgB,CAAC,QAA6B;QACnD,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QACrF,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,OAAO,YAAY,CAAC;IACtB,CAAC;IAEM,cAAc;QACnB,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACnD,CAAC;IAEM,MAAM,CAAC,EAAU;QACtB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAC/C,CAAC;IAEM,SAAS,CAAC,QAAoD;QACnE,MAAM,YAAY,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC;QAC9E,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACtC,OAAO,YAAY,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) Noldova.
|
|
4
|
+
*
|
|
5
|
+
* This source code is licensed under the license found in the
|
|
6
|
+
* LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import { randomUUID } from "node:crypto";
|
|
9
|
+
import { inspect } from "node:util";
|
|
10
|
+
import "@noldova/context.core";
|
|
11
|
+
import { PermissionDecision } from "../../enums/permission-decision.js";
|
|
12
|
+
import { AnswererRegisteredException } from "../../exceptions/answerer-registered.exception.js";
|
|
13
|
+
import { PermissionsClosedException } from "../../exceptions/permissions-closed.exception.js";
|
|
14
|
+
import { PermissionsModuleOnlyException } from "../../exceptions/permissions-module-only.exception.js";
|
|
15
|
+
import { PermissionOutcome } from "../../models/permission-outcome.js";
|
|
16
|
+
import { PermissionQuestion } from "../../models/permission-question.js";
|
|
17
|
+
import { PermissionRevocation } from "../../models/permission-revocation.js";
|
|
18
|
+
import { Registration } from "../../models/registration.js";
|
|
19
|
+
import { Resources } from "../../resources.js";
|
|
20
|
+
import { PermissionRequestChecker } from "./permission-request-checker.js";
|
|
21
|
+
export class PermissionCenter {
|
|
22
|
+
permissionsModule;
|
|
23
|
+
waitMilliseconds;
|
|
24
|
+
waiting = new Map();
|
|
25
|
+
revokedListeners = new Map();
|
|
26
|
+
store = null;
|
|
27
|
+
answerer = null;
|
|
28
|
+
constructor(permissionsModule = null, waitMilliseconds = Resources.permissionWaitMilliseconds) {
|
|
29
|
+
this.permissionsModule = permissionsModule;
|
|
30
|
+
this.waitMilliseconds = waitMilliseconds;
|
|
31
|
+
}
|
|
32
|
+
open(store) {
|
|
33
|
+
this.store = store;
|
|
34
|
+
}
|
|
35
|
+
async requestAsync(moduleId, descriptor, log, session, input, signal, id = randomUUID()) {
|
|
36
|
+
if (signal.aborted)
|
|
37
|
+
return new PermissionOutcome(PermissionDecision.Withdrawn, false, id);
|
|
38
|
+
let request;
|
|
39
|
+
try {
|
|
40
|
+
request = PermissionRequestChecker.read(moduleId, descriptor, input);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
return PermissionCenter.deny(log, descriptor.name, Resources.formatPermissionUnreadable(inspect(error)), id);
|
|
44
|
+
}
|
|
45
|
+
if (Object.isString(request))
|
|
46
|
+
return PermissionCenter.deny(log, descriptor.name, request, id);
|
|
47
|
+
const subject = request.subject ?? null;
|
|
48
|
+
const remembered = this.findRemembered(moduleId, log, request.action, subject, session.scope);
|
|
49
|
+
if (!Object.isNull(remembered) && !(remembered === PermissionDecision.AllowedAlways && PermissionRequestChecker.isNamedHighRisk(request)))
|
|
50
|
+
return new PermissionOutcome(remembered, true, id);
|
|
51
|
+
if (request.isRememberedOnly === true)
|
|
52
|
+
return new PermissionOutcome(PermissionDecision.Denied, false, id);
|
|
53
|
+
const answerer = this.answerer;
|
|
54
|
+
if (Object.isNull(answerer))
|
|
55
|
+
return PermissionCenter.deny(log, request.action, Resources.permissionNoAnswerer, id);
|
|
56
|
+
const decision = await this.askAsync(answerer, log, new PermissionQuestion(moduleId, session.id, session.scope, request, id), signal);
|
|
57
|
+
return new PermissionOutcome(this.keep(moduleId, log, request.action, subject, session.scope, decision), false, id);
|
|
58
|
+
}
|
|
59
|
+
withdrawAll() {
|
|
60
|
+
for (const finish of [...this.waiting.keys()])
|
|
61
|
+
finish(PermissionDecision.Withdrawn);
|
|
62
|
+
}
|
|
63
|
+
registerAnswerer(module, answerer, log) {
|
|
64
|
+
this.requirePermissionsModule(module);
|
|
65
|
+
if (!Object.isNull(this.answerer))
|
|
66
|
+
throw new AnswererRegisteredException(module);
|
|
67
|
+
const registered = { answerer, log };
|
|
68
|
+
this.answerer = registered;
|
|
69
|
+
return new Registration(() => {
|
|
70
|
+
if (this.answerer !== registered)
|
|
71
|
+
return;
|
|
72
|
+
this.answerer = null;
|
|
73
|
+
for (const [finish, request] of [...this.waiting].filter(t => t[1].owner === registered)) {
|
|
74
|
+
request.log.write(Resources.formatPermissionDenied(request.action, Resources.permissionAnswererWithdrawn));
|
|
75
|
+
finish(PermissionDecision.Denied);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
listRemembered(module) {
|
|
80
|
+
this.requirePermissionsModule(module);
|
|
81
|
+
return this.requireStore().list();
|
|
82
|
+
}
|
|
83
|
+
revoke(module, id) {
|
|
84
|
+
this.requirePermissionsModule(module);
|
|
85
|
+
const revoked = this.requireStore().forget(id);
|
|
86
|
+
if (Object.isNull(revoked))
|
|
87
|
+
return false;
|
|
88
|
+
const revocation = new PermissionRevocation(revoked.action, revoked.subject, revoked.scope);
|
|
89
|
+
for (const listener of [...this.revokedListeners.get(revoked.module) ?? []])
|
|
90
|
+
listener(revocation);
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
onRevoked(module, listener, log) {
|
|
94
|
+
const handle = (revocation) => {
|
|
95
|
+
try {
|
|
96
|
+
listener(revocation);
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
log.write(Resources.formatPermissionRevokedListenerFailed(inspect(error)));
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
const listeners = this.revokedListeners.get(module) ?? new Set();
|
|
103
|
+
listeners.add(handle);
|
|
104
|
+
this.revokedListeners.set(module, listeners);
|
|
105
|
+
return new Registration(() => listeners.delete(handle));
|
|
106
|
+
}
|
|
107
|
+
askAsync(registered, requester, question, signal) {
|
|
108
|
+
const action = question.request.action;
|
|
109
|
+
const log = registered.log;
|
|
110
|
+
return new Promise(resolve => {
|
|
111
|
+
const controller = new AbortController();
|
|
112
|
+
const finish = (decision) => {
|
|
113
|
+
if (!this.waiting.delete(finish))
|
|
114
|
+
return;
|
|
115
|
+
clearTimeout(timer);
|
|
116
|
+
signal.removeEventListener(Resources.abortEvent, withdraw);
|
|
117
|
+
controller.abort();
|
|
118
|
+
resolve(decision);
|
|
119
|
+
};
|
|
120
|
+
const withdraw = () => finish(PermissionDecision.Withdrawn);
|
|
121
|
+
const timer = setTimeout(() => finish(PermissionDecision.Expired), this.waitMilliseconds);
|
|
122
|
+
this.waiting.set(finish, { owner: registered, log: requester, action });
|
|
123
|
+
signal.addEventListener(Resources.abortEvent, withdraw, { once: true });
|
|
124
|
+
new Promise(t => t(registered.answerer.answerAsync(question, controller.signal))).then(t => finish(PermissionCenter.checkAnswer(log, question.request, t)), (error) => {
|
|
125
|
+
log.write(Resources.formatPermissionAnswererFailed(action, inspect(error)));
|
|
126
|
+
finish(PermissionDecision.Denied);
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
findRemembered(moduleId, log, action, subject, scope) {
|
|
131
|
+
try {
|
|
132
|
+
return this.requireStore().find(moduleId, action, subject, scope);
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
log.write(Resources.formatPermissionReadFailed(action, inspect(error)));
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
keep(moduleId, log, action, subject, scope, decision) {
|
|
140
|
+
if (!Resources.rememberedDecisions.includes(decision))
|
|
141
|
+
return decision;
|
|
142
|
+
try {
|
|
143
|
+
this.requireStore().remember(moduleId, action, subject, scope, decision);
|
|
144
|
+
return decision;
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
log.write(Resources.formatPermissionKeepFailed(action, inspect(error)));
|
|
148
|
+
return decision === PermissionDecision.AllowedAlways ? PermissionDecision.AllowedOnce : PermissionDecision.Denied;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
requireStore() {
|
|
152
|
+
if (Object.isNull(this.store))
|
|
153
|
+
throw new PermissionsClosedException();
|
|
154
|
+
return this.store;
|
|
155
|
+
}
|
|
156
|
+
requirePermissionsModule(module) {
|
|
157
|
+
if (module !== this.permissionsModule)
|
|
158
|
+
throw new PermissionsModuleOnlyException(module);
|
|
159
|
+
}
|
|
160
|
+
static checkAnswer(log, request, decision) {
|
|
161
|
+
const option = Resources.offeredDecisions.get(decision);
|
|
162
|
+
if (Resources.answerableDecisions.includes(decision) && (Object.isUndefined(option) || request.options.includes(option)))
|
|
163
|
+
return decision;
|
|
164
|
+
log.write(Resources.formatPermissionAnswerInvalid(request.action, String(decision)));
|
|
165
|
+
return PermissionDecision.Denied;
|
|
166
|
+
}
|
|
167
|
+
static deny(log, action, reason, id) {
|
|
168
|
+
log.write(Resources.formatPermissionDenied(action, reason));
|
|
169
|
+
return new PermissionOutcome(PermissionDecision.Denied, false, id);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
//# sourceMappingURL=permission-center.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-center.js","sourceRoot":"","sources":["../../../../../src/noldova.desktop.runtime/src/services/permissions/permission-center.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,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