@noldova/desktop.runtime 0.0.0-stage → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (893) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +82 -2
  3. package/api/index.d.ts +16404 -0
  4. package/api/index.js +256 -0
  5. package/api/index.js.map +1 -0
  6. package/api/testing.d.ts +2132 -0
  7. package/api/testing.js +20 -0
  8. package/api/testing.js.map +1 -0
  9. package/enums/agent-control-failure.js +13 -0
  10. package/enums/agent-control-failure.js.map +1 -0
  11. package/enums/build-relation.js +14 -0
  12. package/enums/build-relation.js.map +1 -0
  13. package/enums/data-directory-state.js +14 -0
  14. package/enums/data-directory-state.js.map +1 -0
  15. package/enums/endpoint-kind.js +13 -0
  16. package/enums/endpoint-kind.js.map +1 -0
  17. package/enums/permission-decision.js +18 -0
  18. package/enums/permission-decision.js.map +1 -0
  19. package/enums/permission-detail-kind.js +15 -0
  20. package/enums/permission-detail-kind.js.map +1 -0
  21. package/enums/permission-option.js +16 -0
  22. package/enums/permission-option.js.map +1 -0
  23. package/enums/session-state.js +17 -0
  24. package/enums/session-state.js.map +1 -0
  25. package/enums/tool-abort-reason.js +16 -0
  26. package/enums/tool-abort-reason.js.map +1 -0
  27. package/enums/tool-content-kind.js +13 -0
  28. package/enums/tool-content-kind.js.map +1 -0
  29. package/enums/tool-failure-code.js +22 -0
  30. package/enums/tool-failure-code.js.map +1 -0
  31. package/enums/tool-risk.js +14 -0
  32. package/enums/tool-risk.js.map +1 -0
  33. package/enums/unknown-schema-failure.js +14 -0
  34. package/enums/unknown-schema-failure.js.map +1 -0
  35. package/enums/update-barrier-state.js +14 -0
  36. package/enums/update-barrier-state.js.map +1 -0
  37. package/enums/update-barrier-status.js +14 -0
  38. package/enums/update-barrier-status.js.map +1 -0
  39. package/enums/window-state-kind.js +13 -0
  40. package/enums/window-state-kind.js.map +1 -0
  41. package/exceptions/addon-incomplete.exception.js +17 -0
  42. package/exceptions/addon-incomplete.exception.js.map +1 -0
  43. package/exceptions/addon-load-failed.exception.js +17 -0
  44. package/exceptions/addon-load-failed.exception.js.map +1 -0
  45. package/exceptions/addon-load.exception.js +14 -0
  46. package/exceptions/addon-load.exception.js.map +1 -0
  47. package/exceptions/addon-missing.exception.js +19 -0
  48. package/exceptions/addon-missing.exception.js.map +1 -0
  49. package/exceptions/addon-unexpected-value.exception.js +17 -0
  50. package/exceptions/addon-unexpected-value.exception.js.map +1 -0
  51. package/exceptions/agent-control.exception.js +28 -0
  52. package/exceptions/agent-control.exception.js.map +1 -0
  53. package/exceptions/answerer-registered.exception.js +10 -0
  54. package/exceptions/answerer-registered.exception.js.map +1 -0
  55. package/exceptions/app-image-copy-unavailable.exception.js +17 -0
  56. package/exceptions/app-image-copy-unavailable.exception.js.map +1 -0
  57. package/exceptions/app-image-copy-unlisted.exception.js +17 -0
  58. package/exceptions/app-image-copy-unlisted.exception.js.map +1 -0
  59. package/exceptions/backup-verification.exception.js +15 -0
  60. package/exceptions/backup-verification.exception.js.map +1 -0
  61. package/exceptions/batch-argument-refused.exception.js +17 -0
  62. package/exceptions/batch-argument-refused.exception.js.map +1 -0
  63. package/exceptions/batch-system-root-missing.exception.js +15 -0
  64. package/exceptions/batch-system-root-missing.exception.js.map +1 -0
  65. package/exceptions/build-mismatch.exception.js +18 -0
  66. package/exceptions/build-mismatch.exception.js.map +1 -0
  67. package/exceptions/call-unanswered.exception.js +17 -0
  68. package/exceptions/call-unanswered.exception.js.map +1 -0
  69. package/exceptions/command-failed.exception.js +18 -0
  70. package/exceptions/command-failed.exception.js.map +1 -0
  71. package/exceptions/command-registered.exception.js +10 -0
  72. package/exceptions/command-registered.exception.js.map +1 -0
  73. package/exceptions/connection-closed.exception.js +16 -0
  74. package/exceptions/connection-closed.exception.js.map +1 -0
  75. package/exceptions/connection-refused.exception.js +14 -0
  76. package/exceptions/connection-refused.exception.js.map +1 -0
  77. package/exceptions/connection.exception.js +16 -0
  78. package/exceptions/connection.exception.js.map +1 -0
  79. package/exceptions/data-directory-owned.exception.js +18 -0
  80. package/exceptions/data-directory-owned.exception.js.map +1 -0
  81. package/exceptions/declaration-field-invalid.exception.js +10 -0
  82. package/exceptions/declaration-field-invalid.exception.js.map +1 -0
  83. package/exceptions/declaration-not-object.exception.js +8 -0
  84. package/exceptions/declaration-not-object.exception.js.map +1 -0
  85. package/exceptions/declarations-format.exception.js +14 -0
  86. package/exceptions/declarations-format.exception.js.map +1 -0
  87. package/exceptions/declarations-unreadable.exception.js +18 -0
  88. package/exceptions/declarations-unreadable.exception.js.map +1 -0
  89. package/exceptions/declarations-version-unsupported.exception.js +10 -0
  90. package/exceptions/declarations-version-unsupported.exception.js.map +1 -0
  91. package/exceptions/discovery-field-invalid.exception.js +10 -0
  92. package/exceptions/discovery-field-invalid.exception.js.map +1 -0
  93. package/exceptions/discovery-format.exception.js +14 -0
  94. package/exceptions/discovery-format.exception.js.map +1 -0
  95. package/exceptions/discovery-not-object.exception.js +8 -0
  96. package/exceptions/discovery-not-object.exception.js.map +1 -0
  97. package/exceptions/discovery-unreadable.exception.js +18 -0
  98. package/exceptions/discovery-unreadable.exception.js.map +1 -0
  99. package/exceptions/discovery-version-unsupported.exception.js +10 -0
  100. package/exceptions/discovery-version-unsupported.exception.js.map +1 -0
  101. package/exceptions/endpoint-unavailable.exception.js +15 -0
  102. package/exceptions/endpoint-unavailable.exception.js.map +1 -0
  103. package/exceptions/environment-unreadable.exception.js +15 -0
  104. package/exceptions/environment-unreadable.exception.js.map +1 -0
  105. package/exceptions/event-declared.exception.js +10 -0
  106. package/exceptions/event-declared.exception.js.map +1 -0
  107. package/exceptions/event-withdrawn.exception.js +10 -0
  108. package/exceptions/event-withdrawn.exception.js.map +1 -0
  109. package/exceptions/exit-code-unreadable.exception.js +17 -0
  110. package/exceptions/exit-code-unreadable.exception.js.map +1 -0
  111. package/exceptions/exit-wait-timed-out.exception.js +19 -0
  112. package/exceptions/exit-wait-timed-out.exception.js.map +1 -0
  113. package/exceptions/folder-not-private.exception.js +19 -0
  114. package/exceptions/folder-not-private.exception.js.map +1 -0
  115. package/exceptions/foreground-group-read-failed.exception.js +18 -0
  116. package/exceptions/foreground-group-read-failed.exception.js.map +1 -0
  117. package/exceptions/foreground-group-unreadable.exception.js +19 -0
  118. package/exceptions/foreground-group-unreadable.exception.js.map +1 -0
  119. package/exceptions/handshake-closed.exception.js +15 -0
  120. package/exceptions/handshake-closed.exception.js.map +1 -0
  121. package/exceptions/handshake-identity-mismatch.exception.js +15 -0
  122. package/exceptions/handshake-identity-mismatch.exception.js.map +1 -0
  123. package/exceptions/handshake-timed-out.exception.js +15 -0
  124. package/exceptions/handshake-timed-out.exception.js.map +1 -0
  125. package/exceptions/job-assignment-failed.exception.js +19 -0
  126. package/exceptions/job-assignment-failed.exception.js.map +1 -0
  127. package/exceptions/job-closed-before-exit.exception.js +17 -0
  128. package/exceptions/job-closed-before-exit.exception.js.map +1 -0
  129. package/exceptions/launch-descriptors-unavailable.exception.js +15 -0
  130. package/exceptions/launch-descriptors-unavailable.exception.js.map +1 -0
  131. package/exceptions/launch-limit-reached.exception.js +17 -0
  132. package/exceptions/launch-limit-reached.exception.js.map +1 -0
  133. package/exceptions/launch-shell-unavailable.exception.js +15 -0
  134. package/exceptions/launch-shell-unavailable.exception.js.map +1 -0
  135. package/exceptions/launch-start-failed.exception.js +17 -0
  136. package/exceptions/launch-start-failed.exception.js.map +1 -0
  137. package/exceptions/launch-timed-out.exception.js +15 -0
  138. package/exceptions/launch-timed-out.exception.js.map +1 -0
  139. package/exceptions/launch.exception.js +14 -0
  140. package/exceptions/launch.exception.js.map +1 -0
  141. package/exceptions/main-process-refused-again.exception.js +15 -0
  142. package/exceptions/main-process-refused-again.exception.js.map +1 -0
  143. package/exceptions/method-failure.exception.js +16 -0
  144. package/exceptions/method-failure.exception.js.map +1 -0
  145. package/exceptions/method-registered.exception.js +10 -0
  146. package/exceptions/method-registered.exception.js.map +1 -0
  147. package/exceptions/migration.exception.js +17 -0
  148. package/exceptions/migration.exception.js.map +1 -0
  149. package/exceptions/module-activation.exception.js +17 -0
  150. package/exceptions/module-activation.exception.js.map +1 -0
  151. package/exceptions/module-database.exception.js +17 -0
  152. package/exceptions/module-database.exception.js.map +1 -0
  153. package/exceptions/module-id-device.exception.js +10 -0
  154. package/exceptions/module-id-device.exception.js.map +1 -0
  155. package/exceptions/module-load.exception.js +15 -0
  156. package/exceptions/module-load.exception.js.map +1 -0
  157. package/exceptions/module-stopping.exception.js +19 -0
  158. package/exceptions/module-stopping.exception.js.map +1 -0
  159. package/exceptions/move-aside-refused.exception.js +17 -0
  160. package/exceptions/move-aside-refused.exception.js.map +1 -0
  161. package/exceptions/no-job-for-exit-code.exception.js +17 -0
  162. package/exceptions/no-job-for-exit-code.exception.js.map +1 -0
  163. package/exceptions/no-runtime.exception.js +17 -0
  164. package/exceptions/no-runtime.exception.js.map +1 -0
  165. package/exceptions/not-contributed.exception.js +14 -0
  166. package/exceptions/not-contributed.exception.js.map +1 -0
  167. package/exceptions/notification-command-not-allowed.exception.js +12 -0
  168. package/exceptions/notification-command-not-allowed.exception.js.map +1 -0
  169. package/exceptions/notification-kind-changed.exception.js +12 -0
  170. package/exceptions/notification-kind-changed.exception.js.map +1 -0
  171. package/exceptions/ownership-released.exception.js +15 -0
  172. package/exceptions/ownership-released.exception.js.map +1 -0
  173. package/exceptions/permission-access.exception.js +14 -0
  174. package/exceptions/permission-access.exception.js.map +1 -0
  175. package/exceptions/permissions-closed.exception.js +8 -0
  176. package/exceptions/permissions-closed.exception.js.map +1 -0
  177. package/exceptions/permissions-module-only.exception.js +10 -0
  178. package/exceptions/permissions-module-only.exception.js.map +1 -0
  179. package/exceptions/pre-shell-data-found.exception.js +18 -0
  180. package/exceptions/pre-shell-data-found.exception.js.map +1 -0
  181. package/exceptions/pre-shell-data.exception.js +19 -0
  182. package/exceptions/pre-shell-data.exception.js.map +1 -0
  183. package/exceptions/process-start-failed.exception.js +17 -0
  184. package/exceptions/process-start-failed.exception.js.map +1 -0
  185. package/exceptions/process-start.exception.js +14 -0
  186. package/exceptions/process-start.exception.js.map +1 -0
  187. package/exceptions/process-table-row-unreadable.exception.js +17 -0
  188. package/exceptions/process-table-row-unreadable.exception.js.map +1 -0
  189. package/exceptions/product-file.exception.js +18 -0
  190. package/exceptions/product-file.exception.js.map +1 -0
  191. package/exceptions/program-not-found.exception.js +17 -0
  192. package/exceptions/program-not-found.exception.js.map +1 -0
  193. package/exceptions/program-path-relative.exception.js +17 -0
  194. package/exceptions/program-path-relative.exception.js.map +1 -0
  195. package/exceptions/pseudo-terminal-batch-refused.exception.js +17 -0
  196. package/exceptions/pseudo-terminal-batch-refused.exception.js.map +1 -0
  197. package/exceptions/pseudo-terminal-command-line-batch-refused.exception.js +17 -0
  198. package/exceptions/pseudo-terminal-command-line-batch-refused.exception.js.map +1 -0
  199. package/exceptions/pseudo-terminal-command-line-refused.exception.js +17 -0
  200. package/exceptions/pseudo-terminal-command-line-refused.exception.js.map +1 -0
  201. package/exceptions/pseudo-terminal-command-line-with-arguments.exception.js +17 -0
  202. package/exceptions/pseudo-terminal-command-line-with-arguments.exception.js.map +1 -0
  203. package/exceptions/pseudo-terminals-undeclared.exception.js +19 -0
  204. package/exceptions/pseudo-terminals-undeclared.exception.js.map +1 -0
  205. package/exceptions/registration.exception.js +14 -0
  206. package/exceptions/registration.exception.js.map +1 -0
  207. package/exceptions/runtime-exited-without-reason.exception.js +15 -0
  208. package/exceptions/runtime-exited-without-reason.exception.js.map +1 -0
  209. package/exceptions/runtime-exited.exception.js +17 -0
  210. package/exceptions/runtime-exited.exception.js.map +1 -0
  211. package/exceptions/runtime-handover.exception.js +18 -0
  212. package/exceptions/runtime-handover.exception.js.map +1 -0
  213. package/exceptions/runtime-unreachable.exception.js +17 -0
  214. package/exceptions/runtime-unreachable.exception.js.map +1 -0
  215. package/exceptions/runtime.exception.js +14 -0
  216. package/exceptions/runtime.exception.js.map +1 -0
  217. package/exceptions/secret-not-owned.exception.js +12 -0
  218. package/exceptions/secret-not-owned.exception.js.map +1 -0
  219. package/exceptions/service-access.exception.js +14 -0
  220. package/exceptions/service-access.exception.js.map +1 -0
  221. package/exceptions/service-missing.exception.js +10 -0
  222. package/exceptions/service-missing.exception.js.map +1 -0
  223. package/exceptions/service-not-allowed.exception.js +12 -0
  224. package/exceptions/service-not-allowed.exception.js.map +1 -0
  225. package/exceptions/service-not-owned.exception.js +12 -0
  226. package/exceptions/service-not-owned.exception.js.map +1 -0
  227. package/exceptions/service-published.exception.js +10 -0
  228. package/exceptions/service-published.exception.js.map +1 -0
  229. package/exceptions/service-type-mismatch.exception.js +12 -0
  230. package/exceptions/service-type-mismatch.exception.js.map +1 -0
  231. package/exceptions/setting-needs-device.exception.js +11 -0
  232. package/exceptions/setting-needs-device.exception.js.map +1 -0
  233. package/exceptions/setting-not-readable.exception.js +12 -0
  234. package/exceptions/setting-not-readable.exception.js.map +1 -0
  235. package/exceptions/setting-not-writable.exception.js +12 -0
  236. package/exceptions/setting-not-writable.exception.js.map +1 -0
  237. package/exceptions/setting-scope-not-allowed.exception.js +13 -0
  238. package/exceptions/setting-scope-not-allowed.exception.js.map +1 -0
  239. package/exceptions/setting-scope-not-owned.exception.js +12 -0
  240. package/exceptions/setting-scope-not-owned.exception.js.map +1 -0
  241. package/exceptions/setting-unknown.exception.js +11 -0
  242. package/exceptions/setting-unknown.exception.js.map +1 -0
  243. package/exceptions/setting-value-invalid.exception.js +11 -0
  244. package/exceptions/setting-value-invalid.exception.js.map +1 -0
  245. package/exceptions/setting.exception.js +14 -0
  246. package/exceptions/setting.exception.js.map +1 -0
  247. package/exceptions/stop-refused.exception.js +17 -0
  248. package/exceptions/stop-refused.exception.js.map +1 -0
  249. package/exceptions/stop-timed-out.exception.js +15 -0
  250. package/exceptions/stop-timed-out.exception.js.map +1 -0
  251. package/exceptions/system-command.exception.js +14 -0
  252. package/exceptions/system-command.exception.js.map +1 -0
  253. package/exceptions/system-root-missing.exception.js +15 -0
  254. package/exceptions/system-root-missing.exception.js.map +1 -0
  255. package/exceptions/tool-endpoint.exception.js +15 -0
  256. package/exceptions/tool-endpoint.exception.js.map +1 -0
  257. package/exceptions/tool-failure.exception.js +16 -0
  258. package/exceptions/tool-failure.exception.js.map +1 -0
  259. package/exceptions/tool-registered.exception.js +10 -0
  260. package/exceptions/tool-registered.exception.js.map +1 -0
  261. package/exceptions/unknown-schema.exception.js +30 -0
  262. package/exceptions/unknown-schema.exception.js.map +1 -0
  263. package/exceptions/update-in-progress.exception.js +19 -0
  264. package/exceptions/update-in-progress.exception.js.map +1 -0
  265. package/exceptions/update-preparing.exception.js +19 -0
  266. package/exceptions/update-preparing.exception.js.map +1 -0
  267. package/exceptions/user-identity-unreadable.exception.js +17 -0
  268. package/exceptions/user-identity-unreadable.exception.js.map +1 -0
  269. package/exceptions/verbatim-batch-refused.exception.js +17 -0
  270. package/exceptions/verbatim-batch-refused.exception.js.map +1 -0
  271. package/exceptions/web-view-failure.exception.js +17 -0
  272. package/exceptions/web-view-failure.exception.js.map +1 -0
  273. package/exceptions/work-in-progress.exception.js +17 -0
  274. package/exceptions/work-in-progress.exception.js.map +1 -0
  275. package/interfaces/i-app-shortcuts.js +9 -0
  276. package/interfaces/i-app-shortcuts.js.map +1 -0
  277. package/interfaces/i-app-windows.js +9 -0
  278. package/interfaces/i-app-windows.js.map +1 -0
  279. package/interfaces/i-environment-source.js +9 -0
  280. package/interfaces/i-environment-source.js.map +1 -0
  281. package/interfaces/i-event-sink.js +9 -0
  282. package/interfaces/i-event-sink.js.map +1 -0
  283. package/interfaces/i-file-share-options.js +9 -0
  284. package/interfaces/i-file-share-options.js.map +1 -0
  285. package/interfaces/i-folder-protector.js +9 -0
  286. package/interfaces/i-folder-protector.js.map +1 -0
  287. package/interfaces/i-idle-participant.js +9 -0
  288. package/interfaces/i-idle-participant.js.map +1 -0
  289. package/interfaces/i-issued-grant.js +9 -0
  290. package/interfaces/i-issued-grant.js.map +1 -0
  291. package/interfaces/i-line-process-listener.js +9 -0
  292. package/interfaces/i-line-process-listener.js.map +1 -0
  293. package/interfaces/i-line-process-starter.js +9 -0
  294. package/interfaces/i-line-process-starter.js.map +1 -0
  295. package/interfaces/i-line-process.js +9 -0
  296. package/interfaces/i-line-process.js.map +1 -0
  297. package/interfaces/i-main-process-check.js +9 -0
  298. package/interfaces/i-main-process-check.js.map +1 -0
  299. package/interfaces/i-method-handler.js +9 -0
  300. package/interfaces/i-method-handler.js.map +1 -0
  301. package/interfaces/i-module-database.js +9 -0
  302. package/interfaces/i-module-database.js.map +1 -0
  303. package/interfaces/i-module-log.js +9 -0
  304. package/interfaces/i-module-log.js.map +1 -0
  305. package/interfaces/i-module-secrets.js +9 -0
  306. package/interfaces/i-module-secrets.js.map +1 -0
  307. package/interfaces/i-module-settings.js +9 -0
  308. package/interfaces/i-module-settings.js.map +1 -0
  309. package/interfaces/i-peer-process-api.js +9 -0
  310. package/interfaces/i-peer-process-api.js.map +1 -0
  311. package/interfaces/i-permission-answerer.js +9 -0
  312. package/interfaces/i-permission-answerer.js.map +1 -0
  313. package/interfaces/i-permission-detail.js +9 -0
  314. package/interfaces/i-permission-detail.js.map +1 -0
  315. package/interfaces/i-permission-request.js +9 -0
  316. package/interfaces/i-permission-request.js.map +1 -0
  317. package/interfaces/i-permissions-context.js +9 -0
  318. package/interfaces/i-permissions-context.js.map +1 -0
  319. package/interfaces/i-posix-process-addon.js +9 -0
  320. package/interfaces/i-posix-process-addon.js.map +1 -0
  321. package/interfaces/i-posix-process-api.js +9 -0
  322. package/interfaces/i-posix-process-api.js.map +1 -0
  323. package/interfaces/i-posix-process-table-api.js +9 -0
  324. package/interfaces/i-posix-process-table-api.js.map +1 -0
  325. package/interfaces/i-process-ender.js +9 -0
  326. package/interfaces/i-process-ender.js.map +1 -0
  327. package/interfaces/i-process-starter.js +9 -0
  328. package/interfaces/i-process-starter.js.map +1 -0
  329. package/interfaces/i-process-table.reader.js +9 -0
  330. package/interfaces/i-process-table.reader.js.map +1 -0
  331. package/interfaces/i-profile-watch.js +9 -0
  332. package/interfaces/i-profile-watch.js.map +1 -0
  333. package/interfaces/i-pseudo-terminal-exit.js +9 -0
  334. package/interfaces/i-pseudo-terminal-exit.js.map +1 -0
  335. package/interfaces/i-pseudo-terminal-handle.js +9 -0
  336. package/interfaces/i-pseudo-terminal-handle.js.map +1 -0
  337. package/interfaces/i-pseudo-terminal-library.js +9 -0
  338. package/interfaces/i-pseudo-terminal-library.js.map +1 -0
  339. package/interfaces/i-pseudo-terminal-options.js +9 -0
  340. package/interfaces/i-pseudo-terminal-options.js.map +1 -0
  341. package/interfaces/i-pseudo-terminal-start-options.js +9 -0
  342. package/interfaces/i-pseudo-terminal-start-options.js.map +1 -0
  343. package/interfaces/i-pseudo-terminal-subscription.js +9 -0
  344. package/interfaces/i-pseudo-terminal-subscription.js.map +1 -0
  345. package/interfaces/i-resolved-file.js +9 -0
  346. package/interfaces/i-resolved-file.js.map +1 -0
  347. package/interfaces/i-runtime-client-listener.js +9 -0
  348. package/interfaces/i-runtime-client-listener.js.map +1 -0
  349. package/interfaces/i-runtime-discovery-json.js +9 -0
  350. package/interfaces/i-runtime-discovery-json.js.map +1 -0
  351. package/interfaces/i-runtime-files.js +9 -0
  352. package/interfaces/i-runtime-files.js.map +1 -0
  353. package/interfaces/i-runtime-part-context.js +9 -0
  354. package/interfaces/i-runtime-part-context.js.map +1 -0
  355. package/interfaces/i-runtime-part-loader.js +9 -0
  356. package/interfaces/i-runtime-part-loader.js.map +1 -0
  357. package/interfaces/i-runtime-part.js +9 -0
  358. package/interfaces/i-runtime-part.js.map +1 -0
  359. package/interfaces/i-runtime-web-views.js +9 -0
  360. package/interfaces/i-runtime-web-views.js.map +1 -0
  361. package/interfaces/i-secret-backend.js +9 -0
  362. package/interfaces/i-secret-backend.js.map +1 -0
  363. package/interfaces/i-session-listener.js +9 -0
  364. package/interfaces/i-session-listener.js.map +1 -0
  365. package/interfaces/i-tool-call-options.js +9 -0
  366. package/interfaces/i-tool-call-options.js.map +1 -0
  367. package/interfaces/i-tool-call-permissions.js +9 -0
  368. package/interfaces/i-tool-call-permissions.js.map +1 -0
  369. package/interfaces/i-tool-deadline.js +9 -0
  370. package/interfaces/i-tool-deadline.js.map +1 -0
  371. package/interfaces/i-tool-descriptor.js +9 -0
  372. package/interfaces/i-tool-descriptor.js.map +1 -0
  373. package/interfaces/i-tool-endpoint-handler.js +9 -0
  374. package/interfaces/i-tool-endpoint-handler.js.map +1 -0
  375. package/interfaces/i-tool-endpoint.js +9 -0
  376. package/interfaces/i-tool-endpoint.js.map +1 -0
  377. package/interfaces/i-tool-handler.js +9 -0
  378. package/interfaces/i-tool-handler.js.map +1 -0
  379. package/interfaces/i-tool-hints.js +9 -0
  380. package/interfaces/i-tool-hints.js.map +1 -0
  381. package/interfaces/i-tool-limits.js +9 -0
  382. package/interfaces/i-tool-limits.js.map +1 -0
  383. package/interfaces/i-tool-risk-range.js +9 -0
  384. package/interfaces/i-tool-risk-range.js.map +1 -0
  385. package/interfaces/i-tool-schema.validator.js +2 -0
  386. package/interfaces/i-tool-schema.validator.js.map +1 -0
  387. package/interfaces/i-tool-session-host.js +9 -0
  388. package/interfaces/i-tool-session-host.js.map +1 -0
  389. package/interfaces/i-tools-context.js +9 -0
  390. package/interfaces/i-tools-context.js.map +1 -0
  391. package/interfaces/i-web-view-relay.js +9 -0
  392. package/interfaces/i-web-view-relay.js.map +1 -0
  393. package/interfaces/i-windows-peer-addon.js +9 -0
  394. package/interfaces/i-windows-peer-addon.js.map +1 -0
  395. package/interfaces/i-windows-process-addon.js +9 -0
  396. package/interfaces/i-windows-process-addon.js.map +1 -0
  397. package/interfaces/i-windows-process-api.js +9 -0
  398. package/interfaces/i-windows-process-api.js.map +1 -0
  399. package/interfaces/i-windows-signature.js +9 -0
  400. package/interfaces/i-windows-signature.js.map +1 -0
  401. package/models/app-image-copy-record.js +49 -0
  402. package/models/app-image-copy-record.js.map +1 -0
  403. package/models/app-image-source.js +48 -0
  404. package/models/app-image-source.js.map +1 -0
  405. package/models/attach-options.js +16 -0
  406. package/models/attach-options.js.map +1 -0
  407. package/models/capability-token.js +29 -0
  408. package/models/capability-token.js.map +1 -0
  409. package/models/caught-failure.js +15 -0
  410. package/models/caught-failure.js.map +1 -0
  411. package/models/client-closure.js +16 -0
  412. package/models/client-closure.js.map +1 -0
  413. package/models/client-settings.js +26 -0
  414. package/models/client-settings.js.map +1 -0
  415. package/models/connected-client.js +16 -0
  416. package/models/connected-client.js.map +1 -0
  417. package/models/data-directory-inspection.js +16 -0
  418. package/models/data-directory-inspection.js.map +1 -0
  419. package/models/endpoint.js +46 -0
  420. package/models/endpoint.js.map +1 -0
  421. package/models/event-channel.js +25 -0
  422. package/models/event-channel.js.map +1 -0
  423. package/models/granted-file.js +41 -0
  424. package/models/granted-file.js.map +1 -0
  425. package/models/image-size.js +22 -0
  426. package/models/image-size.js.map +1 -0
  427. package/models/kept-program.js +16 -0
  428. package/models/kept-program.js.map +1 -0
  429. package/models/launch-settings.js +44 -0
  430. package/models/launch-settings.js.map +1 -0
  431. package/models/migration.js +22 -0
  432. package/models/migration.js.map +1 -0
  433. package/models/module-activation.js +23 -0
  434. package/models/module-activation.js.map +1 -0
  435. package/models/module-declaration.js +203 -0
  436. package/models/module-declaration.js.map +1 -0
  437. package/models/notification-handle.js +24 -0
  438. package/models/notification-handle.js.map +1 -0
  439. package/models/owned-process.js +42 -0
  440. package/models/owned-process.js.map +1 -0
  441. package/models/packaged-path.js +14 -0
  442. package/models/packaged-path.js.map +1 -0
  443. package/models/peer-process.js +18 -0
  444. package/models/peer-process.js.map +1 -0
  445. package/models/pending-call.js +28 -0
  446. package/models/pending-call.js.map +1 -0
  447. package/models/permission-outcome.js +22 -0
  448. package/models/permission-outcome.js.map +1 -0
  449. package/models/permission-question.js +23 -0
  450. package/models/permission-question.js.map +1 -0
  451. package/models/permission-record.js +23 -0
  452. package/models/permission-record.js.map +1 -0
  453. package/models/permission-revocation.js +18 -0
  454. package/models/permission-revocation.js.map +1 -0
  455. package/models/process-ending.js +24 -0
  456. package/models/process-ending.js.map +1 -0
  457. package/models/process-exit.js +24 -0
  458. package/models/process-exit.js.map +1 -0
  459. package/models/process-killing.js +20 -0
  460. package/models/process-killing.js.map +1 -0
  461. package/models/process-launch-command.js +46 -0
  462. package/models/process-launch-command.js.map +1 -0
  463. package/models/process-launch.js +21 -0
  464. package/models/process-launch.js.map +1 -0
  465. package/models/process-record.js +41 -0
  466. package/models/process-record.js.map +1 -0
  467. package/models/process-request.js +40 -0
  468. package/models/process-request.js.map +1 -0
  469. package/models/process-settings.js +31 -0
  470. package/models/process-settings.js.map +1 -0
  471. package/models/process-table-entry.js +30 -0
  472. package/models/process-table-entry.js.map +1 -0
  473. package/models/process-table.js +55 -0
  474. package/models/process-table.js.map +1 -0
  475. package/models/product-info.js +68 -0
  476. package/models/product-info.js.map +1 -0
  477. package/models/pseudo-terminal-console.js +41 -0
  478. package/models/pseudo-terminal-console.js.map +1 -0
  479. package/models/pseudo-terminal-exit.js +24 -0
  480. package/models/pseudo-terminal-exit.js.map +1 -0
  481. package/models/pseudo-terminal-request.js +44 -0
  482. package/models/pseudo-terminal-request.js.map +1 -0
  483. package/models/pseudo-terminal.js +104 -0
  484. package/models/pseudo-terminal.js.map +1 -0
  485. package/models/refusal.js +16 -0
  486. package/models/refusal.js.map +1 -0
  487. package/models/registered-tool.js +22 -0
  488. package/models/registered-tool.js.map +1 -0
  489. package/models/registration.js +17 -0
  490. package/models/registration.js.map +1 -0
  491. package/models/remembered-permission.js +26 -0
  492. package/models/remembered-permission.js.map +1 -0
  493. package/models/request-context.js +27 -0
  494. package/models/request-context.js.map +1 -0
  495. package/models/running-process.js +25 -0
  496. package/models/running-process.js.map +1 -0
  497. package/models/running-program.js +26 -0
  498. package/models/running-program.js.map +1 -0
  499. package/models/running-tool-call.js +111 -0
  500. package/models/running-tool-call.js.map +1 -0
  501. package/models/runtime-build.js +17 -0
  502. package/models/runtime-build.js.map +1 -0
  503. package/models/runtime-command.js +39 -0
  504. package/models/runtime-command.js.map +1 -0
  505. package/models/runtime-discovery.js +85 -0
  506. package/models/runtime-discovery.js.map +1 -0
  507. package/models/runtime-options.js +63 -0
  508. package/models/runtime-options.js.map +1 -0
  509. package/models/server-settings.js +34 -0
  510. package/models/server-settings.js.map +1 -0
  511. package/models/started-runtime.js +29 -0
  512. package/models/started-runtime.js.map +1 -0
  513. package/models/system-error-code.js +29 -0
  514. package/models/system-error-code.js.map +1 -0
  515. package/models/terminal-size.js +19 -0
  516. package/models/terminal-size.js.map +1 -0
  517. package/models/tool-call.js +65 -0
  518. package/models/tool-call.js.map +1 -0
  519. package/models/tool-content.js +44 -0
  520. package/models/tool-content.js.map +1 -0
  521. package/models/tool-descriptor.js +104 -0
  522. package/models/tool-descriptor.js.map +1 -0
  523. package/models/tool-failure.js +39 -0
  524. package/models/tool-failure.js.map +1 -0
  525. package/models/tool-result.js +22 -0
  526. package/models/tool-result.js.map +1 -0
  527. package/models/tool-session.js +29 -0
  528. package/models/tool-session.js.map +1 -0
  529. package/models/tool-turns.js +31 -0
  530. package/models/tool-turns.js.map +1 -0
  531. package/models/update-barrier.js +39 -0
  532. package/models/update-barrier.js.map +1 -0
  533. package/models/watched-pseudo-terminal-handle.js +118 -0
  534. package/models/watched-pseudo-terminal-handle.js.map +1 -0
  535. package/models/web-view-protocol-event.js +20 -0
  536. package/models/web-view-protocol-event.js.map +1 -0
  537. package/models/windows-device-names.js +15 -0
  538. package/models/windows-device-names.js.map +1 -0
  539. package/models/work-item.js +29 -0
  540. package/models/work-item.js.map +1 -0
  541. package/native/darwin-arm64/posix-process.node +0 -0
  542. package/native/darwin-x64/posix-process.node +0 -0
  543. package/native/linux-arm64/posix-process.node +0 -0
  544. package/native/linux-x64/posix-process.node +0 -0
  545. package/native/win32-arm64/windows-process.node +0 -0
  546. package/native/win32-x64/windows-process.node +0 -0
  547. package/package.json +59 -3
  548. package/resources.js +1786 -0
  549. package/resources.js.map +1 -0
  550. package/services/app-surface/app-shortcuts-changed-method.js +24 -0
  551. package/services/app-surface/app-shortcuts-changed-method.js.map +1 -0
  552. package/services/app-surface/app-surface.js +57 -0
  553. package/services/app-surface/app-surface.js.map +1 -0
  554. package/services/app-surface/app-windows-changed-method.js +24 -0
  555. package/services/app-surface/app-windows-changed-method.js.map +1 -0
  556. package/services/app-surface/main-window-changed-method.js +24 -0
  557. package/services/app-surface/main-window-changed-method.js.map +1 -0
  558. package/services/app-surface/main-window-method.js +10 -0
  559. package/services/app-surface/main-window-method.js.map +1 -0
  560. package/services/app-surface/module-app-shortcuts.js +27 -0
  561. package/services/app-surface/module-app-shortcuts.js.map +1 -0
  562. package/services/app-surface/module-app-windows.js +24 -0
  563. package/services/app-surface/module-app-windows.js.map +1 -0
  564. package/services/app-surface/reported-list.js +61 -0
  565. package/services/app-surface/reported-list.js.map +1 -0
  566. package/services/client/app-image-copy-launch.js +187 -0
  567. package/services/client/app-image-copy-launch.js.map +1 -0
  568. package/services/client/app-image-extraction.js +39 -0
  569. package/services/client/app-image-extraction.js.map +1 -0
  570. package/services/client/app-image-keepalive.js +63 -0
  571. package/services/client/app-image-keepalive.js.map +1 -0
  572. package/services/client/build-comparer.js +25 -0
  573. package/services/client/build-comparer.js.map +1 -0
  574. package/services/client/runtime-client.js +203 -0
  575. package/services/client/runtime-client.js.map +1 -0
  576. package/services/client/runtime-launcher.js +259 -0
  577. package/services/client/runtime-launcher.js.map +1 -0
  578. package/services/commands/shell-commands.js +18 -0
  579. package/services/commands/shell-commands.js.map +1 -0
  580. package/services/commands/system-command.js +31 -0
  581. package/services/commands/system-command.js.map +1 -0
  582. package/services/data-directory/data-directory-inspector.js +49 -0
  583. package/services/data-directory/data-directory-inspector.js.map +1 -0
  584. package/services/data-directory/data-directory-locator.js +25 -0
  585. package/services/data-directory/data-directory-locator.js.map +1 -0
  586. package/services/data-directory/data-directory.js +85 -0
  587. package/services/data-directory/data-directory.js.map +1 -0
  588. package/services/database/backup-guard.js +64 -0
  589. package/services/database/backup-guard.js.map +1 -0
  590. package/services/database/database-backup.js +122 -0
  591. package/services/database/database-backup.js.map +1 -0
  592. package/services/database/migrated-database.js +198 -0
  593. package/services/database/migrated-database.js.map +1 -0
  594. package/services/database/module-database.js +21 -0
  595. package/services/database/module-database.js.map +1 -0
  596. package/services/database/shell-database.js +25 -0
  597. package/services/database/shell-database.js.map +1 -0
  598. package/services/database/shell-migrations.js +22 -0
  599. package/services/database/shell-migrations.js.map +1 -0
  600. package/services/database/update-backup.js +57 -0
  601. package/services/database/update-backup.js.map +1 -0
  602. package/services/diagnostics/diagnostic-redactor.js +75 -0
  603. package/services/diagnostics/diagnostic-redactor.js.map +1 -0
  604. package/services/diagnostics/log-file.js +56 -0
  605. package/services/diagnostics/log-file.js.map +1 -0
  606. package/services/diagnostics/log-text.js +15 -0
  607. package/services/diagnostics/log-text.js.map +1 -0
  608. package/services/diagnostics/standard-error-cap.js +107 -0
  609. package/services/diagnostics/standard-error-cap.js.map +1 -0
  610. package/services/discovery/discovery-publisher.js +64 -0
  611. package/services/discovery/discovery-publisher.js.map +1 -0
  612. package/services/discovery/discovery.reader.js +44 -0
  613. package/services/discovery/discovery.reader.js.map +1 -0
  614. package/services/discovery/folder-protector-factory.js +19 -0
  615. package/services/discovery/folder-protector-factory.js.map +1 -0
  616. package/services/discovery/mac-folder-protector.js +37 -0
  617. package/services/discovery/mac-folder-protector.js.map +1 -0
  618. package/services/discovery/posix-folder-protector.js +15 -0
  619. package/services/discovery/posix-folder-protector.js.map +1 -0
  620. package/services/discovery/windows-folder-protector.js +57 -0
  621. package/services/discovery/windows-folder-protector.js.map +1 -0
  622. package/services/endpoint/client-closures.js +27 -0
  623. package/services/endpoint/client-closures.js.map +1 -0
  624. package/services/endpoint/client-session.js +120 -0
  625. package/services/endpoint/client-session.js.map +1 -0
  626. package/services/endpoint/main-process-check.js +48 -0
  627. package/services/endpoint/main-process-check.js.map +1 -0
  628. package/services/endpoint/runtime-server.js +355 -0
  629. package/services/endpoint/runtime-server.js.map +1 -0
  630. package/services/endpoint/window-closed-method.js +19 -0
  631. package/services/endpoint/window-closed-method.js.map +1 -0
  632. package/services/environment/current-environment.js +43 -0
  633. package/services/environment/current-environment.js.map +1 -0
  634. package/services/environment/line-process-starter.js +21 -0
  635. package/services/environment/line-process-starter.js.map +1 -0
  636. package/services/environment/line-process.js +83 -0
  637. package/services/environment/line-process.js.map +1 -0
  638. package/services/environment/login-shell-environment.js +162 -0
  639. package/services/environment/login-shell-environment.js.map +1 -0
  640. package/services/environment/profile-watch.js +247 -0
  641. package/services/environment/profile-watch.js.map +1 -0
  642. package/services/environment/windows-environment.js +181 -0
  643. package/services/environment/windows-environment.js.map +1 -0
  644. package/services/files/discard-file-grants-method.js +24 -0
  645. package/services/files/discard-file-grants-method.js.map +1 -0
  646. package/services/files/end-file-grants-method.js +25 -0
  647. package/services/files/end-file-grants-method.js.map +1 -0
  648. package/services/files/file-grant-table.js +154 -0
  649. package/services/files/file-grant-table.js.map +1 -0
  650. package/services/files/file-identity.js +14 -0
  651. package/services/files/file-identity.js.map +1 -0
  652. package/services/files/file-presence.js +26 -0
  653. package/services/files/file-presence.js.map +1 -0
  654. package/services/files/file-renamer.js +35 -0
  655. package/services/files/file-renamer.js.map +1 -0
  656. package/services/files/folder-watch.js +134 -0
  657. package/services/files/folder-watch.js.map +1 -0
  658. package/services/files/grant-file-method.js +24 -0
  659. package/services/files/grant-file-method.js.map +1 -0
  660. package/services/files/module-files.js +68 -0
  661. package/services/files/module-files.js.map +1 -0
  662. package/services/files/resolve-file-share-method.js +23 -0
  663. package/services/files/resolve-file-share-method.js.map +1 -0
  664. package/services/installation/device-folder.js +24 -0
  665. package/services/installation/device-folder.js.map +1 -0
  666. package/services/installation/installation.js +207 -0
  667. package/services/installation/installation.js.map +1 -0
  668. package/services/installation/process-presence.js +45 -0
  669. package/services/installation/process-presence.js.map +1 -0
  670. package/services/lifetime/app-image-copy-cleanup.js +78 -0
  671. package/services/lifetime/app-image-copy-cleanup.js.map +1 -0
  672. package/services/lifetime/idle-monitor.js +47 -0
  673. package/services/lifetime/idle-monitor.js.map +1 -0
  674. package/services/lifetime/move-aside-method.js +18 -0
  675. package/services/lifetime/move-aside-method.js.map +1 -0
  676. package/services/lifetime/quit-answered-method.js +19 -0
  677. package/services/lifetime/quit-answered-method.js.map +1 -0
  678. package/services/lifetime/quit-method.js +17 -0
  679. package/services/lifetime/quit-method.js.map +1 -0
  680. package/services/lifetime/quit-relay.js +91 -0
  681. package/services/lifetime/quit-relay.js.map +1 -0
  682. package/services/lifetime/runtime-host.js +405 -0
  683. package/services/lifetime/runtime-host.js.map +1 -0
  684. package/services/lifetime/runtime-log.js +74 -0
  685. package/services/lifetime/runtime-log.js.map +1 -0
  686. package/services/lifetime/stop-method.js +39 -0
  687. package/services/lifetime/stop-method.js.map +1 -0
  688. package/services/lifetime/update-method.js +24 -0
  689. package/services/lifetime/update-method.js.map +1 -0
  690. package/services/lifetime/update-preparation.js +167 -0
  691. package/services/lifetime/update-preparation.js.map +1 -0
  692. package/services/lifetime/update-saved-method.js +19 -0
  693. package/services/lifetime/update-saved-method.js.map +1 -0
  694. package/services/modules/commands-method.js +17 -0
  695. package/services/modules/commands-method.js.map +1 -0
  696. package/services/modules/dependency-states.js +33 -0
  697. package/services/modules/dependency-states.js.map +1 -0
  698. package/services/modules/module-context.js +206 -0
  699. package/services/modules/module-context.js.map +1 -0
  700. package/services/modules/module-declaration.reader.js +46 -0
  701. package/services/modules/module-declaration.reader.js.map +1 -0
  702. package/services/modules/module-host.js +287 -0
  703. package/services/modules/module-host.js.map +1 -0
  704. package/services/modules/module-log.js +25 -0
  705. package/services/modules/module-log.js.map +1 -0
  706. package/services/modules/modules-method.js +17 -0
  707. package/services/modules/modules-method.js.map +1 -0
  708. package/services/modules/package-runtime-part-loader.js +33 -0
  709. package/services/modules/package-runtime-part-loader.js.map +1 -0
  710. package/services/modules/run-command-method.js +28 -0
  711. package/services/modules/run-command-method.js.map +1 -0
  712. package/services/native/native-addon.js +65 -0
  713. package/services/native/native-addon.js.map +1 -0
  714. package/services/notifications/clear-notifications-method.js +18 -0
  715. package/services/notifications/clear-notifications-method.js.map +1 -0
  716. package/services/notifications/dismiss-notification-method.js +19 -0
  717. package/services/notifications/dismiss-notification-method.js.map +1 -0
  718. package/services/notifications/mark-notifications-read-method.js +18 -0
  719. package/services/notifications/mark-notifications-read-method.js.map +1 -0
  720. package/services/notifications/notification-center.js +87 -0
  721. package/services/notifications/notification-center.js.map +1 -0
  722. package/services/notifications/notification-policy.js +54 -0
  723. package/services/notifications/notification-policy.js.map +1 -0
  724. package/services/notifications/notification-settings.js +32 -0
  725. package/services/notifications/notification-settings.js.map +1 -0
  726. package/services/notifications/notifications-method.js +21 -0
  727. package/services/notifications/notifications-method.js.map +1 -0
  728. package/services/notifications/post-notification-method.js +26 -0
  729. package/services/notifications/post-notification-method.js.map +1 -0
  730. package/services/ownership/ownership-lock.js +73 -0
  731. package/services/ownership/ownership-lock.js.map +1 -0
  732. package/services/permissions/module-permissions.js +36 -0
  733. package/services/permissions/module-permissions.js.map +1 -0
  734. package/services/permissions/permission-center.js +172 -0
  735. package/services/permissions/permission-center.js.map +1 -0
  736. package/services/permissions/permission-request-checker.js +146 -0
  737. package/services/permissions/permission-request-checker.js.map +1 -0
  738. package/services/permissions/remembered-permission-store.js +52 -0
  739. package/services/permissions/remembered-permission-store.js.map +1 -0
  740. package/services/process/batch-command-line.js +32 -0
  741. package/services/process/batch-command-line.js.map +1 -0
  742. package/services/process/child-process-starter.js +68 -0
  743. package/services/process/child-process-starter.js.map +1 -0
  744. package/services/process/foreground-process-group.reader.js +64 -0
  745. package/services/process/foreground-process-group.reader.js.map +1 -0
  746. package/services/process/linux-process-folder.js +55 -0
  747. package/services/process/linux-process-folder.js.map +1 -0
  748. package/services/process/posix-peer-process-api.js +95 -0
  749. package/services/process/posix-peer-process-api.js.map +1 -0
  750. package/services/process/posix-process-api.js +50 -0
  751. package/services/process/posix-process-api.js.map +1 -0
  752. package/services/process/posix-process-ender.js +199 -0
  753. package/services/process/posix-process-ender.js.map +1 -0
  754. package/services/process/posix-process-table.reader.js +24 -0
  755. package/services/process/posix-process-table.reader.js.map +1 -0
  756. package/services/process/posix-responsibility-api.js +38 -0
  757. package/services/process/posix-responsibility-api.js.map +1 -0
  758. package/services/process/process-clock.js +38 -0
  759. package/services/process/process-clock.js.map +1 -0
  760. package/services/process/process-ender-factory.js +22 -0
  761. package/services/process/process-ender-factory.js.map +1 -0
  762. package/services/process/process-environment.js +53 -0
  763. package/services/process/process-environment.js.map +1 -0
  764. package/services/process/process-record-store.js +35 -0
  765. package/services/process/process-record-store.js.map +1 -0
  766. package/services/process/process-signals.js +56 -0
  767. package/services/process/process-signals.js.map +1 -0
  768. package/services/process/process-supervisor.js +489 -0
  769. package/services/process/process-supervisor.js.map +1 -0
  770. package/services/process/program-launch-resolver.js +88 -0
  771. package/services/process/program-launch-resolver.js.map +1 -0
  772. package/services/process/program-locator.js +95 -0
  773. package/services/process/program-locator.js.map +1 -0
  774. package/services/process/programs-method.js +17 -0
  775. package/services/process/programs-method.js.map +1 -0
  776. package/services/process/windows-peer-process-api.js +52 -0
  777. package/services/process/windows-peer-process-api.js.map +1 -0
  778. package/services/process/windows-process-api.js +69 -0
  779. package/services/process/windows-process-api.js.map +1 -0
  780. package/services/process/windows-process-ender.js +137 -0
  781. package/services/process/windows-process-ender.js.map +1 -0
  782. package/services/process/windows-process-job.js +63 -0
  783. package/services/process/windows-process-job.js.map +1 -0
  784. package/services/process/windows-process-killer.js +58 -0
  785. package/services/process/windows-process-killer.js.map +1 -0
  786. package/services/process/windows-process-table.reader.js +46 -0
  787. package/services/process/windows-process-table.reader.js.map +1 -0
  788. package/services/recent-commands/recent-commands-method.js +18 -0
  789. package/services/recent-commands/recent-commands-method.js.map +1 -0
  790. package/services/recent-commands/recent-commands-store.js +29 -0
  791. package/services/recent-commands/recent-commands-store.js.map +1 -0
  792. package/services/recent-commands/record-command-method.js +21 -0
  793. package/services/recent-commands/record-command-method.js.map +1 -0
  794. package/services/registry/command-registry.js +51 -0
  795. package/services/registry/command-registry.js.map +1 -0
  796. package/services/registry/event-registry.js +34 -0
  797. package/services/registry/event-registry.js.map +1 -0
  798. package/services/registry/method-registry.js +26 -0
  799. package/services/registry/method-registry.js.map +1 -0
  800. package/services/registry/service-registry.js +26 -0
  801. package/services/registry/service-registry.js.map +1 -0
  802. package/services/runtime-entry.js +87 -0
  803. package/services/runtime-entry.js.map +1 -0
  804. package/services/secrets/machine-secret-backend.js +121 -0
  805. package/services/secrets/machine-secret-backend.js.map +1 -0
  806. package/services/secrets/module-secrets.js +37 -0
  807. package/services/secrets/module-secrets.js.map +1 -0
  808. package/services/secrets/remove-secret-method.js +19 -0
  809. package/services/secrets/remove-secret-method.js.map +1 -0
  810. package/services/secrets/save-secret-method.js +20 -0
  811. package/services/secrets/save-secret-method.js.map +1 -0
  812. package/services/secrets/secret-answered-method.js +19 -0
  813. package/services/secrets/secret-answered-method.js.map +1 -0
  814. package/services/secrets/secret-status-method.js +18 -0
  815. package/services/secrets/secret-status-method.js.map +1 -0
  816. package/services/secrets/secret-table.js +26 -0
  817. package/services/secrets/secret-table.js.map +1 -0
  818. package/services/settings/module-settings.js +69 -0
  819. package/services/settings/module-settings.js.map +1 -0
  820. package/services/settings/setting-read-method.js +18 -0
  821. package/services/settings/setting-read-method.js.map +1 -0
  822. package/services/settings/setting-reset-method.js +20 -0
  823. package/services/settings/setting-reset-method.js.map +1 -0
  824. package/services/settings/setting-write-method.js +20 -0
  825. package/services/settings/setting-write-method.js.map +1 -0
  826. package/services/settings/settings-read-method.js +18 -0
  827. package/services/settings/settings-read-method.js.map +1 -0
  828. package/services/settings/settings.service.js +162 -0
  829. package/services/settings/settings.service.js.map +1 -0
  830. package/services/settings/shell-settings.js +78 -0
  831. package/services/settings/shell-settings.js.map +1 -0
  832. package/services/tools/agent-control.js +49 -0
  833. package/services/tools/agent-control.js.map +1 -0
  834. package/services/tools/image-size.reader.js +35 -0
  835. package/services/tools/image-size.reader.js.map +1 -0
  836. package/services/tools/image-size.resources.js +24 -0
  837. package/services/tools/image-size.resources.js.map +1 -0
  838. package/services/tools/module-tools.js +77 -0
  839. package/services/tools/module-tools.js.map +1 -0
  840. package/services/tools/tool-endpoint.js +131 -0
  841. package/services/tools/tool-endpoint.js.map +1 -0
  842. package/services/tools/tool-registry.js +386 -0
  843. package/services/tools/tool-registry.js.map +1 -0
  844. package/services/tools/tool-result.validator.js +93 -0
  845. package/services/tools/tool-result.validator.js.map +1 -0
  846. package/services/tools/tool-schema.resources.js +45 -0
  847. package/services/tools/tool-schema.resources.js.map +1 -0
  848. package/services/tools/tool-schema.validator.js +232 -0
  849. package/services/tools/tool-schema.validator.js.map +1 -0
  850. package/services/web-views/module-web-view-relay.js +33 -0
  851. package/services/web-views/module-web-view-relay.js.map +1 -0
  852. package/services/web-views/module-web-views.js +46 -0
  853. package/services/web-views/module-web-views.js.map +1 -0
  854. package/services/web-views/web-view-answered-method.js +19 -0
  855. package/services/web-views/web-view-answered-method.js.map +1 -0
  856. package/services/web-views/web-view-center.js +119 -0
  857. package/services/web-views/web-view-center.js.map +1 -0
  858. package/services/web-views/web-view-events-method.js +19 -0
  859. package/services/web-views/web-view-events-method.js.map +1 -0
  860. package/services/window-state/window-state-read-method.js +20 -0
  861. package/services/window-state/window-state-read-method.js.map +1 -0
  862. package/services/window-state/window-state-store.js +24 -0
  863. package/services/window-state/window-state-store.js.map +1 -0
  864. package/services/window-state/window-state-write-method.js +22 -0
  865. package/services/window-state/window-state-write-method.js.map +1 -0
  866. package/services/work/work-method.js +17 -0
  867. package/services/work/work-method.js.map +1 -0
  868. package/services/work/work-tracker.js +56 -0
  869. package/services/work/work-tracker.js.map +1 -0
  870. package/testing/models/fake-app-shortcuts.js +18 -0
  871. package/testing/models/fake-app-shortcuts.js.map +1 -0
  872. package/testing/models/fake-app-windows.js +17 -0
  873. package/testing/models/fake-app-windows.js.map +1 -0
  874. package/testing/models/fake-module-database.js +17 -0
  875. package/testing/models/fake-module-database.js.map +1 -0
  876. package/testing/models/fake-module-log.js +12 -0
  877. package/testing/models/fake-module-log.js.map +1 -0
  878. package/testing/models/fake-module-secrets.js +15 -0
  879. package/testing/models/fake-module-secrets.js.map +1 -0
  880. package/testing/models/fake-module-settings.js +23 -0
  881. package/testing/models/fake-module-settings.js.map +1 -0
  882. package/testing/models/fake-permissions-context.js +28 -0
  883. package/testing/models/fake-permissions-context.js.map +1 -0
  884. package/testing/models/fake-runtime-files.js +13 -0
  885. package/testing/models/fake-runtime-files.js.map +1 -0
  886. package/testing/models/fake-runtime-part-context.js +70 -0
  887. package/testing/models/fake-runtime-part-context.js.map +1 -0
  888. package/testing/models/fake-runtime-web-views.js +26 -0
  889. package/testing/models/fake-runtime-web-views.js.map +1 -0
  890. package/testing/models/fake-tools-context.js +72 -0
  891. package/testing/models/fake-tools-context.js.map +1 -0
  892. package/testing/models/fake-web-view-relay.js +23 -0
  893. package/testing/models/fake-web-view-relay.js.map +1 -0
@@ -0,0 +1,2132 @@
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
+
9
+ import type { JsonObject, JsonValue } from "@noldova/context.json";
10
+ import type { SettingChange, WebViewEvent } from "@noldova/desktop.protocol";
11
+ import { Fake, type UnansweredCallException } from "@noldova/desktop.protocol/testing";
12
+ import type { ClientClosure, IAppShortcuts, IAppWindows, IModuleDatabase, IModuleLog, IModuleSecrets, IModuleSettings, IPermissionsContext, IRuntimeFiles,
13
+ IRuntimePartContext, IRuntimeWebViews, IToolsContext, IWebViewRelay, PermissionRevocation, Registration, RegistrationException,
14
+ WebViewFailureException, WebViewProtocolEvent } from "@noldova/desktop.runtime";
15
+
16
+ /**
17
+ * A fake of the {@link IRuntimePartContext} that the runtime hands a module's
18
+ * runtime part, for the module's tests: it records every call, a test answers
19
+ * each member that returns a value with {@link Fake.answer}, its parts are
20
+ * fakes of their own, and its raisers call the listeners the module added, as
21
+ * the runtime would.
22
+ *
23
+ * A member that returns a value, or a property, throws
24
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
25
+ * that no test passes on a value the fake made up.
26
+ *
27
+ * @example
28
+ * ```ts
29
+ * import { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
30
+ *
31
+ * export function startNotes(): FakeRuntimePartContext {
32
+ * const context = new FakeRuntimePartContext();
33
+ * context.answer("moduleId", "notes");
34
+ * context.settings.answer("read", () => "dark");
35
+ * return context;
36
+ * }
37
+ *
38
+ * export function registeredMethods(context: FakeRuntimePartContext): number {
39
+ * return context.callsOf("registerMethod").length;
40
+ * }
41
+ * ```
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
46
+ * import { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
47
+ *
48
+ * export async function isUnansweredAsync(): Promise<boolean> {
49
+ * const fake = new FakeRuntimePartContext();
50
+ * try {
51
+ * await fake.getWorkFolderAsync();
52
+ * } catch (error) {
53
+ * return error instanceof UnansweredCallException;
54
+ * }
55
+ * return false;
56
+ * }
57
+ * ```
58
+ */
59
+ export declare class FakeRuntimePartContext extends Fake<IRuntimePartContext> implements IRuntimePartContext {
60
+ /**
61
+ * The fake that stands in for {@link IRuntimePartContext.database}, with
62
+ * calls and answers of its own.
63
+ */
64
+ public readonly database: FakeModuleDatabase;
65
+
66
+ /**
67
+ * The fake that stands in for {@link IRuntimePartContext.settings}, with
68
+ * calls and answers of its own.
69
+ */
70
+ public readonly settings: FakeModuleSettings;
71
+
72
+ /**
73
+ * The fake that stands in for {@link IRuntimePartContext.log}, with calls and
74
+ * answers of its own.
75
+ */
76
+ public readonly log: FakeModuleLog;
77
+
78
+ /**
79
+ * The fake that stands in for {@link IRuntimePartContext.tools}, with calls
80
+ * and answers of its own.
81
+ */
82
+ public readonly tools: FakeToolsContext;
83
+
84
+ /**
85
+ * The fake that stands in for {@link IRuntimePartContext.permissions}, with
86
+ * calls and answers of its own.
87
+ */
88
+ public readonly permissions: FakePermissionsContext;
89
+
90
+ /**
91
+ * The fake that stands in for {@link IRuntimePartContext.webViews}, with
92
+ * calls and answers of its own.
93
+ */
94
+ public readonly webViews: FakeRuntimeWebViews;
95
+
96
+ /**
97
+ * The fake that stands in for {@link IRuntimePartContext.files}, with calls
98
+ * and answers of its own.
99
+ */
100
+ public readonly files: FakeRuntimeFiles;
101
+
102
+ /**
103
+ * The fake that stands in for {@link IRuntimePartContext.secrets}, with calls
104
+ * and answers of its own.
105
+ */
106
+ public readonly secrets: FakeModuleSecrets;
107
+
108
+ /**
109
+ * The fake that stands in for {@link IRuntimePartContext.appWindows}, with
110
+ * calls and answers of its own.
111
+ */
112
+ public readonly appWindows: FakeAppWindows;
113
+
114
+ /**
115
+ * The fake that stands in for {@link IRuntimePartContext.shortcuts}, with
116
+ * calls and answers of its own.
117
+ */
118
+ public readonly shortcuts: FakeAppShortcuts;
119
+
120
+ /**
121
+ * Stands in for {@link IRuntimePartContext.getWorkFolderAsync}. Records each
122
+ * call, which {@link Fake.callsOf} reads, and returns what the answer that
123
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
124
+ * rejects rather than the call throwing.
125
+ *
126
+ * @throws {UnansweredCallException} As the rejection of the promise it
127
+ * returns, naming the member, while the test has given it no answer, as the
128
+ * real member fails.
129
+ *
130
+ * @example
131
+ * ```ts
132
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
133
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
134
+ *
135
+ * export function answerGetWorkFolderAsync(fake: FakeRuntimePartContext, value: Awaited<ReturnType<IRuntimePartContext["getWorkFolderAsync"]>>): void {
136
+ * fake.answer("getWorkFolderAsync", () => Promise.resolve(value));
137
+ * }
138
+ * ```
139
+ */
140
+ public readonly getWorkFolderAsync: IRuntimePartContext["getWorkFolderAsync"];
141
+
142
+ /**
143
+ * Stands in for {@link IRuntimePartContext.beginWork}. Records each call,
144
+ * which {@link Fake.callsOf} reads, and returns what the answer that
145
+ * {@link Fake.answer} gives returns.
146
+ *
147
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
148
+ * the test has given it no answer.
149
+ *
150
+ * @example
151
+ * ```ts
152
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
153
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
154
+ *
155
+ * export function answerBeginWork(fake: FakeRuntimePartContext, value: ReturnType<IRuntimePartContext["beginWork"]>): void {
156
+ * fake.answer("beginWork", () => value);
157
+ * }
158
+ * ```
159
+ */
160
+ public readonly beginWork: IRuntimePartContext["beginWork"];
161
+
162
+ /**
163
+ * Stands in for {@link IRuntimePartContext.readEnvironmentAsync}. Records
164
+ * each call, which {@link Fake.callsOf} reads, and returns what the answer
165
+ * that {@link Fake.answer} gives returns; while unanswered, the promise it
166
+ * returns rejects rather than the call throwing.
167
+ *
168
+ * @throws {UnansweredCallException} As the rejection of the promise it
169
+ * returns, naming the member, while the test has given it no answer, as the
170
+ * real member fails.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
175
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
176
+ *
177
+ * export function answerReadEnvironmentAsync(fake: FakeRuntimePartContext, value: Awaited<ReturnType<IRuntimePartContext["readEnvironmentAsync"]>>): void {
178
+ * fake.answer("readEnvironmentAsync", () => Promise.resolve(value));
179
+ * }
180
+ * ```
181
+ */
182
+ public readonly readEnvironmentAsync: IRuntimePartContext["readEnvironmentAsync"];
183
+
184
+ /**
185
+ * Stands in for {@link IRuntimePartContext.startProcessAsync}. Records each
186
+ * call, which {@link Fake.callsOf} reads, and returns what the answer that
187
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
188
+ * rejects rather than the call throwing.
189
+ *
190
+ * @throws {UnansweredCallException} As the rejection of the promise it
191
+ * returns, naming the member, while the test has given it no answer, as the
192
+ * real member fails.
193
+ *
194
+ * @example
195
+ * ```ts
196
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
197
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
198
+ *
199
+ * export function answerStartProcessAsync(fake: FakeRuntimePartContext, value: Awaited<ReturnType<IRuntimePartContext["startProcessAsync"]>>): void {
200
+ * fake.answer("startProcessAsync", () => Promise.resolve(value));
201
+ * }
202
+ * ```
203
+ */
204
+ public readonly startProcessAsync: IRuntimePartContext["startProcessAsync"];
205
+
206
+ /**
207
+ * Stands in for {@link IRuntimePartContext.startPseudoTerminalAsync}. Records
208
+ * each call, which {@link Fake.callsOf} reads, and returns what the answer
209
+ * that {@link Fake.answer} gives returns; while unanswered, the promise it
210
+ * returns rejects rather than the call throwing.
211
+ *
212
+ * @throws {UnansweredCallException} As the rejection of the promise it
213
+ * returns, naming the member, while the test has given it no answer, as the
214
+ * real member fails.
215
+ *
216
+ * @example
217
+ * ```ts
218
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
219
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
220
+ *
221
+ * export function answerStartPseudoTerminalAsync(fake: FakeRuntimePartContext, value: Awaited<ReturnType<IRuntimePartContext["startPseudoTerminalAsync"]>>): void {
222
+ * fake.answer("startPseudoTerminalAsync", () => Promise.resolve(value));
223
+ * }
224
+ * ```
225
+ */
226
+ public readonly startPseudoTerminalAsync: IRuntimePartContext["startPseudoTerminalAsync"];
227
+
228
+ /**
229
+ * Stands in for {@link IRuntimePartContext.registerMethod}. Records each
230
+ * call, which {@link Fake.callsOf} reads, and calls the answer that
231
+ * {@link Fake.answer} gives; while unanswered, it only records the call.
232
+ *
233
+ * @example
234
+ * ```ts
235
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
236
+ *
237
+ * export function heardRegisterMethod(fake: FakeRuntimePartContext): readonly unknown[][] {
238
+ * const heard: unknown[][] = [];
239
+ * fake.answer("registerMethod", (...args) => {
240
+ * heard.push(args);
241
+ * });
242
+ * return heard;
243
+ * }
244
+ * ```
245
+ */
246
+ public readonly registerMethod: IRuntimePartContext["registerMethod"];
247
+
248
+ /**
249
+ * Stands in for {@link IRuntimePartContext.declareEvent}. Records each call,
250
+ * which {@link Fake.callsOf} reads, and returns what the answer that
251
+ * {@link Fake.answer} gives returns.
252
+ *
253
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
254
+ * the test has given it no answer.
255
+ *
256
+ * @example
257
+ * ```ts
258
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
259
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
260
+ *
261
+ * export function answerDeclareEvent(fake: FakeRuntimePartContext, value: ReturnType<IRuntimePartContext["declareEvent"]>): void {
262
+ * fake.answer("declareEvent", () => value);
263
+ * }
264
+ * ```
265
+ */
266
+ public readonly declareEvent: IRuntimePartContext["declareEvent"];
267
+
268
+ /**
269
+ * Stands in for {@link IRuntimePartContext.registerCommand}. Records each
270
+ * call, which {@link Fake.callsOf} reads, and calls the answer that
271
+ * {@link Fake.answer} gives; while unanswered, it only records the call.
272
+ *
273
+ * @example
274
+ * ```ts
275
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
276
+ *
277
+ * export function heardRegisterCommand(fake: FakeRuntimePartContext): readonly unknown[][] {
278
+ * const heard: unknown[][] = [];
279
+ * fake.answer("registerCommand", (...args) => {
280
+ * heard.push(args);
281
+ * });
282
+ * return heard;
283
+ * }
284
+ * ```
285
+ */
286
+ public readonly registerCommand: IRuntimePartContext["registerCommand"];
287
+
288
+ /**
289
+ * Stands in for {@link IRuntimePartContext.onClientClosed}. Records each
290
+ * listener, which {@link FakeRuntimePartContext.raiseClientClosedAsync} calls
291
+ * and {@link Fake.activeCallsOf} lists; like the interface, it gives no way
292
+ * to remove it, and it takes no answer.
293
+ *
294
+ * @example
295
+ * ```ts
296
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
297
+ *
298
+ * export function activeOnClientClosed(fake: FakeRuntimePartContext): number {
299
+ * return fake.activeCallsOf("onClientClosed").length;
300
+ * }
301
+ * ```
302
+ */
303
+ public readonly onClientClosed: IRuntimePartContext["onClientClosed"];
304
+
305
+ /**
306
+ * Stands in for {@link IRuntimePartContext.postNotification}. Records each
307
+ * call, which {@link Fake.callsOf} reads, and returns what the answer that
308
+ * {@link Fake.answer} gives returns.
309
+ *
310
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
311
+ * the test has given it no answer.
312
+ *
313
+ * @example
314
+ * ```ts
315
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
316
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
317
+ *
318
+ * export function answerPostNotification(fake: FakeRuntimePartContext, value: ReturnType<IRuntimePartContext["postNotification"]>): void {
319
+ * fake.answer("postNotification", () => value);
320
+ * }
321
+ * ```
322
+ */
323
+ public readonly postNotification: IRuntimePartContext["postNotification"];
324
+
325
+ /**
326
+ * Stands in for {@link IRuntimePartContext.publishService}. Records each
327
+ * call, which {@link Fake.callsOf} reads, and calls the answer that
328
+ * {@link Fake.answer} gives; while unanswered, it only records the call.
329
+ *
330
+ * @example
331
+ * ```ts
332
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
333
+ *
334
+ * export function heardPublishService(fake: FakeRuntimePartContext): readonly unknown[][] {
335
+ * const heard: unknown[][] = [];
336
+ * fake.answer("publishService", (...args) => {
337
+ * heard.push(args);
338
+ * });
339
+ * return heard;
340
+ * }
341
+ * ```
342
+ */
343
+ public readonly publishService: IRuntimePartContext["publishService"];
344
+
345
+ /**
346
+ * Stands in for {@link IRuntimePartContext.onDependencyChanged}. Records each
347
+ * listener, which {@link FakeRuntimePartContext.raiseDependencyChanged} calls
348
+ * and {@link Fake.activeCallsOf} lists until the disposer it returns runs; it
349
+ * takes no answer.
350
+ *
351
+ * @example
352
+ * ```ts
353
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
354
+ *
355
+ * export function activeOnDependencyChanged(fake: FakeRuntimePartContext): number {
356
+ * return fake.activeCallsOf("onDependencyChanged").length;
357
+ * }
358
+ * ```
359
+ */
360
+ public readonly onDependencyChanged: IRuntimePartContext["onDependencyChanged"];
361
+
362
+ /**
363
+ * Stands in for {@link IRuntimePartContext.moduleId}. Reads the value that
364
+ * {@link Fake.answer} gives.
365
+ *
366
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
367
+ * the test has given it no answer.
368
+ *
369
+ * @example
370
+ * ```ts
371
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
372
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
373
+ *
374
+ * export function answerModuleId(fake: FakeRuntimePartContext, value: IRuntimePartContext["moduleId"]): void {
375
+ * fake.answer("moduleId", value);
376
+ * }
377
+ * ```
378
+ */
379
+ public get moduleId(): string;
380
+
381
+ /**
382
+ * Stands in for {@link IRuntimePartContext.moduleFolder}. Reads the value
383
+ * that {@link Fake.answer} gives.
384
+ *
385
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
386
+ * the test has given it no answer.
387
+ *
388
+ * @example
389
+ * ```ts
390
+ * import type { IRuntimePartContext } from "@noldova/desktop.runtime";
391
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
392
+ *
393
+ * export function answerModuleFolder(fake: FakeRuntimePartContext, value: IRuntimePartContext["moduleFolder"]): void {
394
+ * fake.answer("moduleFolder", value);
395
+ * }
396
+ * ```
397
+ */
398
+ public get moduleFolder(): string;
399
+
400
+ /**
401
+ * Stands in for {@link IRuntimePartContext.getService}. Records each call,
402
+ * which {@link Fake.callsOf} reads, and returns what the answer that
403
+ * {@link Fake.answer} gives returns.
404
+ *
405
+ * @typeParam T The service's type.
406
+ *
407
+ * @param name The service's name.
408
+ *
409
+ * @param type The class the service is an instance of.
410
+ *
411
+ * @returns What the answer returns.
412
+ *
413
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
414
+ * the test has given it no answer.
415
+ *
416
+ * @example
417
+ * ```ts
418
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
419
+ *
420
+ * export function answerGetService(fake: FakeRuntimePartContext): void {
421
+ * fake.answer("getService", name => {
422
+ * throw new Error(`No ${name} service.`);
423
+ * });
424
+ * }
425
+ * ```
426
+ */
427
+ public getService<T extends object>(name: string, type: abstract new (...args: never[]) => T): T;
428
+
429
+ /**
430
+ * Stands in for {@link IRuntimePartContext.findService}. Records each call,
431
+ * which {@link Fake.callsOf} reads, and returns what the answer that
432
+ * {@link Fake.answer} gives returns.
433
+ *
434
+ * @typeParam T The service's type.
435
+ *
436
+ * @param name The service's name.
437
+ *
438
+ * @param guard Tells whether a service is of the type.
439
+ *
440
+ * @returns What the answer returns.
441
+ *
442
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
443
+ * the test has given it no answer.
444
+ *
445
+ * @example
446
+ * ```ts
447
+ * import type { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
448
+ *
449
+ * export function answerFindService(fake: FakeRuntimePartContext): void {
450
+ * fake.answer("findService", () => null);
451
+ * }
452
+ * ```
453
+ */
454
+ public findService<T extends object>(name: string, guard: (service: object) => service is T): T | null;
455
+
456
+ /**
457
+ * Tells each listener of {@link IRuntimePartContext.onClientClosed} that a
458
+ * client closed, and waits for what each one returns, which the runtime
459
+ * itself doesn't.
460
+ *
461
+ * As the runtime's own dispatch does, it skips a listener that an earlier one
462
+ * removes during the call, and one that throws or rejects stops no other:
463
+ * {@link Fake.errors} keeps what it threw, where the runtime's diagnostics
464
+ * log it.
465
+ *
466
+ * @param closure The client that closed.
467
+ *
468
+ * @returns A promise that settles when every listener's work has.
469
+ *
470
+ * @example
471
+ * ```ts
472
+ * import { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
473
+ *
474
+ * import { ClientClosure } from "@noldova/desktop.runtime";
475
+ *
476
+ * export async function closeWindow(context: FakeRuntimePartContext): Promise<void> {
477
+ * await context.raiseClientClosedAsync(new ClientClosure(1, 1));
478
+ * }
479
+ * ```
480
+ */
481
+ public raiseClientClosedAsync(closure: ClientClosure): Promise<void>;
482
+
483
+ /**
484
+ * Tells each listener of {@link IRuntimePartContext.onDependencyChanged} that
485
+ * an optional dependency became active or stopped.
486
+ *
487
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
488
+ * one removes during the call, and one that throws stops no other: the fake's
489
+ * {@link FakeRuntimePartContext.log} records the line the module's log would
490
+ * write.
491
+ *
492
+ * @param moduleId The dependency's id.
493
+ *
494
+ * @param isActive Whether it is active now.
495
+ *
496
+ * @example
497
+ * ```ts
498
+ * import { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
499
+ *
500
+ * export function stopGit(context: FakeRuntimePartContext): void {
501
+ * context.raiseDependencyChanged("git", false);
502
+ * }
503
+ * ```
504
+ */
505
+ public raiseDependencyChanged(moduleId: string, isActive: boolean): void;
506
+
507
+ /**
508
+ * The fakes it holds, its database, settings, log, tools, permissions,
509
+ * web views, files, secrets, app windows and shortcuts, which
510
+ * {@link Fake.beStrict} makes strict with it.
511
+ *
512
+ * @returns The fakes it holds.
513
+ *
514
+ * @example
515
+ * ```ts
516
+ * import { FakeRuntimePartContext } from "@noldova/desktop.runtime/testing";
517
+ *
518
+ * export function strict(): FakeRuntimePartContext {
519
+ * const fake = new FakeRuntimePartContext();
520
+ * fake.beStrict();
521
+ * return fake;
522
+ * }
523
+ * ```
524
+ */
525
+ protected override parts(): readonly Pick<Fake<object>, "beStrict">[];
526
+ }
527
+
528
+ /**
529
+ * A fake of {@link IRuntimePartContext.database}, the module's database, for a
530
+ * module's tests: it records every call, and a test answers each member that
531
+ * returns a value with {@link Fake.answer}.
532
+ *
533
+ * A member that returns a value, or a property, throws
534
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
535
+ * that no test passes on a value the fake made up.
536
+ *
537
+ * @example
538
+ * ```ts
539
+ * import { FakeModuleDatabase } from "@noldova/desktop.runtime/testing";
540
+ *
541
+ * export function withNoRows(): FakeModuleDatabase {
542
+ * const database = new FakeModuleDatabase();
543
+ * database.answer("readAll", () => []);
544
+ * return database;
545
+ * }
546
+ * ```
547
+ *
548
+ * @example
549
+ * ```ts
550
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
551
+ * import { FakeModuleDatabase } from "@noldova/desktop.runtime/testing";
552
+ *
553
+ * export function isUnanswered(): boolean {
554
+ * const fake = new FakeModuleDatabase();
555
+ * try {
556
+ * fake.readAll("SELECT name FROM notes");
557
+ * } catch (error) {
558
+ * return error instanceof UnansweredCallException;
559
+ * }
560
+ * return false;
561
+ * }
562
+ * ```
563
+ */
564
+ export declare class FakeModuleDatabase extends Fake<IModuleDatabase> implements IModuleDatabase {
565
+ /**
566
+ * Stands in for {@link IModuleDatabase.read}. Records each call, which
567
+ * {@link Fake.callsOf} reads, and returns what the answer that
568
+ * {@link Fake.answer} gives returns.
569
+ *
570
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
571
+ * the test has given it no answer.
572
+ *
573
+ * @example
574
+ * ```ts
575
+ * import type { IModuleDatabase } from "@noldova/desktop.runtime";
576
+ * import type { FakeModuleDatabase } from "@noldova/desktop.runtime/testing";
577
+ *
578
+ * export function answerRead(fake: FakeModuleDatabase, value: ReturnType<IModuleDatabase["read"]>): void {
579
+ * fake.answer("read", () => value);
580
+ * }
581
+ * ```
582
+ */
583
+ public readonly read: IModuleDatabase["read"];
584
+
585
+ /**
586
+ * Stands in for {@link IModuleDatabase.readAll}. Records each call, which
587
+ * {@link Fake.callsOf} reads, and returns what the answer that
588
+ * {@link Fake.answer} gives returns.
589
+ *
590
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
591
+ * the test has given it no answer.
592
+ *
593
+ * @example
594
+ * ```ts
595
+ * import type { IModuleDatabase } from "@noldova/desktop.runtime";
596
+ * import type { FakeModuleDatabase } from "@noldova/desktop.runtime/testing";
597
+ *
598
+ * export function answerReadAll(fake: FakeModuleDatabase, value: ReturnType<IModuleDatabase["readAll"]>): void {
599
+ * fake.answer("readAll", () => value);
600
+ * }
601
+ * ```
602
+ */
603
+ public readonly readAll: IModuleDatabase["readAll"];
604
+
605
+ /**
606
+ * Stands in for {@link IModuleDatabase.run}. Records each call, which
607
+ * {@link Fake.callsOf} reads, and returns what the answer that
608
+ * {@link Fake.answer} gives returns.
609
+ *
610
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
611
+ * the test has given it no answer.
612
+ *
613
+ * @example
614
+ * ```ts
615
+ * import type { IModuleDatabase } from "@noldova/desktop.runtime";
616
+ * import type { FakeModuleDatabase } from "@noldova/desktop.runtime/testing";
617
+ *
618
+ * export function answerRun(fake: FakeModuleDatabase, value: ReturnType<IModuleDatabase["run"]>): void {
619
+ * fake.answer("run", () => value);
620
+ * }
621
+ * ```
622
+ */
623
+ public readonly run: IModuleDatabase["run"];
624
+
625
+ /**
626
+ * Stands in for {@link IModuleDatabase.transaction}. Records each call, which
627
+ * {@link Fake.callsOf} reads, and returns what the answer that
628
+ * {@link Fake.answer} gives returns.
629
+ *
630
+ * @typeParam T What the action returns.
631
+ *
632
+ * @param action What runs in the transaction.
633
+ *
634
+ * @returns What the answer returns.
635
+ *
636
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
637
+ * the test has given it no answer.
638
+ *
639
+ * @example
640
+ * ```ts
641
+ * import type { FakeModuleDatabase } from "@noldova/desktop.runtime/testing";
642
+ *
643
+ * export function answerTransaction(fake: FakeModuleDatabase): void {
644
+ * fake.answer("transaction", action => action());
645
+ * }
646
+ * ```
647
+ */
648
+ public transaction<T>(action: () => T & ([T] extends [PromiseLike<unknown>] ? never : unknown)): T;
649
+ }
650
+
651
+ /**
652
+ * A fake of {@link IRuntimePartContext.settings}, the module's settings, for a
653
+ * module's tests: it records every call, and a test answers each member that
654
+ * returns a value with {@link Fake.answer}.
655
+ *
656
+ * A member that returns a value, or a property, throws
657
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
658
+ * that no test passes on a value the fake made up.
659
+ *
660
+ * @example
661
+ * ```ts
662
+ * import { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
663
+ *
664
+ * export function withDark(): FakeModuleSettings {
665
+ * const settings = new FakeModuleSettings();
666
+ * settings.answer("read", () => "dark");
667
+ * return settings;
668
+ * }
669
+ * ```
670
+ *
671
+ * @example
672
+ * ```ts
673
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
674
+ * import { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
675
+ *
676
+ * export function isUnanswered(): boolean {
677
+ * const fake = new FakeModuleSettings();
678
+ * try {
679
+ * fake.read("notes.theme");
680
+ * } catch (error) {
681
+ * return error instanceof UnansweredCallException;
682
+ * }
683
+ * return false;
684
+ * }
685
+ * ```
686
+ */
687
+ export declare class FakeModuleSettings extends Fake<IModuleSettings> implements IModuleSettings {
688
+ /**
689
+ * Stands in for {@link IModuleSettings.read}. Records each call, which
690
+ * {@link Fake.callsOf} reads, and returns what the answer that
691
+ * {@link Fake.answer} gives returns.
692
+ *
693
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
694
+ * the test has given it no answer.
695
+ *
696
+ * @example
697
+ * ```ts
698
+ * import type { IModuleSettings } from "@noldova/desktop.runtime";
699
+ * import type { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
700
+ *
701
+ * export function answerRead(fake: FakeModuleSettings, value: ReturnType<IModuleSettings["read"]>): void {
702
+ * fake.answer("read", () => value);
703
+ * }
704
+ * ```
705
+ */
706
+ public readonly read: IModuleSettings["read"];
707
+
708
+ /**
709
+ * Stands in for {@link IModuleSettings.write}. Records each call, which
710
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
711
+ * gives; while unanswered, it only records the call.
712
+ *
713
+ * @example
714
+ * ```ts
715
+ * import type { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
716
+ *
717
+ * export function heardWrite(fake: FakeModuleSettings): readonly unknown[][] {
718
+ * const heard: unknown[][] = [];
719
+ * fake.answer("write", (...args) => {
720
+ * heard.push(args);
721
+ * });
722
+ * return heard;
723
+ * }
724
+ * ```
725
+ */
726
+ public readonly write: IModuleSettings["write"];
727
+
728
+ /**
729
+ * Stands in for {@link IModuleSettings.reset}. Records each call, which
730
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
731
+ * gives; while unanswered, it only records the call.
732
+ *
733
+ * @example
734
+ * ```ts
735
+ * import type { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
736
+ *
737
+ * export function heardReset(fake: FakeModuleSettings): readonly unknown[][] {
738
+ * const heard: unknown[][] = [];
739
+ * fake.answer("reset", (...args) => {
740
+ * heard.push(args);
741
+ * });
742
+ * return heard;
743
+ * }
744
+ * ```
745
+ */
746
+ public readonly reset: IModuleSettings["reset"];
747
+
748
+ /**
749
+ * Stands in for {@link IModuleSettings.onChanged}. Records each listener,
750
+ * which {@link FakeModuleSettings.raiseChanged} calls and
751
+ * {@link Fake.activeCallsOf} lists; like the interface, it gives no way to
752
+ * remove it, and it takes no answer.
753
+ *
754
+ * @example
755
+ * ```ts
756
+ * import type { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
757
+ *
758
+ * export function activeOnChanged(fake: FakeModuleSettings): number {
759
+ * return fake.activeCallsOf("onChanged").length;
760
+ * }
761
+ * ```
762
+ */
763
+ public readonly onChanged: IModuleSettings["onChanged"];
764
+
765
+ /**
766
+ * Stands in for {@link IModuleSettings.setScopeParent}. Records each call,
767
+ * which {@link Fake.callsOf} reads, and calls the answer that
768
+ * {@link Fake.answer} gives; while unanswered, it only records the call.
769
+ *
770
+ * @example
771
+ * ```ts
772
+ * import type { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
773
+ *
774
+ * export function heardSetScopeParent(fake: FakeModuleSettings): readonly unknown[][] {
775
+ * const heard: unknown[][] = [];
776
+ * fake.answer("setScopeParent", (...args) => {
777
+ * heard.push(args);
778
+ * });
779
+ * return heard;
780
+ * }
781
+ * ```
782
+ */
783
+ public readonly setScopeParent: IModuleSettings["setScopeParent"];
784
+
785
+ /**
786
+ * Stands in for {@link IModuleSettings.removeScope}. Records each call, which
787
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
788
+ * gives; while unanswered, it only records the call.
789
+ *
790
+ * @example
791
+ * ```ts
792
+ * import type { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
793
+ *
794
+ * export function heardRemoveScope(fake: FakeModuleSettings): readonly unknown[][] {
795
+ * const heard: unknown[][] = [];
796
+ * fake.answer("removeScope", (...args) => {
797
+ * heard.push(args);
798
+ * });
799
+ * return heard;
800
+ * }
801
+ * ```
802
+ */
803
+ public readonly removeScope: IModuleSettings["removeScope"];
804
+
805
+ /**
806
+ * Tells each listener of {@link IModuleSettings.onChanged} for the setting
807
+ * that its value changed.
808
+ *
809
+ * As Noldova Desktop's own dispatch does, it calls each listener in place when
810
+ * the call starts: one that an earlier one removes during the call is still
811
+ * called, and one that throws stops the rest, and its error comes out of this
812
+ * call.
813
+ *
814
+ * @param name The setting's name.
815
+ *
816
+ * @param change The change.
817
+ *
818
+ * @example
819
+ * ```ts
820
+ * import { FakeModuleSettings } from "@noldova/desktop.runtime/testing";
821
+ *
822
+ * import type { SettingChange } from "@noldova/desktop.protocol";
823
+ *
824
+ * export function change(settings: FakeModuleSettings, value: SettingChange): void {
825
+ * settings.raiseChanged("terminal.theme", value);
826
+ * }
827
+ * ```
828
+ */
829
+ public raiseChanged(name: string, change: SettingChange): void;
830
+ }
831
+
832
+ /**
833
+ * A fake of {@link IRuntimePartContext.log}, the module's log, for a module's
834
+ * tests: it records every call, and a test answers each member that returns a
835
+ * value with {@link Fake.answer}.
836
+ *
837
+ * A member that returns a value, or a property, throws
838
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
839
+ * that no test passes on a value the fake made up.
840
+ *
841
+ * @example
842
+ * ```ts
843
+ * import { FakeModuleLog } from "@noldova/desktop.runtime/testing";
844
+ *
845
+ * export function written(log: FakeModuleLog): readonly string[] {
846
+ * return log.callsOf("write").map(t => String(t[0]));
847
+ * }
848
+ * ```
849
+ */
850
+ export declare class FakeModuleLog extends Fake<IModuleLog> implements IModuleLog {
851
+ /**
852
+ * Stands in for {@link IModuleLog.write}. Records each call, which
853
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
854
+ * gives; while unanswered, it only records the call.
855
+ *
856
+ * @example
857
+ * ```ts
858
+ * import type { FakeModuleLog } from "@noldova/desktop.runtime/testing";
859
+ *
860
+ * export function heardWrite(fake: FakeModuleLog): readonly unknown[][] {
861
+ * const heard: unknown[][] = [];
862
+ * fake.answer("write", (...args) => {
863
+ * heard.push(args);
864
+ * });
865
+ * return heard;
866
+ * }
867
+ * ```
868
+ */
869
+ public readonly write: IModuleLog["write"];
870
+ }
871
+
872
+ /**
873
+ * A fake of {@link IRuntimePartContext.secrets}, the module's secrets, for a
874
+ * module's tests: it records every call, and a test answers each member that
875
+ * returns a value with {@link Fake.answer}.
876
+ *
877
+ * A member that returns a value, or a property, throws
878
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
879
+ * that no test passes on a value the fake made up.
880
+ *
881
+ * @example
882
+ * ```ts
883
+ * import { FakeModuleSecrets } from "@noldova/desktop.runtime/testing";
884
+ *
885
+ * export function withNone(): FakeModuleSecrets {
886
+ * const secrets = new FakeModuleSecrets();
887
+ * secrets.answer("readAsync", () => Promise.resolve(null));
888
+ * return secrets;
889
+ * }
890
+ * ```
891
+ *
892
+ * @example
893
+ * ```ts
894
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
895
+ * import { FakeModuleSecrets } from "@noldova/desktop.runtime/testing";
896
+ *
897
+ * export async function isUnansweredAsync(): Promise<boolean> {
898
+ * const fake = new FakeModuleSecrets();
899
+ * try {
900
+ * await fake.readAsync("notes.token");
901
+ * } catch (error) {
902
+ * return error instanceof UnansweredCallException;
903
+ * }
904
+ * return false;
905
+ * }
906
+ * ```
907
+ */
908
+ export declare class FakeModuleSecrets extends Fake<IModuleSecrets> implements IModuleSecrets {
909
+ /**
910
+ * Stands in for {@link IModuleSecrets.saveAsync}. Records each call, which
911
+ * {@link Fake.callsOf} reads, and returns what the answer that
912
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
913
+ * rejects rather than the call throwing.
914
+ *
915
+ * @throws {UnansweredCallException} As the rejection of the promise it
916
+ * returns, naming the member, while the test has given it no answer, as the
917
+ * real member fails.
918
+ *
919
+ * @example
920
+ * ```ts
921
+ * import type { IModuleSecrets } from "@noldova/desktop.runtime";
922
+ * import type { FakeModuleSecrets } from "@noldova/desktop.runtime/testing";
923
+ *
924
+ * export function answerSaveAsync(fake: FakeModuleSecrets, value: Awaited<ReturnType<IModuleSecrets["saveAsync"]>>): void {
925
+ * fake.answer("saveAsync", () => Promise.resolve(value));
926
+ * }
927
+ * ```
928
+ */
929
+ public readonly saveAsync: IModuleSecrets["saveAsync"];
930
+
931
+ /**
932
+ * Stands in for {@link IModuleSecrets.readAsync}. Records each call, which
933
+ * {@link Fake.callsOf} reads, and returns what the answer that
934
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
935
+ * rejects rather than the call throwing.
936
+ *
937
+ * @throws {UnansweredCallException} As the rejection of the promise it
938
+ * returns, naming the member, while the test has given it no answer, as the
939
+ * real member fails.
940
+ *
941
+ * @example
942
+ * ```ts
943
+ * import type { IModuleSecrets } from "@noldova/desktop.runtime";
944
+ * import type { FakeModuleSecrets } from "@noldova/desktop.runtime/testing";
945
+ *
946
+ * export function answerReadAsync(fake: FakeModuleSecrets, value: Awaited<ReturnType<IModuleSecrets["readAsync"]>>): void {
947
+ * fake.answer("readAsync", () => Promise.resolve(value));
948
+ * }
949
+ * ```
950
+ */
951
+ public readonly readAsync: IModuleSecrets["readAsync"];
952
+
953
+ /**
954
+ * Stands in for {@link IModuleSecrets.removeAsync}. Records each call, which
955
+ * {@link Fake.callsOf} reads, and returns what the answer that
956
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
957
+ * rejects rather than the call throwing.
958
+ *
959
+ * @throws {UnansweredCallException} As the rejection of the promise it
960
+ * returns, naming the member, while the test has given it no answer, as the
961
+ * real member fails.
962
+ *
963
+ * @example
964
+ * ```ts
965
+ * import type { IModuleSecrets } from "@noldova/desktop.runtime";
966
+ * import type { FakeModuleSecrets } from "@noldova/desktop.runtime/testing";
967
+ *
968
+ * export function answerRemoveAsync(fake: FakeModuleSecrets, value: Awaited<ReturnType<IModuleSecrets["removeAsync"]>>): void {
969
+ * fake.answer("removeAsync", () => Promise.resolve(value));
970
+ * }
971
+ * ```
972
+ */
973
+ public readonly removeAsync: IModuleSecrets["removeAsync"];
974
+
975
+ /**
976
+ * Stands in for {@link IModuleSecrets.isSetAsync}. Records each call, which
977
+ * {@link Fake.callsOf} reads, and returns what the answer that
978
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
979
+ * rejects rather than the call throwing.
980
+ *
981
+ * @throws {UnansweredCallException} As the rejection of the promise it
982
+ * returns, naming the member, while the test has given it no answer, as the
983
+ * real member fails.
984
+ *
985
+ * @example
986
+ * ```ts
987
+ * import type { IModuleSecrets } from "@noldova/desktop.runtime";
988
+ * import type { FakeModuleSecrets } from "@noldova/desktop.runtime/testing";
989
+ *
990
+ * export function answerIsSetAsync(fake: FakeModuleSecrets, value: Awaited<ReturnType<IModuleSecrets["isSetAsync"]>>): void {
991
+ * fake.answer("isSetAsync", () => Promise.resolve(value));
992
+ * }
993
+ * ```
994
+ */
995
+ public readonly isSetAsync: IModuleSecrets["isSetAsync"];
996
+ }
997
+
998
+ /**
999
+ * A fake of {@link IRuntimePartContext.tools}, the module's agent tools, for a
1000
+ * module's tests: it records every call, and a test answers each member that
1001
+ * returns a value with {@link Fake.answer}.
1002
+ *
1003
+ * A member that returns a value, or a property, throws
1004
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
1005
+ * that no test passes on a value the fake made up.
1006
+ *
1007
+ * @example
1008
+ * ```ts
1009
+ * import { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1010
+ *
1011
+ * export function running(): FakeToolsContext {
1012
+ * const tools = new FakeToolsContext();
1013
+ * tools.answer("isStopped", false);
1014
+ * return tools;
1015
+ * }
1016
+ * ```
1017
+ *
1018
+ * @example
1019
+ * ```ts
1020
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
1021
+ * import { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1022
+ *
1023
+ * export function isUnanswered(): boolean {
1024
+ * const fake = new FakeToolsContext();
1025
+ * try {
1026
+ * void fake.isStopped;
1027
+ * } catch (error) {
1028
+ * return error instanceof UnansweredCallException;
1029
+ * }
1030
+ * return false;
1031
+ * }
1032
+ * ```
1033
+ */
1034
+ export declare class FakeToolsContext extends Fake<IToolsContext> implements IToolsContext {
1035
+ /**
1036
+ * Makes the fake.
1037
+ *
1038
+ * @param log The log that takes a listener's failure, as the module's log
1039
+ * does in the runtime; by default, a {@link FakeModuleLog} of the fake's own.
1040
+ * {@link FakeRuntimePartContext} passes its
1041
+ * {@link FakeRuntimePartContext.log}.
1042
+ *
1043
+ * @example
1044
+ * ```ts
1045
+ * import { FakeModuleLog, FakeToolsContext } from "@noldova/desktop.runtime/testing";
1046
+ *
1047
+ * export function logged(log: FakeModuleLog): FakeToolsContext {
1048
+ * return new FakeToolsContext(log);
1049
+ * }
1050
+ * ```
1051
+ */
1052
+ public constructor(log?: IModuleLog);
1053
+
1054
+ /**
1055
+ * Stands in for {@link IToolsContext.register}. Records each registration,
1056
+ * which {@link Fake.activeCallsOf} lists until the {@link Registration} it
1057
+ * returns is disposed. With the answer that {@link Fake.answer} gives, it
1058
+ * also passes the registration to that answer, such as a
1059
+ * `ToolRegistry`'s own, and disposing the {@link Registration} it
1060
+ * returns also disposes the answer's; an answer that throws keeps no
1061
+ * registration, and its error comes out of the call.
1062
+ *
1063
+ * @example
1064
+ * ```ts
1065
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1066
+ *
1067
+ * export function activeRegister(fake: FakeToolsContext): number {
1068
+ * return fake.activeCallsOf("register").length;
1069
+ * }
1070
+ * ```
1071
+ *
1072
+ * @example
1073
+ * ```ts
1074
+ * import { ToolDescriptor, type ToolRegistry } from "@noldova/desktop.runtime";
1075
+ * import type { FakeModuleLog, FakeToolsContext } from "@noldova/desktop.runtime/testing";
1076
+ *
1077
+ * export function serveThrough(fake: FakeToolsContext, registry: ToolRegistry, log: FakeModuleLog, tools: readonly string[]): void {
1078
+ * fake.answer("register", (descriptor, handler) => registry.register("notes", new ToolDescriptor(descriptor, tools), handler, tools, log));
1079
+ * }
1080
+ * ```
1081
+ */
1082
+ public readonly register: IToolsContext["register"];
1083
+
1084
+ /**
1085
+ * Stands in for {@link IToolsContext.openSession}. Records each call, which
1086
+ * {@link Fake.callsOf} reads, and returns what the answer that
1087
+ * {@link Fake.answer} gives returns.
1088
+ *
1089
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
1090
+ * the test has given it no answer.
1091
+ *
1092
+ * @example
1093
+ * ```ts
1094
+ * import type { IToolsContext } from "@noldova/desktop.runtime";
1095
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1096
+ *
1097
+ * export function answerOpenSession(fake: FakeToolsContext, value: ReturnType<IToolsContext["openSession"]>): void {
1098
+ * fake.answer("openSession", () => value);
1099
+ * }
1100
+ * ```
1101
+ */
1102
+ public readonly openSession: IToolsContext["openSession"];
1103
+
1104
+ /**
1105
+ * Stands in for {@link IToolsContext.onSessionEnded}. Records each listener,
1106
+ * which {@link Fake.activeCallsOf} lists until the {@link Registration} it
1107
+ * returns is disposed, and which {@link FakeToolsContext.raiseSessionEnded}
1108
+ * calls. With the answer that {@link Fake.answer} gives, such as a
1109
+ * `ToolRegistry`'s own, the listener goes to that answer instead, and
1110
+ * the raiser doesn't call it; disposing the {@link Registration} it returns
1111
+ * also disposes the answer's.
1112
+ *
1113
+ * @example
1114
+ * ```ts
1115
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1116
+ *
1117
+ * export function activeOnSessionEnded(fake: FakeToolsContext): number {
1118
+ * return fake.activeCallsOf("onSessionEnded").length;
1119
+ * }
1120
+ * ```
1121
+ */
1122
+ public readonly onSessionEnded: IToolsContext["onSessionEnded"];
1123
+
1124
+ /**
1125
+ * Stands in for {@link IToolsContext.openEndpointAsync}. Records each call,
1126
+ * which {@link Fake.callsOf} reads, and returns what the answer that
1127
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1128
+ * rejects rather than the call throwing.
1129
+ *
1130
+ * @throws {UnansweredCallException} As the rejection of the promise it
1131
+ * returns, naming the member, while the test has given it no answer, as the
1132
+ * real member fails.
1133
+ *
1134
+ * @example
1135
+ * ```ts
1136
+ * import type { IToolsContext } from "@noldova/desktop.runtime";
1137
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1138
+ *
1139
+ * export function answerOpenEndpointAsync(fake: FakeToolsContext, value: Awaited<ReturnType<IToolsContext["openEndpointAsync"]>>): void {
1140
+ * fake.answer("openEndpointAsync", () => Promise.resolve(value));
1141
+ * }
1142
+ * ```
1143
+ */
1144
+ public readonly openEndpointAsync: IToolsContext["openEndpointAsync"];
1145
+
1146
+ /**
1147
+ * Stands in for {@link IToolsContext.stopAll}. Records each call, which
1148
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
1149
+ * gives; while unanswered, it only records the call.
1150
+ *
1151
+ * @example
1152
+ * ```ts
1153
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1154
+ *
1155
+ * export function heardStopAll(fake: FakeToolsContext): readonly unknown[][] {
1156
+ * const heard: unknown[][] = [];
1157
+ * fake.answer("stopAll", (...args) => {
1158
+ * heard.push(args);
1159
+ * });
1160
+ * return heard;
1161
+ * }
1162
+ * ```
1163
+ */
1164
+ public readonly stopAll: IToolsContext["stopAll"];
1165
+
1166
+ /**
1167
+ * Stands in for {@link IToolsContext.stopSession}. Records each call, which
1168
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
1169
+ * gives; while unanswered, it only records the call.
1170
+ *
1171
+ * @example
1172
+ * ```ts
1173
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1174
+ *
1175
+ * export function heardStopSession(fake: FakeToolsContext): readonly unknown[][] {
1176
+ * const heard: unknown[][] = [];
1177
+ * fake.answer("stopSession", (...args) => {
1178
+ * heard.push(args);
1179
+ * });
1180
+ * return heard;
1181
+ * }
1182
+ * ```
1183
+ */
1184
+ public readonly stopSession: IToolsContext["stopSession"];
1185
+
1186
+ /**
1187
+ * Stands in for {@link IToolsContext.onSessionStopped}. Records each
1188
+ * listener, which {@link Fake.activeCallsOf} lists until the
1189
+ * {@link Registration} it returns is disposed, and which
1190
+ * {@link FakeToolsContext.raiseSessionStopped} calls. With the answer that
1191
+ * {@link Fake.answer} gives, such as a `ToolRegistry`'s own, the
1192
+ * listener goes to that answer instead, and the raiser doesn't call it;
1193
+ * disposing the {@link Registration} it returns also disposes the answer's.
1194
+ *
1195
+ * @example
1196
+ * ```ts
1197
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1198
+ *
1199
+ * export function activeOnSessionStopped(fake: FakeToolsContext): number {
1200
+ * return fake.activeCallsOf("onSessionStopped").length;
1201
+ * }
1202
+ * ```
1203
+ */
1204
+ public readonly onSessionStopped: IToolsContext["onSessionStopped"];
1205
+
1206
+ /**
1207
+ * Stands in for {@link IToolsContext.resumeAll}. Records each call, which
1208
+ * {@link Fake.callsOf} reads, and calls the answer that {@link Fake.answer}
1209
+ * gives; while unanswered, it only records the call.
1210
+ *
1211
+ * @example
1212
+ * ```ts
1213
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1214
+ *
1215
+ * export function heardResumeAll(fake: FakeToolsContext): readonly unknown[][] {
1216
+ * const heard: unknown[][] = [];
1217
+ * fake.answer("resumeAll", (...args) => {
1218
+ * heard.push(args);
1219
+ * });
1220
+ * return heard;
1221
+ * }
1222
+ * ```
1223
+ */
1224
+ public readonly resumeAll: IToolsContext["resumeAll"];
1225
+
1226
+ /**
1227
+ * Stands in for {@link IToolsContext.onStopped}. Records each listener, which
1228
+ * {@link Fake.activeCallsOf} lists until the {@link Registration} it returns
1229
+ * is disposed, and which {@link FakeToolsContext.raiseStopped} calls. With
1230
+ * the answer that {@link Fake.answer} gives, such as a
1231
+ * `ToolRegistry`'s own, the listener goes to that answer instead, and
1232
+ * the raiser doesn't call it; disposing the {@link Registration} it returns
1233
+ * also disposes the answer's.
1234
+ *
1235
+ * @example
1236
+ * ```ts
1237
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1238
+ *
1239
+ * export function activeOnStopped(fake: FakeToolsContext): number {
1240
+ * return fake.activeCallsOf("onStopped").length;
1241
+ * }
1242
+ * ```
1243
+ */
1244
+ public readonly onStopped: IToolsContext["onStopped"];
1245
+
1246
+ /**
1247
+ * Stands in for {@link IToolsContext.onResumed}. Records each listener, which
1248
+ * {@link Fake.activeCallsOf} lists until the {@link Registration} it returns
1249
+ * is disposed, and which {@link FakeToolsContext.raiseResumed} calls. With
1250
+ * the answer that {@link Fake.answer} gives, such as a
1251
+ * `ToolRegistry`'s own, the listener goes to that answer instead, and
1252
+ * the raiser doesn't call it; disposing the {@link Registration} it returns
1253
+ * also disposes the answer's.
1254
+ *
1255
+ * @example
1256
+ * ```ts
1257
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1258
+ *
1259
+ * export function activeOnResumed(fake: FakeToolsContext): number {
1260
+ * return fake.activeCallsOf("onResumed").length;
1261
+ * }
1262
+ * ```
1263
+ */
1264
+ public readonly onResumed: IToolsContext["onResumed"];
1265
+
1266
+ /**
1267
+ * Stands in for {@link IToolsContext.isStopped}. Reads the value that
1268
+ * {@link Fake.answer} gives.
1269
+ *
1270
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
1271
+ * the test has given it no answer.
1272
+ *
1273
+ * @example
1274
+ * ```ts
1275
+ * import type { IToolsContext } from "@noldova/desktop.runtime";
1276
+ * import type { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1277
+ *
1278
+ * export function answerIsStopped(fake: FakeToolsContext, value: IToolsContext["isStopped"]): void {
1279
+ * fake.answer("isStopped", value);
1280
+ * }
1281
+ * ```
1282
+ */
1283
+ public get isStopped(): boolean;
1284
+
1285
+ /**
1286
+ * Tells each listener of {@link IToolsContext.onSessionEnded} that a tool
1287
+ * session ended.
1288
+ *
1289
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
1290
+ * one removes during the call, and one that throws stops no other: the log
1291
+ * the fake was made with records the line the module's log would write.
1292
+ *
1293
+ * @param session The session's id.
1294
+ *
1295
+ * @example
1296
+ * ```ts
1297
+ * import { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1298
+ *
1299
+ * export function end(tools: FakeToolsContext): void {
1300
+ * tools.raiseSessionEnded("session-1");
1301
+ * }
1302
+ * ```
1303
+ */
1304
+ public raiseSessionEnded(session: string): void;
1305
+
1306
+ /**
1307
+ * Tells each listener of {@link IToolsContext.onSessionStopped} that the
1308
+ * person stopped a tool session.
1309
+ *
1310
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
1311
+ * one removes during the call, and one that throws stops no other: the log
1312
+ * the fake was made with records the line the module's log would write.
1313
+ *
1314
+ * @param session The session's id.
1315
+ *
1316
+ * @param reason Why it stopped.
1317
+ *
1318
+ * @example
1319
+ * ```ts
1320
+ * import { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1321
+ *
1322
+ * export function stop(tools: FakeToolsContext): void {
1323
+ * tools.raiseSessionStopped("session-1", "Stopped by the person.");
1324
+ * }
1325
+ * ```
1326
+ */
1327
+ public raiseSessionStopped(session: string, reason: string): void;
1328
+
1329
+ /**
1330
+ * Tells each listener of {@link IToolsContext.onStopped} that every tool
1331
+ * stopped.
1332
+ *
1333
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
1334
+ * one removes during the call, and one that throws stops no other: the log
1335
+ * the fake was made with records the line the module's log would write.
1336
+ *
1337
+ * @param reason Why they stopped.
1338
+ *
1339
+ * @example
1340
+ * ```ts
1341
+ * import { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1342
+ *
1343
+ * export function stopAll(tools: FakeToolsContext): void {
1344
+ * tools.raiseStopped("Stopped by the person.");
1345
+ * }
1346
+ * ```
1347
+ */
1348
+ public raiseStopped(reason: string): void;
1349
+
1350
+ /**
1351
+ * Tells each listener of {@link IToolsContext.onResumed} that the tools
1352
+ * resumed.
1353
+ *
1354
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
1355
+ * one removes during the call, and one that throws stops no other: the log
1356
+ * the fake was made with records the line the module's log would write.
1357
+ *
1358
+ * @example
1359
+ * ```ts
1360
+ * import { FakeToolsContext } from "@noldova/desktop.runtime/testing";
1361
+ *
1362
+ * export function resume(tools: FakeToolsContext): void {
1363
+ * tools.raiseResumed();
1364
+ * }
1365
+ * ```
1366
+ */
1367
+ public raiseResumed(): void;
1368
+ }
1369
+
1370
+ /**
1371
+ * A fake of {@link IRuntimePartContext.permissions}, the module's permission
1372
+ * answers, for a module's tests: it records every call, and a test answers each
1373
+ * member that returns a value with {@link Fake.answer}.
1374
+ *
1375
+ * A member that returns a value, or a property, throws
1376
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
1377
+ * that no test passes on a value the fake made up.
1378
+ *
1379
+ * @example
1380
+ * ```ts
1381
+ * import { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1382
+ *
1383
+ * export function withNone(): FakePermissionsContext {
1384
+ * const permissions = new FakePermissionsContext();
1385
+ * permissions.answer("listRemembered", () => []);
1386
+ * return permissions;
1387
+ * }
1388
+ * ```
1389
+ *
1390
+ * @example
1391
+ * ```ts
1392
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
1393
+ * import { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1394
+ *
1395
+ * export function isUnanswered(): boolean {
1396
+ * const fake = new FakePermissionsContext();
1397
+ * try {
1398
+ * fake.listRemembered();
1399
+ * } catch (error) {
1400
+ * return error instanceof UnansweredCallException;
1401
+ * }
1402
+ * return false;
1403
+ * }
1404
+ * ```
1405
+ */
1406
+ export declare class FakePermissionsContext extends Fake<IPermissionsContext> implements IPermissionsContext {
1407
+ /**
1408
+ * Makes the fake.
1409
+ *
1410
+ * @param log The log that takes a listener's failure, as the module's log
1411
+ * does in the runtime; by default, a {@link FakeModuleLog} of the fake's own.
1412
+ * {@link FakeRuntimePartContext} passes its
1413
+ * {@link FakeRuntimePartContext.log}.
1414
+ *
1415
+ * @example
1416
+ * ```ts
1417
+ * import { FakeModuleLog, FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1418
+ *
1419
+ * export function logged(log: FakeModuleLog): FakePermissionsContext {
1420
+ * return new FakePermissionsContext(log);
1421
+ * }
1422
+ * ```
1423
+ */
1424
+ public constructor(log?: IModuleLog);
1425
+
1426
+ /**
1427
+ * Stands in for {@link IPermissionsContext.registerAnswerer}. Records each
1428
+ * registration, which {@link Fake.activeCallsOf} lists until the
1429
+ * {@link Registration} it returns is disposed; it takes no answer.
1430
+ *
1431
+ * @example
1432
+ * ```ts
1433
+ * import type { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1434
+ *
1435
+ * export function activeRegisterAnswerer(fake: FakePermissionsContext): number {
1436
+ * return fake.activeCallsOf("registerAnswerer").length;
1437
+ * }
1438
+ * ```
1439
+ */
1440
+ public readonly registerAnswerer: IPermissionsContext["registerAnswerer"];
1441
+
1442
+ /**
1443
+ * Stands in for {@link IPermissionsContext.listRemembered}. Records each
1444
+ * call, which {@link Fake.callsOf} reads, and returns what the answer that
1445
+ * {@link Fake.answer} gives returns.
1446
+ *
1447
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
1448
+ * the test has given it no answer.
1449
+ *
1450
+ * @example
1451
+ * ```ts
1452
+ * import type { IPermissionsContext } from "@noldova/desktop.runtime";
1453
+ * import type { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1454
+ *
1455
+ * export function answerListRemembered(fake: FakePermissionsContext, value: ReturnType<IPermissionsContext["listRemembered"]>): void {
1456
+ * fake.answer("listRemembered", () => value);
1457
+ * }
1458
+ * ```
1459
+ */
1460
+ public readonly listRemembered: IPermissionsContext["listRemembered"];
1461
+
1462
+ /**
1463
+ * Stands in for {@link IPermissionsContext.revoke}. Records each call, which
1464
+ * {@link Fake.callsOf} reads, and returns what the answer that
1465
+ * {@link Fake.answer} gives returns.
1466
+ *
1467
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
1468
+ * the test has given it no answer.
1469
+ *
1470
+ * @example
1471
+ * ```ts
1472
+ * import type { IPermissionsContext } from "@noldova/desktop.runtime";
1473
+ * import type { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1474
+ *
1475
+ * export function answerRevoke(fake: FakePermissionsContext, value: ReturnType<IPermissionsContext["revoke"]>): void {
1476
+ * fake.answer("revoke", () => value);
1477
+ * }
1478
+ * ```
1479
+ */
1480
+ public readonly revoke: IPermissionsContext["revoke"];
1481
+
1482
+ /**
1483
+ * Stands in for {@link IPermissionsContext.onRevoked}. Records each listener,
1484
+ * which {@link FakePermissionsContext.raiseRevoked} calls and
1485
+ * {@link Fake.activeCallsOf} lists until the {@link Registration} it returns
1486
+ * is disposed; it takes no answer.
1487
+ *
1488
+ * @example
1489
+ * ```ts
1490
+ * import type { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1491
+ *
1492
+ * export function activeOnRevoked(fake: FakePermissionsContext): number {
1493
+ * return fake.activeCallsOf("onRevoked").length;
1494
+ * }
1495
+ * ```
1496
+ */
1497
+ public readonly onRevoked: IPermissionsContext["onRevoked"];
1498
+
1499
+ /**
1500
+ * Tells each listener of {@link IPermissionsContext.onRevoked} that the
1501
+ * person revoked a remembered answer.
1502
+ *
1503
+ * As Noldova Desktop's own dispatch does, it calls each listener in place when
1504
+ * the call starts: one that an earlier one removes during the call is still
1505
+ * called, and one that throws stops no other: the log the fake was made with
1506
+ * records the line the module's log would write.
1507
+ *
1508
+ * @param revocation The answer revoked.
1509
+ *
1510
+ * @example
1511
+ * ```ts
1512
+ * import { FakePermissionsContext } from "@noldova/desktop.runtime/testing";
1513
+ *
1514
+ * import { PermissionRevocation } from "@noldova/desktop.runtime";
1515
+ *
1516
+ * export function revoke(permissions: FakePermissionsContext): void {
1517
+ * permissions.raiseRevoked(new PermissionRevocation("git.push", null, "folder"));
1518
+ * }
1519
+ * ```
1520
+ */
1521
+ public raiseRevoked(revocation: PermissionRevocation): void;
1522
+ }
1523
+
1524
+ /**
1525
+ * A fake of {@link IRuntimePartContext.webViews}, the module's web views as its
1526
+ * runtime part drives them, for a module's tests: it records every call, and a
1527
+ * test answers each member that returns a value with {@link Fake.answer}.
1528
+ *
1529
+ * A member that returns a value, or a property, throws
1530
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
1531
+ * that no test passes on a value the fake made up.
1532
+ *
1533
+ * @example
1534
+ * ```ts
1535
+ * import { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1536
+ *
1537
+ * export function withNone(): FakeRuntimeWebViews {
1538
+ * const webViews = new FakeRuntimeWebViews();
1539
+ * webViews.answer("list", () => []);
1540
+ * return webViews;
1541
+ * }
1542
+ * ```
1543
+ *
1544
+ * @example
1545
+ * ```ts
1546
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
1547
+ * import { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1548
+ *
1549
+ * export function isUnanswered(): boolean {
1550
+ * const fake = new FakeRuntimeWebViews();
1551
+ * try {
1552
+ * fake.list();
1553
+ * } catch (error) {
1554
+ * return error instanceof UnansweredCallException;
1555
+ * }
1556
+ * return false;
1557
+ * }
1558
+ * ```
1559
+ */
1560
+ export declare class FakeRuntimeWebViews extends Fake<IRuntimeWebViews> implements IRuntimeWebViews {
1561
+ /**
1562
+ * The fake that stands in for {@link IRuntimeWebViews.relay}, with calls and
1563
+ * answers of its own.
1564
+ */
1565
+ public readonly relay: FakeWebViewRelay;
1566
+
1567
+ /**
1568
+ * Stands in for {@link IRuntimeWebViews.list}. Records each call, which
1569
+ * {@link Fake.callsOf} reads, and returns what the answer that
1570
+ * {@link Fake.answer} gives returns.
1571
+ *
1572
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
1573
+ * the test has given it no answer.
1574
+ *
1575
+ * @example
1576
+ * ```ts
1577
+ * import type { IRuntimeWebViews } from "@noldova/desktop.runtime";
1578
+ * import type { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1579
+ *
1580
+ * export function answerList(fake: FakeRuntimeWebViews, value: ReturnType<IRuntimeWebViews["list"]>): void {
1581
+ * fake.answer("list", () => value);
1582
+ * }
1583
+ * ```
1584
+ */
1585
+ public readonly list: IRuntimeWebViews["list"];
1586
+
1587
+ /**
1588
+ * Stands in for {@link IRuntimeWebViews.navigateAsync}. Records each call,
1589
+ * which {@link Fake.callsOf} reads, and returns what the answer that
1590
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1591
+ * rejects rather than the call throwing.
1592
+ *
1593
+ * @throws {UnansweredCallException} As the rejection of the promise it
1594
+ * returns, naming the member, while the test has given it no answer, as the
1595
+ * real member fails.
1596
+ *
1597
+ * @example
1598
+ * ```ts
1599
+ * import type { IRuntimeWebViews } from "@noldova/desktop.runtime";
1600
+ * import type { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1601
+ *
1602
+ * export function answerNavigateAsync(fake: FakeRuntimeWebViews, value: Awaited<ReturnType<IRuntimeWebViews["navigateAsync"]>>): void {
1603
+ * fake.answer("navigateAsync", () => Promise.resolve(value));
1604
+ * }
1605
+ * ```
1606
+ */
1607
+ public readonly navigateAsync: IRuntimeWebViews["navigateAsync"];
1608
+
1609
+ /**
1610
+ * Stands in for {@link IRuntimeWebViews.actAsync}. Records each call, which
1611
+ * {@link Fake.callsOf} reads, and returns what the answer that
1612
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1613
+ * rejects rather than the call throwing.
1614
+ *
1615
+ * @throws {UnansweredCallException} As the rejection of the promise it
1616
+ * returns, naming the member, while the test has given it no answer, as the
1617
+ * real member fails.
1618
+ *
1619
+ * @example
1620
+ * ```ts
1621
+ * import type { IRuntimeWebViews } from "@noldova/desktop.runtime";
1622
+ * import type { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1623
+ *
1624
+ * export function answerActAsync(fake: FakeRuntimeWebViews, value: Awaited<ReturnType<IRuntimeWebViews["actAsync"]>>): void {
1625
+ * fake.answer("actAsync", () => Promise.resolve(value));
1626
+ * }
1627
+ * ```
1628
+ */
1629
+ public readonly actAsync: IRuntimeWebViews["actAsync"];
1630
+
1631
+ /**
1632
+ * Stands in for {@link IRuntimeWebViews.setAllowedOriginsAsync}. Records each
1633
+ * call, which {@link Fake.callsOf} reads, and returns what the answer that
1634
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1635
+ * rejects rather than the call throwing.
1636
+ *
1637
+ * @throws {UnansweredCallException} As the rejection of the promise it
1638
+ * returns, naming the member, while the test has given it no answer, as the
1639
+ * real member fails.
1640
+ *
1641
+ * @example
1642
+ * ```ts
1643
+ * import type { IRuntimeWebViews } from "@noldova/desktop.runtime";
1644
+ * import type { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1645
+ *
1646
+ * export function answerSetAllowedOriginsAsync(fake: FakeRuntimeWebViews, value: Awaited<ReturnType<IRuntimeWebViews["setAllowedOriginsAsync"]>>): void {
1647
+ * fake.answer("setAllowedOriginsAsync", () => Promise.resolve(value));
1648
+ * }
1649
+ * ```
1650
+ */
1651
+ public readonly setAllowedOriginsAsync: IRuntimeWebViews["setAllowedOriginsAsync"];
1652
+
1653
+ /**
1654
+ * Stands in for {@link IRuntimeWebViews.clearProfileAsync}. Records each
1655
+ * call, which {@link Fake.callsOf} reads, and returns what the answer that
1656
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1657
+ * rejects rather than the call throwing.
1658
+ *
1659
+ * @throws {UnansweredCallException} As the rejection of the promise it
1660
+ * returns, naming the member, while the test has given it no answer, as the
1661
+ * real member fails.
1662
+ *
1663
+ * @example
1664
+ * ```ts
1665
+ * import type { IRuntimeWebViews } from "@noldova/desktop.runtime";
1666
+ * import type { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1667
+ *
1668
+ * export function answerClearProfileAsync(fake: FakeRuntimeWebViews, value: Awaited<ReturnType<IRuntimeWebViews["clearProfileAsync"]>>): void {
1669
+ * fake.answer("clearProfileAsync", () => Promise.resolve(value));
1670
+ * }
1671
+ * ```
1672
+ */
1673
+ public readonly clearProfileAsync: IRuntimeWebViews["clearProfileAsync"];
1674
+
1675
+ /**
1676
+ * Stands in for {@link IRuntimeWebViews.onViewEvent}. Records each listener,
1677
+ * which {@link FakeRuntimeWebViews.raiseViewEvent} calls and
1678
+ * {@link Fake.activeCallsOf} lists until the disposer it returns runs; it
1679
+ * takes no answer.
1680
+ *
1681
+ * @example
1682
+ * ```ts
1683
+ * import type { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1684
+ *
1685
+ * export function activeOnViewEvent(fake: FakeRuntimeWebViews): number {
1686
+ * return fake.activeCallsOf("onViewEvent").length;
1687
+ * }
1688
+ * ```
1689
+ */
1690
+ public readonly onViewEvent: IRuntimeWebViews["onViewEvent"];
1691
+
1692
+ /**
1693
+ * Tells each listener of {@link IRuntimeWebViews.onViewEvent} what happened
1694
+ * in one of the module's web views.
1695
+ *
1696
+ * As Noldova Desktop's own dispatch does, it calls each listener in place when
1697
+ * the call starts: one that an earlier one removes during the call is still
1698
+ * called, and one that throws stops no other: {@link Fake.errors} keeps what
1699
+ * it threw, where Noldova Desktop reports it in a place a test can't read.
1700
+ *
1701
+ * @param event What happened.
1702
+ *
1703
+ * @example
1704
+ * ```ts
1705
+ * import { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1706
+ *
1707
+ * import { WebViewEvent, WebViewEventKind } from "@noldova/desktop.protocol";
1708
+ *
1709
+ * export function close(webViews: FakeRuntimeWebViews): void {
1710
+ * webViews.raiseViewEvent(new WebViewEvent("notes", "view-1", WebViewEventKind.Closed));
1711
+ * }
1712
+ * ```
1713
+ */
1714
+ public raiseViewEvent(event: WebViewEvent): void;
1715
+
1716
+ /**
1717
+ * The fakes it holds, its relay, which {@link Fake.beStrict} makes strict
1718
+ * with it.
1719
+ *
1720
+ * @returns The fakes it holds.
1721
+ *
1722
+ * @example
1723
+ * ```ts
1724
+ * import { FakeRuntimeWebViews } from "@noldova/desktop.runtime/testing";
1725
+ *
1726
+ * export function strict(): FakeRuntimeWebViews {
1727
+ * const fake = new FakeRuntimeWebViews();
1728
+ * fake.beStrict();
1729
+ * return fake;
1730
+ * }
1731
+ * ```
1732
+ */
1733
+ protected override parts(): readonly Pick<Fake<object>, "beStrict">[];
1734
+ }
1735
+
1736
+ /**
1737
+ * A fake of {@link IRuntimeWebViews.relay}, the protocol relay to the module's
1738
+ * web views, for a module's tests: it records every call, and a test answers
1739
+ * each member that returns a value with {@link Fake.answer}.
1740
+ *
1741
+ * A member that returns a value, or a property, throws
1742
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
1743
+ * that no test passes on a value the fake made up.
1744
+ *
1745
+ * @example
1746
+ * ```ts
1747
+ * import { FakeWebViewRelay } from "@noldova/desktop.runtime/testing";
1748
+ *
1749
+ * export function answering(): FakeWebViewRelay {
1750
+ * const relay = new FakeWebViewRelay();
1751
+ * relay.answer("sendAsync", () => Promise.resolve({}));
1752
+ * return relay;
1753
+ * }
1754
+ * ```
1755
+ *
1756
+ * @example
1757
+ * ```ts
1758
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
1759
+ * import { FakeWebViewRelay } from "@noldova/desktop.runtime/testing";
1760
+ *
1761
+ * export async function isUnansweredAsync(): Promise<boolean> {
1762
+ * const fake = new FakeWebViewRelay();
1763
+ * try {
1764
+ * await fake.sendAsync("view-1", "Page.reload", {}, 1000);
1765
+ * } catch (error) {
1766
+ * return error instanceof UnansweredCallException;
1767
+ * }
1768
+ * return false;
1769
+ * }
1770
+ * ```
1771
+ */
1772
+ export declare class FakeWebViewRelay extends Fake<IWebViewRelay> implements IWebViewRelay {
1773
+ /**
1774
+ * Stands in for {@link IWebViewRelay.sendAsync}. Records each call, which
1775
+ * {@link Fake.callsOf} reads, and returns what the answer that
1776
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1777
+ * rejects rather than the call throwing. It refuses
1778
+ * `Emulation.setFocusEmulationEnabled` whatever the answer, as the host does,
1779
+ * since the host owns focus emulation.
1780
+ *
1781
+ * @throws {UnansweredCallException} As the rejection of the promise it
1782
+ * returns, naming the member, while the test has given it no answer, as the
1783
+ * real member fails.
1784
+ * @throws {WebViewFailureException} As the rejection of the promise it
1785
+ * returns, of kind `NotAllowed`, for `Emulation.setFocusEmulationEnabled`.
1786
+ *
1787
+ * @example
1788
+ * ```ts
1789
+ * import type { IWebViewRelay } from "@noldova/desktop.runtime";
1790
+ * import type { FakeWebViewRelay } from "@noldova/desktop.runtime/testing";
1791
+ *
1792
+ * export function answerSendAsync(fake: FakeWebViewRelay, value: Awaited<ReturnType<IWebViewRelay["sendAsync"]>>): void {
1793
+ * fake.answer("sendAsync", () => Promise.resolve(value));
1794
+ * }
1795
+ * ```
1796
+ */
1797
+ public readonly sendAsync: IWebViewRelay["sendAsync"];
1798
+
1799
+ /**
1800
+ * Stands in for {@link IWebViewRelay.onProtocolEvent}. Records each listener,
1801
+ * which {@link FakeWebViewRelay.raiseProtocolEvent} calls and
1802
+ * {@link Fake.activeCallsOf} lists until the disposer it returns runs; it
1803
+ * takes no answer.
1804
+ *
1805
+ * @example
1806
+ * ```ts
1807
+ * import type { FakeWebViewRelay } from "@noldova/desktop.runtime/testing";
1808
+ *
1809
+ * export function activeOnProtocolEvent(fake: FakeWebViewRelay): number {
1810
+ * return fake.activeCallsOf("onProtocolEvent").length;
1811
+ * }
1812
+ * ```
1813
+ */
1814
+ public readonly onProtocolEvent: IWebViewRelay["onProtocolEvent"];
1815
+
1816
+ /**
1817
+ * Tells each listener of {@link IWebViewRelay.onProtocolEvent} for the web
1818
+ * view that its page sent a protocol event.
1819
+ *
1820
+ * As Noldova Desktop's own dispatch does, it calls each listener in place when
1821
+ * the call starts: one that an earlier one removes during the call is still
1822
+ * called, and one that throws stops no other: {@link Fake.errors} keeps what
1823
+ * it threw, where Noldova Desktop reports it in a place a test can't read.
1824
+ *
1825
+ * @param id The web view's id.
1826
+ *
1827
+ * @param event The event.
1828
+ *
1829
+ * @example
1830
+ * ```ts
1831
+ * import { FakeWebViewRelay } from "@noldova/desktop.runtime/testing";
1832
+ *
1833
+ * import { WebViewProtocolEvent } from "@noldova/desktop.runtime";
1834
+ *
1835
+ * export function load(relay: FakeWebViewRelay): void {
1836
+ * relay.raiseProtocolEvent("view-1", new WebViewProtocolEvent("view-1", "Page.loadEventFired", {}, false));
1837
+ * }
1838
+ * ```
1839
+ */
1840
+ public raiseProtocolEvent(id: string, event: WebViewProtocolEvent): void;
1841
+ }
1842
+
1843
+ /**
1844
+ * A fake of {@link IRuntimePartContext.files}, the files the window granted the
1845
+ * module, for a module's tests: it records every call, and a test answers each
1846
+ * member that returns a value with {@link Fake.answer}.
1847
+ *
1848
+ * A member that returns a value, or a property, throws
1849
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
1850
+ * that no test passes on a value the fake made up.
1851
+ *
1852
+ * @example
1853
+ * ```ts
1854
+ * import { FakeRuntimeFiles } from "@noldova/desktop.runtime/testing";
1855
+ *
1856
+ * export function sharing(): FakeRuntimeFiles {
1857
+ * const files = new FakeRuntimeFiles();
1858
+ * files.answer("shareAsync", () => Promise.resolve("grant-1"));
1859
+ * return files;
1860
+ * }
1861
+ * ```
1862
+ *
1863
+ * @example
1864
+ * ```ts
1865
+ * import type { RequestContext } from "@noldova/desktop.runtime";
1866
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
1867
+ * import { FakeRuntimeFiles } from "@noldova/desktop.runtime/testing";
1868
+ *
1869
+ * export async function isUnansweredAsync(request: RequestContext): Promise<boolean> {
1870
+ * const fake = new FakeRuntimeFiles();
1871
+ * try {
1872
+ * await fake.redeemAsync("grant-1", request);
1873
+ * } catch (error) {
1874
+ * return error instanceof UnansweredCallException;
1875
+ * }
1876
+ * return false;
1877
+ * }
1878
+ * ```
1879
+ */
1880
+ export declare class FakeRuntimeFiles extends Fake<IRuntimeFiles> implements IRuntimeFiles {
1881
+ /**
1882
+ * Stands in for {@link IRuntimeFiles.redeemAsync}. Records each call, which
1883
+ * {@link Fake.callsOf} reads, and returns what the answer that
1884
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1885
+ * rejects rather than the call throwing.
1886
+ *
1887
+ * @throws {UnansweredCallException} As the rejection of the promise it
1888
+ * returns, naming the member, while the test has given it no answer, as the
1889
+ * real member fails.
1890
+ *
1891
+ * @example
1892
+ * ```ts
1893
+ * import type { IRuntimeFiles } from "@noldova/desktop.runtime";
1894
+ * import type { FakeRuntimeFiles } from "@noldova/desktop.runtime/testing";
1895
+ *
1896
+ * export function answerRedeemAsync(fake: FakeRuntimeFiles, value: Awaited<ReturnType<IRuntimeFiles["redeemAsync"]>>): void {
1897
+ * fake.answer("redeemAsync", () => Promise.resolve(value));
1898
+ * }
1899
+ * ```
1900
+ */
1901
+ public readonly redeemAsync: IRuntimeFiles["redeemAsync"];
1902
+
1903
+ /**
1904
+ * Stands in for {@link IRuntimeFiles.shareAsync}. Records each call, which
1905
+ * {@link Fake.callsOf} reads, and returns what the answer that
1906
+ * {@link Fake.answer} gives returns; while unanswered, the promise it returns
1907
+ * rejects rather than the call throwing.
1908
+ *
1909
+ * @throws {UnansweredCallException} As the rejection of the promise it
1910
+ * returns, naming the member, while the test has given it no answer, as the
1911
+ * real member fails.
1912
+ *
1913
+ * @example
1914
+ * ```ts
1915
+ * import type { IRuntimeFiles } from "@noldova/desktop.runtime";
1916
+ * import type { FakeRuntimeFiles } from "@noldova/desktop.runtime/testing";
1917
+ *
1918
+ * export function answerShareAsync(fake: FakeRuntimeFiles, value: Awaited<ReturnType<IRuntimeFiles["shareAsync"]>>): void {
1919
+ * fake.answer("shareAsync", () => Promise.resolve(value));
1920
+ * }
1921
+ * ```
1922
+ */
1923
+ public readonly shareAsync: IRuntimeFiles["shareAsync"];
1924
+ }
1925
+
1926
+ /**
1927
+ * A fake of {@link IRuntimePartContext.appWindows}, the app's open windows, for
1928
+ * a module's tests: it records every call, and a test answers each member that
1929
+ * returns a value with {@link Fake.answer}.
1930
+ *
1931
+ * A member that returns a value, or a property, throws
1932
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
1933
+ * that no test passes on a value the fake made up.
1934
+ *
1935
+ * @example
1936
+ * ```ts
1937
+ * import { FakeAppWindows } from "@noldova/desktop.runtime/testing";
1938
+ *
1939
+ * export function withNone(): FakeAppWindows {
1940
+ * const windows = new FakeAppWindows();
1941
+ * windows.answer("list", () => []);
1942
+ * return windows;
1943
+ * }
1944
+ * ```
1945
+ *
1946
+ * @example
1947
+ * ```ts
1948
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
1949
+ * import { FakeAppWindows } from "@noldova/desktop.runtime/testing";
1950
+ *
1951
+ * export function isUnanswered(): boolean {
1952
+ * const fake = new FakeAppWindows();
1953
+ * try {
1954
+ * fake.list();
1955
+ * } catch (error) {
1956
+ * return error instanceof UnansweredCallException;
1957
+ * }
1958
+ * return false;
1959
+ * }
1960
+ * ```
1961
+ */
1962
+ export declare class FakeAppWindows extends Fake<IAppWindows> implements IAppWindows {
1963
+ /**
1964
+ * Stands in for {@link IAppWindows.list}. Records each call, which
1965
+ * {@link Fake.callsOf} reads, and returns what the answer that
1966
+ * {@link Fake.answer} gives returns.
1967
+ *
1968
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
1969
+ * the test has given it no answer.
1970
+ *
1971
+ * @example
1972
+ * ```ts
1973
+ * import type { IAppWindows } from "@noldova/desktop.runtime";
1974
+ * import type { FakeAppWindows } from "@noldova/desktop.runtime/testing";
1975
+ *
1976
+ * export function answerList(fake: FakeAppWindows, value: ReturnType<IAppWindows["list"]>): void {
1977
+ * fake.answer("list", () => value);
1978
+ * }
1979
+ * ```
1980
+ */
1981
+ public readonly list: IAppWindows["list"];
1982
+
1983
+ /**
1984
+ * Stands in for {@link IAppWindows.onChanged}. Records each listener, which
1985
+ * {@link FakeAppWindows.raiseChanged} calls and {@link Fake.activeCallsOf}
1986
+ * lists until the disposer it returns runs; it takes no answer.
1987
+ *
1988
+ * @example
1989
+ * ```ts
1990
+ * import type { FakeAppWindows } from "@noldova/desktop.runtime/testing";
1991
+ *
1992
+ * export function activeOnChanged(fake: FakeAppWindows): number {
1993
+ * return fake.activeCallsOf("onChanged").length;
1994
+ * }
1995
+ * ```
1996
+ */
1997
+ public readonly onChanged: IAppWindows["onChanged"];
1998
+
1999
+ /**
2000
+ * Tells each listener of {@link IAppWindows.onChanged} that a window opened,
2001
+ * closed or changed.
2002
+ *
2003
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
2004
+ * one removes during the call, and one that throws stops no other:
2005
+ * {@link Fake.errors} keeps what it threw, where Noldova Desktop reports it in a
2006
+ * place a test can't read.
2007
+ *
2008
+ * @example
2009
+ * ```ts
2010
+ * import { FakeAppWindows } from "@noldova/desktop.runtime/testing";
2011
+ *
2012
+ * export function change(windows: FakeAppWindows): void {
2013
+ * windows.raiseChanged();
2014
+ * }
2015
+ * ```
2016
+ */
2017
+ public raiseChanged(): void;
2018
+ }
2019
+
2020
+ /**
2021
+ * A fake of {@link IRuntimePartContext.shortcuts}, the app's own shortcuts, for
2022
+ * a module's tests: it records every call, and a test answers each member that
2023
+ * returns a value with {@link Fake.answer}.
2024
+ *
2025
+ * A member that returns a value, or a property, throws
2026
+ * {@link UnansweredCallException}, naming it, until the test answers it, so
2027
+ * that no test passes on a value the fake made up.
2028
+ *
2029
+ * @example
2030
+ * ```ts
2031
+ * import { FakeAppShortcuts } from "@noldova/desktop.runtime/testing";
2032
+ *
2033
+ * export function withNone(): FakeAppShortcuts {
2034
+ * const shortcuts = new FakeAppShortcuts();
2035
+ * shortcuts.answer("list", () => []);
2036
+ * return shortcuts;
2037
+ * }
2038
+ * ```
2039
+ *
2040
+ * @example
2041
+ * ```ts
2042
+ * import { UnansweredCallException } from "@noldova/desktop.protocol/testing";
2043
+ * import { FakeAppShortcuts } from "@noldova/desktop.runtime/testing";
2044
+ *
2045
+ * export function isUnanswered(): boolean {
2046
+ * const fake = new FakeAppShortcuts();
2047
+ * try {
2048
+ * fake.list();
2049
+ * } catch (error) {
2050
+ * return error instanceof UnansweredCallException;
2051
+ * }
2052
+ * return false;
2053
+ * }
2054
+ * ```
2055
+ */
2056
+ export declare class FakeAppShortcuts extends Fake<IAppShortcuts> implements IAppShortcuts {
2057
+ /**
2058
+ * Stands in for {@link IAppShortcuts.list}. Records each call, which
2059
+ * {@link Fake.callsOf} reads, and returns what the answer that
2060
+ * {@link Fake.answer} gives returns.
2061
+ *
2062
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
2063
+ * the test has given it no answer.
2064
+ *
2065
+ * @example
2066
+ * ```ts
2067
+ * import type { IAppShortcuts } from "@noldova/desktop.runtime";
2068
+ * import type { FakeAppShortcuts } from "@noldova/desktop.runtime/testing";
2069
+ *
2070
+ * export function answerList(fake: FakeAppShortcuts, value: ReturnType<IAppShortcuts["list"]>): void {
2071
+ * fake.answer("list", () => value);
2072
+ * }
2073
+ * ```
2074
+ */
2075
+ public readonly list: IAppShortcuts["list"];
2076
+
2077
+ /**
2078
+ * Stands in for {@link IAppShortcuts.has}. Records each call, which
2079
+ * {@link Fake.callsOf} reads, and returns what the answer that
2080
+ * {@link Fake.answer} gives returns.
2081
+ *
2082
+ * @throws {UnansweredCallException} Synchronously, naming the member, while
2083
+ * the test has given it no answer.
2084
+ *
2085
+ * @example
2086
+ * ```ts
2087
+ * import type { IAppShortcuts } from "@noldova/desktop.runtime";
2088
+ * import type { FakeAppShortcuts } from "@noldova/desktop.runtime/testing";
2089
+ *
2090
+ * export function answerHas(fake: FakeAppShortcuts, value: ReturnType<IAppShortcuts["has"]>): void {
2091
+ * fake.answer("has", () => value);
2092
+ * }
2093
+ * ```
2094
+ */
2095
+ public readonly has: IAppShortcuts["has"];
2096
+
2097
+ /**
2098
+ * Stands in for {@link IAppShortcuts.onChanged}. Records each listener, which
2099
+ * {@link FakeAppShortcuts.raiseChanged} calls and {@link Fake.activeCallsOf}
2100
+ * lists until the disposer it returns runs; it takes no answer.
2101
+ *
2102
+ * @example
2103
+ * ```ts
2104
+ * import type { FakeAppShortcuts } from "@noldova/desktop.runtime/testing";
2105
+ *
2106
+ * export function activeOnChanged(fake: FakeAppShortcuts): number {
2107
+ * return fake.activeCallsOf("onChanged").length;
2108
+ * }
2109
+ * ```
2110
+ */
2111
+ public readonly onChanged: IAppShortcuts["onChanged"];
2112
+
2113
+ /**
2114
+ * Tells each listener of {@link IAppShortcuts.onChanged} that the app's
2115
+ * shortcuts changed.
2116
+ *
2117
+ * As Noldova Desktop's own dispatch does, it skips a listener that an earlier
2118
+ * one removes during the call, and one that throws stops no other:
2119
+ * {@link Fake.errors} keeps what it threw, where Noldova Desktop reports it in a
2120
+ * place a test can't read.
2121
+ *
2122
+ * @example
2123
+ * ```ts
2124
+ * import { FakeAppShortcuts } from "@noldova/desktop.runtime/testing";
2125
+ *
2126
+ * export function change(shortcuts: FakeAppShortcuts): void {
2127
+ * shortcuts.raiseChanged();
2128
+ * }
2129
+ * ```
2130
+ */
2131
+ public raiseChanged(): void;
2132
+ }