jishushell 0.5.22 → 0.6.18

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 (3198) hide show
  1. package/apps/anythingllm-container.yaml +20 -177
  2. package/apps/browserless-chromium-container.yaml +17 -12
  3. package/apps/filebrowser-container.yaml +22 -9
  4. package/apps/hermes-container.yaml +23 -2
  5. package/apps/jishu-kb-container.yaml +152 -0
  6. package/apps/ollama-binary.yaml +32 -28
  7. package/apps/ollama-cpu-container.yaml +5 -0
  8. package/apps/ollama-with-hollama-binary.yaml +33 -28
  9. package/apps/openclaw-binary.yaml +34 -10
  10. package/apps/openclaw-container.yaml +33 -8
  11. package/apps/openclaw-with-ollama-container.yaml +8 -2
  12. package/apps/openclaw-with-searxng-container.yaml +18 -6
  13. package/apps/searxng-container.yaml +12 -7
  14. package/apps/weknora-container.yaml +29 -23
  15. package/dependencies/jishushell-panel-0.6.18.tgz +0 -0
  16. package/dist/cli/app.js +494 -192
  17. package/dist/cli/app.js.map +1 -1
  18. package/dist/cli/backup.js +112 -139
  19. package/dist/cli/backup.js.map +1 -1
  20. package/dist/cli/core.d.ts +30 -0
  21. package/dist/cli/core.js +1415 -0
  22. package/dist/cli/core.js.map +1 -0
  23. package/dist/cli/doctor.d.ts +1 -1
  24. package/dist/cli/doctor.js +50 -61
  25. package/dist/cli/doctor.js.map +1 -1
  26. package/dist/cli/job.js +62 -14
  27. package/dist/cli/job.js.map +1 -1
  28. package/dist/cli/llm.d.ts +1 -18
  29. package/dist/cli/llm.js +103 -83
  30. package/dist/cli/llm.js.map +1 -1
  31. package/dist/cli/managed-list.d.ts +1 -3
  32. package/dist/cli/managed-list.js +18 -16
  33. package/dist/cli/managed-list.js.map +1 -1
  34. package/dist/cli/migrate.d.ts +2 -0
  35. package/dist/cli/migrate.js +160 -0
  36. package/dist/cli/migrate.js.map +1 -0
  37. package/dist/cli.js +26 -2
  38. package/dist/cli.js.map +1 -1
  39. package/dist/config.d.ts +53 -44
  40. package/dist/config.js +216 -146
  41. package/dist/config.js.map +1 -1
  42. package/dist/constants.d.ts +0 -1
  43. package/dist/constants.js +0 -4
  44. package/dist/constants.js.map +1 -1
  45. package/dist/control.d.ts +7 -7
  46. package/dist/control.js +32 -24
  47. package/dist/control.js.map +1 -1
  48. package/dist/core.d.ts +5 -0
  49. package/dist/core.js +6 -0
  50. package/dist/core.js.map +1 -0
  51. package/dist/install.d.ts +3 -10
  52. package/dist/install.js +118 -43
  53. package/dist/install.js.map +1 -1
  54. package/dist/routes/apps.d.ts +1 -1
  55. package/dist/routes/apps.js +100 -234
  56. package/dist/routes/apps.js.map +1 -1
  57. package/dist/routes/auth.d.ts +1 -3
  58. package/dist/routes/auth.js +7 -14
  59. package/dist/routes/auth.js.map +1 -1
  60. package/dist/routes/backup.js +137 -334
  61. package/dist/routes/backup.js.map +1 -1
  62. package/dist/routes/external-mounts.d.ts +1 -1
  63. package/dist/routes/external-mounts.js +7 -7
  64. package/dist/routes/external-mounts.js.map +1 -1
  65. package/dist/routes/file-mounts.d.ts +4 -3
  66. package/dist/routes/file-mounts.js +51 -30
  67. package/dist/routes/file-mounts.js.map +1 -1
  68. package/dist/routes/files-organize.d.ts +2 -2
  69. package/dist/routes/files-organize.js +5 -5
  70. package/dist/routes/files-organize.js.map +1 -1
  71. package/dist/routes/files.d.ts +1 -1
  72. package/dist/routes/files.js +1 -1
  73. package/dist/routes/files.js.map +1 -1
  74. package/dist/routes/instances.d.ts +11 -4
  75. package/dist/routes/instances.js +482 -923
  76. package/dist/routes/instances.js.map +1 -1
  77. package/dist/routes/integration-apps.d.ts +14 -0
  78. package/dist/routes/integration-apps.js +81 -0
  79. package/dist/routes/integration-apps.js.map +1 -0
  80. package/dist/routes/integrations.d.ts +9 -0
  81. package/dist/routes/integrations.js +12 -0
  82. package/dist/routes/integrations.js.map +1 -0
  83. package/dist/routes/llm-proxy.d.ts +2 -0
  84. package/dist/routes/llm-proxy.js +294 -0
  85. package/dist/routes/llm-proxy.js.map +1 -0
  86. package/dist/routes/llm.d.ts +1 -1
  87. package/dist/routes/llm.js +25 -75
  88. package/dist/routes/llm.js.map +1 -1
  89. package/dist/routes/setup.js +93 -93
  90. package/dist/routes/setup.js.map +1 -1
  91. package/dist/routes/system.js +248 -54
  92. package/dist/routes/system.js.map +1 -1
  93. package/dist/routes/webdav.d.ts +1 -1
  94. package/dist/routes/webdav.js +2 -2
  95. package/dist/routes/webdav.js.map +1 -1
  96. package/dist/server.d.ts +2 -0
  97. package/dist/server.js +343 -312
  98. package/dist/server.js.map +1 -1
  99. package/dist/services/app-common/app-compiler.js +186 -0
  100. package/dist/services/app-common/app-compiler.js.map +1 -0
  101. package/dist/services/app-common/app-shared.d.ts +15 -0
  102. package/dist/services/app-common/app-shared.js +64 -0
  103. package/dist/services/app-common/app-shared.js.map +1 -0
  104. package/dist/services/app-common/capability-service.d.ts +45 -0
  105. package/dist/services/app-common/capability-service.js +331 -0
  106. package/dist/services/app-common/capability-service.js.map +1 -0
  107. package/dist/services/app-common/catalog-service.d.ts +59 -0
  108. package/dist/services/app-common/catalog-service.js +308 -0
  109. package/dist/services/app-common/catalog-service.js.map +1 -0
  110. package/dist/services/app-common/create-pipeline.d.ts +26 -0
  111. package/dist/services/app-common/create-pipeline.js +298 -0
  112. package/dist/services/app-common/create-pipeline.js.map +1 -0
  113. package/dist/services/app-common/delete-service.d.ts +5 -0
  114. package/dist/services/app-common/delete-service.js +104 -0
  115. package/dist/services/app-common/delete-service.js.map +1 -0
  116. package/dist/services/app-common/execution-owner.d.ts +23 -0
  117. package/dist/services/app-common/execution-owner.js +124 -0
  118. package/dist/services/app-common/execution-owner.js.map +1 -0
  119. package/dist/services/app-common/execution-service.d.ts +23 -0
  120. package/dist/services/app-common/execution-service.js +105 -0
  121. package/dist/services/app-common/execution-service.js.map +1 -0
  122. package/dist/services/app-common/id-normalizer.d.ts +31 -0
  123. package/dist/services/app-common/id-normalizer.js +83 -0
  124. package/dist/services/app-common/id-normalizer.js.map +1 -0
  125. package/dist/services/app-common/install-store.d.ts +34 -0
  126. package/dist/services/app-common/install-store.js +261 -0
  127. package/dist/services/app-common/install-store.js.map +1 -0
  128. package/dist/services/app-common/instance-store.d.ts +78 -0
  129. package/dist/services/app-common/instance-store.js +495 -0
  130. package/dist/services/app-common/instance-store.js.map +1 -0
  131. package/dist/services/app-common/integration-refs.d.ts +17 -0
  132. package/dist/services/app-common/integration-refs.js +47 -0
  133. package/dist/services/app-common/integration-refs.js.map +1 -0
  134. package/dist/services/app-common/lifecycle-pipeline.d.ts +62 -0
  135. package/dist/services/app-common/lifecycle-pipeline.js +317 -0
  136. package/dist/services/app-common/lifecycle-pipeline.js.map +1 -0
  137. package/dist/services/app-common/lifecycle-scripts.d.ts +38 -0
  138. package/dist/services/app-common/lifecycle-scripts.js +935 -0
  139. package/dist/services/app-common/lifecycle-scripts.js.map +1 -0
  140. package/dist/services/app-common/lifecycle-service.d.ts +68 -0
  141. package/dist/services/app-common/lifecycle-service.js +467 -0
  142. package/dist/services/app-common/lifecycle-service.js.map +1 -0
  143. package/dist/services/app-common/paths.d.ts +29 -0
  144. package/dist/services/app-common/paths.js +34 -0
  145. package/dist/services/app-common/paths.js.map +1 -0
  146. package/dist/services/app-common/platform-transform.d.ts +32 -0
  147. package/dist/services/app-common/platform-transform.js +65 -0
  148. package/dist/services/app-common/platform-transform.js.map +1 -0
  149. package/dist/services/app-common/provide-resolver.d.ts +29 -0
  150. package/dist/services/app-common/provide-resolver.js +129 -0
  151. package/dist/services/app-common/provide-resolver.js.map +1 -0
  152. package/dist/services/app-common/remote-spec.d.ts +14 -0
  153. package/dist/services/app-common/remote-spec.js +58 -0
  154. package/dist/services/app-common/remote-spec.js.map +1 -0
  155. package/dist/services/app-common/runtime-builder.d.ts +1 -0
  156. package/dist/services/app-common/runtime-builder.js +2 -0
  157. package/dist/services/app-common/runtime-builder.js.map +1 -0
  158. package/dist/services/app-common/runtime-facts.d.ts +19 -0
  159. package/dist/services/app-common/runtime-facts.js +126 -0
  160. package/dist/services/app-common/runtime-facts.js.map +1 -0
  161. package/dist/services/app-common/service.d.ts +9 -0
  162. package/dist/services/app-common/service.js +10 -0
  163. package/dist/services/app-common/service.js.map +1 -0
  164. package/dist/services/app-common/spec-materializer.d.ts +9 -0
  165. package/dist/services/app-common/spec-materializer.js +361 -0
  166. package/dist/services/app-common/spec-materializer.js.map +1 -0
  167. package/dist/services/app-common/status-refresh.d.ts +33 -0
  168. package/dist/services/app-common/status-refresh.js +759 -0
  169. package/dist/services/app-common/status-refresh.js.map +1 -0
  170. package/dist/services/app-common/task-service.d.ts +29 -0
  171. package/dist/services/app-common/task-service.js +93 -0
  172. package/dist/services/app-common/task-service.js.map +1 -0
  173. package/dist/services/app-common/terminal-session-manager.js +157 -0
  174. package/dist/services/app-common/terminal-session-manager.js.map +1 -0
  175. package/dist/services/app-modules/browserless/routes.d.ts +9 -0
  176. package/dist/services/app-modules/browserless/routes.js +517 -0
  177. package/dist/services/app-modules/browserless/routes.js.map +1 -0
  178. package/dist/services/app-modules/routes.d.ts +2 -0
  179. package/dist/services/app-modules/routes.js +5 -0
  180. package/dist/services/app-modules/routes.js.map +1 -0
  181. package/dist/services/backup/backup-admin.d.ts +95 -0
  182. package/dist/services/backup/backup-admin.js +246 -0
  183. package/dist/services/backup/backup-admin.js.map +1 -0
  184. package/dist/services/backup/backup-manager.d.ts +264 -0
  185. package/dist/services/backup/backup-manager.js +2318 -0
  186. package/dist/services/backup/backup-manager.js.map +1 -0
  187. package/dist/services/backup/backup-verify.js +240 -0
  188. package/dist/services/backup/backup-verify.js.map +1 -0
  189. package/dist/services/capabilities/browser-policy.d.ts +14 -0
  190. package/dist/services/capabilities/browser-policy.js +141 -0
  191. package/dist/services/capabilities/browser-policy.js.map +1 -0
  192. package/dist/services/capabilities/contract.d.ts +50 -0
  193. package/dist/services/capabilities/contract.js +129 -0
  194. package/dist/services/capabilities/contract.js.map +1 -0
  195. package/dist/services/capabilities/endpoint-validator.d.ts +42 -0
  196. package/dist/services/capabilities/endpoint-validator.js +114 -0
  197. package/dist/services/capabilities/endpoint-validator.js.map +1 -0
  198. package/dist/services/capabilities/health.d.ts +16 -0
  199. package/dist/services/capabilities/health.js +121 -0
  200. package/dist/services/capabilities/health.js.map +1 -0
  201. package/dist/services/capabilities/registry.d.ts +56 -0
  202. package/dist/services/capabilities/registry.js +222 -0
  203. package/dist/services/capabilities/registry.js.map +1 -0
  204. package/dist/services/capabilities/sync.d.ts +7 -0
  205. package/dist/services/capabilities/sync.js +223 -0
  206. package/dist/services/capabilities/sync.js.map +1 -0
  207. package/dist/services/capability-proxy/html-rewriters/browserless.d.ts +1 -0
  208. package/dist/services/capability-proxy/html-rewriters/browserless.js +83 -0
  209. package/dist/services/capability-proxy/html-rewriters/browserless.js.map +1 -0
  210. package/dist/services/capability-proxy/html-rewriters/index.d.ts +12 -0
  211. package/dist/services/capability-proxy/html-rewriters/index.js +25 -0
  212. package/dist/services/capability-proxy/html-rewriters/index.js.map +1 -0
  213. package/dist/services/capability-proxy/html-rewriters/jishukb.d.ts +1 -0
  214. package/dist/services/capability-proxy/html-rewriters/jishukb.js +161 -0
  215. package/dist/services/capability-proxy/html-rewriters/jishukb.js.map +1 -0
  216. package/dist/services/connections/admin.d.ts +80 -0
  217. package/dist/services/connections/admin.js +327 -0
  218. package/dist/services/connections/admin.js.map +1 -0
  219. package/dist/services/connections/apply.d.ts +110 -0
  220. package/dist/services/connections/apply.js +444 -0
  221. package/dist/services/connections/apply.js.map +1 -0
  222. package/dist/services/connections/resolver.d.ts +82 -0
  223. package/dist/services/connections/resolver.js +289 -0
  224. package/dist/services/connections/resolver.js.map +1 -0
  225. package/dist/services/connections/suggestions.d.ts +27 -0
  226. package/dist/services/connections/suggestions.js +124 -0
  227. package/dist/services/connections/suggestions.js.map +1 -0
  228. package/dist/services/connections/transactor.d.ts +39 -0
  229. package/dist/services/connections/transactor.js +307 -0
  230. package/dist/services/connections/transactor.js.map +1 -0
  231. package/dist/services/files/external-mounts.js +187 -0
  232. package/dist/services/files/external-mounts.js.map +1 -0
  233. package/dist/services/files/files-manager.d.ts +265 -0
  234. package/dist/services/files/files-manager.js +1189 -0
  235. package/dist/services/files/files-manager.js.map +1 -0
  236. package/dist/services/files/files-mounts.d.ts +42 -0
  237. package/dist/services/files/files-mounts.js +207 -0
  238. package/dist/services/files/files-mounts.js.map +1 -0
  239. package/dist/services/files/organize/applier.js +218 -0
  240. package/dist/services/files/organize/applier.js.map +1 -0
  241. package/dist/services/files/organize/rules.js +286 -0
  242. package/dist/services/files/organize/rules.js.map +1 -0
  243. package/dist/services/files/organize/scanner.js +366 -0
  244. package/dist/services/files/organize/scanner.js.map +1 -0
  245. package/dist/services/files/organize/store.js +82 -0
  246. package/dist/services/files/organize/store.js.map +1 -0
  247. package/dist/services/files/webdav/server.d.ts +47 -0
  248. package/dist/services/files/webdav/server.js +329 -0
  249. package/dist/services/files/webdav/server.js.map +1 -0
  250. package/dist/services/files/webdav/xml-builder.js.map +1 -0
  251. package/dist/services/instances/admin.d.ts +23 -0
  252. package/dist/services/instances/admin.js +218 -0
  253. package/dist/services/instances/admin.js.map +1 -0
  254. package/dist/services/instances/clone.d.ts +26 -0
  255. package/dist/services/instances/clone.js +78 -0
  256. package/dist/services/instances/clone.js.map +1 -0
  257. package/dist/services/instances/config-admin.d.ts +17 -0
  258. package/dist/services/instances/config-admin.js +181 -0
  259. package/dist/services/instances/config-admin.js.map +1 -0
  260. package/dist/services/instances/manager.d.ts +231 -0
  261. package/dist/services/instances/manager.js +1348 -0
  262. package/dist/services/instances/manager.js.map +1 -0
  263. package/dist/services/instances/passwords.js +173 -0
  264. package/dist/services/instances/passwords.js.map +1 -0
  265. package/dist/services/instances/types.d.ts +21 -0
  266. package/dist/services/instances/types.js +2 -0
  267. package/dist/services/instances/types.js.map +1 -0
  268. package/dist/services/integrations/anythingllm/integration.d.ts +25 -0
  269. package/dist/services/integrations/anythingllm/integration.js +251 -0
  270. package/dist/services/integrations/anythingllm/integration.js.map +1 -0
  271. package/dist/services/integrations/catalog.d.ts +3 -0
  272. package/dist/services/integrations/catalog.js +73 -0
  273. package/dist/services/integrations/catalog.js.map +1 -0
  274. package/dist/services/integrations/custom/integration.d.ts +28 -0
  275. package/dist/services/integrations/custom/integration.js +179 -0
  276. package/dist/services/integrations/custom/integration.js.map +1 -0
  277. package/dist/services/integrations/hermes/integration.d.ts +194 -0
  278. package/dist/services/integrations/hermes/integration.js +1669 -0
  279. package/dist/services/integrations/hermes/integration.js.map +1 -0
  280. package/dist/services/integrations/index.d.ts +40 -0
  281. package/dist/services/integrations/index.js +59 -0
  282. package/dist/services/integrations/index.js.map +1 -0
  283. package/dist/services/integrations/installable/catalog.d.ts +33 -0
  284. package/dist/services/integrations/installable/catalog.js +88 -0
  285. package/dist/services/integrations/installable/catalog.js.map +1 -0
  286. package/dist/services/integrations/installable/index.d.ts +35 -0
  287. package/dist/services/integrations/installable/index.js +170 -0
  288. package/dist/services/integrations/installable/index.js.map +1 -0
  289. package/dist/services/integrations/installable/installers/integration-probes.d.ts +50 -0
  290. package/dist/services/integrations/installable/installers/integration-probes.js +231 -0
  291. package/dist/services/integrations/installable/installers/integration-probes.js.map +1 -0
  292. package/dist/services/integrations/installable/installers/integration.d.ts +30 -0
  293. package/dist/services/integrations/installable/installers/integration.js +177 -0
  294. package/dist/services/integrations/installable/installers/integration.js.map +1 -0
  295. package/dist/services/integrations/installable/installers/registry-probe.js.map +1 -0
  296. package/dist/services/integrations/installable/installers/shell-script.d.ts +46 -0
  297. package/dist/services/integrations/installable/installers/shell-script.js +487 -0
  298. package/dist/services/integrations/installable/installers/shell-script.js.map +1 -0
  299. package/dist/services/integrations/installable/types.d.ts +130 -0
  300. package/dist/services/integrations/installable/types.js +19 -0
  301. package/dist/services/integrations/installable/types.js.map +1 -0
  302. package/dist/services/integrations/jishukb/integration.d.ts +22 -0
  303. package/dist/services/integrations/jishukb/integration.js +189 -0
  304. package/dist/services/integrations/jishukb/integration.js.map +1 -0
  305. package/dist/services/integrations/openclaw/anythingllm-shim.d.ts +46 -0
  306. package/dist/services/integrations/openclaw/anythingllm-shim.js +281 -0
  307. package/dist/services/integrations/openclaw/anythingllm-shim.js.map +1 -0
  308. package/dist/services/integrations/openclaw/drive-shim.d.ts +54 -0
  309. package/dist/services/integrations/openclaw/drive-shim.js +490 -0
  310. package/dist/services/integrations/openclaw/drive-shim.js.map +1 -0
  311. package/dist/services/integrations/openclaw/integration.d.ts +424 -0
  312. package/dist/services/integrations/openclaw/integration.js +4402 -0
  313. package/dist/services/integrations/openclaw/integration.js.map +1 -0
  314. package/dist/services/integrations/openclaw/jishukb-shim.d.ts +48 -0
  315. package/dist/services/integrations/openclaw/jishukb-shim.js +750 -0
  316. package/dist/services/integrations/openclaw/jishukb-shim.js.map +1 -0
  317. package/dist/services/integrations/openclaw/mcporter-lite.d.ts +24 -0
  318. package/dist/services/integrations/openclaw/mcporter-lite.js +276 -0
  319. package/dist/services/integrations/openclaw/mcporter-lite.js.map +1 -0
  320. package/dist/services/integrations/openclaw/mcporter.d.ts +46 -0
  321. package/dist/services/integrations/openclaw/mcporter.js +112 -0
  322. package/dist/services/integrations/openclaw/mcporter.js.map +1 -0
  323. package/dist/services/integrations/openclaw/routes.d.ts +21 -0
  324. package/dist/services/integrations/openclaw/routes.js +1191 -0
  325. package/dist/services/integrations/openclaw/routes.js.map +1 -0
  326. package/dist/services/integrations/registry.d.ts +17 -0
  327. package/dist/services/integrations/registry.js +36 -0
  328. package/dist/services/integrations/registry.js.map +1 -0
  329. package/dist/services/integrations/routes.d.ts +2 -0
  330. package/dist/services/integrations/routes.js +9 -0
  331. package/dist/services/integrations/routes.js.map +1 -0
  332. package/dist/services/integrations/types.d.ts +469 -0
  333. package/dist/services/integrations/types.js +2 -0
  334. package/dist/services/integrations/types.js.map +1 -0
  335. package/dist/services/legacy-migrator/classifier.d.ts +44 -0
  336. package/dist/services/legacy-migrator/classifier.js +309 -0
  337. package/dist/services/legacy-migrator/classifier.js.map +1 -0
  338. package/dist/services/legacy-migrator/executor.d.ts +42 -0
  339. package/dist/services/legacy-migrator/executor.js +637 -0
  340. package/dist/services/legacy-migrator/executor.js.map +1 -0
  341. package/dist/services/legacy-migrator/index.d.ts +31 -0
  342. package/dist/services/legacy-migrator/index.js +34 -0
  343. package/dist/services/legacy-migrator/index.js.map +1 -0
  344. package/dist/services/legacy-migrator/planner.d.ts +8 -0
  345. package/dist/services/legacy-migrator/planner.js +154 -0
  346. package/dist/services/legacy-migrator/planner.js.map +1 -0
  347. package/dist/services/legacy-migrator/provider-settings.d.ts +6 -0
  348. package/dist/services/legacy-migrator/provider-settings.js +72 -0
  349. package/dist/services/legacy-migrator/provider-settings.js.map +1 -0
  350. package/dist/services/legacy-migrator/report.d.ts +9 -0
  351. package/dist/services/legacy-migrator/report.js +99 -0
  352. package/dist/services/legacy-migrator/report.js.map +1 -0
  353. package/dist/services/legacy-migrator/scanner.d.ts +13 -0
  354. package/dist/services/legacy-migrator/scanner.js +157 -0
  355. package/dist/services/legacy-migrator/scanner.js.map +1 -0
  356. package/dist/services/legacy-migrator/types.d.ts +97 -0
  357. package/dist/services/legacy-migrator/types.js +23 -0
  358. package/dist/services/legacy-migrator/types.js.map +1 -0
  359. package/dist/services/llm-proxy/adapters.js +5 -4
  360. package/dist/services/llm-proxy/adapters.js.map +1 -1
  361. package/dist/services/llm-proxy/index.d.ts +8 -105
  362. package/dist/services/llm-proxy/index.js +12 -889
  363. package/dist/services/llm-proxy/index.js.map +1 -1
  364. package/dist/services/llm-proxy/instance-proxy.d.ts +61 -0
  365. package/dist/services/llm-proxy/instance-proxy.js +702 -0
  366. package/dist/services/llm-proxy/instance-proxy.js.map +1 -0
  367. package/dist/services/llm-proxy/probe.js +5 -14
  368. package/dist/services/llm-proxy/probe.js.map +1 -1
  369. package/dist/services/llm-proxy/providers.d.ts +21 -0
  370. package/dist/services/llm-proxy/providers.js +88 -0
  371. package/dist/services/llm-proxy/providers.js.map +1 -0
  372. package/dist/services/llm-proxy/proxy-runtime.d.ts +12 -0
  373. package/dist/services/llm-proxy/proxy-runtime.js +65 -0
  374. package/dist/services/llm-proxy/proxy-runtime.js.map +1 -0
  375. package/dist/services/llm-proxy/sse.d.ts +13 -3
  376. package/dist/services/llm-proxy/sse.js.map +1 -1
  377. package/dist/services/llm-proxy/ssrf.d.ts +11 -4
  378. package/dist/services/llm-proxy/ssrf.js +45 -7
  379. package/dist/services/llm-proxy/ssrf.js.map +1 -1
  380. package/dist/services/llm-proxy/validate-key.js +27 -51
  381. package/dist/services/llm-proxy/validate-key.js.map +1 -1
  382. package/dist/services/repair/runtime-repair.d.ts +22 -0
  383. package/dist/services/repair/runtime-repair.js +307 -0
  384. package/dist/services/repair/runtime-repair.js.map +1 -0
  385. package/dist/services/runtime/driver-registry.d.ts +21 -0
  386. package/dist/services/runtime/driver-registry.js +22 -0
  387. package/dist/services/runtime/driver-registry.js.map +1 -0
  388. package/dist/services/runtime/drivers/nomad.d.ts +260 -0
  389. package/dist/services/runtime/drivers/nomad.js +3092 -0
  390. package/dist/services/runtime/drivers/nomad.js.map +1 -0
  391. package/dist/services/runtime/errors.d.ts +3 -3
  392. package/dist/services/runtime/errors.js +3 -3
  393. package/dist/services/runtime/instance.d.ts +14 -16
  394. package/dist/services/runtime/instance.js +93 -110
  395. package/dist/services/runtime/instance.js.map +1 -1
  396. package/dist/services/runtime/job-id.d.ts +9 -0
  397. package/dist/services/runtime/job-id.js +15 -0
  398. package/dist/services/runtime/job-id.js.map +1 -0
  399. package/dist/services/runtime/mcp-shims/firewall.d.ts +2 -2
  400. package/dist/services/runtime/mcp-shims/firewall.js +2 -2
  401. package/dist/services/runtime/mcp-shims/searxng-shim.d.ts +3 -5
  402. package/dist/services/runtime/mcp-shims/searxng-shim.js +3 -5
  403. package/dist/services/runtime/mcp-shims/searxng-shim.js.map +1 -1
  404. package/dist/services/runtime/mcp-shims/write-mcp-entry.d.ts +20 -20
  405. package/dist/services/runtime/mcp-shims/write-mcp-entry.js +16 -16
  406. package/dist/services/runtime/mcp-shims/write-mcp-entry.js.map +1 -1
  407. package/dist/services/runtime/ownership-marker.d.ts +83 -0
  408. package/dist/services/runtime/ownership-marker.js +109 -0
  409. package/dist/services/runtime/ownership-marker.js.map +1 -0
  410. package/dist/services/runtime/types.d.ts +23 -511
  411. package/dist/services/runtime/types.js +0 -12
  412. package/dist/services/runtime/types.js.map +1 -1
  413. package/dist/services/runtime/workload-compiler.d.ts +17 -0
  414. package/dist/services/runtime/workload-compiler.js +525 -0
  415. package/dist/services/runtime/workload-compiler.js.map +1 -0
  416. package/dist/services/runtime/workload-types.d.ts +11 -0
  417. package/dist/services/runtime/workload-types.js +2 -0
  418. package/dist/services/runtime/workload-types.js.map +1 -0
  419. package/dist/services/setup/core-manager.d.ts +50 -0
  420. package/dist/services/setup/core-manager.js +456 -0
  421. package/dist/services/setup/core-manager.js.map +1 -0
  422. package/dist/services/setup/plugin-installer.js +136 -0
  423. package/dist/services/setup/plugin-installer.js.map +1 -0
  424. package/dist/services/setup/setup-manager.d.ts +158 -0
  425. package/dist/services/setup/setup-manager.js +2768 -0
  426. package/dist/services/setup/setup-manager.js.map +1 -0
  427. package/dist/services/system/cli-command.d.ts +5 -0
  428. package/dist/services/system/cli-command.js +18 -0
  429. package/dist/services/system/cli-command.js.map +1 -0
  430. package/dist/services/system/macos-launchd.d.ts +100 -0
  431. package/dist/services/system/macos-launchd.js +312 -0
  432. package/dist/services/system/macos-launchd.js.map +1 -0
  433. package/dist/services/system/repair-orchestrator.d.ts +71 -0
  434. package/dist/services/system/repair-orchestrator.js +412 -0
  435. package/dist/services/system/repair-orchestrator.js.map +1 -0
  436. package/dist/services/system/system-monitor.js +96 -0
  437. package/dist/services/system/system-monitor.js.map +1 -0
  438. package/dist/services/system/system-ollama-provider.d.ts +14 -0
  439. package/dist/services/system/system-ollama-provider.js +129 -0
  440. package/dist/services/system/system-ollama-provider.js.map +1 -0
  441. package/dist/services/system/system-reconciler.d.ts +59 -0
  442. package/dist/services/system/system-reconciler.js +710 -0
  443. package/dist/services/system/system-reconciler.js.map +1 -0
  444. package/dist/services/system/update-manager.d.ts +43 -0
  445. package/dist/services/system/update-manager.js +315 -0
  446. package/dist/services/system/update-manager.js.map +1 -0
  447. package/dist/services/system/upgrade-finalize.d.ts +80 -0
  448. package/dist/services/system/upgrade-finalize.js +507 -0
  449. package/dist/services/system/upgrade-finalize.js.map +1 -0
  450. package/dist/services/tasks/registry.d.ts +44 -0
  451. package/dist/services/tasks/registry.js +90 -0
  452. package/dist/services/tasks/registry.js.map +1 -0
  453. package/dist/services/telemetry/activation.d.ts +8 -4
  454. package/dist/services/telemetry/activation.js +12 -8
  455. package/dist/services/telemetry/activation.js.map +1 -1
  456. package/dist/services/telemetry/device-fingerprint.js +6 -1
  457. package/dist/services/telemetry/device-fingerprint.js.map +1 -1
  458. package/dist/services/telemetry/heartbeat.d.ts +8 -4
  459. package/dist/services/telemetry/heartbeat.js +12 -8
  460. package/dist/services/telemetry/heartbeat.js.map +1 -1
  461. package/dist/services/workspaces/builder.d.ts +29 -0
  462. package/dist/services/workspaces/builder.js +186 -0
  463. package/dist/services/workspaces/builder.js.map +1 -0
  464. package/dist/types.d.ts +361 -72
  465. package/dist/utils/docker-inspect.d.ts +19 -0
  466. package/dist/utils/docker-inspect.js +74 -0
  467. package/dist/utils/docker-inspect.js.map +1 -0
  468. package/dist/utils/instance-lock.d.ts +2 -2
  469. package/dist/utils/instance-lock.js +2 -2
  470. package/dist/utils/sudo-askpass.d.ts +23 -0
  471. package/dist/utils/sudo-askpass.js +83 -0
  472. package/dist/utils/sudo-askpass.js.map +1 -0
  473. package/install/jishu-install.sh +627 -109
  474. package/install/jishu-uninstall.sh +48 -12
  475. package/install/post-install.sh +316 -93
  476. package/install/post-uninstall.sh +99 -9
  477. package/node_modules/@fastify/accept-negotiator/LICENSE +22 -0
  478. package/node_modules/@fastify/accept-negotiator/README.md +52 -0
  479. package/node_modules/@fastify/accept-negotiator/index.js +170 -0
  480. package/node_modules/@fastify/accept-negotiator/package.json +77 -0
  481. package/node_modules/@fastify/accept-negotiator/types/index.d.ts +17 -0
  482. package/node_modules/@fastify/ajv-compiler/.gitattributes +2 -0
  483. package/node_modules/@fastify/ajv-compiler/.github/.stale.yml +21 -0
  484. package/node_modules/@fastify/ajv-compiler/.github/dependabot.yml +13 -0
  485. package/node_modules/@fastify/ajv-compiler/.github/tests_checker.yml +8 -0
  486. package/node_modules/@fastify/ajv-compiler/.github/workflows/ci.yml +33 -0
  487. package/node_modules/@fastify/ajv-compiler/LICENSE +23 -0
  488. package/node_modules/@fastify/ajv-compiler/README.md +237 -0
  489. package/node_modules/@fastify/ajv-compiler/benchmark/small-object.mjs +37 -0
  490. package/node_modules/@fastify/ajv-compiler/eslint.config.js +6 -0
  491. package/node_modules/@fastify/ajv-compiler/index.js +53 -0
  492. package/node_modules/@fastify/ajv-compiler/lib/default-ajv-options.js +14 -0
  493. package/node_modules/@fastify/ajv-compiler/lib/serializer-compiler.js +27 -0
  494. package/node_modules/@fastify/ajv-compiler/lib/validator-compiler.js +58 -0
  495. package/node_modules/@fastify/ajv-compiler/package.json +84 -0
  496. package/node_modules/@fastify/ajv-compiler/standalone.js +44 -0
  497. package/node_modules/@fastify/ajv-compiler/test/.gitkeep +0 -0
  498. package/node_modules/@fastify/ajv-compiler/test/duplicated-id-compile.test.js +55 -0
  499. package/node_modules/@fastify/ajv-compiler/test/index.test.js +307 -0
  500. package/node_modules/@fastify/ajv-compiler/test/plugins.test.js +246 -0
  501. package/node_modules/@fastify/ajv-compiler/test/serialization.test.js +279 -0
  502. package/node_modules/@fastify/ajv-compiler/test/standalone.test.js +203 -0
  503. package/node_modules/@fastify/ajv-compiler/types/index.d.ts +87 -0
  504. package/node_modules/@fastify/ajv-compiler/types/index.test-d.ts +302 -0
  505. package/node_modules/@fastify/error/.gitattributes +2 -0
  506. package/node_modules/@fastify/error/.github/dependabot.yml +13 -0
  507. package/node_modules/@fastify/error/.github/workflows/ci.yml +28 -0
  508. package/node_modules/@fastify/error/LICENSE +21 -0
  509. package/node_modules/@fastify/error/README.md +140 -0
  510. package/node_modules/@fastify/error/benchmarks/create.js +9 -0
  511. package/node_modules/@fastify/error/benchmarks/instantiate.js +18 -0
  512. package/node_modules/@fastify/error/benchmarks/no-stack.js +13 -0
  513. package/node_modules/@fastify/error/benchmarks/toString.js +11 -0
  514. package/node_modules/@fastify/error/eslint.config.js +6 -0
  515. package/node_modules/@fastify/error/index.js +100 -0
  516. package/node_modules/@fastify/error/package.json +75 -0
  517. package/node_modules/@fastify/error/test/index.test.js +232 -0
  518. package/node_modules/@fastify/error/test/instanceof.test.js +263 -0
  519. package/node_modules/@fastify/error/types/index.d.ts +49 -0
  520. package/node_modules/@fastify/error/types/index.test-d.ts +92 -0
  521. package/node_modules/@fastify/fast-json-stringify-compiler/.eslintrc +1 -0
  522. package/node_modules/@fastify/fast-json-stringify-compiler/.gitattributes +2 -0
  523. package/node_modules/@fastify/fast-json-stringify-compiler/.github/dependabot.yml +13 -0
  524. package/node_modules/@fastify/fast-json-stringify-compiler/.github/workflows/ci.yml +28 -0
  525. package/node_modules/@fastify/fast-json-stringify-compiler/LICENSE +21 -0
  526. package/node_modules/@fastify/fast-json-stringify-compiler/README.md +128 -0
  527. package/node_modules/@fastify/fast-json-stringify-compiler/eslint.config.js +6 -0
  528. package/node_modules/@fastify/fast-json-stringify-compiler/index.js +8 -0
  529. package/node_modules/@fastify/fast-json-stringify-compiler/package.json +71 -0
  530. package/node_modules/@fastify/fast-json-stringify-compiler/standalone.js +58 -0
  531. package/node_modules/@fastify/fast-json-stringify-compiler/test/duplicate-schema.test.js +26 -0
  532. package/node_modules/@fastify/fast-json-stringify-compiler/test/plugin.test.js +78 -0
  533. package/node_modules/@fastify/fast-json-stringify-compiler/test/standalone.test.js +230 -0
  534. package/node_modules/@fastify/fast-json-stringify-compiler/types/index.d.ts +41 -0
  535. package/node_modules/@fastify/fast-json-stringify-compiler/types/index.test-d.ts +142 -0
  536. package/node_modules/@fastify/forwarded/LICENSE +24 -0
  537. package/node_modules/@fastify/forwarded/README.md +43 -0
  538. package/node_modules/@fastify/forwarded/index.js +59 -0
  539. package/node_modules/@fastify/forwarded/package.json +74 -0
  540. package/node_modules/@fastify/forwarded/types/index.d.ts +14 -0
  541. package/node_modules/@fastify/merge-json-schemas/.gitattributes +2 -0
  542. package/node_modules/@fastify/merge-json-schemas/.github/dependabot.yml +13 -0
  543. package/node_modules/@fastify/merge-json-schemas/.github/workflows/ci.yml +23 -0
  544. package/node_modules/@fastify/merge-json-schemas/LICENSE +21 -0
  545. package/node_modules/@fastify/merge-json-schemas/README.md +119 -0
  546. package/node_modules/@fastify/merge-json-schemas/eslint.config.js +6 -0
  547. package/node_modules/@fastify/merge-json-schemas/index.js +357 -0
  548. package/node_modules/@fastify/merge-json-schemas/lib/errors.js +36 -0
  549. package/node_modules/@fastify/merge-json-schemas/lib/resolvers.js +127 -0
  550. package/node_modules/@fastify/merge-json-schemas/package.json +67 -0
  551. package/node_modules/@fastify/merge-json-schemas/test/additional-items.test.js +164 -0
  552. package/node_modules/@fastify/merge-json-schemas/test/additional-properties.test.js +129 -0
  553. package/node_modules/@fastify/merge-json-schemas/test/all-of.test.js +43 -0
  554. package/node_modules/@fastify/merge-json-schemas/test/any-of.test.js +81 -0
  555. package/node_modules/@fastify/merge-json-schemas/test/const.test.js +58 -0
  556. package/node_modules/@fastify/merge-json-schemas/test/contains.test.js +55 -0
  557. package/node_modules/@fastify/merge-json-schemas/test/custom-resolvers.test.js +50 -0
  558. package/node_modules/@fastify/merge-json-schemas/test/default-resolver.test.js +111 -0
  559. package/node_modules/@fastify/merge-json-schemas/test/default.test.js +50 -0
  560. package/node_modules/@fastify/merge-json-schemas/test/definitions.test.js +46 -0
  561. package/node_modules/@fastify/merge-json-schemas/test/defs.test.js +46 -0
  562. package/node_modules/@fastify/merge-json-schemas/test/dependencies.test.js +75 -0
  563. package/node_modules/@fastify/merge-json-schemas/test/dependent-required.test.js +75 -0
  564. package/node_modules/@fastify/merge-json-schemas/test/dependent-schemas.test.js +76 -0
  565. package/node_modules/@fastify/merge-json-schemas/test/enum.test.js +44 -0
  566. package/node_modules/@fastify/merge-json-schemas/test/exclusive-maximum.test.js +30 -0
  567. package/node_modules/@fastify/merge-json-schemas/test/exclusive-minimum.test.js +30 -0
  568. package/node_modules/@fastify/merge-json-schemas/test/format.test.js +36 -0
  569. package/node_modules/@fastify/merge-json-schemas/test/id.test.js +22 -0
  570. package/node_modules/@fastify/merge-json-schemas/test/if-then-else.test.js +550 -0
  571. package/node_modules/@fastify/merge-json-schemas/test/items.test.js +152 -0
  572. package/node_modules/@fastify/merge-json-schemas/test/max-items.test.js +30 -0
  573. package/node_modules/@fastify/merge-json-schemas/test/max-length.test.js +30 -0
  574. package/node_modules/@fastify/merge-json-schemas/test/max-properties.test.js +30 -0
  575. package/node_modules/@fastify/merge-json-schemas/test/maximum.test.js +30 -0
  576. package/node_modules/@fastify/merge-json-schemas/test/merge-schema.test.js +29 -0
  577. package/node_modules/@fastify/merge-json-schemas/test/min-items.test.js +30 -0
  578. package/node_modules/@fastify/merge-json-schemas/test/min-length.test.js +30 -0
  579. package/node_modules/@fastify/merge-json-schemas/test/min-properties.test.js +30 -0
  580. package/node_modules/@fastify/merge-json-schemas/test/minimum.test.js +30 -0
  581. package/node_modules/@fastify/merge-json-schemas/test/multiple-of.test.js +36 -0
  582. package/node_modules/@fastify/merge-json-schemas/test/not.test.js +29 -0
  583. package/node_modules/@fastify/merge-json-schemas/test/nullable.test.js +30 -0
  584. package/node_modules/@fastify/merge-json-schemas/test/one-of.test.js +144 -0
  585. package/node_modules/@fastify/merge-json-schemas/test/properties.test.js +312 -0
  586. package/node_modules/@fastify/merge-json-schemas/test/property-names.test.js +49 -0
  587. package/node_modules/@fastify/merge-json-schemas/test/required.test.js +30 -0
  588. package/node_modules/@fastify/merge-json-schemas/test/type.test.js +52 -0
  589. package/node_modules/@fastify/merge-json-schemas/test/unique-items.test.js +38 -0
  590. package/node_modules/@fastify/merge-json-schemas/test/utils.js +9 -0
  591. package/node_modules/@fastify/merge-json-schemas/types/index.d.ts +61 -0
  592. package/node_modules/@fastify/merge-json-schemas/types/index.test-d.ts +52 -0
  593. package/node_modules/@fastify/proxy-addr/.gitattributes +2 -0
  594. package/node_modules/@fastify/proxy-addr/.github/dependabot.yml +13 -0
  595. package/node_modules/@fastify/proxy-addr/.github/stale.yml +21 -0
  596. package/node_modules/@fastify/proxy-addr/.github/workflows/ci.yml +28 -0
  597. package/node_modules/@fastify/proxy-addr/LICENSE +24 -0
  598. package/node_modules/@fastify/proxy-addr/README.md +141 -0
  599. package/node_modules/@fastify/proxy-addr/benchmark/compiling.js +50 -0
  600. package/node_modules/@fastify/proxy-addr/benchmark/index.js +30 -0
  601. package/node_modules/@fastify/proxy-addr/benchmark/kind.js +57 -0
  602. package/node_modules/@fastify/proxy-addr/benchmark/matching.js +78 -0
  603. package/node_modules/@fastify/proxy-addr/eslint.config.js +6 -0
  604. package/node_modules/@fastify/proxy-addr/index.js +331 -0
  605. package/node_modules/@fastify/proxy-addr/package.json +73 -0
  606. package/node_modules/@fastify/proxy-addr/test/all.test.js +55 -0
  607. package/node_modules/@fastify/proxy-addr/test/base.test.js +365 -0
  608. package/node_modules/@fastify/proxy-addr/test/compile.test.js +58 -0
  609. package/node_modules/@fastify/proxy-addr/types/index.d.ts +18 -0
  610. package/node_modules/@fastify/proxy-addr/types/index.test-d.ts +27 -0
  611. package/node_modules/@fastify/send/.gitattributes +2 -0
  612. package/node_modules/@fastify/send/.github/dependabot.yml +13 -0
  613. package/node_modules/@fastify/send/.github/workflows/ci.yml +28 -0
  614. package/node_modules/@fastify/send/HISTORY.md +521 -0
  615. package/node_modules/@fastify/send/LICENSE +23 -0
  616. package/node_modules/@fastify/send/README.md +310 -0
  617. package/node_modules/@fastify/send/benchmarks/collapseLeadingSlashes.js +13 -0
  618. package/node_modules/@fastify/send/benchmarks/containsDotFile.js +15 -0
  619. package/node_modules/@fastify/send/benchmarks/isUtf8MimeType.js +23 -0
  620. package/node_modules/@fastify/send/benchmarks/normalizeList.js +14 -0
  621. package/node_modules/@fastify/send/benchmarks/parseBytesRange.js +15 -0
  622. package/node_modules/@fastify/send/eslint.config.js +6 -0
  623. package/node_modules/@fastify/send/examples/index.html +1 -0
  624. package/node_modules/@fastify/send/examples/simple.js +15 -0
  625. package/node_modules/@fastify/send/index.js +28 -0
  626. package/node_modules/@fastify/send/lib/collapseLeadingSlashes.js +25 -0
  627. package/node_modules/@fastify/send/lib/containsDotFile.js +23 -0
  628. package/node_modules/@fastify/send/lib/contentRange.js +18 -0
  629. package/node_modules/@fastify/send/lib/createHtmlDocument.js +29 -0
  630. package/node_modules/@fastify/send/lib/createHttpError.js +23 -0
  631. package/node_modules/@fastify/send/lib/isUtf8MimeType.js +12 -0
  632. package/node_modules/@fastify/send/lib/normalizeList.js +28 -0
  633. package/node_modules/@fastify/send/lib/parseBytesRange.js +133 -0
  634. package/node_modules/@fastify/send/lib/parseTokenList.js +46 -0
  635. package/node_modules/@fastify/send/lib/send.js +729 -0
  636. package/node_modules/@fastify/send/package.json +81 -0
  637. package/node_modules/@fastify/send/test/collapseLeadingSlashes.test.js +22 -0
  638. package/node_modules/@fastify/send/test/containsDotFile.test.js +18 -0
  639. package/node_modules/@fastify/send/test/fixtures/.hidden.txt +1 -0
  640. package/node_modules/@fastify/send/test/fixtures/.mine/.hidden.txt +1 -0
  641. package/node_modules/@fastify/send/test/fixtures/.mine/name.txt +1 -0
  642. package/node_modules/@fastify/send/test/fixtures/do..ts.txt +1 -0
  643. package/node_modules/@fastify/send/test/fixtures/empty.txt +0 -0
  644. package/node_modules/@fastify/send/test/fixtures/images/node-js.png +0 -0
  645. package/node_modules/@fastify/send/test/fixtures/name.d/name.txt +1 -0
  646. package/node_modules/@fastify/send/test/fixtures/name.dir/name.txt +1 -0
  647. package/node_modules/@fastify/send/test/fixtures/name.html +1 -0
  648. package/node_modules/@fastify/send/test/fixtures/name.txt +1 -0
  649. package/node_modules/@fastify/send/test/fixtures/no_ext +1 -0
  650. package/node_modules/@fastify/send/test/fixtures/nums.txt +1 -0
  651. package/node_modules/@fastify/send/test/fixtures/pets/.hidden.txt +1 -0
  652. package/node_modules/@fastify/send/test/fixtures/pets/index.html +3 -0
  653. package/node_modules/@fastify/send/test/fixtures/snow /342/230/203/index.html +0 -0
  654. package/node_modules/@fastify/send/test/fixtures/some thing.txt +1 -0
  655. package/node_modules/@fastify/send/test/fixtures/thing.html.html +1 -0
  656. package/node_modules/@fastify/send/test/fixtures/tobi.html +1 -0
  657. package/node_modules/@fastify/send/test/isUtf8MimeType.test.js +22 -0
  658. package/node_modules/@fastify/send/test/mime.test.js +56 -0
  659. package/node_modules/@fastify/send/test/normalizeList.test.js +28 -0
  660. package/node_modules/@fastify/send/test/parseBytesRange.test.js +103 -0
  661. package/node_modules/@fastify/send/test/send.1.test.js +646 -0
  662. package/node_modules/@fastify/send/test/send.2.test.js +977 -0
  663. package/node_modules/@fastify/send/test/send.3.test.js +133 -0
  664. package/node_modules/@fastify/send/test/utils.js +36 -0
  665. package/node_modules/@fastify/send/types/index.d.ts +167 -0
  666. package/node_modules/@fastify/send/types/index.test-d.ts +67 -0
  667. package/node_modules/@fastify/static/.gitattributes +5 -0
  668. package/node_modules/@fastify/static/.github/dependabot.yml +13 -0
  669. package/node_modules/@fastify/static/.github/workflows/ci.yml +33 -0
  670. package/node_modules/@fastify/static/.github/workflows/lock-threads.yml +19 -0
  671. package/node_modules/@fastify/static/LICENSE +21 -0
  672. package/node_modules/@fastify/static/README.md +538 -0
  673. package/node_modules/@fastify/static/eslint.config.js +7 -0
  674. package/node_modules/@fastify/static/example/public/.hidden/sample.json +1 -0
  675. package/node_modules/@fastify/static/example/public/images/sample.jpg +0 -0
  676. package/node_modules/@fastify/static/example/public/index.css +9 -0
  677. package/node_modules/@fastify/static/example/public/index.html +11 -0
  678. package/node_modules/@fastify/static/example/public/index.js +8 -0
  679. package/node_modules/@fastify/static/example/public2/test.css +4 -0
  680. package/node_modules/@fastify/static/example/public2/test.html +8 -0
  681. package/node_modules/@fastify/static/example/server-benchmark.js +39 -0
  682. package/node_modules/@fastify/static/example/server-compress.js +15 -0
  683. package/node_modules/@fastify/static/example/server-dir-list.js +38 -0
  684. package/node_modules/@fastify/static/example/server-hidden-file.js +15 -0
  685. package/node_modules/@fastify/static/example/server.js +13 -0
  686. package/node_modules/@fastify/static/index.js +726 -0
  687. package/node_modules/@fastify/static/lib/dirList.js +225 -0
  688. package/node_modules/@fastify/static/package.json +89 -0
  689. package/node_modules/@fastify/static/test/content-type/binary +0 -0
  690. package/node_modules/@fastify/static/test/content-type/binary.br +1 -0
  691. package/node_modules/@fastify/static/test/content-type/index.css +0 -0
  692. package/node_modules/@fastify/static/test/content-type/index.css.br +1 -0
  693. package/node_modules/@fastify/static/test/content-type/index.html +5 -0
  694. package/node_modules/@fastify/static/test/content-type/index.html.br +0 -0
  695. package/node_modules/@fastify/static/test/content-type/sample.jpg +0 -0
  696. package/node_modules/@fastify/static/test/content-type/test.txt +0 -0
  697. package/node_modules/@fastify/static/test/content-type/test.txt.br +1 -0
  698. package/node_modules/@fastify/static/test/content-type.test.js +144 -0
  699. package/node_modules/@fastify/static/test/dir-list.test.js +820 -0
  700. package/node_modules/@fastify/static/test/static/.example +1 -0
  701. package/node_modules/@fastify/static/test/static/100%.txt +1 -0
  702. package/node_modules/@fastify/static/test/static/a .md +1 -0
  703. package/node_modules/@fastify/static/test/static/deep/path/for/test/index.html +5 -0
  704. package/node_modules/@fastify/static/test/static/deep/path/for/test/purpose/foo.html +5 -0
  705. package/node_modules/@fastify/static/test/static/foo.html +3 -0
  706. package/node_modules/@fastify/static/test/static/foobar.html +3 -0
  707. package/node_modules/@fastify/static/test/static/index.css +0 -0
  708. package/node_modules/@fastify/static/test/static/index.html +5 -0
  709. package/node_modules/@fastify/static/test/static/shallow/sample.jpg +0 -0
  710. package/node_modules/@fastify/static/test/static-dotfiles/.aaa +0 -0
  711. package/node_modules/@fastify/static/test/static-dotfiles/dir/index.html +0 -0
  712. package/node_modules/@fastify/static/test/static-dotfiles/test.txt +0 -0
  713. package/node_modules/@fastify/static/test/static-encode/[...]/a .md +1 -0
  714. package/node_modules/@fastify/static/test/static-filtered/bar.private +1 -0
  715. package/node_modules/@fastify/static/test/static-filtered/deep/path/to/baz.html +3 -0
  716. package/node_modules/@fastify/static/test/static-filtered/deep/path/to/baz.private +1 -0
  717. package/node_modules/@fastify/static/test/static-filtered/index.html +3 -0
  718. package/node_modules/@fastify/static/test/static-hidden/.hidden/sample.json +1 -0
  719. package/node_modules/@fastify/static/test/static-pre-compressed/all-three.html +5 -0
  720. package/node_modules/@fastify/static/test/static-pre-compressed/all-three.html.br +0 -0
  721. package/node_modules/@fastify/static/test/static-pre-compressed/all-three.html.gz +0 -0
  722. package/node_modules/@fastify/static/test/static-pre-compressed/baz.json +3 -0
  723. package/node_modules/@fastify/static/test/static-pre-compressed/dir/index.html +5 -0
  724. package/node_modules/@fastify/static/test/static-pre-compressed/dir/index.html.br +0 -0
  725. package/node_modules/@fastify/static/test/static-pre-compressed/dir-gz/index.html +5 -0
  726. package/node_modules/@fastify/static/test/static-pre-compressed/dir-gz/index.html.gz +0 -0
  727. package/node_modules/@fastify/static/test/static-pre-compressed/empty/.gitkeep +0 -0
  728. package/node_modules/@fastify/static/test/static-pre-compressed/gzip-only.html +3 -0
  729. package/node_modules/@fastify/static/test/static-pre-compressed/gzip-only.html.gz +0 -0
  730. package/node_modules/@fastify/static/test/static-pre-compressed/index.html +5 -0
  731. package/node_modules/@fastify/static/test/static-pre-compressed/index.html.br +0 -0
  732. package/node_modules/@fastify/static/test/static-pre-compressed/sample.jpg +0 -0
  733. package/node_modules/@fastify/static/test/static-pre-compressed/sample.jpg.br +0 -0
  734. package/node_modules/@fastify/static/test/static-pre-compressed/uncompressed.html +3 -0
  735. package/node_modules/@fastify/static/test/static-symbolic-link/origin/subdir/subdir/index.html +3 -0
  736. package/node_modules/@fastify/static/test/static.test.js +4115 -0
  737. package/node_modules/@fastify/static/test/static2/bar.html +3 -0
  738. package/node_modules/@fastify/static/test/static2/index.html +3 -0
  739. package/node_modules/@fastify/static/types/index.d.ts +136 -0
  740. package/node_modules/@fastify/static/types/index.test-d.ts +240 -0
  741. package/node_modules/@lukeed/ms/dist/index.js +37 -0
  742. package/node_modules/@lukeed/ms/dist/index.min.js +1 -0
  743. package/node_modules/@lukeed/ms/dist/index.mjs +34 -0
  744. package/node_modules/@lukeed/ms/index.d.ts +2 -0
  745. package/node_modules/@lukeed/ms/license +9 -0
  746. package/node_modules/@lukeed/ms/package.json +48 -0
  747. package/node_modules/@lukeed/ms/readme.md +133 -0
  748. package/node_modules/@pinojs/redact/.github/dependabot.yml +13 -0
  749. package/node_modules/@pinojs/redact/.github/workflows/ci.yml +48 -0
  750. package/node_modules/@pinojs/redact/.github/workflows/publish-release.yml +43 -0
  751. package/node_modules/@pinojs/redact/LICENSE +21 -0
  752. package/node_modules/@pinojs/redact/README.md +350 -0
  753. package/node_modules/@pinojs/redact/benchmarks/basic.js +184 -0
  754. package/node_modules/@pinojs/redact/eslint.config.js +1 -0
  755. package/node_modules/@pinojs/redact/index.d.ts +52 -0
  756. package/node_modules/@pinojs/redact/index.js +529 -0
  757. package/node_modules/@pinojs/redact/index.test-d.ts +22 -0
  758. package/node_modules/@pinojs/redact/package.json +37 -0
  759. package/node_modules/@pinojs/redact/scripts/sync-version.mjs +20 -0
  760. package/node_modules/@pinojs/redact/test/actual-redact-comparison.test.js +211 -0
  761. package/node_modules/@pinojs/redact/test/index.test.js +824 -0
  762. package/node_modules/@pinojs/redact/test/integration.test.js +390 -0
  763. package/node_modules/@pinojs/redact/test/multiple-wildcards.test.js +227 -0
  764. package/node_modules/@pinojs/redact/test/prototype-pollution.test.js +223 -0
  765. package/node_modules/@pinojs/redact/test/selective-clone.test.js +115 -0
  766. package/node_modules/@pinojs/redact/tsconfig.json +19 -0
  767. package/node_modules/abstract-logging/Readme.md +47 -0
  768. package/node_modules/abstract-logging/index.js +18 -0
  769. package/node_modules/abstract-logging/package.json +25 -0
  770. package/node_modules/abstract-logging/test.js +17 -0
  771. package/node_modules/ajv/.runkit_example.js +23 -0
  772. package/node_modules/ajv/LICENSE +22 -0
  773. package/node_modules/ajv/README.md +207 -0
  774. package/node_modules/ajv/dist/2019.d.ts +19 -0
  775. package/node_modules/ajv/dist/2019.js +61 -0
  776. package/node_modules/ajv/dist/2019.js.map +1 -0
  777. package/node_modules/ajv/dist/2020.d.ts +19 -0
  778. package/node_modules/ajv/dist/2020.js +55 -0
  779. package/node_modules/ajv/dist/2020.js.map +1 -0
  780. package/node_modules/ajv/dist/ajv.d.ts +18 -0
  781. package/node_modules/ajv/dist/ajv.js +50 -0
  782. package/node_modules/ajv/dist/ajv.js.map +1 -0
  783. package/node_modules/ajv/dist/compile/codegen/code.d.ts +40 -0
  784. package/node_modules/ajv/dist/compile/codegen/code.js +156 -0
  785. package/node_modules/ajv/dist/compile/codegen/code.js.map +1 -0
  786. package/node_modules/ajv/dist/compile/codegen/index.d.ts +79 -0
  787. package/node_modules/ajv/dist/compile/codegen/index.js +697 -0
  788. package/node_modules/ajv/dist/compile/codegen/index.js.map +1 -0
  789. package/node_modules/ajv/dist/compile/codegen/scope.d.ts +79 -0
  790. package/node_modules/ajv/dist/compile/codegen/scope.js +143 -0
  791. package/node_modules/ajv/dist/compile/codegen/scope.js.map +1 -0
  792. package/node_modules/ajv/dist/compile/errors.d.ts +13 -0
  793. package/node_modules/ajv/dist/compile/errors.js +123 -0
  794. package/node_modules/ajv/dist/compile/errors.js.map +1 -0
  795. package/node_modules/ajv/dist/compile/index.d.ts +80 -0
  796. package/node_modules/ajv/dist/compile/index.js +242 -0
  797. package/node_modules/ajv/dist/compile/index.js.map +1 -0
  798. package/node_modules/ajv/dist/compile/jtd/parse.d.ts +4 -0
  799. package/node_modules/ajv/dist/compile/jtd/parse.js +350 -0
  800. package/node_modules/ajv/dist/compile/jtd/parse.js.map +1 -0
  801. package/node_modules/ajv/dist/compile/jtd/serialize.d.ts +4 -0
  802. package/node_modules/ajv/dist/compile/jtd/serialize.js +236 -0
  803. package/node_modules/ajv/dist/compile/jtd/serialize.js.map +1 -0
  804. package/node_modules/ajv/dist/compile/jtd/types.d.ts +6 -0
  805. package/node_modules/ajv/dist/compile/jtd/types.js +14 -0
  806. package/node_modules/ajv/dist/compile/jtd/types.js.map +1 -0
  807. package/node_modules/ajv/dist/compile/names.d.ts +20 -0
  808. package/node_modules/ajv/dist/compile/names.js +28 -0
  809. package/node_modules/ajv/dist/compile/names.js.map +1 -0
  810. package/node_modules/ajv/dist/compile/ref_error.d.ts +6 -0
  811. package/node_modules/ajv/dist/compile/ref_error.js +12 -0
  812. package/node_modules/ajv/dist/compile/ref_error.js.map +1 -0
  813. package/node_modules/ajv/dist/compile/resolve.d.ts +12 -0
  814. package/node_modules/ajv/dist/compile/resolve.js +155 -0
  815. package/node_modules/ajv/dist/compile/resolve.js.map +1 -0
  816. package/node_modules/ajv/dist/compile/rules.d.ts +28 -0
  817. package/node_modules/ajv/dist/compile/rules.js +26 -0
  818. package/node_modules/ajv/dist/compile/rules.js.map +1 -0
  819. package/node_modules/ajv/dist/compile/util.d.ts +40 -0
  820. package/node_modules/ajv/dist/compile/util.js +178 -0
  821. package/node_modules/ajv/dist/compile/util.js.map +1 -0
  822. package/node_modules/ajv/dist/compile/validate/applicability.d.ts +6 -0
  823. package/node_modules/ajv/dist/compile/validate/applicability.js +19 -0
  824. package/node_modules/ajv/dist/compile/validate/applicability.js.map +1 -0
  825. package/node_modules/ajv/dist/compile/validate/boolSchema.d.ts +4 -0
  826. package/node_modules/ajv/dist/compile/validate/boolSchema.js +50 -0
  827. package/node_modules/ajv/dist/compile/validate/boolSchema.js.map +1 -0
  828. package/node_modules/ajv/dist/compile/validate/dataType.d.ts +17 -0
  829. package/node_modules/ajv/dist/compile/validate/dataType.js +203 -0
  830. package/node_modules/ajv/dist/compile/validate/dataType.js.map +1 -0
  831. package/node_modules/ajv/dist/compile/validate/defaults.d.ts +2 -0
  832. package/node_modules/ajv/dist/compile/validate/defaults.js +35 -0
  833. package/node_modules/ajv/dist/compile/validate/defaults.js.map +1 -0
  834. package/node_modules/ajv/dist/compile/validate/index.d.ts +42 -0
  835. package/node_modules/ajv/dist/compile/validate/index.js +520 -0
  836. package/node_modules/ajv/dist/compile/validate/index.js.map +1 -0
  837. package/node_modules/ajv/dist/compile/validate/keyword.d.ts +8 -0
  838. package/node_modules/ajv/dist/compile/validate/keyword.js +124 -0
  839. package/node_modules/ajv/dist/compile/validate/keyword.js.map +1 -0
  840. package/node_modules/ajv/dist/compile/validate/subschema.d.ts +47 -0
  841. package/node_modules/ajv/dist/compile/validate/subschema.js +81 -0
  842. package/node_modules/ajv/dist/compile/validate/subschema.js.map +1 -0
  843. package/node_modules/ajv/dist/core.d.ts +174 -0
  844. package/node_modules/ajv/dist/core.js +618 -0
  845. package/node_modules/ajv/dist/core.js.map +1 -0
  846. package/node_modules/ajv/dist/jtd.d.ts +47 -0
  847. package/node_modules/ajv/dist/jtd.js +72 -0
  848. package/node_modules/ajv/dist/jtd.js.map +1 -0
  849. package/node_modules/ajv/dist/refs/data.json +13 -0
  850. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.d.ts +2 -0
  851. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js +28 -0
  852. package/node_modules/ajv/dist/refs/json-schema-2019-09/index.js.map +1 -0
  853. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/applicator.json +53 -0
  854. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/content.json +17 -0
  855. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/core.json +57 -0
  856. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/format.json +14 -0
  857. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  858. package/node_modules/ajv/dist/refs/json-schema-2019-09/meta/validation.json +90 -0
  859. package/node_modules/ajv/dist/refs/json-schema-2019-09/schema.json +39 -0
  860. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.d.ts +2 -0
  861. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js +30 -0
  862. package/node_modules/ajv/dist/refs/json-schema-2020-12/index.js.map +1 -0
  863. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json +48 -0
  864. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json +17 -0
  865. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json +51 -0
  866. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  867. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  868. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  869. package/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json +90 -0
  870. package/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json +55 -0
  871. package/node_modules/ajv/dist/refs/json-schema-draft-06.json +137 -0
  872. package/node_modules/ajv/dist/refs/json-schema-draft-07.json +151 -0
  873. package/node_modules/ajv/dist/refs/json-schema-secure.json +88 -0
  874. package/node_modules/ajv/dist/refs/jtd-schema.d.ts +3 -0
  875. package/node_modules/ajv/dist/refs/jtd-schema.js +118 -0
  876. package/node_modules/ajv/dist/refs/jtd-schema.js.map +1 -0
  877. package/node_modules/ajv/dist/runtime/equal.d.ts +6 -0
  878. package/node_modules/ajv/dist/runtime/equal.js +7 -0
  879. package/node_modules/ajv/dist/runtime/equal.js.map +1 -0
  880. package/node_modules/ajv/dist/runtime/parseJson.d.ts +18 -0
  881. package/node_modules/ajv/dist/runtime/parseJson.js +185 -0
  882. package/node_modules/ajv/dist/runtime/parseJson.js.map +1 -0
  883. package/node_modules/ajv/dist/runtime/quote.d.ts +5 -0
  884. package/node_modules/ajv/dist/runtime/quote.js +30 -0
  885. package/node_modules/ajv/dist/runtime/quote.js.map +1 -0
  886. package/node_modules/ajv/dist/runtime/re2.d.ts +6 -0
  887. package/node_modules/ajv/dist/runtime/re2.js +6 -0
  888. package/node_modules/ajv/dist/runtime/re2.js.map +1 -0
  889. package/node_modules/ajv/dist/runtime/timestamp.d.ts +5 -0
  890. package/node_modules/ajv/dist/runtime/timestamp.js +42 -0
  891. package/node_modules/ajv/dist/runtime/timestamp.js.map +1 -0
  892. package/node_modules/ajv/dist/runtime/ucs2length.d.ts +5 -0
  893. package/node_modules/ajv/dist/runtime/ucs2length.js +24 -0
  894. package/node_modules/ajv/dist/runtime/ucs2length.js.map +1 -0
  895. package/node_modules/ajv/dist/runtime/uri.d.ts +6 -0
  896. package/node_modules/ajv/dist/runtime/uri.js +6 -0
  897. package/node_modules/ajv/dist/runtime/uri.js.map +1 -0
  898. package/node_modules/ajv/dist/runtime/validation_error.d.ts +7 -0
  899. package/node_modules/ajv/dist/runtime/validation_error.js +11 -0
  900. package/node_modules/ajv/dist/runtime/validation_error.js.map +1 -0
  901. package/node_modules/ajv/dist/standalone/index.d.ts +6 -0
  902. package/node_modules/ajv/dist/standalone/index.js +90 -0
  903. package/node_modules/ajv/dist/standalone/index.js.map +1 -0
  904. package/node_modules/ajv/dist/standalone/instance.d.ts +12 -0
  905. package/node_modules/ajv/dist/standalone/instance.js +35 -0
  906. package/node_modules/ajv/dist/standalone/instance.js.map +1 -0
  907. package/node_modules/ajv/dist/types/index.d.ts +183 -0
  908. package/node_modules/ajv/dist/types/index.js +3 -0
  909. package/node_modules/ajv/dist/types/index.js.map +1 -0
  910. package/node_modules/ajv/dist/types/json-schema.d.ts +125 -0
  911. package/node_modules/ajv/dist/types/json-schema.js +3 -0
  912. package/node_modules/ajv/dist/types/json-schema.js.map +1 -0
  913. package/node_modules/ajv/dist/types/jtd-schema.d.ts +174 -0
  914. package/node_modules/ajv/dist/types/jtd-schema.js +3 -0
  915. package/node_modules/ajv/dist/types/jtd-schema.js.map +1 -0
  916. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.d.ts +8 -0
  917. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js +49 -0
  918. package/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js.map +1 -0
  919. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.d.ts +6 -0
  920. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js +106 -0
  921. package/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js.map +1 -0
  922. package/node_modules/ajv/dist/vocabularies/applicator/allOf.d.ts +3 -0
  923. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js +23 -0
  924. package/node_modules/ajv/dist/vocabularies/applicator/allOf.js.map +1 -0
  925. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.d.ts +4 -0
  926. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js +12 -0
  927. package/node_modules/ajv/dist/vocabularies/applicator/anyOf.js.map +1 -0
  928. package/node_modules/ajv/dist/vocabularies/applicator/contains.d.ts +7 -0
  929. package/node_modules/ajv/dist/vocabularies/applicator/contains.js +95 -0
  930. package/node_modules/ajv/dist/vocabularies/applicator/contains.js.map +1 -0
  931. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.d.ts +21 -0
  932. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js +85 -0
  933. package/node_modules/ajv/dist/vocabularies/applicator/dependencies.js.map +1 -0
  934. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.d.ts +3 -0
  935. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js +11 -0
  936. package/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js.map +1 -0
  937. package/node_modules/ajv/dist/vocabularies/applicator/if.d.ts +6 -0
  938. package/node_modules/ajv/dist/vocabularies/applicator/if.js +66 -0
  939. package/node_modules/ajv/dist/vocabularies/applicator/if.js.map +1 -0
  940. package/node_modules/ajv/dist/vocabularies/applicator/index.d.ts +13 -0
  941. package/node_modules/ajv/dist/vocabularies/applicator/index.js +44 -0
  942. package/node_modules/ajv/dist/vocabularies/applicator/index.js.map +1 -0
  943. package/node_modules/ajv/dist/vocabularies/applicator/items.d.ts +5 -0
  944. package/node_modules/ajv/dist/vocabularies/applicator/items.js +52 -0
  945. package/node_modules/ajv/dist/vocabularies/applicator/items.js.map +1 -0
  946. package/node_modules/ajv/dist/vocabularies/applicator/items2020.d.ts +6 -0
  947. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js +30 -0
  948. package/node_modules/ajv/dist/vocabularies/applicator/items2020.js.map +1 -0
  949. package/node_modules/ajv/dist/vocabularies/applicator/not.d.ts +4 -0
  950. package/node_modules/ajv/dist/vocabularies/applicator/not.js +26 -0
  951. package/node_modules/ajv/dist/vocabularies/applicator/not.js.map +1 -0
  952. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.d.ts +6 -0
  953. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js +60 -0
  954. package/node_modules/ajv/dist/vocabularies/applicator/oneOf.js.map +1 -0
  955. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.d.ts +3 -0
  956. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js +75 -0
  957. package/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js.map +1 -0
  958. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.d.ts +3 -0
  959. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js +12 -0
  960. package/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js.map +1 -0
  961. package/node_modules/ajv/dist/vocabularies/applicator/properties.d.ts +3 -0
  962. package/node_modules/ajv/dist/vocabularies/applicator/properties.js +54 -0
  963. package/node_modules/ajv/dist/vocabularies/applicator/properties.js.map +1 -0
  964. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.d.ts +6 -0
  965. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js +38 -0
  966. package/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js.map +1 -0
  967. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.d.ts +3 -0
  968. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js +13 -0
  969. package/node_modules/ajv/dist/vocabularies/applicator/thenElse.js.map +1 -0
  970. package/node_modules/ajv/dist/vocabularies/code.d.ts +17 -0
  971. package/node_modules/ajv/dist/vocabularies/code.js +131 -0
  972. package/node_modules/ajv/dist/vocabularies/code.js.map +1 -0
  973. package/node_modules/ajv/dist/vocabularies/core/id.d.ts +3 -0
  974. package/node_modules/ajv/dist/vocabularies/core/id.js +10 -0
  975. package/node_modules/ajv/dist/vocabularies/core/id.js.map +1 -0
  976. package/node_modules/ajv/dist/vocabularies/core/index.d.ts +3 -0
  977. package/node_modules/ajv/dist/vocabularies/core/index.js +16 -0
  978. package/node_modules/ajv/dist/vocabularies/core/index.js.map +1 -0
  979. package/node_modules/ajv/dist/vocabularies/core/ref.d.ts +8 -0
  980. package/node_modules/ajv/dist/vocabularies/core/ref.js +122 -0
  981. package/node_modules/ajv/dist/vocabularies/core/ref.js.map +1 -0
  982. package/node_modules/ajv/dist/vocabularies/discriminator/index.d.ts +5 -0
  983. package/node_modules/ajv/dist/vocabularies/discriminator/index.js +104 -0
  984. package/node_modules/ajv/dist/vocabularies/discriminator/index.js.map +1 -0
  985. package/node_modules/ajv/dist/vocabularies/discriminator/types.d.ts +10 -0
  986. package/node_modules/ajv/dist/vocabularies/discriminator/types.js +9 -0
  987. package/node_modules/ajv/dist/vocabularies/discriminator/types.js.map +1 -0
  988. package/node_modules/ajv/dist/vocabularies/draft2020.d.ts +3 -0
  989. package/node_modules/ajv/dist/vocabularies/draft2020.js +23 -0
  990. package/node_modules/ajv/dist/vocabularies/draft2020.js.map +1 -0
  991. package/node_modules/ajv/dist/vocabularies/draft7.d.ts +3 -0
  992. package/node_modules/ajv/dist/vocabularies/draft7.js +17 -0
  993. package/node_modules/ajv/dist/vocabularies/draft7.js.map +1 -0
  994. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.d.ts +5 -0
  995. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js +30 -0
  996. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js.map +1 -0
  997. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.d.ts +5 -0
  998. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js +51 -0
  999. package/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js.map +1 -0
  1000. package/node_modules/ajv/dist/vocabularies/dynamic/index.d.ts +3 -0
  1001. package/node_modules/ajv/dist/vocabularies/dynamic/index.js +9 -0
  1002. package/node_modules/ajv/dist/vocabularies/dynamic/index.js.map +1 -0
  1003. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.d.ts +3 -0
  1004. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js +16 -0
  1005. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js.map +1 -0
  1006. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.d.ts +3 -0
  1007. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js +10 -0
  1008. package/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js.map +1 -0
  1009. package/node_modules/ajv/dist/vocabularies/errors.d.ts +9 -0
  1010. package/node_modules/ajv/dist/vocabularies/errors.js +3 -0
  1011. package/node_modules/ajv/dist/vocabularies/errors.js.map +1 -0
  1012. package/node_modules/ajv/dist/vocabularies/format/format.d.ts +8 -0
  1013. package/node_modules/ajv/dist/vocabularies/format/format.js +92 -0
  1014. package/node_modules/ajv/dist/vocabularies/format/format.js.map +1 -0
  1015. package/node_modules/ajv/dist/vocabularies/format/index.d.ts +3 -0
  1016. package/node_modules/ajv/dist/vocabularies/format/index.js +6 -0
  1017. package/node_modules/ajv/dist/vocabularies/format/index.js.map +1 -0
  1018. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.d.ts +6 -0
  1019. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js +71 -0
  1020. package/node_modules/ajv/dist/vocabularies/jtd/discriminator.js.map +1 -0
  1021. package/node_modules/ajv/dist/vocabularies/jtd/elements.d.ts +5 -0
  1022. package/node_modules/ajv/dist/vocabularies/jtd/elements.js +24 -0
  1023. package/node_modules/ajv/dist/vocabularies/jtd/elements.js.map +1 -0
  1024. package/node_modules/ajv/dist/vocabularies/jtd/enum.d.ts +6 -0
  1025. package/node_modules/ajv/dist/vocabularies/jtd/enum.js +43 -0
  1026. package/node_modules/ajv/dist/vocabularies/jtd/enum.js.map +1 -0
  1027. package/node_modules/ajv/dist/vocabularies/jtd/error.d.ts +9 -0
  1028. package/node_modules/ajv/dist/vocabularies/jtd/error.js +20 -0
  1029. package/node_modules/ajv/dist/vocabularies/jtd/error.js.map +1 -0
  1030. package/node_modules/ajv/dist/vocabularies/jtd/index.d.ts +10 -0
  1031. package/node_modules/ajv/dist/vocabularies/jtd/index.js +29 -0
  1032. package/node_modules/ajv/dist/vocabularies/jtd/index.js.map +1 -0
  1033. package/node_modules/ajv/dist/vocabularies/jtd/metadata.d.ts +5 -0
  1034. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js +25 -0
  1035. package/node_modules/ajv/dist/vocabularies/jtd/metadata.js.map +1 -0
  1036. package/node_modules/ajv/dist/vocabularies/jtd/nullable.d.ts +4 -0
  1037. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js +22 -0
  1038. package/node_modules/ajv/dist/vocabularies/jtd/nullable.js.map +1 -0
  1039. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.d.ts +3 -0
  1040. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js +15 -0
  1041. package/node_modules/ajv/dist/vocabularies/jtd/optionalProperties.js.map +1 -0
  1042. package/node_modules/ajv/dist/vocabularies/jtd/properties.d.ts +22 -0
  1043. package/node_modules/ajv/dist/vocabularies/jtd/properties.js +149 -0
  1044. package/node_modules/ajv/dist/vocabularies/jtd/properties.js.map +1 -0
  1045. package/node_modules/ajv/dist/vocabularies/jtd/ref.d.ts +4 -0
  1046. package/node_modules/ajv/dist/vocabularies/jtd/ref.js +67 -0
  1047. package/node_modules/ajv/dist/vocabularies/jtd/ref.js.map +1 -0
  1048. package/node_modules/ajv/dist/vocabularies/jtd/type.d.ts +10 -0
  1049. package/node_modules/ajv/dist/vocabularies/jtd/type.js +69 -0
  1050. package/node_modules/ajv/dist/vocabularies/jtd/type.js.map +1 -0
  1051. package/node_modules/ajv/dist/vocabularies/jtd/union.d.ts +3 -0
  1052. package/node_modules/ajv/dist/vocabularies/jtd/union.js +12 -0
  1053. package/node_modules/ajv/dist/vocabularies/jtd/union.js.map +1 -0
  1054. package/node_modules/ajv/dist/vocabularies/jtd/values.d.ts +5 -0
  1055. package/node_modules/ajv/dist/vocabularies/jtd/values.js +51 -0
  1056. package/node_modules/ajv/dist/vocabularies/jtd/values.js.map +1 -0
  1057. package/node_modules/ajv/dist/vocabularies/metadata.d.ts +3 -0
  1058. package/node_modules/ajv/dist/vocabularies/metadata.js +18 -0
  1059. package/node_modules/ajv/dist/vocabularies/metadata.js.map +1 -0
  1060. package/node_modules/ajv/dist/vocabularies/next.d.ts +3 -0
  1061. package/node_modules/ajv/dist/vocabularies/next.js +8 -0
  1062. package/node_modules/ajv/dist/vocabularies/next.js.map +1 -0
  1063. package/node_modules/ajv/dist/vocabularies/unevaluated/index.d.ts +3 -0
  1064. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js +7 -0
  1065. package/node_modules/ajv/dist/vocabularies/unevaluated/index.js.map +1 -0
  1066. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.d.ts +6 -0
  1067. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js +40 -0
  1068. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js.map +1 -0
  1069. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.d.ts +6 -0
  1070. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js +65 -0
  1071. package/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js.map +1 -0
  1072. package/node_modules/ajv/dist/vocabularies/validation/const.d.ts +6 -0
  1073. package/node_modules/ajv/dist/vocabularies/validation/const.js +25 -0
  1074. package/node_modules/ajv/dist/vocabularies/validation/const.js.map +1 -0
  1075. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.d.ts +5 -0
  1076. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js +12 -0
  1077. package/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js.map +1 -0
  1078. package/node_modules/ajv/dist/vocabularies/validation/enum.d.ts +8 -0
  1079. package/node_modules/ajv/dist/vocabularies/validation/enum.js +48 -0
  1080. package/node_modules/ajv/dist/vocabularies/validation/enum.js.map +1 -0
  1081. package/node_modules/ajv/dist/vocabularies/validation/index.d.ts +16 -0
  1082. package/node_modules/ajv/dist/vocabularies/validation/index.js +33 -0
  1083. package/node_modules/ajv/dist/vocabularies/validation/index.js.map +1 -0
  1084. package/node_modules/ajv/dist/vocabularies/validation/limitContains.d.ts +3 -0
  1085. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js +15 -0
  1086. package/node_modules/ajv/dist/vocabularies/validation/limitContains.js.map +1 -0
  1087. package/node_modules/ajv/dist/vocabularies/validation/limitItems.d.ts +3 -0
  1088. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js +24 -0
  1089. package/node_modules/ajv/dist/vocabularies/validation/limitItems.js.map +1 -0
  1090. package/node_modules/ajv/dist/vocabularies/validation/limitLength.d.ts +3 -0
  1091. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js +27 -0
  1092. package/node_modules/ajv/dist/vocabularies/validation/limitLength.js.map +1 -0
  1093. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.d.ts +11 -0
  1094. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js +27 -0
  1095. package/node_modules/ajv/dist/vocabularies/validation/limitNumber.js.map +1 -0
  1096. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.d.ts +3 -0
  1097. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js +24 -0
  1098. package/node_modules/ajv/dist/vocabularies/validation/limitProperties.js.map +1 -0
  1099. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.d.ts +8 -0
  1100. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js +26 -0
  1101. package/node_modules/ajv/dist/vocabularies/validation/multipleOf.js.map +1 -0
  1102. package/node_modules/ajv/dist/vocabularies/validation/pattern.d.ts +8 -0
  1103. package/node_modules/ajv/dist/vocabularies/validation/pattern.js +33 -0
  1104. package/node_modules/ajv/dist/vocabularies/validation/pattern.js.map +1 -0
  1105. package/node_modules/ajv/dist/vocabularies/validation/required.d.ts +8 -0
  1106. package/node_modules/ajv/dist/vocabularies/validation/required.js +79 -0
  1107. package/node_modules/ajv/dist/vocabularies/validation/required.js.map +1 -0
  1108. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.d.ts +9 -0
  1109. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js +64 -0
  1110. package/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js.map +1 -0
  1111. package/node_modules/ajv/lib/2019.ts +81 -0
  1112. package/node_modules/ajv/lib/2020.ts +75 -0
  1113. package/node_modules/ajv/lib/ajv.ts +70 -0
  1114. package/node_modules/ajv/lib/compile/codegen/code.ts +169 -0
  1115. package/node_modules/ajv/lib/compile/codegen/index.ts +852 -0
  1116. package/node_modules/ajv/lib/compile/codegen/scope.ts +215 -0
  1117. package/node_modules/ajv/lib/compile/errors.ts +184 -0
  1118. package/node_modules/ajv/lib/compile/index.ts +324 -0
  1119. package/node_modules/ajv/lib/compile/jtd/parse.ts +411 -0
  1120. package/node_modules/ajv/lib/compile/jtd/serialize.ts +277 -0
  1121. package/node_modules/ajv/lib/compile/jtd/types.ts +16 -0
  1122. package/node_modules/ajv/lib/compile/names.ts +27 -0
  1123. package/node_modules/ajv/lib/compile/ref_error.ts +13 -0
  1124. package/node_modules/ajv/lib/compile/resolve.ts +149 -0
  1125. package/node_modules/ajv/lib/compile/rules.ts +50 -0
  1126. package/node_modules/ajv/lib/compile/util.ts +213 -0
  1127. package/node_modules/ajv/lib/compile/validate/applicability.ts +22 -0
  1128. package/node_modules/ajv/lib/compile/validate/boolSchema.ts +47 -0
  1129. package/node_modules/ajv/lib/compile/validate/dataType.ts +230 -0
  1130. package/node_modules/ajv/lib/compile/validate/defaults.ts +32 -0
  1131. package/node_modules/ajv/lib/compile/validate/index.ts +582 -0
  1132. package/node_modules/ajv/lib/compile/validate/keyword.ts +171 -0
  1133. package/node_modules/ajv/lib/compile/validate/subschema.ts +135 -0
  1134. package/node_modules/ajv/lib/core.ts +892 -0
  1135. package/node_modules/ajv/lib/jtd.ts +132 -0
  1136. package/node_modules/ajv/lib/refs/data.json +13 -0
  1137. package/node_modules/ajv/lib/refs/json-schema-2019-09/index.ts +28 -0
  1138. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/applicator.json +53 -0
  1139. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/content.json +17 -0
  1140. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/core.json +57 -0
  1141. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/format.json +14 -0
  1142. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/meta-data.json +37 -0
  1143. package/node_modules/ajv/lib/refs/json-schema-2019-09/meta/validation.json +90 -0
  1144. package/node_modules/ajv/lib/refs/json-schema-2019-09/schema.json +39 -0
  1145. package/node_modules/ajv/lib/refs/json-schema-2020-12/index.ts +30 -0
  1146. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/applicator.json +48 -0
  1147. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/content.json +17 -0
  1148. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/core.json +51 -0
  1149. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/format-annotation.json +14 -0
  1150. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/meta-data.json +37 -0
  1151. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/unevaluated.json +15 -0
  1152. package/node_modules/ajv/lib/refs/json-schema-2020-12/meta/validation.json +90 -0
  1153. package/node_modules/ajv/lib/refs/json-schema-2020-12/schema.json +55 -0
  1154. package/node_modules/ajv/lib/refs/json-schema-draft-06.json +137 -0
  1155. package/node_modules/ajv/lib/refs/json-schema-draft-07.json +151 -0
  1156. package/node_modules/ajv/lib/refs/json-schema-secure.json +88 -0
  1157. package/node_modules/ajv/lib/refs/jtd-schema.ts +130 -0
  1158. package/node_modules/ajv/lib/runtime/equal.ts +7 -0
  1159. package/node_modules/ajv/lib/runtime/parseJson.ts +177 -0
  1160. package/node_modules/ajv/lib/runtime/quote.ts +31 -0
  1161. package/node_modules/ajv/lib/runtime/re2.ts +6 -0
  1162. package/node_modules/ajv/lib/runtime/timestamp.ts +46 -0
  1163. package/node_modules/ajv/lib/runtime/ucs2length.ts +20 -0
  1164. package/node_modules/ajv/lib/runtime/uri.ts +6 -0
  1165. package/node_modules/ajv/lib/runtime/validation_error.ts +13 -0
  1166. package/node_modules/ajv/lib/standalone/index.ts +100 -0
  1167. package/node_modules/ajv/lib/standalone/instance.ts +36 -0
  1168. package/node_modules/ajv/lib/types/index.ts +244 -0
  1169. package/node_modules/ajv/lib/types/json-schema.ts +187 -0
  1170. package/node_modules/ajv/lib/types/jtd-schema.ts +273 -0
  1171. package/node_modules/ajv/lib/vocabularies/applicator/additionalItems.ts +56 -0
  1172. package/node_modules/ajv/lib/vocabularies/applicator/additionalProperties.ts +118 -0
  1173. package/node_modules/ajv/lib/vocabularies/applicator/allOf.ts +22 -0
  1174. package/node_modules/ajv/lib/vocabularies/applicator/anyOf.ts +14 -0
  1175. package/node_modules/ajv/lib/vocabularies/applicator/contains.ts +109 -0
  1176. package/node_modules/ajv/lib/vocabularies/applicator/dependencies.ts +112 -0
  1177. package/node_modules/ajv/lib/vocabularies/applicator/dependentSchemas.ts +11 -0
  1178. package/node_modules/ajv/lib/vocabularies/applicator/if.ts +80 -0
  1179. package/node_modules/ajv/lib/vocabularies/applicator/index.ts +53 -0
  1180. package/node_modules/ajv/lib/vocabularies/applicator/items.ts +59 -0
  1181. package/node_modules/ajv/lib/vocabularies/applicator/items2020.ts +36 -0
  1182. package/node_modules/ajv/lib/vocabularies/applicator/not.ts +38 -0
  1183. package/node_modules/ajv/lib/vocabularies/applicator/oneOf.ts +82 -0
  1184. package/node_modules/ajv/lib/vocabularies/applicator/patternProperties.ts +91 -0
  1185. package/node_modules/ajv/lib/vocabularies/applicator/prefixItems.ts +12 -0
  1186. package/node_modules/ajv/lib/vocabularies/applicator/properties.ts +57 -0
  1187. package/node_modules/ajv/lib/vocabularies/applicator/propertyNames.ts +50 -0
  1188. package/node_modules/ajv/lib/vocabularies/applicator/thenElse.ts +13 -0
  1189. package/node_modules/ajv/lib/vocabularies/code.ts +168 -0
  1190. package/node_modules/ajv/lib/vocabularies/core/id.ts +10 -0
  1191. package/node_modules/ajv/lib/vocabularies/core/index.ts +16 -0
  1192. package/node_modules/ajv/lib/vocabularies/core/ref.ts +129 -0
  1193. package/node_modules/ajv/lib/vocabularies/discriminator/index.ts +113 -0
  1194. package/node_modules/ajv/lib/vocabularies/discriminator/types.ts +12 -0
  1195. package/node_modules/ajv/lib/vocabularies/draft2020.ts +23 -0
  1196. package/node_modules/ajv/lib/vocabularies/draft7.ts +17 -0
  1197. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicAnchor.ts +31 -0
  1198. package/node_modules/ajv/lib/vocabularies/dynamic/dynamicRef.ts +51 -0
  1199. package/node_modules/ajv/lib/vocabularies/dynamic/index.ts +9 -0
  1200. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveAnchor.ts +14 -0
  1201. package/node_modules/ajv/lib/vocabularies/dynamic/recursiveRef.ts +10 -0
  1202. package/node_modules/ajv/lib/vocabularies/errors.ts +18 -0
  1203. package/node_modules/ajv/lib/vocabularies/format/format.ts +120 -0
  1204. package/node_modules/ajv/lib/vocabularies/format/index.ts +6 -0
  1205. package/node_modules/ajv/lib/vocabularies/jtd/discriminator.ts +89 -0
  1206. package/node_modules/ajv/lib/vocabularies/jtd/elements.ts +32 -0
  1207. package/node_modules/ajv/lib/vocabularies/jtd/enum.ts +45 -0
  1208. package/node_modules/ajv/lib/vocabularies/jtd/error.ts +23 -0
  1209. package/node_modules/ajv/lib/vocabularies/jtd/index.ts +37 -0
  1210. package/node_modules/ajv/lib/vocabularies/jtd/metadata.ts +24 -0
  1211. package/node_modules/ajv/lib/vocabularies/jtd/nullable.ts +21 -0
  1212. package/node_modules/ajv/lib/vocabularies/jtd/optionalProperties.ts +15 -0
  1213. package/node_modules/ajv/lib/vocabularies/jtd/properties.ts +184 -0
  1214. package/node_modules/ajv/lib/vocabularies/jtd/ref.ts +76 -0
  1215. package/node_modules/ajv/lib/vocabularies/jtd/type.ts +75 -0
  1216. package/node_modules/ajv/lib/vocabularies/jtd/union.ts +12 -0
  1217. package/node_modules/ajv/lib/vocabularies/jtd/values.ts +58 -0
  1218. package/node_modules/ajv/lib/vocabularies/metadata.ts +17 -0
  1219. package/node_modules/ajv/lib/vocabularies/next.ts +8 -0
  1220. package/node_modules/ajv/lib/vocabularies/unevaluated/index.ts +7 -0
  1221. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedItems.ts +47 -0
  1222. package/node_modules/ajv/lib/vocabularies/unevaluated/unevaluatedProperties.ts +85 -0
  1223. package/node_modules/ajv/lib/vocabularies/validation/const.ts +28 -0
  1224. package/node_modules/ajv/lib/vocabularies/validation/dependentRequired.ts +23 -0
  1225. package/node_modules/ajv/lib/vocabularies/validation/enum.ts +54 -0
  1226. package/node_modules/ajv/lib/vocabularies/validation/index.ts +49 -0
  1227. package/node_modules/ajv/lib/vocabularies/validation/limitContains.ts +16 -0
  1228. package/node_modules/ajv/lib/vocabularies/validation/limitItems.ts +26 -0
  1229. package/node_modules/ajv/lib/vocabularies/validation/limitLength.ts +30 -0
  1230. package/node_modules/ajv/lib/vocabularies/validation/limitNumber.ts +42 -0
  1231. package/node_modules/ajv/lib/vocabularies/validation/limitProperties.ts +26 -0
  1232. package/node_modules/ajv/lib/vocabularies/validation/multipleOf.ts +34 -0
  1233. package/node_modules/ajv/lib/vocabularies/validation/pattern.ts +39 -0
  1234. package/node_modules/ajv/lib/vocabularies/validation/required.ts +98 -0
  1235. package/node_modules/ajv/lib/vocabularies/validation/uniqueItems.ts +79 -0
  1236. package/node_modules/ajv/package.json +127 -0
  1237. package/node_modules/ajv-formats/LICENSE +21 -0
  1238. package/node_modules/ajv-formats/README.md +125 -0
  1239. package/node_modules/ajv-formats/dist/formats.d.ts +9 -0
  1240. package/node_modules/ajv-formats/dist/formats.js +208 -0
  1241. package/node_modules/ajv-formats/dist/formats.js.map +1 -0
  1242. package/node_modules/ajv-formats/dist/index.d.ts +15 -0
  1243. package/node_modules/ajv-formats/dist/index.js +37 -0
  1244. package/node_modules/ajv-formats/dist/index.js.map +1 -0
  1245. package/node_modules/ajv-formats/dist/limit.d.ts +10 -0
  1246. package/node_modules/ajv-formats/dist/limit.js +69 -0
  1247. package/node_modules/ajv-formats/dist/limit.js.map +1 -0
  1248. package/node_modules/ajv-formats/package.json +74 -0
  1249. package/node_modules/ajv-formats/src/formats.ts +269 -0
  1250. package/node_modules/ajv-formats/src/index.ts +62 -0
  1251. package/node_modules/ajv-formats/src/limit.ts +99 -0
  1252. package/node_modules/atomic-sleep/.travis.yml +11 -0
  1253. package/node_modules/atomic-sleep/LICENSE +22 -0
  1254. package/node_modules/atomic-sleep/index.js +38 -0
  1255. package/node_modules/atomic-sleep/package.json +37 -0
  1256. package/node_modules/atomic-sleep/readme.md +58 -0
  1257. package/node_modules/atomic-sleep/test.js +47 -0
  1258. package/node_modules/avvio/.borp.yaml +2 -0
  1259. package/node_modules/avvio/.gitattributes +2 -0
  1260. package/node_modules/avvio/.github/dependabot.yml +13 -0
  1261. package/node_modules/avvio/.github/release-drafter.yml +4 -0
  1262. package/node_modules/avvio/.github/workflows/ci.yml +33 -0
  1263. package/node_modules/avvio/LICENSE +24 -0
  1264. package/node_modules/avvio/README.md +700 -0
  1265. package/node_modules/avvio/boot.js +621 -0
  1266. package/node_modules/avvio/eslint.config.js +6 -0
  1267. package/node_modules/avvio/examples/example.js +72 -0
  1268. package/node_modules/avvio/index.d.ts +95 -0
  1269. package/node_modules/avvio/lib/create-promise.js +45 -0
  1270. package/node_modules/avvio/lib/debug.js +19 -0
  1271. package/node_modules/avvio/lib/errors.js +38 -0
  1272. package/node_modules/avvio/lib/execute-with-thenable.js +36 -0
  1273. package/node_modules/avvio/lib/get-plugin-name.js +34 -0
  1274. package/node_modules/avvio/lib/is-bundled-or-typescript-plugin.js +23 -0
  1275. package/node_modules/avvio/lib/is-promise-like.js +17 -0
  1276. package/node_modules/avvio/lib/plugin.js +279 -0
  1277. package/node_modules/avvio/lib/symbols.js +26 -0
  1278. package/node_modules/avvio/lib/thenify.js +60 -0
  1279. package/node_modules/avvio/lib/time-tree.js +200 -0
  1280. package/node_modules/avvio/lib/validate-plugin.js +26 -0
  1281. package/node_modules/avvio/package.json +74 -0
  1282. package/node_modules/avvio/test/after-and-ready.test.js +903 -0
  1283. package/node_modules/avvio/test/after-pass-through.test.js +33 -0
  1284. package/node_modules/avvio/test/after-self-promise.test.js +20 -0
  1285. package/node_modules/avvio/test/after-throw.test.js +26 -0
  1286. package/node_modules/avvio/test/after-use-after.test.js +87 -0
  1287. package/node_modules/avvio/test/async-await.test.js +323 -0
  1288. package/node_modules/avvio/test/await-after.test.js +448 -0
  1289. package/node_modules/avvio/test/await-self.test.js +31 -0
  1290. package/node_modules/avvio/test/await-use.test.js +295 -0
  1291. package/node_modules/avvio/test/basic.test.js +459 -0
  1292. package/node_modules/avvio/test/callbacks.test.js +116 -0
  1293. package/node_modules/avvio/test/catch-override-exception.test.js +27 -0
  1294. package/node_modules/avvio/test/chainable.test.js +70 -0
  1295. package/node_modules/avvio/test/close.test.js +562 -0
  1296. package/node_modules/avvio/test/errors.test.js +26 -0
  1297. package/node_modules/avvio/test/esm.mjs +12 -0
  1298. package/node_modules/avvio/test/esm.test.js +8 -0
  1299. package/node_modules/avvio/test/events-listeners.test.js +23 -0
  1300. package/node_modules/avvio/test/expose.test.js +76 -0
  1301. package/node_modules/avvio/test/fixtures/dummy.txt +1 -0
  1302. package/node_modules/avvio/test/fixtures/esm.mjs +3 -0
  1303. package/node_modules/avvio/test/fixtures/plugin-no-next.js +5 -0
  1304. package/node_modules/avvio/test/gh-issues/bug-205.test.js +17 -0
  1305. package/node_modules/avvio/test/lib/create-promise.test.js +56 -0
  1306. package/node_modules/avvio/test/lib/execute-with-thenable.test.js +86 -0
  1307. package/node_modules/avvio/test/lib/get-plugin-name.test.js +67 -0
  1308. package/node_modules/avvio/test/lib/is-bundled-or-typescript-plugin.test.js +20 -0
  1309. package/node_modules/avvio/test/lib/is-promise-like.test.js +20 -0
  1310. package/node_modules/avvio/test/lib/thenify.test.js +140 -0
  1311. package/node_modules/avvio/test/lib/time-tree.test.js +391 -0
  1312. package/node_modules/avvio/test/lib/validate-plugin.test.js +19 -0
  1313. package/node_modules/avvio/test/load-plugin.test.js +132 -0
  1314. package/node_modules/avvio/test/no-done.test.js +19 -0
  1315. package/node_modules/avvio/test/on-ready-timeout-await.test.js +33 -0
  1316. package/node_modules/avvio/test/override.test.js +385 -0
  1317. package/node_modules/avvio/test/plugin-loaded-so-far.test.js +81 -0
  1318. package/node_modules/avvio/test/plugin-name.test.js +58 -0
  1319. package/node_modules/avvio/test/plugin-timeout-await.test.js +33 -0
  1320. package/node_modules/avvio/test/plugin-timeout.test.js +227 -0
  1321. package/node_modules/avvio/test/pretty-print.test.js +76 -0
  1322. package/node_modules/avvio/test/reentrant.test.js +126 -0
  1323. package/node_modules/avvio/test/symbol-async-dispose.test.js +28 -0
  1324. package/node_modules/avvio/test/to-json.test.js +130 -0
  1325. package/node_modules/avvio/test/twice-done.test.js +23 -0
  1326. package/node_modules/avvio/test/types/index.ts +412 -0
  1327. package/node_modules/avvio/test/types/tsconfig.json +9 -0
  1328. package/node_modules/balanced-match/LICENSE.md +23 -0
  1329. package/node_modules/balanced-match/README.md +57 -0
  1330. package/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
  1331. package/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
  1332. package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
  1333. package/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
  1334. package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
  1335. package/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
  1336. package/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
  1337. package/node_modules/balanced-match/dist/esm/index.js +54 -0
  1338. package/node_modules/balanced-match/dist/esm/index.js.map +1 -0
  1339. package/node_modules/balanced-match/dist/esm/package.json +3 -0
  1340. package/node_modules/balanced-match/package.json +68 -0
  1341. package/node_modules/brace-expansion/LICENSE +23 -0
  1342. package/node_modules/brace-expansion/README.md +94 -0
  1343. package/node_modules/brace-expansion/dist/commonjs/index.d.ts +6 -0
  1344. package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
  1345. package/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
  1346. package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
  1347. package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
  1348. package/node_modules/brace-expansion/dist/esm/index.d.ts +6 -0
  1349. package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
  1350. package/node_modules/brace-expansion/dist/esm/index.js +197 -0
  1351. package/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
  1352. package/node_modules/brace-expansion/dist/esm/package.json +3 -0
  1353. package/node_modules/brace-expansion/package.json +64 -0
  1354. package/node_modules/content-disposition/LICENSE +22 -0
  1355. package/node_modules/content-disposition/README.md +141 -0
  1356. package/node_modules/content-disposition/index.js +536 -0
  1357. package/node_modules/content-disposition/package.json +40 -0
  1358. package/node_modules/cookie/LICENSE +24 -0
  1359. package/node_modules/cookie/README.md +295 -0
  1360. package/node_modules/cookie/dist/index.d.ts +148 -0
  1361. package/node_modules/cookie/dist/index.js +350 -0
  1362. package/node_modules/cookie/dist/index.js.map +1 -0
  1363. package/node_modules/cookie/package.json +47 -0
  1364. package/node_modules/depd/History.md +103 -0
  1365. package/node_modules/depd/LICENSE +22 -0
  1366. package/node_modules/depd/Readme.md +280 -0
  1367. package/node_modules/depd/index.js +538 -0
  1368. package/node_modules/depd/lib/browser/index.js +77 -0
  1369. package/node_modules/depd/package.json +45 -0
  1370. package/node_modules/dequal/dist/index.js +86 -0
  1371. package/node_modules/dequal/dist/index.min.js +1 -0
  1372. package/node_modules/dequal/dist/index.mjs +84 -0
  1373. package/node_modules/dequal/index.d.ts +1 -0
  1374. package/node_modules/dequal/license +21 -0
  1375. package/node_modules/dequal/lite/index.d.ts +1 -0
  1376. package/node_modules/dequal/lite/index.js +31 -0
  1377. package/node_modules/dequal/lite/index.min.js +1 -0
  1378. package/node_modules/dequal/lite/index.mjs +29 -0
  1379. package/node_modules/dequal/package.json +57 -0
  1380. package/node_modules/dequal/readme.md +112 -0
  1381. package/node_modules/escape-html/LICENSE +24 -0
  1382. package/node_modules/escape-html/Readme.md +43 -0
  1383. package/node_modules/escape-html/index.js +78 -0
  1384. package/node_modules/escape-html/package.json +24 -0
  1385. package/node_modules/fast-decode-uri-component/.travis.yml +12 -0
  1386. package/node_modules/fast-decode-uri-component/LICENSE +23 -0
  1387. package/node_modules/fast-decode-uri-component/README.md +43 -0
  1388. package/node_modules/fast-decode-uri-component/bench.js +35 -0
  1389. package/node_modules/fast-decode-uri-component/index.js +115 -0
  1390. package/node_modules/fast-decode-uri-component/package.json +33 -0
  1391. package/node_modules/fast-decode-uri-component/test.js +32 -0
  1392. package/node_modules/fast-deep-equal/LICENSE +21 -0
  1393. package/node_modules/fast-deep-equal/README.md +96 -0
  1394. package/node_modules/fast-deep-equal/es6/index.d.ts +2 -0
  1395. package/node_modules/fast-deep-equal/es6/index.js +72 -0
  1396. package/node_modules/fast-deep-equal/es6/react.d.ts +2 -0
  1397. package/node_modules/fast-deep-equal/es6/react.js +79 -0
  1398. package/node_modules/fast-deep-equal/index.d.ts +4 -0
  1399. package/node_modules/fast-deep-equal/index.js +46 -0
  1400. package/node_modules/fast-deep-equal/package.json +61 -0
  1401. package/node_modules/fast-deep-equal/react.d.ts +2 -0
  1402. package/node_modules/fast-deep-equal/react.js +53 -0
  1403. package/node_modules/fast-json-stringify/.gitattributes +2 -0
  1404. package/node_modules/fast-json-stringify/.github/dependabot.yml +13 -0
  1405. package/node_modules/fast-json-stringify/.github/workflows/ci.yml +33 -0
  1406. package/node_modules/fast-json-stringify/.github/workflows/lock-threads.yml +19 -0
  1407. package/node_modules/fast-json-stringify/LICENSE +22 -0
  1408. package/node_modules/fast-json-stringify/README.md +742 -0
  1409. package/node_modules/fast-json-stringify/benchmark/bench-cmp-branch.js +116 -0
  1410. package/node_modules/fast-json-stringify/benchmark/bench-cmp-lib.js +339 -0
  1411. package/node_modules/fast-json-stringify/benchmark/bench-thread.js +33 -0
  1412. package/node_modules/fast-json-stringify/benchmark/bench.js +391 -0
  1413. package/node_modules/fast-json-stringify/build/build-schema-validator.js +26 -0
  1414. package/node_modules/fast-json-stringify/eslint.config.js +9 -0
  1415. package/node_modules/fast-json-stringify/examples/example.js +81 -0
  1416. package/node_modules/fast-json-stringify/examples/server.js +42 -0
  1417. package/node_modules/fast-json-stringify/index.js +1312 -0
  1418. package/node_modules/fast-json-stringify/lib/location.js +24 -0
  1419. package/node_modules/fast-json-stringify/lib/merge-schemas.js +9 -0
  1420. package/node_modules/fast-json-stringify/lib/schema-validator.js +1134 -0
  1421. package/node_modules/fast-json-stringify/lib/serializer.js +141 -0
  1422. package/node_modules/fast-json-stringify/lib/standalone.js +34 -0
  1423. package/node_modules/fast-json-stringify/lib/validator.js +96 -0
  1424. package/node_modules/fast-json-stringify/package.json +89 -0
  1425. package/node_modules/fast-json-stringify/test/additionalProperties.test.js +332 -0
  1426. package/node_modules/fast-json-stringify/test/allof.test.js +751 -0
  1427. package/node_modules/fast-json-stringify/test/any.test.js +231 -0
  1428. package/node_modules/fast-json-stringify/test/anyof.test.js +812 -0
  1429. package/node_modules/fast-json-stringify/test/array.test.js +688 -0
  1430. package/node_modules/fast-json-stringify/test/asNumber.test.js +13 -0
  1431. package/node_modules/fast-json-stringify/test/basic.test.js +400 -0
  1432. package/node_modules/fast-json-stringify/test/bigint.test.js +76 -0
  1433. package/node_modules/fast-json-stringify/test/clean-cache.test.js +47 -0
  1434. package/node_modules/fast-json-stringify/test/const.test.js +314 -0
  1435. package/node_modules/fast-json-stringify/test/date.test.js +639 -0
  1436. package/node_modules/fast-json-stringify/test/debug-mode.test.js +142 -0
  1437. package/node_modules/fast-json-stringify/test/defaults.test.js +376 -0
  1438. package/node_modules/fast-json-stringify/test/enum.test.js +37 -0
  1439. package/node_modules/fast-json-stringify/test/fix-604.test.js +25 -0
  1440. package/node_modules/fast-json-stringify/test/fixtures/.keep +0 -0
  1441. package/node_modules/fast-json-stringify/test/if-then-else.test.js +540 -0
  1442. package/node_modules/fast-json-stringify/test/inferType.test.js +92 -0
  1443. package/node_modules/fast-json-stringify/test/infinity.test.js +55 -0
  1444. package/node_modules/fast-json-stringify/test/integer.test.js +194 -0
  1445. package/node_modules/fast-json-stringify/test/invalidSchema.test.js +38 -0
  1446. package/node_modules/fast-json-stringify/test/issue-479.test.js +57 -0
  1447. package/node_modules/fast-json-stringify/test/issue-793.test.js +107 -0
  1448. package/node_modules/fast-json-stringify/test/issue-794.test.js +177 -0
  1449. package/node_modules/fast-json-stringify/test/issue-836.test.js +183 -0
  1450. package/node_modules/fast-json-stringify/test/json-add-comma.test.js +57 -0
  1451. package/node_modules/fast-json-stringify/test/json-schema-test-suite/README.md +10 -0
  1452. package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft4/required.json +54 -0
  1453. package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft4.test.js +12 -0
  1454. package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft6/required.json +70 -0
  1455. package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft6.test.js +12 -0
  1456. package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft7/required.json +70 -0
  1457. package/node_modules/fast-json-stringify/test/json-schema-test-suite/draft7.test.js +12 -0
  1458. package/node_modules/fast-json-stringify/test/json-schema-test-suite/util.js +31 -0
  1459. package/node_modules/fast-json-stringify/test/missing-values.test.js +88 -0
  1460. package/node_modules/fast-json-stringify/test/multi-type-serializer.test.js +19 -0
  1461. package/node_modules/fast-json-stringify/test/nestedObjects.test.js +63 -0
  1462. package/node_modules/fast-json-stringify/test/nullable.test.js +543 -0
  1463. package/node_modules/fast-json-stringify/test/oneof.test.js +510 -0
  1464. package/node_modules/fast-json-stringify/test/patternProperties.test.js +168 -0
  1465. package/node_modules/fast-json-stringify/test/recursion.test.js +245 -0
  1466. package/node_modules/fast-json-stringify/test/ref.json +12 -0
  1467. package/node_modules/fast-json-stringify/test/ref.test.js +2077 -0
  1468. package/node_modules/fast-json-stringify/test/regex.test.js +32 -0
  1469. package/node_modules/fast-json-stringify/test/required.test.js +204 -0
  1470. package/node_modules/fast-json-stringify/test/requiresAjv.test.js +50 -0
  1471. package/node_modules/fast-json-stringify/test/sanitize.test.js +141 -0
  1472. package/node_modules/fast-json-stringify/test/sanitize2.test.js +18 -0
  1473. package/node_modules/fast-json-stringify/test/sanitize3.test.js +17 -0
  1474. package/node_modules/fast-json-stringify/test/sanitize4.test.js +16 -0
  1475. package/node_modules/fast-json-stringify/test/sanitize5.test.js +16 -0
  1476. package/node_modules/fast-json-stringify/test/sanitize6.test.js +22 -0
  1477. package/node_modules/fast-json-stringify/test/sanitize7.test.js +68 -0
  1478. package/node_modules/fast-json-stringify/test/side-effect.test.js +196 -0
  1479. package/node_modules/fast-json-stringify/test/standalone-mode.test.js +219 -0
  1480. package/node_modules/fast-json-stringify/test/string.test.js +84 -0
  1481. package/node_modules/fast-json-stringify/test/surrogate.test.js +67 -0
  1482. package/node_modules/fast-json-stringify/test/toJSON.test.js +203 -0
  1483. package/node_modules/fast-json-stringify/test/typebox.test.js +36 -0
  1484. package/node_modules/fast-json-stringify/test/typesArray.test.js +550 -0
  1485. package/node_modules/fast-json-stringify/test/unknownFormats.test.js +27 -0
  1486. package/node_modules/fast-json-stringify/test/webpack.test.js +50 -0
  1487. package/node_modules/fast-json-stringify/types/index.d.ts +231 -0
  1488. package/node_modules/fast-json-stringify/types/index.tst.ts +259 -0
  1489. package/node_modules/fast-querystring/LICENSE +25 -0
  1490. package/node_modules/fast-querystring/README.md +114 -0
  1491. package/node_modules/fast-querystring/lib/index.d.ts +14 -0
  1492. package/node_modules/fast-querystring/lib/index.js +20 -0
  1493. package/node_modules/fast-querystring/lib/internals/querystring.js +96 -0
  1494. package/node_modules/fast-querystring/lib/parse.js +126 -0
  1495. package/node_modules/fast-querystring/lib/stringify.js +69 -0
  1496. package/node_modules/fast-querystring/package.json +56 -0
  1497. package/node_modules/fast-uri/.gitattributes +2 -0
  1498. package/node_modules/fast-uri/.github/dependabot.yml +13 -0
  1499. package/node_modules/fast-uri/.github/workflows/ci.yml +106 -0
  1500. package/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  1501. package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +24 -0
  1502. package/node_modules/fast-uri/LICENSE +30 -0
  1503. package/node_modules/fast-uri/README.md +152 -0
  1504. package/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
  1505. package/node_modules/fast-uri/benchmark/equal.mjs +51 -0
  1506. package/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
  1507. package/node_modules/fast-uri/benchmark/package.json +17 -0
  1508. package/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
  1509. package/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
  1510. package/node_modules/fast-uri/eslint.config.js +6 -0
  1511. package/node_modules/fast-uri/index.js +406 -0
  1512. package/node_modules/fast-uri/lib/schemes.js +267 -0
  1513. package/node_modules/fast-uri/lib/utils.js +443 -0
  1514. package/node_modules/fast-uri/package.json +68 -0
  1515. package/node_modules/fast-uri/test/ajv.test.js +43 -0
  1516. package/node_modules/fast-uri/test/equal.test.js +117 -0
  1517. package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
  1518. package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
  1519. package/node_modules/fast-uri/test/parse.test.js +323 -0
  1520. package/node_modules/fast-uri/test/resolve.test.js +87 -0
  1521. package/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
  1522. package/node_modules/fast-uri/test/security-normalization.test.js +39 -0
  1523. package/node_modules/fast-uri/test/security.test.js +133 -0
  1524. package/node_modules/fast-uri/test/serialize.test.js +151 -0
  1525. package/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
  1526. package/node_modules/fast-uri/test/uri-js.test.js +912 -0
  1527. package/node_modules/fast-uri/test/util.test.js +38 -0
  1528. package/node_modules/fast-uri/tsconfig.json +9 -0
  1529. package/node_modules/fast-uri/types/index.d.ts +60 -0
  1530. package/node_modules/fast-uri/types/index.test-d.ts +17 -0
  1531. package/node_modules/fastify/.borp.yaml +3 -0
  1532. package/node_modules/fastify/.markdownlint-cli2.yaml +22 -0
  1533. package/node_modules/fastify/.prettierignore +1 -0
  1534. package/node_modules/fastify/GOVERNANCE.md +4 -0
  1535. package/node_modules/fastify/LICENSE +21 -0
  1536. package/node_modules/fastify/PROJECT_CHARTER.md +126 -0
  1537. package/node_modules/fastify/README.md +423 -0
  1538. package/node_modules/fastify/SECURITY.md +220 -0
  1539. package/node_modules/fastify/SPONSORS.md +24 -0
  1540. package/node_modules/fastify/build/build-error-serializer.js +35 -0
  1541. package/node_modules/fastify/build/build-validation.js +169 -0
  1542. package/node_modules/fastify/build/sync-version.js +11 -0
  1543. package/node_modules/fastify/docs/Guides/Benchmarking.md +60 -0
  1544. package/node_modules/fastify/docs/Guides/Database.md +321 -0
  1545. package/node_modules/fastify/docs/Guides/Delay-Accepting-Requests.md +608 -0
  1546. package/node_modules/fastify/docs/Guides/Detecting-When-Clients-Abort.md +172 -0
  1547. package/node_modules/fastify/docs/Guides/Ecosystem.md +730 -0
  1548. package/node_modules/fastify/docs/Guides/Fluent-Schema.md +127 -0
  1549. package/node_modules/fastify/docs/Guides/Getting-Started.md +620 -0
  1550. package/node_modules/fastify/docs/Guides/Index.md +43 -0
  1551. package/node_modules/fastify/docs/Guides/Migration-Guide-V3.md +287 -0
  1552. package/node_modules/fastify/docs/Guides/Migration-Guide-V4.md +267 -0
  1553. package/node_modules/fastify/docs/Guides/Migration-Guide-V5.md +727 -0
  1554. package/node_modules/fastify/docs/Guides/Plugins-Guide.md +520 -0
  1555. package/node_modules/fastify/docs/Guides/Prototype-Poisoning.md +383 -0
  1556. package/node_modules/fastify/docs/Guides/Recommendations.md +378 -0
  1557. package/node_modules/fastify/docs/Guides/Serverless.md +604 -0
  1558. package/node_modules/fastify/docs/Guides/Style-Guide.md +246 -0
  1559. package/node_modules/fastify/docs/Guides/Testing.md +481 -0
  1560. package/node_modules/fastify/docs/Guides/Write-Plugin.md +103 -0
  1561. package/node_modules/fastify/docs/Guides/Write-Type-Provider.md +34 -0
  1562. package/node_modules/fastify/docs/Reference/ContentTypeParser.md +271 -0
  1563. package/node_modules/fastify/docs/Reference/Decorators.md +436 -0
  1564. package/node_modules/fastify/docs/Reference/Encapsulation.md +194 -0
  1565. package/node_modules/fastify/docs/Reference/Errors.md +377 -0
  1566. package/node_modules/fastify/docs/Reference/HTTP2.md +94 -0
  1567. package/node_modules/fastify/docs/Reference/Hooks.md +958 -0
  1568. package/node_modules/fastify/docs/Reference/Index.md +73 -0
  1569. package/node_modules/fastify/docs/Reference/LTS.md +86 -0
  1570. package/node_modules/fastify/docs/Reference/Lifecycle.md +99 -0
  1571. package/node_modules/fastify/docs/Reference/Logging.md +268 -0
  1572. package/node_modules/fastify/docs/Reference/Middleware.md +79 -0
  1573. package/node_modules/fastify/docs/Reference/Plugins.md +245 -0
  1574. package/node_modules/fastify/docs/Reference/Principles.md +73 -0
  1575. package/node_modules/fastify/docs/Reference/Reply.md +1001 -0
  1576. package/node_modules/fastify/docs/Reference/Request.md +295 -0
  1577. package/node_modules/fastify/docs/Reference/Routes.md +802 -0
  1578. package/node_modules/fastify/docs/Reference/Server.md +2389 -0
  1579. package/node_modules/fastify/docs/Reference/Type-Providers.md +256 -0
  1580. package/node_modules/fastify/docs/Reference/TypeScript.md +1729 -0
  1581. package/node_modules/fastify/docs/Reference/Validation-and-Serialization.md +1130 -0
  1582. package/node_modules/fastify/docs/Reference/Warnings.md +58 -0
  1583. package/node_modules/fastify/docs/index.md +24 -0
  1584. package/node_modules/fastify/docs/resources/encapsulation_context.drawio +1 -0
  1585. package/node_modules/fastify/docs/resources/encapsulation_context.svg +3 -0
  1586. package/node_modules/fastify/eslint.config.js +35 -0
  1587. package/node_modules/fastify/examples/asyncawait.js +38 -0
  1588. package/node_modules/fastify/examples/benchmark/body.json +3 -0
  1589. package/node_modules/fastify/examples/benchmark/hooks-benchmark-async-await.js +44 -0
  1590. package/node_modules/fastify/examples/benchmark/hooks-benchmark.js +52 -0
  1591. package/node_modules/fastify/examples/benchmark/parser.js +47 -0
  1592. package/node_modules/fastify/examples/benchmark/simple.js +30 -0
  1593. package/node_modules/fastify/examples/benchmark/webstream.js +27 -0
  1594. package/node_modules/fastify/examples/hooks.js +91 -0
  1595. package/node_modules/fastify/examples/http2.js +39 -0
  1596. package/node_modules/fastify/examples/https.js +38 -0
  1597. package/node_modules/fastify/examples/parser.js +53 -0
  1598. package/node_modules/fastify/examples/plugin.js +12 -0
  1599. package/node_modules/fastify/examples/route-prefix.js +38 -0
  1600. package/node_modules/fastify/examples/shared-schema.js +38 -0
  1601. package/node_modules/fastify/examples/simple-stream.js +20 -0
  1602. package/node_modules/fastify/examples/simple.js +32 -0
  1603. package/node_modules/fastify/examples/simple.mjs +27 -0
  1604. package/node_modules/fastify/examples/typescript-server.ts +79 -0
  1605. package/node_modules/fastify/examples/use-plugin.js +29 -0
  1606. package/node_modules/fastify/fastify.d.ts +253 -0
  1607. package/node_modules/fastify/fastify.js +985 -0
  1608. package/node_modules/fastify/integration/server.js +29 -0
  1609. package/node_modules/fastify/integration/test.sh +23 -0
  1610. package/node_modules/fastify/lib/config-validator.js +1266 -0
  1611. package/node_modules/fastify/lib/content-type-parser.js +413 -0
  1612. package/node_modules/fastify/lib/content-type.js +160 -0
  1613. package/node_modules/fastify/lib/context.js +98 -0
  1614. package/node_modules/fastify/lib/decorate.js +152 -0
  1615. package/node_modules/fastify/lib/error-handler.js +173 -0
  1616. package/node_modules/fastify/lib/error-serializer.js +134 -0
  1617. package/node_modules/fastify/lib/error-status.js +14 -0
  1618. package/node_modules/fastify/lib/errors.js +516 -0
  1619. package/node_modules/fastify/lib/four-oh-four.js +190 -0
  1620. package/node_modules/fastify/lib/handle-request.js +195 -0
  1621. package/node_modules/fastify/lib/head-route.js +45 -0
  1622. package/node_modules/fastify/lib/hooks.js +429 -0
  1623. package/node_modules/fastify/lib/initial-config-validation.js +37 -0
  1624. package/node_modules/fastify/lib/logger-factory.js +136 -0
  1625. package/node_modules/fastify/lib/logger-pino.js +68 -0
  1626. package/node_modules/fastify/lib/noop-set.js +10 -0
  1627. package/node_modules/fastify/lib/plugin-override.js +90 -0
  1628. package/node_modules/fastify/lib/plugin-utils.js +169 -0
  1629. package/node_modules/fastify/lib/promise.js +23 -0
  1630. package/node_modules/fastify/lib/reply.js +1030 -0
  1631. package/node_modules/fastify/lib/req-id-gen-factory.js +52 -0
  1632. package/node_modules/fastify/lib/request.js +387 -0
  1633. package/node_modules/fastify/lib/route.js +686 -0
  1634. package/node_modules/fastify/lib/schema-controller.js +164 -0
  1635. package/node_modules/fastify/lib/schemas.js +207 -0
  1636. package/node_modules/fastify/lib/server.js +441 -0
  1637. package/node_modules/fastify/lib/symbols.js +71 -0
  1638. package/node_modules/fastify/lib/validation.js +280 -0
  1639. package/node_modules/fastify/lib/warnings.js +57 -0
  1640. package/node_modules/fastify/lib/wrap-thenable.js +84 -0
  1641. package/node_modules/fastify/package.json +225 -0
  1642. package/node_modules/fastify/scripts/validate-ecosystem-links.js +179 -0
  1643. package/node_modules/fastify/test/404s.test.js +2035 -0
  1644. package/node_modules/fastify/test/500s.test.js +422 -0
  1645. package/node_modules/fastify/test/allow-unsafe-regex.test.js +92 -0
  1646. package/node_modules/fastify/test/als.test.js +65 -0
  1647. package/node_modules/fastify/test/async-await.test.js +705 -0
  1648. package/node_modules/fastify/test/async-dispose.test.js +20 -0
  1649. package/node_modules/fastify/test/async_hooks.test.js +52 -0
  1650. package/node_modules/fastify/test/body-limit.test.js +224 -0
  1651. package/node_modules/fastify/test/buffer.test.js +74 -0
  1652. package/node_modules/fastify/test/build/error-serializer.test.js +36 -0
  1653. package/node_modules/fastify/test/build/version.test.js +14 -0
  1654. package/node_modules/fastify/test/build-certificate.js +109 -0
  1655. package/node_modules/fastify/test/bundler/README.md +29 -0
  1656. package/node_modules/fastify/test/bundler/esbuild/bundler-test.js +32 -0
  1657. package/node_modules/fastify/test/bundler/esbuild/package.json +10 -0
  1658. package/node_modules/fastify/test/bundler/esbuild/src/fail-plugin-version.js +14 -0
  1659. package/node_modules/fastify/test/bundler/esbuild/src/index.js +9 -0
  1660. package/node_modules/fastify/test/bundler/webpack/bundler-test.js +32 -0
  1661. package/node_modules/fastify/test/bundler/webpack/package.json +11 -0
  1662. package/node_modules/fastify/test/bundler/webpack/src/fail-plugin-version.js +14 -0
  1663. package/node_modules/fastify/test/bundler/webpack/src/index.js +9 -0
  1664. package/node_modules/fastify/test/bundler/webpack/webpack.config.js +15 -0
  1665. package/node_modules/fastify/test/case-insensitive.test.js +102 -0
  1666. package/node_modules/fastify/test/chainable.test.js +40 -0
  1667. package/node_modules/fastify/test/child-logger-factory.test.js +128 -0
  1668. package/node_modules/fastify/test/client-timeout.test.js +38 -0
  1669. package/node_modules/fastify/test/close-pipelining.test.js +78 -0
  1670. package/node_modules/fastify/test/close.test.js +706 -0
  1671. package/node_modules/fastify/test/conditional-pino.test.js +47 -0
  1672. package/node_modules/fastify/test/connection-timeout.test.js +42 -0
  1673. package/node_modules/fastify/test/constrained-routes.test.js +1138 -0
  1674. package/node_modules/fastify/test/content-length.test.js +174 -0
  1675. package/node_modules/fastify/test/content-parser.test.js +739 -0
  1676. package/node_modules/fastify/test/content-type.test.js +181 -0
  1677. package/node_modules/fastify/test/context-config.test.js +164 -0
  1678. package/node_modules/fastify/test/custom-http-server.test.js +118 -0
  1679. package/node_modules/fastify/test/custom-parser-async.test.js +59 -0
  1680. package/node_modules/fastify/test/custom-parser.0.test.js +701 -0
  1681. package/node_modules/fastify/test/custom-parser.1.test.js +266 -0
  1682. package/node_modules/fastify/test/custom-parser.2.test.js +91 -0
  1683. package/node_modules/fastify/test/custom-parser.3.test.js +208 -0
  1684. package/node_modules/fastify/test/custom-parser.4.test.js +218 -0
  1685. package/node_modules/fastify/test/custom-parser.5.test.js +130 -0
  1686. package/node_modules/fastify/test/custom-querystring-parser.test.js +129 -0
  1687. package/node_modules/fastify/test/decorator.test.js +1330 -0
  1688. package/node_modules/fastify/test/delete.test.js +344 -0
  1689. package/node_modules/fastify/test/diagnostics-channel/404.test.js +49 -0
  1690. package/node_modules/fastify/test/diagnostics-channel/async-delay-request.test.js +65 -0
  1691. package/node_modules/fastify/test/diagnostics-channel/async-request.test.js +64 -0
  1692. package/node_modules/fastify/test/diagnostics-channel/error-before-handler.test.js +35 -0
  1693. package/node_modules/fastify/test/diagnostics-channel/error-request.test.js +53 -0
  1694. package/node_modules/fastify/test/diagnostics-channel/error-status.test.js +123 -0
  1695. package/node_modules/fastify/test/diagnostics-channel/init.test.js +50 -0
  1696. package/node_modules/fastify/test/diagnostics-channel/sync-delay-request.test.js +49 -0
  1697. package/node_modules/fastify/test/diagnostics-channel/sync-request-reply.test.js +51 -0
  1698. package/node_modules/fastify/test/diagnostics-channel/sync-request.test.js +54 -0
  1699. package/node_modules/fastify/test/encapsulated-child-logger-factory.test.js +69 -0
  1700. package/node_modules/fastify/test/encapsulated-error-handler.test.js +237 -0
  1701. package/node_modules/fastify/test/esm/errorCodes.test.mjs +10 -0
  1702. package/node_modules/fastify/test/esm/esm.test.mjs +13 -0
  1703. package/node_modules/fastify/test/esm/index.test.js +8 -0
  1704. package/node_modules/fastify/test/esm/named-exports.mjs +14 -0
  1705. package/node_modules/fastify/test/esm/other.mjs +8 -0
  1706. package/node_modules/fastify/test/esm/plugin.mjs +8 -0
  1707. package/node_modules/fastify/test/fastify-instance.test.js +300 -0
  1708. package/node_modules/fastify/test/find-route.test.js +152 -0
  1709. package/node_modules/fastify/test/fluent-schema.test.js +209 -0
  1710. package/node_modules/fastify/test/genReqId.test.js +426 -0
  1711. package/node_modules/fastify/test/handler-context.test.js +45 -0
  1712. package/node_modules/fastify/test/handler-timeout.test.js +367 -0
  1713. package/node_modules/fastify/test/has-route.test.js +88 -0
  1714. package/node_modules/fastify/test/header-overflow.test.js +55 -0
  1715. package/node_modules/fastify/test/helper.js +496 -0
  1716. package/node_modules/fastify/test/hooks-async.test.js +1099 -0
  1717. package/node_modules/fastify/test/hooks.on-listen.test.js +1162 -0
  1718. package/node_modules/fastify/test/hooks.on-ready.test.js +421 -0
  1719. package/node_modules/fastify/test/hooks.test.js +3578 -0
  1720. package/node_modules/fastify/test/http-methods/copy.test.js +35 -0
  1721. package/node_modules/fastify/test/http-methods/custom-http-methods.test.js +114 -0
  1722. package/node_modules/fastify/test/http-methods/get.test.js +412 -0
  1723. package/node_modules/fastify/test/http-methods/head.test.js +263 -0
  1724. package/node_modules/fastify/test/http-methods/lock.test.js +108 -0
  1725. package/node_modules/fastify/test/http-methods/mkcalendar.test.js +143 -0
  1726. package/node_modules/fastify/test/http-methods/mkcol.test.js +35 -0
  1727. package/node_modules/fastify/test/http-methods/move.test.js +42 -0
  1728. package/node_modules/fastify/test/http-methods/propfind.test.js +136 -0
  1729. package/node_modules/fastify/test/http-methods/proppatch.test.js +105 -0
  1730. package/node_modules/fastify/test/http-methods/report.test.js +142 -0
  1731. package/node_modules/fastify/test/http-methods/search.test.js +233 -0
  1732. package/node_modules/fastify/test/http-methods/trace.test.js +21 -0
  1733. package/node_modules/fastify/test/http-methods/unlock.test.js +38 -0
  1734. package/node_modules/fastify/test/http2/closing.test.js +270 -0
  1735. package/node_modules/fastify/test/http2/constraint.test.js +109 -0
  1736. package/node_modules/fastify/test/http2/head.test.js +34 -0
  1737. package/node_modules/fastify/test/http2/plain.test.js +68 -0
  1738. package/node_modules/fastify/test/http2/secure-with-fallback.test.js +113 -0
  1739. package/node_modules/fastify/test/http2/secure.test.js +67 -0
  1740. package/node_modules/fastify/test/http2/unknown-http-method.test.js +34 -0
  1741. package/node_modules/fastify/test/https/custom-https-server.test.js +58 -0
  1742. package/node_modules/fastify/test/https/https.test.js +136 -0
  1743. package/node_modules/fastify/test/imports.test.js +17 -0
  1744. package/node_modules/fastify/test/inject.test.js +502 -0
  1745. package/node_modules/fastify/test/input-validation.js +335 -0
  1746. package/node_modules/fastify/test/internals/all.test.js +38 -0
  1747. package/node_modules/fastify/test/internals/content-type-parser.test.js +111 -0
  1748. package/node_modules/fastify/test/internals/context.test.js +31 -0
  1749. package/node_modules/fastify/test/internals/decorator.test.js +156 -0
  1750. package/node_modules/fastify/test/internals/errors.test.js +982 -0
  1751. package/node_modules/fastify/test/internals/handle-request.test.js +270 -0
  1752. package/node_modules/fastify/test/internals/hook-runner.test.js +449 -0
  1753. package/node_modules/fastify/test/internals/hooks.test.js +96 -0
  1754. package/node_modules/fastify/test/internals/initial-config.test.js +383 -0
  1755. package/node_modules/fastify/test/internals/logger.test.js +163 -0
  1756. package/node_modules/fastify/test/internals/plugin.test.js +170 -0
  1757. package/node_modules/fastify/test/internals/promise.test.js +63 -0
  1758. package/node_modules/fastify/test/internals/reply-serialize.test.js +714 -0
  1759. package/node_modules/fastify/test/internals/reply.test.js +1920 -0
  1760. package/node_modules/fastify/test/internals/req-id-gen-factory.test.js +133 -0
  1761. package/node_modules/fastify/test/internals/request-validate.test.js +1402 -0
  1762. package/node_modules/fastify/test/internals/request.test.js +506 -0
  1763. package/node_modules/fastify/test/internals/schema-controller-perf.test.js +40 -0
  1764. package/node_modules/fastify/test/internals/server.test.js +91 -0
  1765. package/node_modules/fastify/test/internals/validation.test.js +352 -0
  1766. package/node_modules/fastify/test/issue-4959.test.js +118 -0
  1767. package/node_modules/fastify/test/keep-alive-timeout.test.js +42 -0
  1768. package/node_modules/fastify/test/listen.1.test.js +154 -0
  1769. package/node_modules/fastify/test/listen.2.test.js +113 -0
  1770. package/node_modules/fastify/test/listen.3.test.js +83 -0
  1771. package/node_modules/fastify/test/listen.4.test.js +168 -0
  1772. package/node_modules/fastify/test/listen.5.test.js +122 -0
  1773. package/node_modules/fastify/test/logger/instantiation.test.js +341 -0
  1774. package/node_modules/fastify/test/logger/logger-test-utils.js +47 -0
  1775. package/node_modules/fastify/test/logger/logging.test.js +460 -0
  1776. package/node_modules/fastify/test/logger/options.test.js +579 -0
  1777. package/node_modules/fastify/test/logger/request.test.js +292 -0
  1778. package/node_modules/fastify/test/logger/response.test.js +183 -0
  1779. package/node_modules/fastify/test/logger/tap-parallel-not-ok +0 -0
  1780. package/node_modules/fastify/test/max-requests-per-socket.test.js +113 -0
  1781. package/node_modules/fastify/test/middleware.test.js +37 -0
  1782. package/node_modules/fastify/test/noop-set.test.js +19 -0
  1783. package/node_modules/fastify/test/nullable-validation.test.js +187 -0
  1784. package/node_modules/fastify/test/options.error-handler.test.js +5 -0
  1785. package/node_modules/fastify/test/options.test.js +5 -0
  1786. package/node_modules/fastify/test/output-validation.test.js +140 -0
  1787. package/node_modules/fastify/test/patch.error-handler.test.js +5 -0
  1788. package/node_modules/fastify/test/patch.test.js +5 -0
  1789. package/node_modules/fastify/test/plugin.1.test.js +230 -0
  1790. package/node_modules/fastify/test/plugin.2.test.js +314 -0
  1791. package/node_modules/fastify/test/plugin.3.test.js +287 -0
  1792. package/node_modules/fastify/test/plugin.4.test.js +504 -0
  1793. package/node_modules/fastify/test/plugin.helper.js +8 -0
  1794. package/node_modules/fastify/test/plugin.name.display.js +10 -0
  1795. package/node_modules/fastify/test/post-empty-body.test.js +38 -0
  1796. package/node_modules/fastify/test/pretty-print.test.js +366 -0
  1797. package/node_modules/fastify/test/promises.test.js +125 -0
  1798. package/node_modules/fastify/test/proto-poisoning.test.js +145 -0
  1799. package/node_modules/fastify/test/put.error-handler.test.js +5 -0
  1800. package/node_modules/fastify/test/put.test.js +5 -0
  1801. package/node_modules/fastify/test/register.test.js +184 -0
  1802. package/node_modules/fastify/test/reply-code.test.js +148 -0
  1803. package/node_modules/fastify/test/reply-early-hints.test.js +100 -0
  1804. package/node_modules/fastify/test/reply-error.test.js +815 -0
  1805. package/node_modules/fastify/test/reply-trailers.test.js +445 -0
  1806. package/node_modules/fastify/test/reply-web-stream-locked.test.js +37 -0
  1807. package/node_modules/fastify/test/request-error.test.js +624 -0
  1808. package/node_modules/fastify/test/request-header-host.test.js +339 -0
  1809. package/node_modules/fastify/test/request-id.test.js +118 -0
  1810. package/node_modules/fastify/test/request-port.test.js +72 -0
  1811. package/node_modules/fastify/test/request-timeout.test.js +53 -0
  1812. package/node_modules/fastify/test/route-hooks.test.js +635 -0
  1813. package/node_modules/fastify/test/route-prefix.test.js +904 -0
  1814. package/node_modules/fastify/test/route-shorthand.test.js +48 -0
  1815. package/node_modules/fastify/test/route.1.test.js +259 -0
  1816. package/node_modules/fastify/test/route.2.test.js +100 -0
  1817. package/node_modules/fastify/test/route.3.test.js +213 -0
  1818. package/node_modules/fastify/test/route.4.test.js +127 -0
  1819. package/node_modules/fastify/test/route.5.test.js +211 -0
  1820. package/node_modules/fastify/test/route.6.test.js +306 -0
  1821. package/node_modules/fastify/test/route.7.test.js +406 -0
  1822. package/node_modules/fastify/test/route.8.test.js +225 -0
  1823. package/node_modules/fastify/test/router-options.test.js +1108 -0
  1824. package/node_modules/fastify/test/same-shape.test.js +124 -0
  1825. package/node_modules/fastify/test/schema-examples.test.js +661 -0
  1826. package/node_modules/fastify/test/schema-feature.test.js +2198 -0
  1827. package/node_modules/fastify/test/schema-serialization.test.js +1171 -0
  1828. package/node_modules/fastify/test/schema-special-usage.test.js +1348 -0
  1829. package/node_modules/fastify/test/schema-validation.test.js +1593 -0
  1830. package/node_modules/fastify/test/scripts/validate-ecosystem-links.test.js +339 -0
  1831. package/node_modules/fastify/test/serialize-response.test.js +186 -0
  1832. package/node_modules/fastify/test/server.test.js +347 -0
  1833. package/node_modules/fastify/test/set-error-handler.test.js +69 -0
  1834. package/node_modules/fastify/test/skip-reply-send.test.js +317 -0
  1835. package/node_modules/fastify/test/stream-serializers.test.js +40 -0
  1836. package/node_modules/fastify/test/stream.1.test.js +94 -0
  1837. package/node_modules/fastify/test/stream.2.test.js +129 -0
  1838. package/node_modules/fastify/test/stream.3.test.js +198 -0
  1839. package/node_modules/fastify/test/stream.4.test.js +176 -0
  1840. package/node_modules/fastify/test/stream.5.test.js +188 -0
  1841. package/node_modules/fastify/test/sync-routes.test.js +32 -0
  1842. package/node_modules/fastify/test/throw.test.js +359 -0
  1843. package/node_modules/fastify/test/toolkit.js +63 -0
  1844. package/node_modules/fastify/test/trust-proxy.test.js +274 -0
  1845. package/node_modules/fastify/test/type-provider.test.js +22 -0
  1846. package/node_modules/fastify/test/types/content-type-parser.test-d.ts +72 -0
  1847. package/node_modules/fastify/test/types/decorate-request-reply.test-d.ts +18 -0
  1848. package/node_modules/fastify/test/types/dummy-plugin.ts +9 -0
  1849. package/node_modules/fastify/test/types/errors.test-d.ts +90 -0
  1850. package/node_modules/fastify/test/types/fastify.test-d.ts +352 -0
  1851. package/node_modules/fastify/test/types/hooks.test-d.ts +550 -0
  1852. package/node_modules/fastify/test/types/import.ts +2 -0
  1853. package/node_modules/fastify/test/types/instance.test-d.ts +588 -0
  1854. package/node_modules/fastify/test/types/logger.test-d.ts +277 -0
  1855. package/node_modules/fastify/test/types/plugin.test-d.ts +97 -0
  1856. package/node_modules/fastify/test/types/register.test-d.ts +237 -0
  1857. package/node_modules/fastify/test/types/reply.test-d.ts +254 -0
  1858. package/node_modules/fastify/test/types/request.test-d.ts +188 -0
  1859. package/node_modules/fastify/test/types/route.test-d.ts +553 -0
  1860. package/node_modules/fastify/test/types/schema.test-d.ts +135 -0
  1861. package/node_modules/fastify/test/types/serverFactory.test-d.ts +37 -0
  1862. package/node_modules/fastify/test/types/type-provider.test-d.ts +1213 -0
  1863. package/node_modules/fastify/test/types/using.test-d.ts +17 -0
  1864. package/node_modules/fastify/test/upgrade.test.js +52 -0
  1865. package/node_modules/fastify/test/url-rewriting.test.js +122 -0
  1866. package/node_modules/fastify/test/use-semicolon-delimiter.test.js +168 -0
  1867. package/node_modules/fastify/test/validation-error-handling.test.js +900 -0
  1868. package/node_modules/fastify/test/versioned-routes.test.js +603 -0
  1869. package/node_modules/fastify/test/web-api.test.js +616 -0
  1870. package/node_modules/fastify/test/wrap-thenable.test.js +30 -0
  1871. package/node_modules/fastify/types/content-type-parser.d.ts +75 -0
  1872. package/node_modules/fastify/types/context.d.ts +22 -0
  1873. package/node_modules/fastify/types/errors.d.ts +92 -0
  1874. package/node_modules/fastify/types/hooks.d.ts +875 -0
  1875. package/node_modules/fastify/types/instance.d.ts +609 -0
  1876. package/node_modules/fastify/types/logger.d.ts +107 -0
  1877. package/node_modules/fastify/types/plugin.d.ts +44 -0
  1878. package/node_modules/fastify/types/register.d.ts +42 -0
  1879. package/node_modules/fastify/types/reply.d.ts +81 -0
  1880. package/node_modules/fastify/types/request.d.ts +95 -0
  1881. package/node_modules/fastify/types/route.d.ts +199 -0
  1882. package/node_modules/fastify/types/schema.d.ts +61 -0
  1883. package/node_modules/fastify/types/server-factory.d.ts +19 -0
  1884. package/node_modules/fastify/types/type-provider.d.ts +130 -0
  1885. package/node_modules/fastify/types/utils.d.ts +98 -0
  1886. package/node_modules/fastify-plugin/.gitattributes +2 -0
  1887. package/node_modules/fastify-plugin/.github/dependabot.yml +13 -0
  1888. package/node_modules/fastify-plugin/.github/stale.yml +21 -0
  1889. package/node_modules/fastify-plugin/.github/workflows/ci.yml +28 -0
  1890. package/node_modules/fastify-plugin/LICENSE +23 -0
  1891. package/node_modules/fastify-plugin/README.md +188 -0
  1892. package/node_modules/fastify-plugin/eslint.config.js +6 -0
  1893. package/node_modules/fastify-plugin/lib/getPluginName.js +25 -0
  1894. package/node_modules/fastify-plugin/lib/toCamelCase.js +10 -0
  1895. package/node_modules/fastify-plugin/package.json +70 -0
  1896. package/node_modules/fastify-plugin/plugin.js +67 -0
  1897. package/node_modules/fastify-plugin/test/bundlers.test.js +110 -0
  1898. package/node_modules/fastify-plugin/test/checkVersion.test.js +67 -0
  1899. package/node_modules/fastify-plugin/test/composite.test.js +14 -0
  1900. package/node_modules/fastify-plugin/test/esm/esm.mjs +11 -0
  1901. package/node_modules/fastify-plugin/test/esm/index.test.js +11 -0
  1902. package/node_modules/fastify-plugin/test/extractPluginName.test.js +49 -0
  1903. package/node_modules/fastify-plugin/test/mu1tip1e.composite.test.js +15 -0
  1904. package/node_modules/fastify-plugin/test/test.js +396 -0
  1905. package/node_modules/fastify-plugin/test/toCamelCase.test.js +24 -0
  1906. package/node_modules/fastify-plugin/types/example-async.test-d.ts +19 -0
  1907. package/node_modules/fastify-plugin/types/example-callback.test-d.ts +19 -0
  1908. package/node_modules/fastify-plugin/types/plugin.d.ts +61 -0
  1909. package/node_modules/fastify-plugin/types/plugin.test-d.ts +166 -0
  1910. package/node_modules/fastq/LICENSE +13 -0
  1911. package/node_modules/fastq/README.md +310 -0
  1912. package/node_modules/fastq/SECURITY.md +15 -0
  1913. package/node_modules/fastq/bench.js +66 -0
  1914. package/node_modules/fastq/eslint.config.js +11 -0
  1915. package/node_modules/fastq/example.js +14 -0
  1916. package/node_modules/fastq/example.mjs +9 -0
  1917. package/node_modules/fastq/index.d.ts +59 -0
  1918. package/node_modules/fastq/package.json +49 -0
  1919. package/node_modules/fastq/queue.js +346 -0
  1920. package/node_modules/fastq/test/example.ts +83 -0
  1921. package/node_modules/fastq/test/promise.js +325 -0
  1922. package/node_modules/fastq/test/test.js +733 -0
  1923. package/node_modules/fastq/test/tsconfig.json +11 -0
  1924. package/node_modules/find-my-way/.github/dependabot.yml +34 -0
  1925. package/node_modules/find-my-way/.github/workflows/node.js.yml +68 -0
  1926. package/node_modules/find-my-way/LICENSE +21 -0
  1927. package/node_modules/find-my-way/README.md +885 -0
  1928. package/node_modules/find-my-way/benchmark/bench-thread.js +35 -0
  1929. package/node_modules/find-my-way/benchmark/bench.js +156 -0
  1930. package/node_modules/find-my-way/benchmark/compare-branches.js +113 -0
  1931. package/node_modules/find-my-way/benchmark/uri-decoding.js +55 -0
  1932. package/node_modules/find-my-way/example.js +29 -0
  1933. package/node_modules/find-my-way/index.d.ts +247 -0
  1934. package/node_modules/find-my-way/index.js +872 -0
  1935. package/node_modules/find-my-way/lib/constrainer.js +172 -0
  1936. package/node_modules/find-my-way/lib/handler-storage.js +175 -0
  1937. package/node_modules/find-my-way/lib/http-methods.js +13 -0
  1938. package/node_modules/find-my-way/lib/node.js +228 -0
  1939. package/node_modules/find-my-way/lib/null-object.js +8 -0
  1940. package/node_modules/find-my-way/lib/pretty-print.js +168 -0
  1941. package/node_modules/find-my-way/lib/strategies/accept-host.js +36 -0
  1942. package/node_modules/find-my-way/lib/strategies/accept-version.js +64 -0
  1943. package/node_modules/find-my-way/lib/strategies/http-method.js +15 -0
  1944. package/node_modules/find-my-way/lib/url-sanitizer.js +105 -0
  1945. package/node_modules/find-my-way/package.json +57 -0
  1946. package/node_modules/find-my-way/test/case-insensitive.test.js +230 -0
  1947. package/node_modules/find-my-way/test/constraint.custom-versioning.test.js +130 -0
  1948. package/node_modules/find-my-way/test/constraint.custom.async.test.js +111 -0
  1949. package/node_modules/find-my-way/test/constraint.custom.test.js +273 -0
  1950. package/node_modules/find-my-way/test/constraint.default-versioning.test.js +289 -0
  1951. package/node_modules/find-my-way/test/constraint.host.test.js +104 -0
  1952. package/node_modules/find-my-way/test/constraints.test.js +108 -0
  1953. package/node_modules/find-my-way/test/custom-querystring-parser.test.js +46 -0
  1954. package/node_modules/find-my-way/test/errors.test.js +484 -0
  1955. package/node_modules/find-my-way/test/fastify-issue-3129.test.js +34 -0
  1956. package/node_modules/find-my-way/test/fastify-issue-3957.test.js +23 -0
  1957. package/node_modules/find-my-way/test/find-route.test.js +275 -0
  1958. package/node_modules/find-my-way/test/find.test.js +16 -0
  1959. package/node_modules/find-my-way/test/for-in-loop.test.js +22 -0
  1960. package/node_modules/find-my-way/test/full-url.test.js +30 -0
  1961. package/node_modules/find-my-way/test/has-route.test.js +218 -0
  1962. package/node_modules/find-my-way/test/host-storage.test.js +27 -0
  1963. package/node_modules/find-my-way/test/http2/constraint.host.test.js +44 -0
  1964. package/node_modules/find-my-way/test/issue-101.test.js +31 -0
  1965. package/node_modules/find-my-way/test/issue-104.test.js +206 -0
  1966. package/node_modules/find-my-way/test/issue-110.test.js +31 -0
  1967. package/node_modules/find-my-way/test/issue-132.test.js +80 -0
  1968. package/node_modules/find-my-way/test/issue-145.test.js +24 -0
  1969. package/node_modules/find-my-way/test/issue-149.test.js +21 -0
  1970. package/node_modules/find-my-way/test/issue-151.test.js +54 -0
  1971. package/node_modules/find-my-way/test/issue-154.test.js +21 -0
  1972. package/node_modules/find-my-way/test/issue-161.test.js +88 -0
  1973. package/node_modules/find-my-way/test/issue-17.test.js +397 -0
  1974. package/node_modules/find-my-way/test/issue-175.test.js +80 -0
  1975. package/node_modules/find-my-way/test/issue-182.test.js +18 -0
  1976. package/node_modules/find-my-way/test/issue-190.test.js +44 -0
  1977. package/node_modules/find-my-way/test/issue-20.test.js +79 -0
  1978. package/node_modules/find-my-way/test/issue-206.test.js +121 -0
  1979. package/node_modules/find-my-way/test/issue-221.test.js +50 -0
  1980. package/node_modules/find-my-way/test/issue-234.test.js +94 -0
  1981. package/node_modules/find-my-way/test/issue-238.test.js +119 -0
  1982. package/node_modules/find-my-way/test/issue-240.test.js +30 -0
  1983. package/node_modules/find-my-way/test/issue-241.test.js +32 -0
  1984. package/node_modules/find-my-way/test/issue-247.test.js +51 -0
  1985. package/node_modules/find-my-way/test/issue-254.test.js +31 -0
  1986. package/node_modules/find-my-way/test/issue-28.test.js +618 -0
  1987. package/node_modules/find-my-way/test/issue-280.test.js +14 -0
  1988. package/node_modules/find-my-way/test/issue-285.test.js +37 -0
  1989. package/node_modules/find-my-way/test/issue-330.test.js +231 -0
  1990. package/node_modules/find-my-way/test/issue-44.test.js +149 -0
  1991. package/node_modules/find-my-way/test/issue-46.test.js +75 -0
  1992. package/node_modules/find-my-way/test/issue-49.test.js +108 -0
  1993. package/node_modules/find-my-way/test/issue-59.test.js +131 -0
  1994. package/node_modules/find-my-way/test/issue-62.test.js +28 -0
  1995. package/node_modules/find-my-way/test/issue-63.test.js +23 -0
  1996. package/node_modules/find-my-way/test/issue-67.test.js +50 -0
  1997. package/node_modules/find-my-way/test/issue-93.test.js +19 -0
  1998. package/node_modules/find-my-way/test/lookup-async.test.js +29 -0
  1999. package/node_modules/find-my-way/test/lookup.test.js +58 -0
  2000. package/node_modules/find-my-way/test/matching-order.test.js +17 -0
  2001. package/node_modules/find-my-way/test/max-param-length.test.js +44 -0
  2002. package/node_modules/find-my-way/test/methods.test.js +830 -0
  2003. package/node_modules/find-my-way/test/null-object.test.js +36 -0
  2004. package/node_modules/find-my-way/test/on-bad-url.test.js +72 -0
  2005. package/node_modules/find-my-way/test/optional-params.test.js +216 -0
  2006. package/node_modules/find-my-way/test/params-collisions.test.js +126 -0
  2007. package/node_modules/find-my-way/test/path-params-match.test.js +53 -0
  2008. package/node_modules/find-my-way/test/path-utils.test.js +68 -0
  2009. package/node_modules/find-my-way/test/pretty-print-tree.test.js +596 -0
  2010. package/node_modules/find-my-way/test/pretty-print.test.js +680 -0
  2011. package/node_modules/find-my-way/test/querystring.test.js +54 -0
  2012. package/node_modules/find-my-way/test/regex.test.js +269 -0
  2013. package/node_modules/find-my-way/test/repro-issue-414.test.js +57 -0
  2014. package/node_modules/find-my-way/test/routes-registered.test.js +45 -0
  2015. package/node_modules/find-my-way/test/server.test.js +368 -0
  2016. package/node_modules/find-my-way/test/shorthands.test.js +44 -0
  2017. package/node_modules/find-my-way/test/store.test.js +49 -0
  2018. package/node_modules/find-my-way/test/types/router.test-d.ts +188 -0
  2019. package/node_modules/find-my-way/test/url-sanitizer.test.js +43 -0
  2020. package/node_modules/glob/LICENSE.md +63 -0
  2021. package/node_modules/glob/README.md +1203 -0
  2022. package/node_modules/glob/dist/commonjs/glob.d.ts +396 -0
  2023. package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
  2024. package/node_modules/glob/dist/commonjs/glob.js +248 -0
  2025. package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
  2026. package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
  2027. package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
  2028. package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
  2029. package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
  2030. package/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
  2031. package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
  2032. package/node_modules/glob/dist/commonjs/ignore.js +119 -0
  2033. package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
  2034. package/node_modules/glob/dist/commonjs/index.d.ts +97 -0
  2035. package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
  2036. package/node_modules/glob/dist/commonjs/index.js +68 -0
  2037. package/node_modules/glob/dist/commonjs/index.js.map +1 -0
  2038. package/node_modules/glob/dist/commonjs/index.min.js +4 -0
  2039. package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
  2040. package/node_modules/glob/dist/commonjs/package.json +3 -0
  2041. package/node_modules/glob/dist/commonjs/pattern.d.ts +79 -0
  2042. package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
  2043. package/node_modules/glob/dist/commonjs/pattern.js +223 -0
  2044. package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
  2045. package/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
  2046. package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
  2047. package/node_modules/glob/dist/commonjs/processor.js +301 -0
  2048. package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
  2049. package/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
  2050. package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
  2051. package/node_modules/glob/dist/commonjs/walker.js +387 -0
  2052. package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
  2053. package/node_modules/glob/dist/esm/glob.d.ts +396 -0
  2054. package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
  2055. package/node_modules/glob/dist/esm/glob.js +244 -0
  2056. package/node_modules/glob/dist/esm/glob.js.map +1 -0
  2057. package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
  2058. package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
  2059. package/node_modules/glob/dist/esm/has-magic.js +23 -0
  2060. package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
  2061. package/node_modules/glob/dist/esm/ignore.d.ts +24 -0
  2062. package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
  2063. package/node_modules/glob/dist/esm/ignore.js +115 -0
  2064. package/node_modules/glob/dist/esm/ignore.js.map +1 -0
  2065. package/node_modules/glob/dist/esm/index.d.ts +97 -0
  2066. package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
  2067. package/node_modules/glob/dist/esm/index.js +55 -0
  2068. package/node_modules/glob/dist/esm/index.js.map +1 -0
  2069. package/node_modules/glob/dist/esm/index.min.js +4 -0
  2070. package/node_modules/glob/dist/esm/index.min.js.map +7 -0
  2071. package/node_modules/glob/dist/esm/package.json +3 -0
  2072. package/node_modules/glob/dist/esm/pattern.d.ts +79 -0
  2073. package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
  2074. package/node_modules/glob/dist/esm/pattern.js +219 -0
  2075. package/node_modules/glob/dist/esm/pattern.js.map +1 -0
  2076. package/node_modules/glob/dist/esm/processor.d.ts +59 -0
  2077. package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
  2078. package/node_modules/glob/dist/esm/processor.js +294 -0
  2079. package/node_modules/glob/dist/esm/processor.js.map +1 -0
  2080. package/node_modules/glob/dist/esm/walker.d.ts +97 -0
  2081. package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
  2082. package/node_modules/glob/dist/esm/walker.js +381 -0
  2083. package/node_modules/glob/dist/esm/walker.js.map +1 -0
  2084. package/node_modules/glob/package.json +98 -0
  2085. package/node_modules/http-errors/HISTORY.md +186 -0
  2086. package/node_modules/http-errors/LICENSE +23 -0
  2087. package/node_modules/http-errors/README.md +169 -0
  2088. package/node_modules/http-errors/index.js +290 -0
  2089. package/node_modules/http-errors/package.json +54 -0
  2090. package/node_modules/inherits/LICENSE +16 -0
  2091. package/node_modules/inherits/README.md +42 -0
  2092. package/node_modules/inherits/inherits.js +9 -0
  2093. package/node_modules/inherits/inherits_browser.js +27 -0
  2094. package/node_modules/inherits/package.json +29 -0
  2095. package/node_modules/ipaddr.js/LICENSE +19 -0
  2096. package/node_modules/ipaddr.js/README.md +229 -0
  2097. package/node_modules/ipaddr.js/ipaddr.min.js +1 -0
  2098. package/node_modules/ipaddr.js/lib/ipaddr.js +1082 -0
  2099. package/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +72 -0
  2100. package/node_modules/ipaddr.js/package.json +36 -0
  2101. package/node_modules/jishushell-panel/LICENSE +6 -0
  2102. package/node_modules/jishushell-panel/README.md +47 -0
  2103. package/node_modules/jishushell-panel/output/dist/server.d.ts +13 -0
  2104. package/node_modules/jishushell-panel/output/dist/server.js +466 -0
  2105. package/node_modules/jishushell-panel/output/dist/server.js.map +1 -0
  2106. package/node_modules/jishushell-panel/output/public/assets/ApiKeyField-NKcbHjNz.js +1 -0
  2107. package/node_modules/jishushell-panel/output/public/assets/Dashboard-Da1fL38t.js +1 -0
  2108. package/node_modules/jishushell-panel/output/public/assets/HermesChatPanel-DZvmYsoh.js +1 -0
  2109. package/node_modules/jishushell-panel/output/public/assets/HermesConfigForm-BLUWlKwm.js +4 -0
  2110. package/node_modules/jishushell-panel/output/public/assets/InitPassword-BAKsshzk.js +1 -0
  2111. package/node_modules/jishushell-panel/output/public/assets/InstanceDetail-Dgyc_TX5.js +14 -0
  2112. package/node_modules/jishushell-panel/output/public/assets/Login-DHeOmwI8.js +1 -0
  2113. package/node_modules/jishushell-panel/output/public/assets/NewInstance-CIy0cYtp.js +1 -0
  2114. package/node_modules/jishushell-panel/output/public/assets/ProviderRecommendations-H0ByEYF0.js +1 -0
  2115. package/node_modules/jishushell-panel/output/public/assets/Settings-DAT-UMfP.js +1 -0
  2116. package/node_modules/jishushell-panel/output/public/assets/Setup-g3uckFYR.js +1 -0
  2117. package/node_modules/jishushell-panel/output/public/assets/WeixinLoginPanel-D-T6BxkQ.js +1 -0
  2118. package/node_modules/jishushell-panel/output/public/assets/api-C70Gt678.js +4 -0
  2119. package/node_modules/jishushell-panel/output/public/assets/index-DnnqTf7s.css +1 -0
  2120. package/node_modules/jishushell-panel/output/public/assets/index-ERt6_ngA.js +23 -0
  2121. package/node_modules/jishushell-panel/output/public/assets/registry-DF93EzIb.js +2 -0
  2122. package/node_modules/jishushell-panel/output/public/assets/rolldown-runtime-QTnfLwEv.js +1 -0
  2123. package/node_modules/jishushell-panel/output/public/assets/setup-task-q21GnI0E.js +1 -0
  2124. package/node_modules/jishushell-panel/output/public/assets/usePolling-DeoThIQn.js +1 -0
  2125. package/node_modules/jishushell-panel/output/public/assets/vendor-i18n-CS8DFbkQ.js +1 -0
  2126. package/node_modules/jishushell-panel/output/public/assets/vendor-react-Cc84NArf.js +8 -0
  2127. package/node_modules/jishushell-panel/output/public/index.html +22 -0
  2128. package/node_modules/jishushell-panel/package.json +33 -0
  2129. package/node_modules/json-schema-ref-resolver/.gitattributes +2 -0
  2130. package/node_modules/json-schema-ref-resolver/.github/dependabot.yml +13 -0
  2131. package/node_modules/json-schema-ref-resolver/.github/workflows/ci.yml +25 -0
  2132. package/node_modules/json-schema-ref-resolver/LICENSE +21 -0
  2133. package/node_modules/json-schema-ref-resolver/README.md +406 -0
  2134. package/node_modules/json-schema-ref-resolver/eslint.config.js +6 -0
  2135. package/node_modules/json-schema-ref-resolver/index.js +284 -0
  2136. package/node_modules/json-schema-ref-resolver/package.json +76 -0
  2137. package/node_modules/json-schema-ref-resolver/test/anchor.test.js +56 -0
  2138. package/node_modules/json-schema-ref-resolver/test/collisions.test.js +199 -0
  2139. package/node_modules/json-schema-ref-resolver/test/deref-schema.test.js +287 -0
  2140. package/node_modules/json-schema-ref-resolver/test/get-deref-schema.test.js +363 -0
  2141. package/node_modules/json-schema-ref-resolver/test/get-schema-dependencies.test.js +158 -0
  2142. package/node_modules/json-schema-ref-resolver/test/get-schema-refs.test.js +87 -0
  2143. package/node_modules/json-schema-ref-resolver/test/get-schema.test.js +222 -0
  2144. package/node_modules/json-schema-ref-resolver/test/has-schema.test.js +28 -0
  2145. package/node_modules/json-schema-ref-resolver/types/index.d.ts +67 -0
  2146. package/node_modules/json-schema-ref-resolver/types/index.test-d.ts +23 -0
  2147. package/node_modules/json-schema-traverse/.eslintrc.yml +27 -0
  2148. package/node_modules/json-schema-traverse/.github/FUNDING.yml +2 -0
  2149. package/node_modules/json-schema-traverse/.github/workflows/build.yml +28 -0
  2150. package/node_modules/json-schema-traverse/.github/workflows/publish.yml +27 -0
  2151. package/node_modules/json-schema-traverse/LICENSE +21 -0
  2152. package/node_modules/json-schema-traverse/README.md +95 -0
  2153. package/node_modules/json-schema-traverse/index.d.ts +40 -0
  2154. package/node_modules/json-schema-traverse/index.js +93 -0
  2155. package/node_modules/json-schema-traverse/package.json +43 -0
  2156. package/node_modules/json-schema-traverse/spec/.eslintrc.yml +6 -0
  2157. package/node_modules/json-schema-traverse/spec/fixtures/schema.js +125 -0
  2158. package/node_modules/json-schema-traverse/spec/index.spec.js +171 -0
  2159. package/node_modules/light-my-request/.gitattributes +2 -0
  2160. package/node_modules/light-my-request/.github/dependabot.yml +13 -0
  2161. package/node_modules/light-my-request/.github/stale.yml +21 -0
  2162. package/node_modules/light-my-request/.github/workflows/benchmark.yml +30 -0
  2163. package/node_modules/light-my-request/.github/workflows/ci.yml +23 -0
  2164. package/node_modules/light-my-request/LICENSE +32 -0
  2165. package/node_modules/light-my-request/README.md +261 -0
  2166. package/node_modules/light-my-request/benchmark/benchmark.js +164 -0
  2167. package/node_modules/light-my-request/build/build-validation.js +100 -0
  2168. package/node_modules/light-my-request/eslint.config.js +9 -0
  2169. package/node_modules/light-my-request/index.js +194 -0
  2170. package/node_modules/light-my-request/lib/config-validator.js +919 -0
  2171. package/node_modules/light-my-request/lib/form-data.js +79 -0
  2172. package/node_modules/light-my-request/lib/parse-url.js +47 -0
  2173. package/node_modules/light-my-request/lib/request.js +290 -0
  2174. package/node_modules/light-my-request/lib/response.js +240 -0
  2175. package/node_modules/light-my-request/node_modules/process-warning/.gitattributes +2 -0
  2176. package/node_modules/light-my-request/node_modules/process-warning/.github/dependabot.yml +13 -0
  2177. package/node_modules/light-my-request/node_modules/process-warning/.github/workflows/ci.yml +24 -0
  2178. package/node_modules/light-my-request/node_modules/process-warning/.taprc +2 -0
  2179. package/node_modules/light-my-request/node_modules/process-warning/LICENSE +21 -0
  2180. package/node_modules/light-my-request/node_modules/process-warning/README.md +118 -0
  2181. package/node_modules/light-my-request/node_modules/process-warning/benchmarks/warn.js +25 -0
  2182. package/node_modules/light-my-request/node_modules/process-warning/eslint.config.js +6 -0
  2183. package/node_modules/light-my-request/node_modules/process-warning/examples/example.js +11 -0
  2184. package/node_modules/light-my-request/node_modules/process-warning/index.js +124 -0
  2185. package/node_modules/light-my-request/node_modules/process-warning/package.json +73 -0
  2186. package/node_modules/light-my-request/node_modules/process-warning/test/emit-interpolated-string.test.js +29 -0
  2187. package/node_modules/light-my-request/node_modules/process-warning/test/emit-once-only.test.js +28 -0
  2188. package/node_modules/light-my-request/node_modules/process-warning/test/emit-reset.test.js +36 -0
  2189. package/node_modules/light-my-request/node_modules/process-warning/test/emit-set.test.js +30 -0
  2190. package/node_modules/light-my-request/node_modules/process-warning/test/emit-unlimited.test.js +37 -0
  2191. package/node_modules/light-my-request/node_modules/process-warning/test/index.test.js +99 -0
  2192. package/node_modules/light-my-request/node_modules/process-warning/test/issue-88.test.js +33 -0
  2193. package/node_modules/light-my-request/node_modules/process-warning/test/jest.test.js +22 -0
  2194. package/node_modules/light-my-request/node_modules/process-warning/test/no-warnings.test.js +80 -0
  2195. package/node_modules/light-my-request/node_modules/process-warning/types/index.d.ts +37 -0
  2196. package/node_modules/light-my-request/node_modules/process-warning/types/index.test-d.ts +36 -0
  2197. package/node_modules/light-my-request/package.json +85 -0
  2198. package/node_modules/light-my-request/test/async-await.test.js +55 -0
  2199. package/node_modules/light-my-request/test/index.test.js +2316 -0
  2200. package/node_modules/light-my-request/test/request.test.js +16 -0
  2201. package/node_modules/light-my-request/test/response.test.js +19 -0
  2202. package/node_modules/light-my-request/test/stream.test.js +359 -0
  2203. package/node_modules/light-my-request/types/index.d.ts +128 -0
  2204. package/node_modules/light-my-request/types/index.test-d.ts +149 -0
  2205. package/node_modules/mime/CHANGELOG.md +312 -0
  2206. package/node_modules/mime/LICENSE +21 -0
  2207. package/node_modules/mime/Mime.js +97 -0
  2208. package/node_modules/mime/README.md +178 -0
  2209. package/node_modules/mime/cli.js +46 -0
  2210. package/node_modules/mime/index.js +4 -0
  2211. package/node_modules/mime/lite.js +4 -0
  2212. package/node_modules/mime/package.json +52 -0
  2213. package/node_modules/mime/types/other.js +1 -0
  2214. package/node_modules/mime/types/standard.js +1 -0
  2215. package/node_modules/minimatch/LICENSE.md +55 -0
  2216. package/node_modules/minimatch/README.md +528 -0
  2217. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
  2218. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
  2219. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
  2220. package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
  2221. package/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
  2222. package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
  2223. package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
  2224. package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
  2225. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
  2226. package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
  2227. package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
  2228. package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
  2229. package/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
  2230. package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
  2231. package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
  2232. package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
  2233. package/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
  2234. package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
  2235. package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
  2236. package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
  2237. package/node_modules/minimatch/dist/commonjs/package.json +3 -0
  2238. package/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
  2239. package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
  2240. package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
  2241. package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
  2242. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
  2243. package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
  2244. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
  2245. package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
  2246. package/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
  2247. package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
  2248. package/node_modules/minimatch/dist/esm/ast.js +841 -0
  2249. package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
  2250. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
  2251. package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
  2252. package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
  2253. package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
  2254. package/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
  2255. package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
  2256. package/node_modules/minimatch/dist/esm/escape.js +26 -0
  2257. package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
  2258. package/node_modules/minimatch/dist/esm/index.d.ts +174 -0
  2259. package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
  2260. package/node_modules/minimatch/dist/esm/index.js +1114 -0
  2261. package/node_modules/minimatch/dist/esm/index.js.map +1 -0
  2262. package/node_modules/minimatch/dist/esm/package.json +3 -0
  2263. package/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
  2264. package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
  2265. package/node_modules/minimatch/dist/esm/unescape.js +34 -0
  2266. package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
  2267. package/node_modules/minimatch/package.json +73 -0
  2268. package/node_modules/minipass/LICENSE.md +55 -0
  2269. package/node_modules/minipass/README.md +825 -0
  2270. package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
  2271. package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
  2272. package/node_modules/minipass/dist/commonjs/index.js +1038 -0
  2273. package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
  2274. package/node_modules/minipass/dist/commonjs/package.json +3 -0
  2275. package/node_modules/minipass/dist/esm/index.d.ts +545 -0
  2276. package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
  2277. package/node_modules/minipass/dist/esm/index.js +1020 -0
  2278. package/node_modules/minipass/dist/esm/index.js.map +1 -0
  2279. package/node_modules/minipass/dist/esm/package.json +3 -0
  2280. package/node_modules/minipass/package.json +77 -0
  2281. package/node_modules/on-exit-leak-free/.github/dependabot.yml +12 -0
  2282. package/node_modules/on-exit-leak-free/.github/workflows/ci.yml +46 -0
  2283. package/node_modules/on-exit-leak-free/LICENSE +21 -0
  2284. package/node_modules/on-exit-leak-free/README.md +54 -0
  2285. package/node_modules/on-exit-leak-free/index.js +108 -0
  2286. package/node_modules/on-exit-leak-free/package.json +37 -0
  2287. package/node_modules/on-exit-leak-free/test/base.test.js +30 -0
  2288. package/node_modules/on-exit-leak-free/test/event-emitter-leak.test.js +23 -0
  2289. package/node_modules/on-exit-leak-free/test/fixtures/beforeExit.js +33 -0
  2290. package/node_modules/on-exit-leak-free/test/fixtures/close.js +21 -0
  2291. package/node_modules/on-exit-leak-free/test/fixtures/gc-not-close.js +24 -0
  2292. package/node_modules/on-exit-leak-free/test/fixtures/unregister.js +24 -0
  2293. package/node_modules/path-scurry/LICENSE.md +55 -0
  2294. package/node_modules/path-scurry/README.md +636 -0
  2295. package/node_modules/path-scurry/dist/commonjs/index.d.ts +1115 -0
  2296. package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
  2297. package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
  2298. package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
  2299. package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
  2300. package/node_modules/path-scurry/dist/esm/index.d.ts +1115 -0
  2301. package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
  2302. package/node_modules/path-scurry/dist/esm/index.js +1983 -0
  2303. package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
  2304. package/node_modules/path-scurry/dist/esm/package.json +3 -0
  2305. package/node_modules/path-scurry/node_modules/lru-cache/LICENSE.md +55 -0
  2306. package/node_modules/path-scurry/node_modules/lru-cache/README.md +469 -0
  2307. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
  2308. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
  2309. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
  2310. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
  2311. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1400 -0
  2312. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
  2313. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js +1726 -0
  2314. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
  2315. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
  2316. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
  2317. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
  2318. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
  2319. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
  2320. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
  2321. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
  2322. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
  2323. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
  2324. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
  2325. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts +1400 -0
  2326. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
  2327. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js +1726 -0
  2328. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
  2329. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
  2330. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
  2331. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.d.ts.map +1 -0
  2332. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
  2333. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
  2334. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
  2335. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
  2336. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
  2337. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js +1726 -0
  2338. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
  2339. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
  2340. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
  2341. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
  2342. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
  2343. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
  2344. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
  2345. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/package.json +3 -0
  2346. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
  2347. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
  2348. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
  2349. package/node_modules/path-scurry/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
  2350. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
  2351. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
  2352. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
  2353. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
  2354. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
  2355. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
  2356. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js +1722 -0
  2357. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
  2358. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
  2359. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
  2360. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
  2361. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
  2362. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
  2363. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
  2364. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
  2365. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
  2366. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
  2367. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
  2368. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
  2369. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
  2370. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js +1722 -0
  2371. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js.map +1 -0
  2372. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js +2 -0
  2373. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
  2374. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.d.ts.map +1 -0
  2375. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
  2376. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
  2377. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
  2378. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
  2379. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
  2380. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js +1722 -0
  2381. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
  2382. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
  2383. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
  2384. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
  2385. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
  2386. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
  2387. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
  2388. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/package.json +3 -0
  2389. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
  2390. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
  2391. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js +7 -0
  2392. package/node_modules/path-scurry/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
  2393. package/node_modules/path-scurry/node_modules/lru-cache/package.json +154 -0
  2394. package/node_modules/path-scurry/package.json +72 -0
  2395. package/node_modules/pino/.nojekyll +0 -0
  2396. package/node_modules/pino/.prettierignore +1 -0
  2397. package/node_modules/pino/CNAME +1 -0
  2398. package/node_modules/pino/CONTRIBUTING.md +30 -0
  2399. package/node_modules/pino/LICENSE +21 -0
  2400. package/node_modules/pino/README.md +177 -0
  2401. package/node_modules/pino/SECURITY.md +87 -0
  2402. package/node_modules/pino/benchmarks/basic.bench.js +95 -0
  2403. package/node_modules/pino/benchmarks/child-child.bench.js +52 -0
  2404. package/node_modules/pino/benchmarks/child-creation.bench.js +73 -0
  2405. package/node_modules/pino/benchmarks/child.bench.js +62 -0
  2406. package/node_modules/pino/benchmarks/deep-object.bench.js +88 -0
  2407. package/node_modules/pino/benchmarks/formatters.bench.js +50 -0
  2408. package/node_modules/pino/benchmarks/internal/custom-levels.js +67 -0
  2409. package/node_modules/pino/benchmarks/internal/just-pino-heavy.bench.js +76 -0
  2410. package/node_modules/pino/benchmarks/internal/just-pino.bench.js +182 -0
  2411. package/node_modules/pino/benchmarks/internal/parent-vs-child.bench.js +75 -0
  2412. package/node_modules/pino/benchmarks/internal/redact.bench.js +86 -0
  2413. package/node_modules/pino/benchmarks/long-string.bench.js +81 -0
  2414. package/node_modules/pino/benchmarks/multi-arg.bench.js +193 -0
  2415. package/node_modules/pino/benchmarks/multistream.js +98 -0
  2416. package/node_modules/pino/benchmarks/object.bench.js +82 -0
  2417. package/node_modules/pino/benchmarks/utils/generate-benchmark-doc.js +36 -0
  2418. package/node_modules/pino/benchmarks/utils/runbench.js +138 -0
  2419. package/node_modules/pino/benchmarks/utils/wrap-log-level.js +55 -0
  2420. package/node_modules/pino/bin.js +6 -0
  2421. package/node_modules/pino/browser.js +547 -0
  2422. package/node_modules/pino/build/sync-version.js +25 -0
  2423. package/node_modules/pino/docs/api.md +1593 -0
  2424. package/node_modules/pino/docs/asynchronous.md +40 -0
  2425. package/node_modules/pino/docs/benchmarks.md +55 -0
  2426. package/node_modules/pino/docs/browser.md +278 -0
  2427. package/node_modules/pino/docs/bundling.md +40 -0
  2428. package/node_modules/pino/docs/child-loggers.md +95 -0
  2429. package/node_modules/pino/docs/diagnostics.md +16 -0
  2430. package/node_modules/pino/docs/ecosystem.md +86 -0
  2431. package/node_modules/pino/docs/help.md +345 -0
  2432. package/node_modules/pino/docs/lts.md +64 -0
  2433. package/node_modules/pino/docs/pretty.md +35 -0
  2434. package/node_modules/pino/docs/redaction.md +135 -0
  2435. package/node_modules/pino/docs/transports.md +1376 -0
  2436. package/node_modules/pino/docs/web.md +309 -0
  2437. package/node_modules/pino/eslint.config.js +28 -0
  2438. package/node_modules/pino/examples/basic.js +43 -0
  2439. package/node_modules/pino/examples/transport.js +68 -0
  2440. package/node_modules/pino/favicon.ico +0 -0
  2441. package/node_modules/pino/file.js +12 -0
  2442. package/node_modules/pino/inc-version.sh +42 -0
  2443. package/node_modules/pino/index.html +55 -0
  2444. package/node_modules/pino/lib/caller.js +30 -0
  2445. package/node_modules/pino/lib/constants.js +28 -0
  2446. package/node_modules/pino/lib/deprecations.js +8 -0
  2447. package/node_modules/pino/lib/levels.js +241 -0
  2448. package/node_modules/pino/lib/meta.js +3 -0
  2449. package/node_modules/pino/lib/multistream.js +203 -0
  2450. package/node_modules/pino/lib/proto.js +256 -0
  2451. package/node_modules/pino/lib/redaction.js +114 -0
  2452. package/node_modules/pino/lib/symbols.js +74 -0
  2453. package/node_modules/pino/lib/time.js +39 -0
  2454. package/node_modules/pino/lib/tools.js +427 -0
  2455. package/node_modules/pino/lib/transport-stream.js +56 -0
  2456. package/node_modules/pino/lib/transport.js +289 -0
  2457. package/node_modules/pino/lib/worker.js +194 -0
  2458. package/node_modules/pino/package.json +120 -0
  2459. package/node_modules/pino/pino.d.ts +908 -0
  2460. package/node_modules/pino/pino.js +234 -0
  2461. package/node_modules/pino/test/basic.test.js +886 -0
  2462. package/node_modules/pino/test/broken-pipe.test.js +59 -0
  2463. package/node_modules/pino/test/browser-child.test.js +132 -0
  2464. package/node_modules/pino/test/browser-disabled.test.js +87 -0
  2465. package/node_modules/pino/test/browser-early-console-freeze.test.js +12 -0
  2466. package/node_modules/pino/test/browser-is-level-enabled.test.js +101 -0
  2467. package/node_modules/pino/test/browser-levels.test.js +241 -0
  2468. package/node_modules/pino/test/browser-serializers.test.js +352 -0
  2469. package/node_modules/pino/test/browser-timestamp.test.js +88 -0
  2470. package/node_modules/pino/test/browser-transmit.test.js +417 -0
  2471. package/node_modules/pino/test/browser.test.js +698 -0
  2472. package/node_modules/pino/test/complex-objects.test.js +36 -0
  2473. package/node_modules/pino/test/crlf.test.js +34 -0
  2474. package/node_modules/pino/test/custom-levels.test.js +267 -0
  2475. package/node_modules/pino/test/diagnostics.test.js +107 -0
  2476. package/node_modules/pino/test/error-key.test.js +37 -0
  2477. package/node_modules/pino/test/error.test.js +403 -0
  2478. package/node_modules/pino/test/escaping.test.js +93 -0
  2479. package/node_modules/pino/test/esm/esm.mjs +14 -0
  2480. package/node_modules/pino/test/esm/index.test.js +21 -0
  2481. package/node_modules/pino/test/esm/named-exports.mjs +29 -0
  2482. package/node_modules/pino/test/exit.test.js +79 -0
  2483. package/node_modules/pino/test/fixtures/broken-pipe/basic.js +9 -0
  2484. package/node_modules/pino/test/fixtures/broken-pipe/destination.js +10 -0
  2485. package/node_modules/pino/test/fixtures/broken-pipe/syncfalse.js +12 -0
  2486. package/node_modules/pino/test/fixtures/console-transport.js +13 -0
  2487. package/node_modules/pino/test/fixtures/crashing-transport.js +13 -0
  2488. package/node_modules/pino/test/fixtures/default-exit.js +8 -0
  2489. package/node_modules/pino/test/fixtures/destination-exit.js +8 -0
  2490. package/node_modules/pino/test/fixtures/eval/index.js +13 -0
  2491. package/node_modules/pino/test/fixtures/eval/node_modules/14-files.js +3 -0
  2492. package/node_modules/pino/test/fixtures/eval/node_modules/2-files.js +3 -0
  2493. package/node_modules/pino/test/fixtures/eval/node_modules/file1.js +5 -0
  2494. package/node_modules/pino/test/fixtures/eval/node_modules/file10.js +5 -0
  2495. package/node_modules/pino/test/fixtures/eval/node_modules/file11.js +5 -0
  2496. package/node_modules/pino/test/fixtures/eval/node_modules/file12.js +5 -0
  2497. package/node_modules/pino/test/fixtures/eval/node_modules/file13.js +5 -0
  2498. package/node_modules/pino/test/fixtures/eval/node_modules/file14.js +11 -0
  2499. package/node_modules/pino/test/fixtures/eval/node_modules/file2.js +5 -0
  2500. package/node_modules/pino/test/fixtures/eval/node_modules/file3.js +5 -0
  2501. package/node_modules/pino/test/fixtures/eval/node_modules/file4.js +5 -0
  2502. package/node_modules/pino/test/fixtures/eval/node_modules/file5.js +5 -0
  2503. package/node_modules/pino/test/fixtures/eval/node_modules/file6.js +5 -0
  2504. package/node_modules/pino/test/fixtures/eval/node_modules/file7.js +5 -0
  2505. package/node_modules/pino/test/fixtures/eval/node_modules/file8.js +5 -0
  2506. package/node_modules/pino/test/fixtures/eval/node_modules/file9.js +5 -0
  2507. package/node_modules/pino/test/fixtures/noop-transport.js +10 -0
  2508. package/node_modules/pino/test/fixtures/pretty/null-prototype.js +8 -0
  2509. package/node_modules/pino/test/fixtures/stdout-hack-protection.js +11 -0
  2510. package/node_modules/pino/test/fixtures/syncfalse-child.js +6 -0
  2511. package/node_modules/pino/test/fixtures/syncfalse-exit.js +9 -0
  2512. package/node_modules/pino/test/fixtures/syncfalse-flush-exit.js +10 -0
  2513. package/node_modules/pino/test/fixtures/syncfalse.js +6 -0
  2514. package/node_modules/pino/test/fixtures/syntax-error-esm.mjs +2 -0
  2515. package/node_modules/pino/test/fixtures/to-file-transport-with-transform.js +20 -0
  2516. package/node_modules/pino/test/fixtures/to-file-transport.js +13 -0
  2517. package/node_modules/pino/test/fixtures/to-file-transport.mjs +8 -0
  2518. package/node_modules/pino/test/fixtures/transport/index.js +12 -0
  2519. package/node_modules/pino/test/fixtures/transport/package.json +5 -0
  2520. package/node_modules/pino/test/fixtures/transport-exit-immediately-with-async-dest.js +16 -0
  2521. package/node_modules/pino/test/fixtures/transport-exit-immediately.js +11 -0
  2522. package/node_modules/pino/test/fixtures/transport-exit-on-ready.js +12 -0
  2523. package/node_modules/pino/test/fixtures/transport-invalid-node-options.js +26 -0
  2524. package/node_modules/pino/test/fixtures/transport-main.js +9 -0
  2525. package/node_modules/pino/test/fixtures/transport-many-lines.js +29 -0
  2526. package/node_modules/pino/test/fixtures/transport-preload-main.mjs +13 -0
  2527. package/node_modules/pino/test/fixtures/transport-preload.mjs +13 -0
  2528. package/node_modules/pino/test/fixtures/transport-string-stdout.js +9 -0
  2529. package/node_modules/pino/test/fixtures/transport-transform.js +21 -0
  2530. package/node_modules/pino/test/fixtures/transport-uses-pino-config.js +33 -0
  2531. package/node_modules/pino/test/fixtures/transport-with-on-exit.js +12 -0
  2532. package/node_modules/pino/test/fixtures/transport-worker-data.js +19 -0
  2533. package/node_modules/pino/test/fixtures/transport-worker-name.js +24 -0
  2534. package/node_modules/pino/test/fixtures/transport-worker.js +15 -0
  2535. package/node_modules/pino/test/fixtures/transport-wrong-export-type.js +3 -0
  2536. package/node_modules/pino/test/fixtures/ts/to-file-transport-native.mts +15 -0
  2537. package/node_modules/pino/test/fixtures/ts/to-file-transport-with-transform.ts +18 -0
  2538. package/node_modules/pino/test/fixtures/ts/to-file-transport.ts +11 -0
  2539. package/node_modules/pino/test/fixtures/ts/transpile.cjs +36 -0
  2540. package/node_modules/pino/test/fixtures/ts/transport-exit-immediately-with-async-dest.ts +15 -0
  2541. package/node_modules/pino/test/fixtures/ts/transport-exit-immediately.ts +10 -0
  2542. package/node_modules/pino/test/fixtures/ts/transport-exit-on-ready.ts +11 -0
  2543. package/node_modules/pino/test/fixtures/ts/transport-main.ts +8 -0
  2544. package/node_modules/pino/test/fixtures/ts/transport-string-stdout.ts +8 -0
  2545. package/node_modules/pino/test/fixtures/ts/transport-worker.ts +14 -0
  2546. package/node_modules/pino/test/formatters.test.js +364 -0
  2547. package/node_modules/pino/test/helper.d.ts +4 -0
  2548. package/node_modules/pino/test/helper.js +155 -0
  2549. package/node_modules/pino/test/hooks.test.js +114 -0
  2550. package/node_modules/pino/test/http.test.js +214 -0
  2551. package/node_modules/pino/test/internals/version.test.js +17 -0
  2552. package/node_modules/pino/test/is-level-enabled.test.js +179 -0
  2553. package/node_modules/pino/test/jest/basic.spec.js +10 -0
  2554. package/node_modules/pino/test/levels.test.js +810 -0
  2555. package/node_modules/pino/test/metadata.test.js +120 -0
  2556. package/node_modules/pino/test/mixin-merge-strategy.test.js +57 -0
  2557. package/node_modules/pino/test/mixin.test.js +241 -0
  2558. package/node_modules/pino/test/multistream.test.js +729 -0
  2559. package/node_modules/pino/test/redact.test.js +893 -0
  2560. package/node_modules/pino/test/serializers.test.js +257 -0
  2561. package/node_modules/pino/test/stdout-protection.test.js +41 -0
  2562. package/node_modules/pino/test/syncfalse.test.js +186 -0
  2563. package/node_modules/pino/test/timestamp-nano.test.js +37 -0
  2564. package/node_modules/pino/test/timestamp.test.js +124 -0
  2565. package/node_modules/pino/test/transport/big.test.js +42 -0
  2566. package/node_modules/pino/test/transport/bundlers-support.test.js +99 -0
  2567. package/node_modules/pino/test/transport/caller.test.js +24 -0
  2568. package/node_modules/pino/test/transport/core.test.js +733 -0
  2569. package/node_modules/pino/test/transport/core.transpiled.test.ts +114 -0
  2570. package/node_modules/pino/test/transport/crash.test.js +36 -0
  2571. package/node_modules/pino/test/transport/module-link.test.js +241 -0
  2572. package/node_modules/pino/test/transport/native-type-stripping.test.mjs +151 -0
  2573. package/node_modules/pino/test/transport/node-options.test.js +116 -0
  2574. package/node_modules/pino/test/transport/pipeline.test.js +137 -0
  2575. package/node_modules/pino/test/transport/preload.test.js +54 -0
  2576. package/node_modules/pino/test/transport/repl.test.js +15 -0
  2577. package/node_modules/pino/test/transport/sync-false.test.js +67 -0
  2578. package/node_modules/pino/test/transport/sync-true.test.js +57 -0
  2579. package/node_modules/pino/test/transport/targets.test.js +48 -0
  2580. package/node_modules/pino/test/transport/uses-pino-config.test.js +166 -0
  2581. package/node_modules/pino/test/transport-stream.test.js +40 -0
  2582. package/node_modules/pino/test/types/pino-import.test-d.cts +30 -0
  2583. package/node_modules/pino/test/types/pino-multistream.test-d.ts +28 -0
  2584. package/node_modules/pino/test/types/pino-top-export.test-d.ts +34 -0
  2585. package/node_modules/pino/test/types/pino-transport.test-d.ts +156 -0
  2586. package/node_modules/pino/test/types/pino-type-only.test-d.ts +75 -0
  2587. package/node_modules/pino/test/types/pino.test-d.ts +683 -0
  2588. package/node_modules/pino/test/types/pino.ts +91 -0
  2589. package/node_modules/pino/tsconfig.json +14 -0
  2590. package/node_modules/pino-abstract-transport/.github/dependabot.yml +13 -0
  2591. package/node_modules/pino-abstract-transport/.github/workflows/ci.yml +80 -0
  2592. package/node_modules/pino-abstract-transport/.husky/pre-commit +4 -0
  2593. package/node_modules/pino-abstract-transport/LICENSE +21 -0
  2594. package/node_modules/pino-abstract-transport/README.md +171 -0
  2595. package/node_modules/pino-abstract-transport/index.d.ts +122 -0
  2596. package/node_modules/pino-abstract-transport/index.js +128 -0
  2597. package/node_modules/pino-abstract-transport/package.json +41 -0
  2598. package/node_modules/pino-abstract-transport/test/base.test.js +473 -0
  2599. package/node_modules/pino-abstract-transport/test/fixtures/transport-async-iteration.js +22 -0
  2600. package/node_modules/pino-abstract-transport/test/fixtures/transport-on-data.js +22 -0
  2601. package/node_modules/pino-abstract-transport/test/fixtures/transport-transform.js +24 -0
  2602. package/node_modules/pino-abstract-transport/test/fixtures/worker-pipeline.js +15 -0
  2603. package/node_modules/pino-abstract-transport/test/match.js +24 -0
  2604. package/node_modules/pino-abstract-transport/test/types/index.test-d.ts +31 -0
  2605. package/node_modules/pino-abstract-transport/test/worker.test.js +372 -0
  2606. package/node_modules/pino-std-serializers/.editorconfig +13 -0
  2607. package/node_modules/pino-std-serializers/.github/dependabot.yml +13 -0
  2608. package/node_modules/pino-std-serializers/.github/workflows/ci.yml +81 -0
  2609. package/node_modules/pino-std-serializers/LICENSE +7 -0
  2610. package/node_modules/pino-std-serializers/Readme.md +182 -0
  2611. package/node_modules/pino-std-serializers/eslint.config.js +7 -0
  2612. package/node_modules/pino-std-serializers/index.d.ts +145 -0
  2613. package/node_modules/pino-std-serializers/index.js +36 -0
  2614. package/node_modules/pino-std-serializers/lib/err-helpers.js +118 -0
  2615. package/node_modules/pino-std-serializers/lib/err-proto.js +48 -0
  2616. package/node_modules/pino-std-serializers/lib/err-with-cause.js +48 -0
  2617. package/node_modules/pino-std-serializers/lib/err.js +45 -0
  2618. package/node_modules/pino-std-serializers/lib/req.js +100 -0
  2619. package/node_modules/pino-std-serializers/lib/res.js +47 -0
  2620. package/node_modules/pino-std-serializers/package.json +42 -0
  2621. package/node_modules/pino-std-serializers/test/err-with-cause.test.js +187 -0
  2622. package/node_modules/pino-std-serializers/test/err.test.js +200 -0
  2623. package/node_modules/pino-std-serializers/test/req.test.js +477 -0
  2624. package/node_modules/pino-std-serializers/test/res.test.js +120 -0
  2625. package/node_modules/pino-std-serializers/test/types/index.test-d.ts +71 -0
  2626. package/node_modules/pino-std-serializers/tsconfig.json +13 -0
  2627. package/node_modules/process-warning/.gitattributes +2 -0
  2628. package/node_modules/process-warning/.github/dependabot.yml +13 -0
  2629. package/node_modules/process-warning/.github/workflows/ci.yml +22 -0
  2630. package/node_modules/process-warning/LICENSE +21 -0
  2631. package/node_modules/process-warning/README.md +118 -0
  2632. package/node_modules/process-warning/benchmarks/warn.js +25 -0
  2633. package/node_modules/process-warning/eslint.config.js +6 -0
  2634. package/node_modules/process-warning/examples/example.js +11 -0
  2635. package/node_modules/process-warning/index.js +124 -0
  2636. package/node_modules/process-warning/package.json +73 -0
  2637. package/node_modules/process-warning/test/emit-interpolated-string.test.js +34 -0
  2638. package/node_modules/process-warning/test/emit-once-only.test.js +33 -0
  2639. package/node_modules/process-warning/test/emit-reset.test.js +40 -0
  2640. package/node_modules/process-warning/test/emit-set.test.js +35 -0
  2641. package/node_modules/process-warning/test/emit-unlimited.test.js +42 -0
  2642. package/node_modules/process-warning/test/index.test.js +99 -0
  2643. package/node_modules/process-warning/test/issue-88.test.js +38 -0
  2644. package/node_modules/process-warning/test/jest.test.js +24 -0
  2645. package/node_modules/process-warning/test/no-warnings.test.js +80 -0
  2646. package/node_modules/process-warning/test/promise.js +10 -0
  2647. package/node_modules/process-warning/types/index.d.ts +37 -0
  2648. package/node_modules/process-warning/types/index.test-d.ts +36 -0
  2649. package/node_modules/quick-format-unescaped/.github/workflows/ci.yml +21 -0
  2650. package/node_modules/quick-format-unescaped/LICENSE +21 -0
  2651. package/node_modules/quick-format-unescaped/benchmark.js +24 -0
  2652. package/node_modules/quick-format-unescaped/index.js +109 -0
  2653. package/node_modules/quick-format-unescaped/package.json +29 -0
  2654. package/node_modules/quick-format-unescaped/readme.md +66 -0
  2655. package/node_modules/quick-format-unescaped/test/index.js +136 -0
  2656. package/node_modules/real-require/LICENSE.md +21 -0
  2657. package/node_modules/real-require/README.md +51 -0
  2658. package/node_modules/real-require/package.json +49 -0
  2659. package/node_modules/real-require/src/index.js +14 -0
  2660. package/node_modules/require-from-string/index.js +34 -0
  2661. package/node_modules/require-from-string/license +21 -0
  2662. package/node_modules/require-from-string/package.json +28 -0
  2663. package/node_modules/require-from-string/readme.md +56 -0
  2664. package/node_modules/ret/LICENSE +21 -0
  2665. package/node_modules/ret/README.md +539 -0
  2666. package/node_modules/ret/dist/index.d.ts +7 -0
  2667. package/node_modules/ret/dist/index.js +26 -0
  2668. package/node_modules/ret/dist/index.js.map +1 -0
  2669. package/node_modules/ret/dist/reconstruct.d.ts +2 -0
  2670. package/node_modules/ret/dist/reconstruct.js +77 -0
  2671. package/node_modules/ret/dist/reconstruct.js.map +1 -0
  2672. package/node_modules/ret/dist/sets-lookup.d.ts +5 -0
  2673. package/node_modules/ret/dist/sets-lookup.js +51 -0
  2674. package/node_modules/ret/dist/sets-lookup.js.map +1 -0
  2675. package/node_modules/ret/dist/sets.d.ts +9 -0
  2676. package/node_modules/ret/dist/sets.js +43 -0
  2677. package/node_modules/ret/dist/sets.js.map +1 -0
  2678. package/node_modules/ret/dist/tokenizer.d.ts +8 -0
  2679. package/node_modules/ret/dist/tokenizer.js +361 -0
  2680. package/node_modules/ret/dist/tokenizer.js.map +1 -0
  2681. package/node_modules/ret/dist/types/index.d.ts +3 -0
  2682. package/node_modules/ret/dist/types/index.js +16 -0
  2683. package/node_modules/ret/dist/types/index.js.map +1 -0
  2684. package/node_modules/ret/dist/types/set-lookup.d.ts +8 -0
  2685. package/node_modules/ret/dist/types/set-lookup.js +3 -0
  2686. package/node_modules/ret/dist/types/set-lookup.js.map +1 -0
  2687. package/node_modules/ret/dist/types/tokens.d.ts +41 -0
  2688. package/node_modules/ret/dist/types/tokens.js +3 -0
  2689. package/node_modules/ret/dist/types/tokens.js.map +1 -0
  2690. package/node_modules/ret/dist/types/types.d.ts +10 -0
  2691. package/node_modules/ret/dist/types/types.js +15 -0
  2692. package/node_modules/ret/dist/types/types.js.map +1 -0
  2693. package/node_modules/ret/dist/util.d.ts +18 -0
  2694. package/node_modules/ret/dist/util.js +82 -0
  2695. package/node_modules/ret/dist/util.js.map +1 -0
  2696. package/node_modules/ret/dist/write-set-tokens.d.ts +14 -0
  2697. package/node_modules/ret/dist/write-set-tokens.js +108 -0
  2698. package/node_modules/ret/dist/write-set-tokens.js.map +1 -0
  2699. package/node_modules/ret/package.json +42 -0
  2700. package/node_modules/reusify/.github/dependabot.yml +7 -0
  2701. package/node_modules/reusify/.github/workflows/ci.yml +96 -0
  2702. package/node_modules/reusify/LICENSE +22 -0
  2703. package/node_modules/reusify/README.md +139 -0
  2704. package/node_modules/reusify/SECURITY.md +15 -0
  2705. package/node_modules/reusify/benchmarks/createNoCodeFunction.js +30 -0
  2706. package/node_modules/reusify/benchmarks/fib.js +13 -0
  2707. package/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +38 -0
  2708. package/node_modules/reusify/eslint.config.js +14 -0
  2709. package/node_modules/reusify/package.json +50 -0
  2710. package/node_modules/reusify/reusify.d.ts +14 -0
  2711. package/node_modules/reusify/reusify.js +33 -0
  2712. package/node_modules/reusify/test.js +66 -0
  2713. package/node_modules/reusify/tsconfig.json +11 -0
  2714. package/node_modules/rfdc/.github/workflows/ci.yml +21 -0
  2715. package/node_modules/rfdc/LICENSE +15 -0
  2716. package/node_modules/rfdc/default.js +3 -0
  2717. package/node_modules/rfdc/index.d.ts +13 -0
  2718. package/node_modules/rfdc/index.js +198 -0
  2719. package/node_modules/rfdc/index.test-d.ts +13 -0
  2720. package/node_modules/rfdc/package.json +73 -0
  2721. package/node_modules/rfdc/readme.md +181 -0
  2722. package/node_modules/rfdc/test/index.js +306 -0
  2723. package/node_modules/safe-regex2/.gitattributes +2 -0
  2724. package/node_modules/safe-regex2/.github/dependabot.yml +13 -0
  2725. package/node_modules/safe-regex2/.github/workflows/ci.yml +33 -0
  2726. package/node_modules/safe-regex2/.github/workflows/lock-threads.yml +19 -0
  2727. package/node_modules/safe-regex2/LICENSE +21 -0
  2728. package/node_modules/safe-regex2/README.md +68 -0
  2729. package/node_modules/safe-regex2/bin/safe-regex2.js +58 -0
  2730. package/node_modules/safe-regex2/eslint.config.js +6 -0
  2731. package/node_modules/safe-regex2/example/safe.js +5 -0
  2732. package/node_modules/safe-regex2/index.js +76 -0
  2733. package/node_modules/safe-regex2/package.json +78 -0
  2734. package/node_modules/safe-regex2/test/regex.test.js +58 -0
  2735. package/node_modules/safe-regex2/types/index.d.ts +9 -0
  2736. package/node_modules/safe-regex2/types/index.test-d.ts +12 -0
  2737. package/node_modules/safe-stable-stringify/LICENSE +21 -0
  2738. package/node_modules/safe-stable-stringify/esm/package.json +4 -0
  2739. package/node_modules/safe-stable-stringify/esm/wrapper.d.ts +4 -0
  2740. package/node_modules/safe-stable-stringify/esm/wrapper.js +6 -0
  2741. package/node_modules/safe-stable-stringify/index.d.ts +22 -0
  2742. package/node_modules/safe-stable-stringify/index.js +625 -0
  2743. package/node_modules/safe-stable-stringify/package.json +65 -0
  2744. package/node_modules/safe-stable-stringify/readme.md +179 -0
  2745. package/node_modules/secure-json-parse/.airtap.yml +7 -0
  2746. package/node_modules/secure-json-parse/.gitattributes +2 -0
  2747. package/node_modules/secure-json-parse/.github/dependabot.yml +13 -0
  2748. package/node_modules/secure-json-parse/.github/stale.yml +21 -0
  2749. package/node_modules/secure-json-parse/.github/workflows/ci.yml +149 -0
  2750. package/node_modules/secure-json-parse/LICENSE +19 -0
  2751. package/node_modules/secure-json-parse/README.md +132 -0
  2752. package/node_modules/secure-json-parse/benchmarks/ignore.js +35 -0
  2753. package/node_modules/secure-json-parse/benchmarks/no__proto__.js +40 -0
  2754. package/node_modules/secure-json-parse/benchmarks/package.json +15 -0
  2755. package/node_modules/secure-json-parse/benchmarks/remove.js +39 -0
  2756. package/node_modules/secure-json-parse/benchmarks/throw.js +49 -0
  2757. package/node_modules/secure-json-parse/benchmarks/valid.js +49 -0
  2758. package/node_modules/secure-json-parse/eslint.config.js +6 -0
  2759. package/node_modules/secure-json-parse/index.js +161 -0
  2760. package/node_modules/secure-json-parse/package.json +74 -0
  2761. package/node_modules/secure-json-parse/test/index.test.js +649 -0
  2762. package/node_modules/secure-json-parse/types/index.d.ts +60 -0
  2763. package/node_modules/secure-json-parse/types/index.test-d.ts +43 -0
  2764. package/node_modules/semver/LICENSE +15 -0
  2765. package/node_modules/semver/README.md +680 -0
  2766. package/node_modules/semver/bin/semver.js +195 -0
  2767. package/node_modules/semver/classes/comparator.js +143 -0
  2768. package/node_modules/semver/classes/index.js +7 -0
  2769. package/node_modules/semver/classes/range.js +573 -0
  2770. package/node_modules/semver/classes/semver.js +350 -0
  2771. package/node_modules/semver/functions/clean.js +8 -0
  2772. package/node_modules/semver/functions/cmp.js +54 -0
  2773. package/node_modules/semver/functions/coerce.js +62 -0
  2774. package/node_modules/semver/functions/compare-build.js +9 -0
  2775. package/node_modules/semver/functions/compare-loose.js +5 -0
  2776. package/node_modules/semver/functions/compare.js +7 -0
  2777. package/node_modules/semver/functions/diff.js +60 -0
  2778. package/node_modules/semver/functions/eq.js +5 -0
  2779. package/node_modules/semver/functions/gt.js +5 -0
  2780. package/node_modules/semver/functions/gte.js +5 -0
  2781. package/node_modules/semver/functions/inc.js +21 -0
  2782. package/node_modules/semver/functions/lt.js +5 -0
  2783. package/node_modules/semver/functions/lte.js +5 -0
  2784. package/node_modules/semver/functions/major.js +5 -0
  2785. package/node_modules/semver/functions/minor.js +5 -0
  2786. package/node_modules/semver/functions/neq.js +5 -0
  2787. package/node_modules/semver/functions/parse.js +18 -0
  2788. package/node_modules/semver/functions/patch.js +5 -0
  2789. package/node_modules/semver/functions/prerelease.js +8 -0
  2790. package/node_modules/semver/functions/rcompare.js +5 -0
  2791. package/node_modules/semver/functions/rsort.js +5 -0
  2792. package/node_modules/semver/functions/satisfies.js +12 -0
  2793. package/node_modules/semver/functions/sort.js +5 -0
  2794. package/node_modules/semver/functions/truncate.js +48 -0
  2795. package/node_modules/semver/functions/valid.js +8 -0
  2796. package/node_modules/semver/index.js +93 -0
  2797. package/node_modules/semver/internal/constants.js +37 -0
  2798. package/node_modules/semver/internal/debug.js +11 -0
  2799. package/node_modules/semver/internal/identifiers.js +29 -0
  2800. package/node_modules/semver/internal/lrucache.js +42 -0
  2801. package/node_modules/semver/internal/parse-options.js +17 -0
  2802. package/node_modules/semver/internal/re.js +223 -0
  2803. package/node_modules/semver/package.json +78 -0
  2804. package/node_modules/semver/preload.js +4 -0
  2805. package/node_modules/semver/range.bnf +17 -0
  2806. package/node_modules/semver/ranges/gtr.js +6 -0
  2807. package/node_modules/semver/ranges/intersects.js +9 -0
  2808. package/node_modules/semver/ranges/ltr.js +6 -0
  2809. package/node_modules/semver/ranges/max-satisfying.js +27 -0
  2810. package/node_modules/semver/ranges/min-satisfying.js +26 -0
  2811. package/node_modules/semver/ranges/min-version.js +63 -0
  2812. package/node_modules/semver/ranges/outside.js +82 -0
  2813. package/node_modules/semver/ranges/simplify.js +49 -0
  2814. package/node_modules/semver/ranges/subset.js +249 -0
  2815. package/node_modules/semver/ranges/to-comparators.js +10 -0
  2816. package/node_modules/semver/ranges/valid.js +13 -0
  2817. package/node_modules/set-cookie-parser/LICENSE +21 -0
  2818. package/node_modules/set-cookie-parser/README.md +202 -0
  2819. package/node_modules/set-cookie-parser/lib/set-cookie.js +242 -0
  2820. package/node_modules/set-cookie-parser/package.json +45 -0
  2821. package/node_modules/setprototypeof/LICENSE +13 -0
  2822. package/node_modules/setprototypeof/README.md +31 -0
  2823. package/node_modules/setprototypeof/index.d.ts +2 -0
  2824. package/node_modules/setprototypeof/index.js +17 -0
  2825. package/node_modules/setprototypeof/package.json +38 -0
  2826. package/node_modules/setprototypeof/test/index.js +24 -0
  2827. package/node_modules/sonic-boom/.eslintignore +2 -0
  2828. package/node_modules/sonic-boom/.taprc +3 -0
  2829. package/node_modules/sonic-boom/LICENSE +21 -0
  2830. package/node_modules/sonic-boom/README.md +153 -0
  2831. package/node_modules/sonic-boom/bench.js +98 -0
  2832. package/node_modules/sonic-boom/check.js +18 -0
  2833. package/node_modules/sonic-boom/example.js +8 -0
  2834. package/node_modules/sonic-boom/fixtures/firehose.js +22 -0
  2835. package/node_modules/sonic-boom/index.js +733 -0
  2836. package/node_modules/sonic-boom/package.json +52 -0
  2837. package/node_modules/sonic-boom/test/destroy.test.js +49 -0
  2838. package/node_modules/sonic-boom/test/end.test.js +98 -0
  2839. package/node_modules/sonic-boom/test/flush-sync.test.js +140 -0
  2840. package/node_modules/sonic-boom/test/flush.test.js +419 -0
  2841. package/node_modules/sonic-boom/test/fsync.test.js +63 -0
  2842. package/node_modules/sonic-boom/test/helper.js +42 -0
  2843. package/node_modules/sonic-boom/test/minlength.test.js +35 -0
  2844. package/node_modules/sonic-boom/test/mode.test.js +116 -0
  2845. package/node_modules/sonic-boom/test/periodicflush.test.js +61 -0
  2846. package/node_modules/sonic-boom/test/reopen.test.js +239 -0
  2847. package/node_modules/sonic-boom/test/retry.test.js +414 -0
  2848. package/node_modules/sonic-boom/test/sync.test.js +261 -0
  2849. package/node_modules/sonic-boom/test/write.test.js +515 -0
  2850. package/node_modules/sonic-boom/types/index.d.ts +63 -0
  2851. package/node_modules/sonic-boom/types/tests/test.ts +4 -0
  2852. package/node_modules/split2/LICENSE +13 -0
  2853. package/node_modules/split2/README.md +85 -0
  2854. package/node_modules/split2/bench.js +27 -0
  2855. package/node_modules/split2/index.js +141 -0
  2856. package/node_modules/split2/package.json +39 -0
  2857. package/node_modules/split2/test.js +409 -0
  2858. package/node_modules/statuses/HISTORY.md +87 -0
  2859. package/node_modules/statuses/LICENSE +23 -0
  2860. package/node_modules/statuses/README.md +139 -0
  2861. package/node_modules/statuses/codes.json +65 -0
  2862. package/node_modules/statuses/index.js +146 -0
  2863. package/node_modules/statuses/package.json +49 -0
  2864. package/node_modules/thread-stream/.claude/settings.local.json +15 -0
  2865. package/node_modules/thread-stream/.github/dependabot.yml +13 -0
  2866. package/node_modules/thread-stream/.github/workflows/ci.yml +74 -0
  2867. package/node_modules/thread-stream/LICENSE +21 -0
  2868. package/node_modules/thread-stream/README.md +138 -0
  2869. package/node_modules/thread-stream/bench.js +85 -0
  2870. package/node_modules/thread-stream/eslint.config.js +10 -0
  2871. package/node_modules/thread-stream/index.d.ts +99 -0
  2872. package/node_modules/thread-stream/index.js +645 -0
  2873. package/node_modules/thread-stream/lib/indexes.js +11 -0
  2874. package/node_modules/thread-stream/lib/wait.js +77 -0
  2875. package/node_modules/thread-stream/lib/worker.js +298 -0
  2876. package/node_modules/thread-stream/node_modules/real-require/LICENSE.md +21 -0
  2877. package/node_modules/thread-stream/node_modules/real-require/README.md +51 -0
  2878. package/node_modules/thread-stream/node_modules/real-require/package.json +38 -0
  2879. package/node_modules/thread-stream/node_modules/real-require/src/index.js +14 -0
  2880. package/node_modules/thread-stream/package.json +50 -0
  2881. package/node_modules/thread-stream/test/base.test.js +259 -0
  2882. package/node_modules/thread-stream/test/bench.test.js +38 -0
  2883. package/node_modules/thread-stream/test/bundlers.test.js +59 -0
  2884. package/node_modules/thread-stream/test/close-on-gc.js +37 -0
  2885. package/node_modules/thread-stream/test/commonjs-fallback.test.js +75 -0
  2886. package/node_modules/thread-stream/test/context.test.js +21 -0
  2887. package/node_modules/thread-stream/test/create-and-exit.js +16 -0
  2888. package/node_modules/thread-stream/test/custom-worker.js +9 -0
  2889. package/node_modules/thread-stream/test/dir with spaces/test-package.zip +0 -0
  2890. package/node_modules/thread-stream/test/emit-event.js +22 -0
  2891. package/node_modules/thread-stream/test/end.test.js +56 -0
  2892. package/node_modules/thread-stream/test/error.js +14 -0
  2893. package/node_modules/thread-stream/test/esm.test.mjs +46 -0
  2894. package/node_modules/thread-stream/test/event.test.js +24 -0
  2895. package/node_modules/thread-stream/test/exit.js +14 -0
  2896. package/node_modules/thread-stream/test/flush-worker.js +68 -0
  2897. package/node_modules/thread-stream/test/flush.test.js +112 -0
  2898. package/node_modules/thread-stream/test/get-context.js +22 -0
  2899. package/node_modules/thread-stream/test/helper.d.ts +1 -0
  2900. package/node_modules/thread-stream/test/helper.js +26 -0
  2901. package/node_modules/thread-stream/test/indexes.test.js +11 -0
  2902. package/node_modules/thread-stream/test/message-without-code.js +19 -0
  2903. package/node_modules/thread-stream/test/multibyte-chars.test.mjs +75 -0
  2904. package/node_modules/thread-stream/test/multibyte-overrun.test.mjs +33 -0
  2905. package/node_modules/thread-stream/test/on-message.js +18 -0
  2906. package/node_modules/thread-stream/test/pkg/index.js +37 -0
  2907. package/node_modules/thread-stream/test/pkg/pkg.config.json +14 -0
  2908. package/node_modules/thread-stream/test/pkg/pkg.test.js +45 -0
  2909. package/node_modules/thread-stream/test/port.js +16 -0
  2910. package/node_modules/thread-stream/test/post-message.test.js +23 -0
  2911. package/node_modules/thread-stream/test/report-thread-name.js +16 -0
  2912. package/node_modules/thread-stream/test/string-limit-2.test.js +35 -0
  2913. package/node_modules/thread-stream/test/string-limit.test.js +37 -0
  2914. package/node_modules/thread-stream/test/syntax-error.mjs +2 -0
  2915. package/node_modules/thread-stream/test/thread-management.test.js +150 -0
  2916. package/node_modules/thread-stream/test/to-file-on-destroy.js +23 -0
  2917. package/node_modules/thread-stream/test/to-file-on-final.js +24 -0
  2918. package/node_modules/thread-stream/test/to-file.js +12 -0
  2919. package/node_modules/thread-stream/test/to-file.mjs +8 -0
  2920. package/node_modules/thread-stream/test/to-next.js +9 -0
  2921. package/node_modules/thread-stream/test/transpiled.test.js +29 -0
  2922. package/node_modules/thread-stream/test/ts/to-file.ts +10 -0
  2923. package/node_modules/thread-stream/test/ts/transpile.sh +19 -0
  2924. package/node_modules/thread-stream/test/ts-commonjs-default-export.zip +0 -0
  2925. package/node_modules/thread-stream/test/ts-native.test.mjs +35 -0
  2926. package/node_modules/thread-stream/test/ts-node-fallback.test.js +35 -0
  2927. package/node_modules/thread-stream/test/uncaughtException.js +21 -0
  2928. package/node_modules/thread-stream/test/unhandledRejection.js +21 -0
  2929. package/node_modules/thread-stream/test/watch-mode.test.js +30 -0
  2930. package/node_modules/thread-stream/test/worker-name.test.js +43 -0
  2931. package/node_modules/thread-stream/test/yarnrc.yml +7 -0
  2932. package/node_modules/thread-stream/tsconfig.json +8 -0
  2933. package/node_modules/toad-cache/LICENSE +21 -0
  2934. package/node_modules/toad-cache/README.md +265 -0
  2935. package/node_modules/toad-cache/dist/toad-cache.cjs +878 -0
  2936. package/node_modules/toad-cache/dist/toad-cache.mjs +852 -0
  2937. package/node_modules/toad-cache/package.json +84 -0
  2938. package/node_modules/toad-cache/toad-cache.d.cts +138 -0
  2939. package/node_modules/toad-cache/toad-cache.d.ts +128 -0
  2940. package/node_modules/toidentifier/HISTORY.md +9 -0
  2941. package/node_modules/toidentifier/LICENSE +21 -0
  2942. package/node_modules/toidentifier/README.md +61 -0
  2943. package/node_modules/toidentifier/index.js +32 -0
  2944. package/node_modules/toidentifier/package.json +38 -0
  2945. package/package.json +43 -20
  2946. package/scripts/build-local.sh +10 -11
  2947. package/scripts/check-app-path-boundaries.mjs +121 -0
  2948. package/scripts/check-app-spec.mjs +127 -25
  2949. package/scripts/check-colima-launchd.mjs +26 -22
  2950. package/scripts/check-integration-isolation.ts +541 -0
  2951. package/scripts/check-new-file-tests.mjs +16 -47
  2952. package/scripts/check-open-core-boundaries.mjs +334 -0
  2953. package/scripts/check-test-layering.sh +86 -0
  2954. package/scripts/fixtures/instances/hermes-sample/instance.json +3 -2
  2955. package/scripts/fixtures/instances/legacy-openclaw-sample/instance.json +1 -1
  2956. package/scripts/local-web-upgrade-test.README +147 -0
  2957. package/scripts/local-web-upgrade-test.example.env +54 -0
  2958. package/scripts/local-web-upgrade-test.sh +894 -0
  2959. package/scripts/pack-gui-and-send-pi.sh +41 -0
  2960. package/scripts/pack-with-gui.mjs +391 -0
  2961. package/scripts/perf/instances.js +1 -1
  2962. package/scripts/prune-open-core-dist.mjs +91 -0
  2963. package/scripts/run.sh +24 -25
  2964. package/scripts/setup-pi.sh +2 -2
  2965. package/scripts/smoke/hermes-bootstrap.sh +7 -7
  2966. package/scripts/smoke-backend.mjs +33 -1
  2967. package/templates/hermes-entrypoint.sh +19 -29
  2968. package/apps/openwebui-container.yaml +0 -97
  2969. package/apps/playwright-container.yaml +0 -126
  2970. package/dist/cli/panel.d.ts +0 -27
  2971. package/dist/cli/panel.js +0 -805
  2972. package/dist/cli/panel.js.map +0 -1
  2973. package/dist/crypto-shim.d.ts +0 -1
  2974. package/dist/crypto-shim.js +0 -2
  2975. package/dist/crypto-shim.js.map +0 -1
  2976. package/dist/routes/agent-apps.d.ts +0 -15
  2977. package/dist/routes/agent-apps.js +0 -78
  2978. package/dist/routes/agent-apps.js.map +0 -1
  2979. package/dist/routes/internal.d.ts +0 -2
  2980. package/dist/routes/internal.js +0 -59
  2981. package/dist/routes/internal.js.map +0 -1
  2982. package/dist/routes/runtime.d.ts +0 -15
  2983. package/dist/routes/runtime.js +0 -69
  2984. package/dist/routes/runtime.js.map +0 -1
  2985. package/dist/services/agent-apps/catalog.d.ts +0 -33
  2986. package/dist/services/agent-apps/catalog.js +0 -88
  2987. package/dist/services/agent-apps/catalog.js.map +0 -1
  2988. package/dist/services/agent-apps/index.d.ts +0 -36
  2989. package/dist/services/agent-apps/index.js +0 -171
  2990. package/dist/services/agent-apps/index.js.map +0 -1
  2991. package/dist/services/agent-apps/installers/adapter-probes.d.ts +0 -49
  2992. package/dist/services/agent-apps/installers/adapter-probes.js +0 -223
  2993. package/dist/services/agent-apps/installers/adapter-probes.js.map +0 -1
  2994. package/dist/services/agent-apps/installers/adapter.d.ts +0 -30
  2995. package/dist/services/agent-apps/installers/adapter.js +0 -171
  2996. package/dist/services/agent-apps/installers/adapter.js.map +0 -1
  2997. package/dist/services/agent-apps/installers/registry-probe.js.map +0 -1
  2998. package/dist/services/agent-apps/installers/shell-script.d.ts +0 -47
  2999. package/dist/services/agent-apps/installers/shell-script.js +0 -488
  3000. package/dist/services/agent-apps/installers/shell-script.js.map +0 -1
  3001. package/dist/services/agent-apps/types.d.ts +0 -128
  3002. package/dist/services/agent-apps/types.js +0 -17
  3003. package/dist/services/agent-apps/types.js.map +0 -1
  3004. package/dist/services/app/app-compiler.js +0 -172
  3005. package/dist/services/app/app-compiler.js.map +0 -1
  3006. package/dist/services/app/app-manager.d.ts +0 -174
  3007. package/dist/services/app/app-manager.js +0 -2741
  3008. package/dist/services/app/app-manager.js.map +0 -1
  3009. package/dist/services/app/custom-manager.d.ts +0 -27
  3010. package/dist/services/app/custom-manager.js +0 -285
  3011. package/dist/services/app/custom-manager.js.map +0 -1
  3012. package/dist/services/app/hermes-agent-manager.d.ts +0 -20
  3013. package/dist/services/app/hermes-agent-manager.js +0 -292
  3014. package/dist/services/app/hermes-agent-manager.js.map +0 -1
  3015. package/dist/services/app/id-normalizer.d.ts +0 -27
  3016. package/dist/services/app/id-normalizer.js +0 -77
  3017. package/dist/services/app/id-normalizer.js.map +0 -1
  3018. package/dist/services/app/ollama-manager.d.ts +0 -18
  3019. package/dist/services/app/ollama-manager.js +0 -207
  3020. package/dist/services/app/ollama-manager.js.map +0 -1
  3021. package/dist/services/app/openclaw-manager.d.ts +0 -63
  3022. package/dist/services/app/openclaw-manager.js +0 -1210
  3023. package/dist/services/app/openclaw-manager.js.map +0 -1
  3024. package/dist/services/app/paths.d.ts +0 -47
  3025. package/dist/services/app/paths.js +0 -68
  3026. package/dist/services/app/paths.js.map +0 -1
  3027. package/dist/services/app/platform-transform.d.ts +0 -32
  3028. package/dist/services/app/platform-transform.js +0 -65
  3029. package/dist/services/app/platform-transform.js.map +0 -1
  3030. package/dist/services/app/provide-resolver.d.ts +0 -29
  3031. package/dist/services/app/provide-resolver.js +0 -112
  3032. package/dist/services/app/provide-resolver.js.map +0 -1
  3033. package/dist/services/app/registry.d.ts +0 -17
  3034. package/dist/services/app/registry.js +0 -31
  3035. package/dist/services/app/registry.js.map +0 -1
  3036. package/dist/services/app/remote-spec.d.ts +0 -14
  3037. package/dist/services/app/remote-spec.js +0 -58
  3038. package/dist/services/app/remote-spec.js.map +0 -1
  3039. package/dist/services/app/terminal-session-manager.js +0 -157
  3040. package/dist/services/app/terminal-session-manager.js.map +0 -1
  3041. package/dist/services/app/types.d.ts +0 -72
  3042. package/dist/services/app/types.js +0 -16
  3043. package/dist/services/app/types.js.map +0 -1
  3044. package/dist/services/app-passwords.js +0 -173
  3045. package/dist/services/app-passwords.js.map +0 -1
  3046. package/dist/services/backup-manager.d.ts +0 -264
  3047. package/dist/services/backup-manager.js +0 -2264
  3048. package/dist/services/backup-manager.js.map +0 -1
  3049. package/dist/services/backup-verify.js +0 -240
  3050. package/dist/services/backup-verify.js.map +0 -1
  3051. package/dist/services/capability-endpoint-validator.d.ts +0 -41
  3052. package/dist/services/capability-endpoint-validator.js +0 -123
  3053. package/dist/services/capability-endpoint-validator.js.map +0 -1
  3054. package/dist/services/capability-health.d.ts +0 -16
  3055. package/dist/services/capability-health.js +0 -121
  3056. package/dist/services/capability-health.js.map +0 -1
  3057. package/dist/services/capability-registry.d.ts +0 -106
  3058. package/dist/services/capability-registry.js +0 -313
  3059. package/dist/services/capability-registry.js.map +0 -1
  3060. package/dist/services/connection-apply.d.ts +0 -91
  3061. package/dist/services/connection-apply.js +0 -475
  3062. package/dist/services/connection-apply.js.map +0 -1
  3063. package/dist/services/connection-resolver.d.ts +0 -65
  3064. package/dist/services/connection-resolver.js +0 -281
  3065. package/dist/services/connection-resolver.js.map +0 -1
  3066. package/dist/services/connection-transactor.d.ts +0 -39
  3067. package/dist/services/connection-transactor.js +0 -351
  3068. package/dist/services/connection-transactor.js.map +0 -1
  3069. package/dist/services/external-mounts.js +0 -187
  3070. package/dist/services/external-mounts.js.map +0 -1
  3071. package/dist/services/files-manager.d.ts +0 -252
  3072. package/dist/services/files-manager.js +0 -1075
  3073. package/dist/services/files-manager.js.map +0 -1
  3074. package/dist/services/files-mounts.d.ts +0 -42
  3075. package/dist/services/files-mounts.js +0 -207
  3076. package/dist/services/files-mounts.js.map +0 -1
  3077. package/dist/services/instance-manager.d.ts +0 -191
  3078. package/dist/services/instance-manager.js +0 -1296
  3079. package/dist/services/instance-manager.js.map +0 -1
  3080. package/dist/services/macos-launchd.d.ts +0 -89
  3081. package/dist/services/macos-launchd.js +0 -273
  3082. package/dist/services/macos-launchd.js.map +0 -1
  3083. package/dist/services/nomad-manager.d.ts +0 -290
  3084. package/dist/services/nomad-manager.js +0 -3953
  3085. package/dist/services/nomad-manager.js.map +0 -1
  3086. package/dist/services/organize/applier.js +0 -218
  3087. package/dist/services/organize/applier.js.map +0 -1
  3088. package/dist/services/organize/rules.js +0 -286
  3089. package/dist/services/organize/rules.js.map +0 -1
  3090. package/dist/services/organize/scanner.js +0 -366
  3091. package/dist/services/organize/scanner.js.map +0 -1
  3092. package/dist/services/organize/store.js +0 -82
  3093. package/dist/services/organize/store.js.map +0 -1
  3094. package/dist/services/panel-manager.d.ts +0 -50
  3095. package/dist/services/panel-manager.js +0 -472
  3096. package/dist/services/panel-manager.js.map +0 -1
  3097. package/dist/services/plugin-installer.js +0 -128
  3098. package/dist/services/plugin-installer.js.map +0 -1
  3099. package/dist/services/process-manager.d.ts +0 -25
  3100. package/dist/services/process-manager.js +0 -568
  3101. package/dist/services/process-manager.js.map +0 -1
  3102. package/dist/services/runtime/adapters/custom.d.ts +0 -20
  3103. package/dist/services/runtime/adapters/custom.js +0 -146
  3104. package/dist/services/runtime/adapters/custom.js.map +0 -1
  3105. package/dist/services/runtime/adapters/hermes.d.ts +0 -204
  3106. package/dist/services/runtime/adapters/hermes.js +0 -1631
  3107. package/dist/services/runtime/adapters/hermes.js.map +0 -1
  3108. package/dist/services/runtime/adapters/openclaw-mcporter.d.ts +0 -45
  3109. package/dist/services/runtime/adapters/openclaw-mcporter.js +0 -108
  3110. package/dist/services/runtime/adapters/openclaw-mcporter.js.map +0 -1
  3111. package/dist/services/runtime/adapters/openclaw-routes.d.ts +0 -23
  3112. package/dist/services/runtime/adapters/openclaw-routes.js +0 -1014
  3113. package/dist/services/runtime/adapters/openclaw-routes.js.map +0 -1
  3114. package/dist/services/runtime/adapters/openclaw.d.ts +0 -393
  3115. package/dist/services/runtime/adapters/openclaw.js +0 -3853
  3116. package/dist/services/runtime/adapters/openclaw.js.map +0 -1
  3117. package/dist/services/runtime/index.d.ts +0 -34
  3118. package/dist/services/runtime/index.js +0 -51
  3119. package/dist/services/runtime/index.js.map +0 -1
  3120. package/dist/services/runtime/mcp-shims/anythingllm-shim.d.ts +0 -46
  3121. package/dist/services/runtime/mcp-shims/anythingllm-shim.js +0 -281
  3122. package/dist/services/runtime/mcp-shims/anythingllm-shim.js.map +0 -1
  3123. package/dist/services/runtime/mcp-shims/drive-shim.d.ts +0 -54
  3124. package/dist/services/runtime/mcp-shims/drive-shim.js +0 -489
  3125. package/dist/services/runtime/mcp-shims/drive-shim.js.map +0 -1
  3126. package/dist/services/runtime/migrations.d.ts +0 -23
  3127. package/dist/services/runtime/migrations.js +0 -125
  3128. package/dist/services/runtime/migrations.js.map +0 -1
  3129. package/dist/services/runtime/registry.d.ts +0 -13
  3130. package/dist/services/runtime/registry.js +0 -32
  3131. package/dist/services/runtime/registry.js.map +0 -1
  3132. package/dist/services/setup-manager.d.ts +0 -136
  3133. package/dist/services/setup-manager.js +0 -2149
  3134. package/dist/services/setup-manager.js.map +0 -1
  3135. package/dist/services/suggestions.d.ts +0 -27
  3136. package/dist/services/suggestions.js +0 -133
  3137. package/dist/services/suggestions.js.map +0 -1
  3138. package/dist/services/system-monitor.js +0 -79
  3139. package/dist/services/system-monitor.js.map +0 -1
  3140. package/dist/services/task-registry.d.ts +0 -44
  3141. package/dist/services/task-registry.js +0 -76
  3142. package/dist/services/task-registry.js.map +0 -1
  3143. package/dist/services/types-shim.d.ts +0 -16
  3144. package/dist/services/types-shim.js +0 -2
  3145. package/dist/services/types-shim.js.map +0 -1
  3146. package/dist/services/update-manager.d.ts +0 -47
  3147. package/dist/services/update-manager.js +0 -323
  3148. package/dist/services/update-manager.js.map +0 -1
  3149. package/dist/services/webdav/server.d.ts +0 -24
  3150. package/dist/services/webdav/server.js +0 -420
  3151. package/dist/services/webdav/server.js.map +0 -1
  3152. package/dist/services/webdav/xml-builder.js.map +0 -1
  3153. package/dist/services/workspace-builder.d.ts +0 -29
  3154. package/dist/services/workspace-builder.js +0 -188
  3155. package/dist/services/workspace-builder.js.map +0 -1
  3156. package/public/assets/ApiKeyField-CvyAOcJS.js +0 -1
  3157. package/public/assets/Dashboard-AuJESBlJ.js +0 -1
  3158. package/public/assets/HermesChatPanel-CByPREwb.js +0 -1
  3159. package/public/assets/HermesConfigForm-DRda8FKX.js +0 -4
  3160. package/public/assets/InitPassword-ka4wNpM5.js +0 -1
  3161. package/public/assets/InstanceDetail-Cg1nS8HX.js +0 -92
  3162. package/public/assets/Login-aPajuQzf.js +0 -1
  3163. package/public/assets/NewInstance-Dd1ebNIx.js +0 -1
  3164. package/public/assets/ProviderRecommendations-DFmADQ7V.js +0 -1
  3165. package/public/assets/Settings-BYQnbLYL.js +0 -1
  3166. package/public/assets/Setup-D05lwDOV.js +0 -1
  3167. package/public/assets/WeixinLoginPanel-D89kdhP4.js +0 -9
  3168. package/public/assets/index-HSXCsceK.css +0 -1
  3169. package/public/assets/index-bnBu0nlQ.js +0 -19
  3170. package/public/assets/registry-C_qeFTkZ.js +0 -2
  3171. package/public/assets/usePolling-Bn93fe7M.js +0 -1
  3172. package/public/assets/vendor-i18n-flxcMVeP.js +0 -9
  3173. package/public/assets/vendor-react-ZC5T_huj.js +0 -59
  3174. package/public/index.html +0 -20
  3175. package/scripts/build-image.sh +0 -55
  3176. package/scripts/check-adapter-isolation.ts +0 -293
  3177. package/scripts/check-i18n.mjs +0 -154
  3178. /package/dist/services/{app → app-common}/app-compiler.d.ts +0 -0
  3179. /package/dist/services/{app → app-common}/terminal-session-manager.d.ts +0 -0
  3180. /package/dist/services/{backup-verify.d.ts → backup/backup-verify.d.ts} +0 -0
  3181. /package/dist/services/{external-mounts.d.ts → files/external-mounts.d.ts} +0 -0
  3182. /package/dist/services/{organize → files/organize}/applier.d.ts +0 -0
  3183. /package/dist/services/{organize → files/organize}/rules.d.ts +0 -0
  3184. /package/dist/services/{organize → files/organize}/scanner.d.ts +0 -0
  3185. /package/dist/services/{organize → files/organize}/store.d.ts +0 -0
  3186. /package/dist/services/{webdav → files/webdav}/xml-builder.d.ts +0 -0
  3187. /package/dist/services/{webdav → files/webdav}/xml-builder.js +0 -0
  3188. /package/dist/services/{app-passwords.d.ts → instances/passwords.d.ts} +0 -0
  3189. /package/dist/services/{agent-apps → integrations/installable}/installers/registry-probe.d.ts +0 -0
  3190. /package/dist/services/{agent-apps → integrations/installable}/installers/registry-probe.js +0 -0
  3191. /package/dist/services/{plugin-installer.d.ts → setup/plugin-installer.d.ts} +0 -0
  3192. /package/dist/services/{system-monitor.d.ts → system/system-monitor.d.ts} +0 -0
  3193. /package/{public → node_modules/jishushell-panel/output/public}/assets/logo-black-theme-DywLAtFy.png +0 -0
  3194. /package/{public → node_modules/jishushell-panel/output/public}/assets/logo-white-theme-DXffFAWw.png +0 -0
  3195. /package/{public → node_modules/jishushell-panel/output/public}/favicon.png +0 -0
  3196. /package/{public → node_modules/jishushell-panel/output/public}/logos/hermes.png +0 -0
  3197. /package/{public → node_modules/jishushell-panel/output/public}/logos/ollama.png +0 -0
  3198. /package/{public → node_modules/jishushell-panel/output/public}/logos/openclaw.svg +0 -0
@@ -1,2741 +0,0 @@
1
- import { createHash } from "crypto";
2
- import { existsSync, mkdtempSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync, chmodSync, chownSync, lstatSync, } from "fs";
3
- import { homedir, tmpdir } from "os";
4
- import { basename, extname, join, dirname } from "path";
5
- import { spawn, spawnSync } from "child_process";
6
- import { fileURLToPath } from "url";
7
- import { parse, stringify } from "yaml";
8
- import * as config from "../../config.js";
9
- import { ensureDirHost } from "../../utils/fs.js";
10
- import { safeReadJson, safeWriteJson } from "../../utils/safe-json.js";
11
- import * as legacyInstanceManager from "../instance-manager.js";
12
- import { withInstanceLock } from "../../utils/instance-lock.js";
13
- import { createTask, emitTask, getRunningTasks, getTask } from "../task-registry.js";
14
- import { compileTaskRuntime } from "./app-compiler.js";
15
- import * as capabilityRegistry from "../capability-registry.js";
16
- import { resolveProvideEndpoint } from "./provide-resolver.js";
17
- import { platformTransformSpec } from "./platform-transform.js";
18
- const DEFAULT_LIFECYCLE_PATH_ENTRIES = [
19
- "/opt/homebrew/bin",
20
- "/opt/homebrew/sbin",
21
- "/usr/local/bin",
22
- "/usr/local/sbin",
23
- "/usr/bin",
24
- "/bin",
25
- "/usr/sbin",
26
- "/sbin",
27
- ];
28
- const DEFAULT_LIFECYCLE_PATH = DEFAULT_LIFECYCLE_PATH_ENTRIES.join(":");
29
- const MACOS_LIFECYCLE_PATH_PROBES = [
30
- "/Applications/Docker.app/Contents/Resources/bin",
31
- ];
32
- const ANONYMOUS_DOWNLOAD_IMAGE_ALLOWLIST = new Set([
33
- "filebrowser/filebrowser:latest",
34
- "ghcr.io/browserless/chromium:latest",
35
- "ghcr.io/fmaclen/hollama:latest",
36
- "ghcr.io/open-webui/open-webui:main",
37
- "mcr.microsoft.com/playwright:v1.55.0-noble",
38
- "mintplexlabs/anythingllm:latest",
39
- "paradedb/paradedb:v0.22.2-pg17",
40
- "redis:7.0-alpine",
41
- "searxng/searxng:latest",
42
- "wechatopenai/weknora-app:latest",
43
- "wechatopenai/weknora-docreader:latest",
44
- "wechatopenai/weknora-ui:latest",
45
- ]);
46
- function getConfigValue(name) {
47
- return name in config ? config[name] : undefined;
48
- }
49
- function resolveConfigPath(value, fallback) {
50
- return typeof value === "string" && value.trim() ? value : fallback;
51
- }
52
- const JISHUSHELL_HOME = resolveConfigPath(getConfigValue("JISHUSHELL_HOME"), join(process.env.HOME ?? homedir(), ".jishushell"));
53
- const APPS_DIR = resolveConfigPath(getConfigValue("APPS_DIR"), join(JISHUSHELL_HOME, "apps"));
54
- const INSTANCES_DIR = resolveConfigPath(getConfigValue("INSTANCES_DIR"), join(JISHUSHELL_HOME, "instances"));
55
- const CURRENT_JISHUSHELL_VERSION = (() => {
56
- try {
57
- const pkg = JSON.parse(readFileSync(new URL("../../../package.json", import.meta.url), "utf-8"));
58
- return String(pkg.version ?? "0.0.0");
59
- }
60
- catch {
61
- return "0.0.0";
62
- }
63
- })();
64
- const BUILTIN_SPEC_FILE_RE = /\.ya?ml$/i;
65
- function builtinAppsDirCandidates() {
66
- return [
67
- fileURLToPath(new URL("../../../apps/", import.meta.url)),
68
- join(process.cwd(), "apps"),
69
- ];
70
- }
71
- function resolveBuiltinAppsDir() {
72
- for (const candidate of builtinAppsDirCandidates()) {
73
- if (existsSync(candidate))
74
- return candidate;
75
- }
76
- return null;
77
- }
78
- function parseBuiltinTemplate(fileName, yamlText) {
79
- let parsed = {};
80
- try {
81
- parsed = parse(yamlText) ?? {};
82
- }
83
- catch {
84
- return null;
85
- }
86
- const tasks = Array.isArray(parsed.tasks) ? parsed.tasks : [];
87
- const serviceTasks = tasks.filter((task) => (task?.role ?? "service") === "service");
88
- const serviceTask = serviceTasks[0] ?? tasks[0] ?? null;
89
- const serviceRuntime = typeof serviceTask?.runtime === "string" && serviceTask.runtime.trim()
90
- ? serviceTask.runtime.trim()
91
- : null;
92
- const id = typeof parsed.id === "string" && parsed.id.trim()
93
- ? parsed.id.trim()
94
- : basename(fileName, extname(fileName));
95
- const name = typeof parsed.name === "string" && parsed.name.trim()
96
- ? parsed.name.trim()
97
- : id;
98
- const description = typeof parsed.description === "string" ? parsed.description : "";
99
- const isOllamaTemplate = /^ollama(?:[-_]|$)/i.test(basename(fileName, extname(fileName))) || /^ollama(?:[-_]|$)/i.test(id);
100
- const suggestedAppType = isOllamaTemplate ? "ollama" : "custom";
101
- return {
102
- id,
103
- fileName,
104
- name,
105
- description,
106
- serviceRuntime,
107
- instanceCompatible: serviceTasks.length === 1
108
- && tasks.every((task) => {
109
- const runtime = typeof task?.runtime === "string" ? task.runtime.trim() : "";
110
- return runtime === "container" || runtime === "process";
111
- })
112
- && (serviceRuntime === "container" || serviceRuntime === "process"),
113
- suggestedAppType,
114
- yaml: yamlText,
115
- };
116
- }
117
- export function listBuiltinAppSpecs() {
118
- const dir = resolveBuiltinAppsDir();
119
- if (!dir)
120
- return [];
121
- return readdirSync(dir)
122
- .filter((entry) => BUILTIN_SPEC_FILE_RE.test(entry))
123
- .sort((left, right) => left.localeCompare(right))
124
- .map((fileName) => parseBuiltinTemplate(fileName, readFileSync(join(dir, fileName), "utf-8")))
125
- .filter((entry) => entry != null);
126
- }
127
- function installedAppDir(instanceId) {
128
- for (const rootDir of [APPS_DIR, INSTANCES_DIR]) {
129
- const dir = join(rootDir, instanceId);
130
- if (existsSync(join(dir, "app-spec.yaml")) && existsSync(join(dir, "manifest.json"))) {
131
- return dir;
132
- }
133
- }
134
- return null;
135
- }
136
- export function updateInstance(instanceId, name, description) {
137
- const updatedMeta = legacyInstanceManager.updateInstance(instanceId, name, description);
138
- const appData = getApp(instanceId);
139
- const appDir = installedAppDir(instanceId);
140
- if (appData && appDir) {
141
- const nextSpec = {
142
- ...appData.spec,
143
- ...(name != null ? { name } : {}),
144
- ...(description != null ? { description } : {}),
145
- };
146
- const yamlPath = join(appDir, "app-spec.yaml");
147
- const yamlTmp = yamlPath + ".tmp";
148
- writeFileSync(yamlTmp, stringify(nextSpec), { mode: 0o644 });
149
- renameSync(yamlTmp, yamlPath);
150
- }
151
- return legacyInstanceManager.getInstance(instanceId) ?? updatedMeta;
152
- }
153
- function parseComparableVersion(version, label) {
154
- const normalized = version
155
- .trim()
156
- .replace(/^>=\s*/, "")
157
- .replace(/^v/i, "")
158
- .replace(/[-+].*$/, "");
159
- const match = normalized.match(/^(\d+)(?:\.(\d+))?(?:\.(\d+))?$/);
160
- if (!match) {
161
- throw new Error(`${label} '${version}' 格式无效,应为 x.y.z`);
162
- }
163
- return [
164
- Number(match[1] ?? 0),
165
- Number(match[2] ?? 0),
166
- Number(match[3] ?? 0),
167
- ];
168
- }
169
- function compareVersions(left, right) {
170
- for (let index = 0; index < 3; index++) {
171
- if (left[index] > right[index])
172
- return 1;
173
- if (left[index] < right[index])
174
- return -1;
175
- }
176
- return 0;
177
- }
178
- function requiredJishuShellVersion(spec) {
179
- const required = spec.jishushell?.min_version?.trim();
180
- if (!required) {
181
- throw new Error(`App '${spec.id}' 缺少 jishushell.min_version,请先在 YAML 中声明支持的最低 JishuShell 版本`);
182
- }
183
- return required;
184
- }
185
- function ensureCompatibleJishuShellVersion(spec) {
186
- const required = requiredJishuShellVersion(spec);
187
- const current = parseComparableVersion(CURRENT_JISHUSHELL_VERSION, "当前 JishuShell 版本");
188
- const minimum = parseComparableVersion(required, "jishushell.min_version");
189
- if (compareVersions(current, minimum) < 0) {
190
- throw new Error(`当前 JishuShell 版本 ${CURRENT_JISHUSHELL_VERSION} 低于应用要求 ${required},请先升级 JishuShell`);
191
- }
192
- }
193
- function expandPath(p) {
194
- if (/^~\/\.jishushell(?:\/|$)/.test(p)) {
195
- return p.replace(/^~\/\.jishushell(?=\/|$)/, JISHUSHELL_HOME);
196
- }
197
- return p.replace(/^~(?=\/|$)/, process.env.HOME ?? homedir());
198
- }
199
- function buildDeterministicPath(basePath, extraPaths = []) {
200
- return [basePath ?? "", DEFAULT_LIFECYCLE_PATH, dirname(process.execPath), ...extraPaths]
201
- .flatMap((entry) => entry.split(":"))
202
- .map((entry) => entry.trim())
203
- .filter(Boolean)
204
- .filter((entry, index, entries) => entries.indexOf(entry) === index)
205
- .join(":");
206
- }
207
- function buildLifecycleEnv() {
208
- const extraPaths = process.platform === "darwin"
209
- ? MACOS_LIFECYCLE_PATH_PROBES.filter((entry) => existsSync(entry))
210
- : [];
211
- const mergedPath = buildDeterministicPath(process.env.PATH, extraPaths);
212
- // Surface panel callback hooks to lifecycle scripts. post_start can curl
213
- // ${JISHUSHELL_PANEL_URL}/api/internal/* with the internal token to read
214
- // panel-managed state (default provider creds etc.) and self-configure
215
- // without going through user JWT. Best-effort: if the token file or
216
- // port lookup fails we just omit the vars and the script gets a clean
217
- // "missing env" failure path.
218
- const panelHooks = {};
219
- try {
220
- panelHooks.JISHUSHELL_PANEL_URL = `http://127.0.0.1:${config.getPanelPort()}`;
221
- panelHooks.JISHUSHELL_INTERNAL_TOKEN = config.getInternalMcpToken();
222
- // LAN host that *other* services (and the post_start script's curls into
223
- // its own service) can reach. AnythingLLM binds eth0 via Nomad's
224
- // `external` host_network, so the panel-host loopback (127.0.0.1) won't
225
- // reach 18097 — post_start needs to hit the LAN IP to check its own
226
- // health. getPanelLanHost() returns the same IP Nomad publishes ports on.
227
- panelHooks.JISHUSHELL_LAN_HOST = config.getPanelLanHost();
228
- }
229
- catch {
230
- // tolerate — only post_start cares
231
- }
232
- return {
233
- ...process.env,
234
- HOME: process.env.HOME ?? homedir(),
235
- PATH: mergedPath,
236
- ...panelHooks,
237
- };
238
- }
239
- const SUDO_PASSTHROUGH_ENV_KEYS = ["HOME", "PATH", "TMPDIR", "TMP", "TEMP", "XDG_RUNTIME_DIR"];
240
- function isSudoAuthenticationError(message) {
241
- return /incorrect password|try again|authentication failure|密码错误|抱歉,请重试/i.test(message);
242
- }
243
- function isSudoNoNewPrivilegesError(message) {
244
- return /no new privileges/i.test(message);
245
- }
246
- function isSudoPasswordRequiredError(message) {
247
- return /password is required|a password is required/i.test(message);
248
- }
249
- function buildSudoWrappedCommand(cmd, args, env, execOptions) {
250
- const sudoArgs = execOptions?.sudoPassword ? ["-k", "-A"] : ["-n"];
251
- const envArgs = SUDO_PASSTHROUGH_ENV_KEYS.flatMap((key) => {
252
- const value = env[key];
253
- return typeof value === "string" && value.length > 0 ? [`${key}=${value}`] : [];
254
- });
255
- return {
256
- command: "sudo",
257
- args: [...sudoArgs, "--", "env", ...envArgs, cmd, ...args],
258
- };
259
- }
260
- function createLifecycleSudoError(stderr, fallbackDisplay, hasPassword) {
261
- const message = sanitizeTaskLine(stderr).trim();
262
- if (isSudoNoNewPrivilegesError(message)) {
263
- return createNoNewPrivilegesSudoError();
264
- }
265
- if (isSudoAuthenticationError(message)) {
266
- const err = new Error("sudo 密码错误,请重新输入。");
267
- err.code = "INVALID_SUDO_PASSWORD";
268
- return err;
269
- }
270
- if (!hasPassword && isSudoPasswordRequiredError(message)) {
271
- return new Error("该生命周期步骤需要 sudo 密码;请在页面弹窗中输入后重试。");
272
- }
273
- if (message) {
274
- return new Error(message);
275
- }
276
- return new Error(`lifecycle sudo step failed: ${fallbackDisplay}`);
277
- }
278
- function panelSystemdServicePath() {
279
- const override = process.env.JISHUSHELL_PANEL_SYSTEMD_SERVICE_PATH?.trim();
280
- return override || "/etc/systemd/system/jishushell.service";
281
- }
282
- function isLikelySystemdServiceProcess() {
283
- return Boolean(process.env.INVOCATION_ID
284
- || process.env.JOURNAL_STREAM
285
- || process.env.NOTIFY_SOCKET
286
- || process.env.JISHUSHELL_PANEL_SYSTEMD_SERVICE_PATH?.trim());
287
- }
288
- function maybeRepairPanelAutostartNoNewPrivileges() {
289
- if (!isLikelySystemdServiceProcess())
290
- return null;
291
- const servicePath = panelSystemdServicePath();
292
- if (!existsSync(servicePath))
293
- return null;
294
- let unitText = "";
295
- try {
296
- unitText = readFileSync(servicePath, "utf-8");
297
- }
298
- catch {
299
- return { servicePath, detected: true, updated: false };
300
- }
301
- if (!/^\s*NoNewPrivileges\s*=\s*true\s*$/mi.test(unitText)) {
302
- return null;
303
- }
304
- const nextText = unitText.replace(/^\s*NoNewPrivileges\s*=\s*true\s*\n?/gim, "");
305
- if (nextText === unitText) {
306
- return { servicePath, detected: true, updated: false };
307
- }
308
- try {
309
- writeFileSync(servicePath, nextText);
310
- return { servicePath, detected: true, updated: true };
311
- }
312
- catch {
313
- return { servicePath, detected: true, updated: false };
314
- }
315
- }
316
- function manualInstallCommandForSpec(spec) {
317
- if (spec.id === "ollama-binary") {
318
- return "jishushell app install ollama";
319
- }
320
- const builtin = listBuiltinAppSpecs().find((entry) => entry.id === spec.id);
321
- if (!builtin)
322
- return null;
323
- return `jishushell app install ${spec.id}`;
324
- }
325
- function createNoNewPrivilegesSudoError(manualInstallCommand) {
326
- const repair = maybeRepairPanelAutostartNoNewPrivileges();
327
- const restartCommand = "sudo systemctl daemon-reload && sudo systemctl restart jishushell";
328
- const parts = ["当前运行环境禁止 sudo 提权(no new privileges),面板内无法继续后续安装。"];
329
- if (repair?.updated) {
330
- parts.push(`已从自启文件 ${repair.servicePath} 移除 NoNewPrivileges=true。请在系统终端执行以下命令后重试:\n${restartCommand}`);
331
- }
332
- else if (repair?.detected) {
333
- parts.push(`检测到自启文件 ${repair.servicePath} 仍包含 NoNewPrivileges=true。请在系统终端删除该行后执行:\n${restartCommand}`);
334
- }
335
- if (manualInstallCommand) {
336
- parts.push(`当前安装已停止。你也可以在系统终端手动执行 ${manualInstallCommand}。`);
337
- }
338
- return new Error(parts.join("\n"));
339
- }
340
- function decorateInstallError(error, spec) {
341
- const original = error instanceof Error ? error : new Error(String(error));
342
- if (!isSudoNoNewPrivilegesError(original.message) && !/NoNewPrivileges=true/i.test(original.message)) {
343
- return original;
344
- }
345
- return createNoNewPrivilegesSudoError(manualInstallCommandForSpec(spec) ?? undefined);
346
- }
347
- export async function validateSudoPassword(sudoPassword) {
348
- if (!sudoPassword) {
349
- throw new Error("请输入 sudo 密码");
350
- }
351
- if (typeof process.getuid === "function" && process.getuid() === 0) {
352
- return;
353
- }
354
- const preparedEnv = prepareLifecycleExecEnv({ sudoPassword });
355
- try {
356
- await new Promise((resolve, reject) => {
357
- const child = spawn("sudo", ["-k", "-A", "true"], {
358
- stdio: ["ignore", "ignore", "pipe"],
359
- env: preparedEnv.env,
360
- timeout: 15_000,
361
- });
362
- let stderr = "";
363
- child.stderr?.on("data", (chunk) => {
364
- stderr += chunk.toString("utf-8");
365
- });
366
- child.on("close", (code) => {
367
- if (code === 0) {
368
- resolve();
369
- return;
370
- }
371
- const message = sanitizeTaskLine(stderr).trim();
372
- if (isSudoNoNewPrivilegesError(message)) {
373
- reject(createNoNewPrivilegesSudoError());
374
- return;
375
- }
376
- if (/incorrect password|try again|authentication failure|密码错误|抱歉,请重试/i.test(message)) {
377
- const err = new Error("sudo 密码错误,请重新输入。");
378
- err.code = "INVALID_SUDO_PASSWORD";
379
- reject(err);
380
- return;
381
- }
382
- resolve();
383
- });
384
- child.on("error", (_error) => {
385
- resolve();
386
- });
387
- });
388
- }
389
- finally {
390
- preparedEnv.cleanup();
391
- }
392
- }
393
- function prepareLifecycleExecEnv(execOptions, envOverrides) {
394
- const env = {
395
- ...buildLifecycleEnv(),
396
- ...(envOverrides ?? {}),
397
- };
398
- const sudoPassword = execOptions?.sudoPassword;
399
- if (!sudoPassword) {
400
- return { env, cleanup: () => undefined };
401
- }
402
- const helperDir = mkdtempSync(join(tmpdir(), "jishushell-sudo-askpass-"));
403
- const passwordPath = join(helperDir, "password.txt");
404
- const askpassPath = join(helperDir, "askpass.sh");
405
- writeFileSync(passwordPath, sudoPassword, { mode: 0o600 });
406
- // Use an absolute password-file path in the helper script so sudo env
407
- // filtering cannot drop the file path and cause false password failures.
408
- writeFileSync(askpassPath, `#!/bin/sh\ncat '${passwordPath}'\nprintf '\\n'\n`, { mode: 0o700 });
409
- chmodSync(askpassPath, 0o700);
410
- return {
411
- env: {
412
- ...env,
413
- SUDO_ASKPASS: askpassPath,
414
- JISHUSHELL_SUDO_ASKPASS: "1",
415
- },
416
- cleanup: () => {
417
- try {
418
- rmSync(helperDir, { recursive: true, force: true });
419
- }
420
- catch {
421
- // best effort cleanup for one-shot askpass helper files
422
- }
423
- },
424
- };
425
- }
426
- function shouldBypassDockerCredentialHelperForDownloadImage(image) {
427
- return ANONYMOUS_DOWNLOAD_IMAGE_ALLOWLIST.has(image.trim());
428
- }
429
- function createAnonymousDockerConfig() {
430
- const dockerConfigDir = mkdtempSync(join(tmpdir(), "jishushell-docker-config-"));
431
- writeFileSync(join(dockerConfigDir, "config.json"), `${JSON.stringify({ auths: {} }, null, 2)}\n`, { mode: 0o600 });
432
- return {
433
- envOverrides: {
434
- DOCKER_CONFIG: dockerConfigDir,
435
- },
436
- cleanup: () => {
437
- try {
438
- rmSync(dockerConfigDir, { recursive: true, force: true });
439
- }
440
- catch {
441
- // best effort cleanup for one-shot anonymous docker config files
442
- }
443
- },
444
- };
445
- }
446
- const ANSI_ESCAPE_RE = /\u001B(?:[@-Z\\-_]|\[[0-?]*[ -/]*[@-~])/g;
447
- function sanitizeTaskLine(line) {
448
- return line
449
- .replace(ANSI_ESCAPE_RE, "")
450
- .replace(/[\u0000-\u0008\u000B-\u001F\u007F]/g, "")
451
- .trimEnd();
452
- }
453
- function emitInstallTaskLog(task, message) {
454
- if (!task)
455
- return;
456
- const line = sanitizeTaskLine(message).trim();
457
- if (!line)
458
- return;
459
- emitTask(task, { type: "log", message: line });
460
- }
461
- function emitAppTaskProgress(task, message, progress) {
462
- if (!task)
463
- return;
464
- const line = sanitizeTaskLine(message).trim();
465
- if (!line)
466
- return;
467
- emitTask(task, { type: "progress", message: line, ...(typeof progress === "number" ? { progress } : {}) });
468
- }
469
- function normalizePortVisibility(visibility) {
470
- if (!visibility || visibility === "external" || visibility === "public") {
471
- return "external";
472
- }
473
- if (visibility === "internal") {
474
- return visibility;
475
- }
476
- throw new Error(`port visibility '${visibility}' 仅支持 external 或 internal`);
477
- }
478
- function normalizeAppSpec(spec) {
479
- const normalizedProvides = (spec.provides ?? []).map((provide) => {
480
- if (spec.id === "browserless-chromium-container"
481
- && provide.capability === BROWSERLESS_DEBUGGER_CAPABILITY
482
- && (provide.path === "/" || provide.path === "/debugger")) {
483
- return { ...provide, path: "/debugger/" };
484
- }
485
- if (spec.id === "browserless-chromium-container"
486
- && provide.capability === BROWSERLESS_DOCS_CAPABILITY
487
- && provide.path === "/docs") {
488
- return { ...provide, path: "/docs/" };
489
- }
490
- if (spec.id === "browserless-chromium-container"
491
- && provide.capability === BROWSERLESS_API_CAPABILITY
492
- && provide.path !== "/") {
493
- return { ...provide, path: "/" };
494
- }
495
- return provide;
496
- });
497
- // Inject browserless-api capability for legacy installed specs that lack it.
498
- if (spec.id === "browserless-chromium-container"
499
- && normalizedProvides.length > 0
500
- && !normalizedProvides.some((p) => p.capability === BROWSERLESS_API_CAPABILITY)) {
501
- const debugger_ = normalizedProvides.find((p) => p.capability === BROWSERLESS_DEBUGGER_CAPABILITY);
502
- if (debugger_) {
503
- normalizedProvides.push({
504
- capability: BROWSERLESS_API_CAPABILITY,
505
- port: debugger_.port ?? 3000,
506
- path: "/",
507
- protocol: "http",
508
- description: "Browserless 根 API(供调试器页面连接 ws 与 sessions 接口)",
509
- });
510
- }
511
- }
512
- const normalizedTasks = (spec.tasks ?? []).map((task) => {
513
- const rawTask = { ...task };
514
- if (!rawTask.role) {
515
- rawTask.role = "service";
516
- }
517
- if (!rawTask.command && rawTask.binary) {
518
- rawTask.command = rawTask.binary;
519
- }
520
- if (Array.isArray(rawTask.ports)) {
521
- rawTask.ports = rawTask.ports.map((port) => ({
522
- ...port,
523
- visibility: normalizePortVisibility(port.visibility),
524
- }));
525
- }
526
- return rawTask;
527
- });
528
- let normalizedLifecycle = spec.lifecycle ? { ...spec.lifecycle } : undefined;
529
- if (spec.id === "browserless-chromium-container") {
530
- const browserlessDataDir = `~/.jishushell/apps/${spec.app_id || spec.id}/data`;
531
- const browserlessDataDirTemplate = "~/.jishushell/apps/${app_id}/data";
532
- const browserlessTask = normalizedTasks.find((task) => task.name === "browserless");
533
- if (browserlessTask) {
534
- const dataDirTarget = "/tmp/browserless-data";
535
- const existingVolumes = Array.isArray(browserlessTask.volumes) ? [...browserlessTask.volumes] : [];
536
- const hasDataDirVolume = existingVolumes.some((volume) => typeof volume === "object" && volume !== null && volume.target === dataDirTarget);
537
- if (!hasDataDirVolume) {
538
- existingVolumes.push({ source: browserlessDataDir, target: dataDirTarget });
539
- }
540
- browserlessTask.volumes = existingVolumes;
541
- }
542
- const install = [...(normalizedLifecycle?.install ?? [])];
543
- if (!install.some((step) => "mkdir" in step && (step.mkdir === browserlessDataDir || step.mkdir === browserlessDataDirTemplate))) {
544
- install.push({ mkdir: browserlessDataDir });
545
- }
546
- const preStart = [...(normalizedLifecycle?.pre_start ?? [])];
547
- if (!preStart.some((step) => "mkdir" in step && (step.mkdir === browserlessDataDir || step.mkdir === browserlessDataDirTemplate))) {
548
- preStart.push({ mkdir: browserlessDataDir });
549
- }
550
- normalizedLifecycle = {
551
- ...(normalizedLifecycle ?? {}),
552
- install,
553
- pre_start: preStart,
554
- };
555
- }
556
- return {
557
- ...spec,
558
- ...(spec.provides ? { provides: normalizedProvides } : {}),
559
- tasks: normalizedTasks,
560
- ...(normalizedLifecycle ? { lifecycle: normalizedLifecycle } : {}),
561
- };
562
- }
563
- function imageReferencedByOtherInstalledApps(currentAppId, imagePath) {
564
- return listApps().some((app) => app.manifest.id !== currentAppId && (app.spec.tasks.some((task) => task.image === imagePath)
565
- || app.manifest.artifacts?.some((artifact) => artifact.type === "image" && artifact.path === imagePath)
566
- || app.spec.lifecycle?.install?.some((step) => "downloadImage" in step && step.downloadImage === imagePath)));
567
- }
568
- function shouldDeleteImageForApp(appData, imagePath) {
569
- if (appData.spec.singleInstance === false)
570
- return false;
571
- return !imageReferencedByOtherInstalledApps(appData.manifest.id, imagePath);
572
- }
573
- function selectUninstallLifecycleSteps(appData) {
574
- if (!appData?.spec.lifecycle?.uninstall?.length)
575
- return undefined;
576
- return appData.spec.lifecycle.uninstall.filter((step) => !("deleteImage" in step) || shouldDeleteImageForApp(appData, step.deleteImage));
577
- }
578
- function selectCleanupArtifacts(appData) {
579
- if (!appData?.manifest.artifacts?.length)
580
- return [];
581
- const lifecycleImageDeletes = new Set((selectUninstallLifecycleSteps(appData) ?? [])
582
- .flatMap((step) => ("deleteImage" in step ? [step.deleteImage] : [])));
583
- return appData.manifest.artifacts.filter((artifact) => {
584
- if (artifact.type !== "image")
585
- return true;
586
- if (lifecycleImageDeletes.has(artifact.path))
587
- return false;
588
- return shouldDeleteImageForApp(appData, artifact.path);
589
- });
590
- }
591
- async function deleteLinkedInstances(appId) {
592
- const warnings = [];
593
- const instanceManager = await import("../instance-manager.js");
594
- const linkedInstances = instanceManager
595
- .listInstances()
596
- .filter((instance) => instance?.id && instance.id !== appId && instance.app_id === appId);
597
- if (linkedInstances.length === 0)
598
- return warnings;
599
- const { stopNomadJobInstance: stopInstance } = await import("../nomad-manager.js");
600
- let processManager = null;
601
- try {
602
- processManager = await import("../process-manager.js");
603
- }
604
- catch {
605
- processManager = null;
606
- }
607
- for (const instance of linkedInstances) {
608
- const instanceId = String(instance.id);
609
- let stopFailed = false;
610
- try {
611
- const stopped = await stopInstance(instanceId, true);
612
- if (!stopped.ok) {
613
- const fallback = await stopInstance(instanceId);
614
- if (!fallback.ok)
615
- stopFailed = true;
616
- }
617
- }
618
- catch {
619
- stopFailed = true;
620
- }
621
- if (processManager) {
622
- try {
623
- if ((await processManager.getLegacyStatus(instanceId)).status === "running") {
624
- await processManager.stopInstance(instanceId);
625
- stopFailed = false;
626
- }
627
- }
628
- catch {
629
- // best effort
630
- }
631
- }
632
- const result = await instanceManager.deleteInstance(instanceId);
633
- if (!result.ok) {
634
- warnings.push(`关联实例 '${instanceId}' 删除失败`);
635
- }
636
- if (result.warnings?.length) {
637
- warnings.push(...result.warnings.map((warning) => `关联实例 '${instanceId}': ${warning}`));
638
- }
639
- if (stopFailed) {
640
- warnings.push(`关联实例 '${instanceId}' 停止失败,可能残留进程`);
641
- }
642
- }
643
- return warnings;
644
- }
645
- function getProvidePort(spec, provide) {
646
- if (typeof provide.url === "string" && provide.url.trim()) {
647
- return null;
648
- }
649
- if (typeof provide.port === "number") {
650
- return provide.port;
651
- }
652
- const firstPort = spec.tasks.find((task) => task.role === "service")?.ports?.[0];
653
- if (!firstPort)
654
- return null;
655
- const p = firstPort.host_port ?? firstPort.port;
656
- return typeof p === "number" && p > 0 ? p : null;
657
- }
658
- function getProvideUrl(provide) {
659
- const raw = typeof provide.url === "string" ? provide.url.trim() : "";
660
- if (!raw)
661
- return null;
662
- try {
663
- const parsed = new URL(raw);
664
- if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
665
- return null;
666
- }
667
- return parsed.toString();
668
- }
669
- catch {
670
- return null;
671
- }
672
- }
673
- function buildCapabilityAddress(port, path) {
674
- const host = port > 0 ? legacyInstanceManager.getAdvertisedHostForPort(port) : "127.0.0.1";
675
- if (!path) {
676
- return `${host}:${port}`;
677
- }
678
- const normalizedPath = path.startsWith("/") ? path : `/${path}`;
679
- return `${host}:${port}${normalizedPath}`;
680
- }
681
- function normalizeProvideProtocol(protocol) {
682
- const raw = typeof protocol === "string" ? protocol.trim().toLowerCase() : "";
683
- return raw || "http";
684
- }
685
- function resolveProvideProtocol(provide) {
686
- const url = getProvideUrl(provide);
687
- if (url) {
688
- try {
689
- return new URL(url).protocol.replace(/:$/, "").toLowerCase();
690
- }
691
- catch {
692
- return normalizeProvideProtocol(provide.protocol);
693
- }
694
- }
695
- return normalizeProvideProtocol(provide.protocol);
696
- }
697
- function collectDeclaredPorts(spec) {
698
- return spec.tasks.flatMap((task) => (task.ports ?? [])
699
- .map((port) => port.host_port ?? port.port)
700
- .filter((port) => Number.isInteger(port) && port > 0 && port <= 65535));
701
- }
702
- function buildPortShiftMap(spec, offset) {
703
- const portShiftMap = new Map();
704
- for (const port of collectDeclaredPorts(spec)) {
705
- const shiftedPort = port + offset;
706
- if (shiftedPort < 1 || shiftedPort > 65535) {
707
- throw new Error(`App '${spec.id}' 没有可用端口,端口递增已超出 65535`);
708
- }
709
- portShiftMap.set(port, shiftedPort);
710
- }
711
- return portShiftMap;
712
- }
713
- function replaceAppScopedPaths(value, baseId, appId) {
714
- if (baseId === appId)
715
- return value;
716
- const homeDir = homedir();
717
- const replacements = [
718
- [`~/.jishushell/apps/${baseId}`, `~/.jishushell/apps/${appId}`],
719
- [`$HOME/.jishushell/apps/${baseId}`, `$HOME/.jishushell/apps/${appId}`],
720
- [`${homeDir}/.jishushell/apps/${baseId}`, `${homeDir}/.jishushell/apps/${appId}`],
721
- [`\${HOME}/.jishushell/apps/${baseId}`, `\${HOME}/.jishushell/apps/${appId}`],
722
- ];
723
- let rewritten = value;
724
- for (const [from, to] of replacements) {
725
- rewritten = rewritten.split(from).join(to);
726
- }
727
- return rewritten;
728
- }
729
- function replaceAppIdTokens(value, appId) {
730
- return value
731
- .replace(/\$\{app_id\}/g, appId)
732
- .replace(/\$\{app\.id\}/g, appId);
733
- }
734
- function replacePortTokens(value, portShiftMap) {
735
- let rewritten = value;
736
- const replacements = [...portShiftMap.entries()].sort((left, right) => right[0] - left[0]);
737
- for (const [fromPort, toPort] of replacements) {
738
- const pattern = new RegExp(`(^|[^0-9A-Za-z])${fromPort}($|[^0-9A-Za-z])`, "g");
739
- rewritten = rewritten.replace(pattern, (_match, prefix, suffix) => `${prefix}${toPort}${suffix}`);
740
- }
741
- return rewritten;
742
- }
743
- function rewriteInstalledSpecValue(value, baseId, appId, portShiftMap) {
744
- if (typeof value === "string") {
745
- const hasAppIdToken = value.includes("${app_id}") || value.includes("${app.id}");
746
- return replacePortTokens(hasAppIdToken
747
- ? replaceAppIdTokens(value, appId)
748
- : replaceAppScopedPaths(value, baseId, appId), portShiftMap);
749
- }
750
- if (typeof value === "number") {
751
- return portShiftMap.get(value) ?? value;
752
- }
753
- if (Array.isArray(value)) {
754
- return value.map((entry) => rewriteInstalledSpecValue(entry, baseId, appId, portShiftMap));
755
- }
756
- if (value && typeof value === "object") {
757
- const rewritten = {};
758
- for (const [key, entry] of Object.entries(value)) {
759
- rewritten[key] = rewriteInstalledSpecValue(entry, baseId, appId, portShiftMap);
760
- }
761
- return rewritten;
762
- }
763
- return value;
764
- }
765
- function materializeInstalledSpec(spec, appId, offset) {
766
- const portShiftMap = buildPortShiftMap(spec, offset);
767
- const rewritten = rewriteInstalledSpecValue(spec, spec.id, appId, portShiftMap);
768
- const derivedName = deriveInstalledDisplayName(spec, appId);
769
- const normalized = normalizeAppSpec({
770
- ...rewritten,
771
- id: spec.id,
772
- ...(derivedName ? { name: derivedName } : {}),
773
- });
774
- // Final step: drop spec fields that work on the spec author's Linux
775
- // baseline but break on the host platform (e.g. host_network:
776
- // docker_bridge / user: "host" on darwin). Identity pass-through on
777
- // Linux — see platform-transform.ts for the rule list.
778
- return platformTransformSpec(normalized);
779
- }
780
- function deriveInstalledDisplayName(spec, appId) {
781
- const baseName = typeof spec.name === "string" && spec.name.trim() ? spec.name.trim() : spec.id;
782
- if (!baseName)
783
- return appId;
784
- if (appId === spec.id)
785
- return baseName;
786
- if (!appId.startsWith(`${spec.id}-`))
787
- return baseName;
788
- const suffix = appId.slice(spec.id.length + 1).trim();
789
- return suffix ? `${baseName}-${suffix}` : baseName;
790
- }
791
- function formatInstalledAppId(baseId, instancePrefix, offset) {
792
- if (offset === 0)
793
- return baseId;
794
- return `${baseId}-${instancePrefix}${offset}`;
795
- }
796
- // Delegate to the canonical multi-locus probe in instance-manager so macOS
797
- // loopback-only listeners (e.g. a natively-installed openclaw bound to
798
- // 127.0.0.1:18789) are visible to AppSpec port conflict detection as well.
799
- // Wrap in a thunk so the lookup happens at call time — some test suites
800
- // partially mock instance-manager without re-exporting this symbol.
801
- function isPortInUse(port) {
802
- return legacyInstanceManager.isPortInUse(port);
803
- }
804
- async function resolveInstallTarget(spec, originalSpecYaml, requestedAppId) {
805
- const baseId = spec.id;
806
- const multiInstance = spec.singleInstance === false;
807
- const explicitAppId = requestedAppId?.trim();
808
- if (explicitAppId && !APP_ID_RE.test(explicitAppId)) {
809
- throw new Error(`App id '${explicitAppId}' 格式无效,必须符合 /^[a-z0-9][a-z0-9-]{0,62}$/`);
810
- }
811
- const installedSameSpec = listApps().find((app) => app.spec.id === baseId);
812
- if (!multiInstance) {
813
- if (installedSameSpec) {
814
- const err = new Error(`App '${baseId}' 已安装为 '${installedSameSpec.manifest.id}',如需多实例请设置 singleInstance: false`);
815
- err.code = 409;
816
- throw err;
817
- }
818
- const appId = explicitAppId ?? baseId;
819
- if (appId !== baseId && resolveAppDir(appId)) {
820
- const err = new Error(`App '${appId}' 已安装`);
821
- err.code = 409;
822
- throw err;
823
- }
824
- const installedSpec = materializeInstalledSpec(spec, appId, 0);
825
- return {
826
- appId,
827
- installedSpec,
828
- installedSpecYaml: stringify(installedSpec),
829
- };
830
- }
831
- const usedPorts = new Set();
832
- for (const installedApp of listApps()) {
833
- for (const port of collectDeclaredPorts(installedApp.spec)) {
834
- usedPorts.add(port);
835
- }
836
- }
837
- const instancePrefix = spec.instancePrefix ?? "";
838
- const declaredPorts = collectDeclaredPorts(spec);
839
- const maxBasePort = declaredPorts.length > 0 ? Math.max(...declaredPorts) : 0;
840
- const maxOffset = declaredPorts.length > 0 ? 65535 - maxBasePort : 9999;
841
- if (explicitAppId) {
842
- if (resolveAppDir(explicitAppId)) {
843
- const err = new Error(`App '${explicitAppId}' 已安装`);
844
- err.code = 409;
845
- throw err;
846
- }
847
- for (let offset = 0; offset <= maxOffset; offset++) {
848
- const installedSpec = materializeInstalledSpec(spec, explicitAppId, offset);
849
- const candidatePorts = collectDeclaredPorts(installedSpec);
850
- let portConflict = false;
851
- for (const port of candidatePorts) {
852
- if (usedPorts.has(port) || await isPortInUse(port)) {
853
- portConflict = true;
854
- break;
855
- }
856
- }
857
- if (portConflict)
858
- continue;
859
- return {
860
- appId: explicitAppId,
861
- installedSpec,
862
- installedSpecYaml: stringify(installedSpec),
863
- };
864
- }
865
- throw new Error(`App '${baseId}' 使用指定 id '${explicitAppId}' 时没有可用端口槽位`);
866
- }
867
- for (let offset = 0; offset <= maxOffset; offset++) {
868
- const appId = formatInstalledAppId(baseId, instancePrefix, offset);
869
- if (!APP_ID_RE.test(appId)) {
870
- throw new Error(`自动生成的 App id '${appId}' 超出格式限制,请缩短 id 或 instancePrefix`);
871
- }
872
- if (existsSync(appDirForId(appId)))
873
- continue;
874
- const installedSpec = materializeInstalledSpec(spec, appId, offset);
875
- const candidatePorts = collectDeclaredPorts(installedSpec);
876
- let portConflict = false;
877
- for (const port of candidatePorts) {
878
- if (usedPorts.has(port) || await isPortInUse(port)) {
879
- portConflict = true;
880
- break;
881
- }
882
- }
883
- if (portConflict)
884
- continue;
885
- return {
886
- appId,
887
- installedSpec,
888
- // Always re-serialize from `installedSpec` so the cached yaml
889
- // reflects every transform `materializeInstalledSpec` ran —
890
- // including the platform pass that strips host_network/user fields
891
- // on darwin. Using `originalSpecYaml` for offset=0 (the previous
892
- // behavior) bypassed the transformer for multi-instance apps'
893
- // first install slot and re-introduced the Linux-only fields on
894
- // disk; subsequent panel restarts then re-read the raw source via
895
- // `loadInstalledAppSpec` and broke macOS placement again.
896
- installedSpecYaml: stringify(installedSpec),
897
- };
898
- }
899
- throw new Error(`App '${baseId}' 没有可用安装槽位,目录名或端口已全部占用`);
900
- }
901
- function spawnStep(label, display, cmd, args, task) {
902
- return spawnStepWithTimeout(label, display, display, cmd, args, 300_000, task);
903
- }
904
- const DOCKER_PULL_RETRY_ATTEMPTS = 3;
905
- // spawnStep's 5-min default is fine for small CLI calls but starves real-world
906
- // image pulls on ARM + SD-card hardware. Playwright v1.55.0-noble is ~2.3 GB
907
- // compressed (bundles Chromium + Firefox + WebKit), Hermes ~2.4 GB — neither
908
- // extracts in 5 min on a Raspberry Pi. 30 min clears both with headroom while
909
- // still capping runaway failures (total retry budget 90 min).
910
- const DOCKER_PULL_TIMEOUT_MS = 1_800_000;
911
- // Separate from the total timeout above: if docker pull stops producing any
912
- // stdout/stderr for long enough, treat it as stalled and retry rather than
913
- // waiting the full 30 minutes.
914
- //
915
- // Why 600s (not 180s): on slow links (especially Docker Hub from China to
916
- // edge devices), large single layers — AnythingLLM ~500MB, Playwright/Hermes
917
- // ~2.3GB — can spend 5-8 minutes between progress lines without TTY. 180s
918
- // idle was killing pulls that were actually making progress, then rolling
919
- // back the partially-completed image. Layer cache is preserved across
920
- // retries (docker dedupes by layer sha), so a higher idle ceiling lets each
921
- // big layer finish without throwing away the layers already on disk.
922
- const DOCKER_PULL_IDLE_TIMEOUT_MS = 600_000;
923
- async function pullDockerImageStep(label, image, display, task, timeoutMs = DOCKER_PULL_TIMEOUT_MS, idleTimeoutMs) {
924
- if (await dockerImageExists(image)) {
925
- const skipMessage = `[lifecycle:${label}] docker image '${image}' already exists locally; skipping pull`;
926
- process.stdout.write(` ${skipMessage}\n`);
927
- emitInstallTaskLog(task, skipMessage);
928
- return;
929
- }
930
- const anonymousDockerConfig = shouldBypassDockerCredentialHelperForDownloadImage(image)
931
- ? createAnonymousDockerConfig()
932
- : null;
933
- let lastError;
934
- try {
935
- for (let attempt = 1; attempt <= DOCKER_PULL_RETRY_ATTEMPTS; attempt++) {
936
- try {
937
- await spawnStepWithTimeout(label, display, display, "docker", ["pull", image], timeoutMs, task, undefined, undefined, {
938
- idleTimeoutMs: idleTimeoutMs ?? Math.min(DOCKER_PULL_IDLE_TIMEOUT_MS, timeoutMs),
939
- envOverrides: anonymousDockerConfig?.envOverrides,
940
- stallMessageHint: "Docker credential resolution (for example docker-credential-desktop) may be involved.",
941
- });
942
- return;
943
- }
944
- catch (error) {
945
- if (await dockerImageExists(image)) {
946
- const recoveredMessage = `[lifecycle:${label}] docker image '${image}' is present locally after pull failure/timeout; treating step as successful`;
947
- process.stdout.write(` ${recoveredMessage}\n`);
948
- emitInstallTaskLog(task, recoveredMessage);
949
- return;
950
- }
951
- lastError = error;
952
- if (attempt === DOCKER_PULL_RETRY_ATTEMPTS) {
953
- break;
954
- }
955
- const reason = error instanceof Error ? error.message : String(error);
956
- const retryMessage = `[lifecycle:${label}] docker pull failed for ${image} (attempt ${attempt}/${DOCKER_PULL_RETRY_ATTEMPTS}): ${reason}; retrying`;
957
- process.stdout.write(` ${retryMessage}\n`);
958
- emitInstallTaskLog(task, retryMessage);
959
- }
960
- }
961
- }
962
- finally {
963
- anonymousDockerConfig?.cleanup();
964
- }
965
- throw (lastError instanceof Error ? lastError : new Error(String(lastError)));
966
- }
967
- async function dockerImageExists(image) {
968
- return new Promise((resolve) => {
969
- const child = spawn("docker", ["image", "inspect", image], {
970
- stdio: "ignore",
971
- env: buildLifecycleEnv(),
972
- });
973
- child.on("close", (code) => resolve(code === 0));
974
- child.on("error", () => resolve(false));
975
- });
976
- }
977
- function spawnStepWithTimeout(label, display, taskDisplay, cmd, args, timeoutMs, task, execOptions, sudo, runOptions) {
978
- process.stdout.write(` [lifecycle:${label}] ${display}\n`);
979
- emitInstallTaskLog(task, `[lifecycle:${label}] ${taskDisplay}`);
980
- return new Promise((resolve, reject) => {
981
- const preparedEnv = prepareLifecycleExecEnv(sudo ? execOptions : undefined, runOptions?.envOverrides);
982
- let cleaned = false;
983
- let heartbeatTimer = null;
984
- let idleTimer = null;
985
- let stdoutPending = "";
986
- let stderrPending = "";
987
- let capturedStderr = "";
988
- let forcedError = null;
989
- const cleanupPreparedEnv = () => {
990
- if (cleaned)
991
- return;
992
- cleaned = true;
993
- if (heartbeatTimer) {
994
- clearInterval(heartbeatTimer);
995
- heartbeatTimer = null;
996
- }
997
- if (idleTimer) {
998
- clearTimeout(idleTimer);
999
- idleTimer = null;
1000
- }
1001
- preparedEnv.cleanup();
1002
- };
1003
- const spawnTarget = sudo
1004
- ? buildSudoWrappedCommand(cmd, args, preparedEnv.env, execOptions)
1005
- : { command: cmd, args };
1006
- const captureOutput = Boolean(task) || Boolean(sudo) || Boolean(runOptions?.idleTimeoutMs);
1007
- const child = spawn(spawnTarget.command, spawnTarget.args, {
1008
- stdio: captureOutput ? ["ignore", "pipe", "pipe"] : "inherit",
1009
- timeout: timeoutMs,
1010
- env: preparedEnv.env,
1011
- });
1012
- const resetIdleTimer = () => {
1013
- if (!runOptions?.idleTimeoutMs)
1014
- return;
1015
- if (idleTimer)
1016
- clearTimeout(idleTimer);
1017
- idleTimer = setTimeout(() => {
1018
- const idleSeconds = Math.max(1, Math.round(runOptions.idleTimeoutMs / 1000));
1019
- const stallMessageSuffix = runOptions.stallMessageHint ? ` ${runOptions.stallMessageHint}` : "";
1020
- const stallMessage = `[lifecycle:${label}] no output for ${idleSeconds}s; terminating stalled step: ${taskDisplay}${stallMessageSuffix}`;
1021
- process.stdout.write(` ${stallMessage}\n`);
1022
- emitInstallTaskLog(task, stallMessage);
1023
- forcedError = new Error(`lifecycle '${label}' step stalled after ${idleSeconds}s with no output: ${display}${stallMessageSuffix}`);
1024
- child.kill("SIGTERM");
1025
- }, runOptions.idleTimeoutMs);
1026
- idleTimer.unref?.();
1027
- };
1028
- resetIdleTimer();
1029
- if (captureOutput) {
1030
- const startedAt = Date.now();
1031
- const flushPendingLine = (line) => {
1032
- if (!task)
1033
- return;
1034
- emitInstallTaskLog(task, line);
1035
- };
1036
- const handleChunk = (chunk, stream) => {
1037
- resetIdleTimer();
1038
- const text = typeof chunk === "string" ? chunk : chunk.toString("utf-8");
1039
- if (stream === "stderr") {
1040
- capturedStderr += text;
1041
- }
1042
- if (!task) {
1043
- if (stream === "stdout")
1044
- process.stdout.write(text);
1045
- else
1046
- process.stderr.write(text);
1047
- return;
1048
- }
1049
- const normalized = `${stream === "stdout" ? stdoutPending : stderrPending}${text}`
1050
- .replace(/\r\n/g, "\n")
1051
- .replace(/\r/g, "\n");
1052
- const lines = normalized.split("\n");
1053
- const pending = lines.pop() ?? "";
1054
- if (stream === "stdout")
1055
- stdoutPending = pending;
1056
- else
1057
- stderrPending = pending;
1058
- for (const line of lines) {
1059
- flushPendingLine(line);
1060
- }
1061
- };
1062
- child.stdout?.on("data", (data) => handleChunk(data, "stdout"));
1063
- child.stderr?.on("data", (data) => handleChunk(data, "stderr"));
1064
- if (task) {
1065
- heartbeatTimer = setInterval(() => {
1066
- const elapsedSeconds = Math.max(1, Math.round((Date.now() - startedAt) / 1000));
1067
- emitInstallTaskLog(task, `[lifecycle:${label}] still running (${elapsedSeconds}s): ${taskDisplay}`);
1068
- }, 10_000);
1069
- child.on("close", () => {
1070
- flushPendingLine(stdoutPending);
1071
- flushPendingLine(stderrPending);
1072
- });
1073
- }
1074
- }
1075
- child.on("close", (code) => {
1076
- cleanupPreparedEnv();
1077
- if (forcedError)
1078
- reject(forcedError);
1079
- else if (code === 0)
1080
- resolve();
1081
- else if (sudo)
1082
- reject(createLifecycleSudoError(capturedStderr, display, Boolean(execOptions?.sudoPassword)));
1083
- else
1084
- reject(new Error(`lifecycle '${label}' step failed (exit ${code ?? 1}): ${display}`));
1085
- });
1086
- child.on("error", (err) => {
1087
- cleanupPreparedEnv();
1088
- if (forcedError) {
1089
- reject(forcedError);
1090
- return;
1091
- }
1092
- if (sudo && err.code === "ENOENT") {
1093
- reject(new Error("当前环境未检测到 sudo,无法执行需要 sudo 的生命周期步骤。请以 root 身份重试。"));
1094
- return;
1095
- }
1096
- reject(new Error(`lifecycle '${label}' step error: ${err.message}`));
1097
- });
1098
- });
1099
- }
1100
- function lifecycleRunStepDisplay(label, index) {
1101
- if (label === "pre_install") {
1102
- return `run step ${index + 1}`;
1103
- }
1104
- return "$";
1105
- }
1106
- async function commandExists(command) {
1107
- return new Promise((resolve) => {
1108
- const quoted = command.replace(/'/g, "'\\''");
1109
- const child = spawn("sh", ["-c", `command -v '${quoted}' > /dev/null 2>&1`], {
1110
- stdio: "ignore",
1111
- env: buildLifecycleEnv(),
1112
- });
1113
- child.on("close", (code) => resolve(code === 0));
1114
- child.on("error", () => resolve(false));
1115
- });
1116
- }
1117
- // Recursively chown a path. Owner format is "uid:gid" (numeric only, e.g.
1118
- // "0:0" or "1000:1000"). Used by container apps whose images run as a
1119
- // different uid than the panel user — without this, bind-mounted data
1120
- // dirs end up unwritable for the in-container process and fail with
1121
- // SQLite "readonly database" or chroma init errors.
1122
- function parseOwnerSpec(owner) {
1123
- const m = /^(\d+):(\d+)$/.exec(owner);
1124
- if (!m)
1125
- throw new Error(`chown owner must be "uid:gid" (numeric), got "${owner}"`);
1126
- return { uid: Number(m[1]), gid: Number(m[2]) };
1127
- }
1128
- function chownRecursive(path, uid, gid) {
1129
- chownSync(path, uid, gid);
1130
- let stat;
1131
- try {
1132
- stat = lstatSync(path);
1133
- }
1134
- catch {
1135
- return;
1136
- }
1137
- if (!stat.isDirectory())
1138
- return;
1139
- for (const entry of readdirSync(path)) {
1140
- chownRecursive(join(path, entry), uid, gid);
1141
- }
1142
- }
1143
- /**
1144
- * Try chowning via direct fs syscall first; on EPERM (panel runs as a
1145
- * non-root user with no CAP_CHOWN) fall back to `sudo -n chown`. The
1146
- * fallback only succeeds where passwordless sudo is configured for the
1147
- * panel user (the canonical Pi setup); on other hosts the original
1148
- * EPERM bubbles up as a clear error.
1149
- */
1150
- function chownWithSudoFallback(path, uid, gid, recursive) {
1151
- try {
1152
- if (recursive)
1153
- chownRecursive(path, uid, gid);
1154
- else
1155
- chownSync(path, uid, gid);
1156
- return;
1157
- }
1158
- catch (e) {
1159
- if (e?.code !== "EPERM" && e?.code !== "EACCES")
1160
- throw e;
1161
- }
1162
- const args = [
1163
- "-n",
1164
- "chown",
1165
- ...(recursive ? ["-R"] : []),
1166
- `${uid}:${gid}`,
1167
- path,
1168
- ];
1169
- const r = spawnSync("sudo", args, { stdio: ["ignore", "ignore", "pipe"] });
1170
- if (r.status !== 0) {
1171
- const stderr = r.stderr ? r.stderr.toString().trim() : "";
1172
- throw new Error(`chown ${recursive ? "-R " : ""}${uid}:${gid} ${path} failed: panel user lacks CAP_CHOWN and passwordless sudo also failed${stderr ? `: ${stderr}` : ""}`);
1173
- }
1174
- }
1175
- async function downloadBinaryStep(label, url, dest, chmod, task) {
1176
- const expanded = expandPath(dest);
1177
- process.stdout.write(` [lifecycle:${label}] downloadBinary: ${url} → ${expanded}\n`);
1178
- emitInstallTaskLog(task, `[lifecycle:${label}] downloadBinary: ${url} -> ${expanded}`);
1179
- mkdirSync(dirname(expanded), { recursive: true });
1180
- const tmp = expanded + ".tmp";
1181
- const res = await fetch(url);
1182
- if (!res.ok)
1183
- throw new Error(`downloadBinary: HTTP ${res.status} ${url}`);
1184
- const buf = await res.arrayBuffer();
1185
- writeFileSync(tmp, Buffer.from(buf), { mode: 0o644 });
1186
- renameSync(tmp, expanded);
1187
- if (chmod)
1188
- chmodSync(expanded, parseInt(chmod, 8));
1189
- }
1190
- async function runLifecycleSteps(steps, label, artifacts, task, execOptions) {
1191
- if (!steps || steps.length === 0)
1192
- return;
1193
- for (const [index, step] of steps.entries()) {
1194
- if ("run" in step) {
1195
- if (step.ifFileExists && !existsSync(expandPath(step.ifFileExists))) {
1196
- continue;
1197
- }
1198
- const timeoutMs = step.timeout_ms ?? 300_000;
1199
- const display = label === "pre_install"
1200
- ? lifecycleRunStepDisplay(label, index)
1201
- : `${lifecycleRunStepDisplay(label, index)} ${step.run}`;
1202
- const taskDisplay = `run step ${index + 1}`;
1203
- try {
1204
- await spawnStepWithTimeout(label, display, taskDisplay, "sh", ["-c", step.run], timeoutMs, task, execOptions, step.sudo === true);
1205
- }
1206
- catch (error) {
1207
- if (step.successIfCommandExists && await commandExists(step.successIfCommandExists)) {
1208
- process.stdout.write(` [lifecycle:${label}] command '${step.successIfCommandExists}' detected after failure/timeout; treating step as successful\n`);
1209
- emitInstallTaskLog(task, `[lifecycle:${label}] command '${step.successIfCommandExists}' detected after failure/timeout; treating step as successful`);
1210
- continue;
1211
- }
1212
- throw error;
1213
- }
1214
- }
1215
- else if ("checkNotCommand" in step) {
1216
- const cmd = step.checkNotCommand;
1217
- const found = await commandExists(cmd);
1218
- if (found) {
1219
- throw new Error(step.message ??
1220
- `系统中已检测到 '${cmd}',建议直接使用系统版本,无需重复安装。如需由 Nomad 统一管理,请先卸载系统版本`);
1221
- }
1222
- }
1223
- else if ("downloadImage" in step) {
1224
- await pullDockerImageStep(label, step.downloadImage, `downloadImage: ${step.downloadImage}`, task, step.timeout_ms, step.idle_timeout_ms);
1225
- artifacts?.push({ type: "image", path: step.downloadImage });
1226
- }
1227
- else if ("deleteImage" in step) {
1228
- await spawnStep(label, `deleteImage: ${step.deleteImage}`, "sh", [
1229
- "-c",
1230
- `docker rmi -f ${step.deleteImage} 2>/dev/null || true`,
1231
- ], task);
1232
- }
1233
- else if ("downloadBinary" in step) {
1234
- const { url, dest, chmod } = step.downloadBinary;
1235
- await downloadBinaryStep(label, url, dest, chmod, task);
1236
- artifacts?.push({ type: "binary", path: expandPath(dest) });
1237
- }
1238
- else if ("deleteBinary" in step) {
1239
- const p = expandPath(step.deleteBinary);
1240
- process.stdout.write(` [lifecycle:${label}] deleteBinary: ${p}\n`);
1241
- emitInstallTaskLog(task, `[lifecycle:${label}] deleteBinary: ${p}`);
1242
- try {
1243
- unlinkSync(p);
1244
- }
1245
- catch (e) {
1246
- if (e.code !== "ENOENT")
1247
- throw e;
1248
- }
1249
- }
1250
- else if ("mkdir" in step) {
1251
- const p = expandPath(step.mkdir);
1252
- process.stdout.write(` [lifecycle:${label}] mkdir: ${p}\n`);
1253
- emitInstallTaskLog(task, `[lifecycle:${label}] mkdir: ${p}`);
1254
- mkdirSync(p, { recursive: true });
1255
- artifacts?.push({ type: "dir", path: p });
1256
- }
1257
- else if ("chown" in step) {
1258
- const p = expandPath(step.chown.path);
1259
- const { uid, gid } = parseOwnerSpec(step.chown.owner);
1260
- const recursive = step.chown.recursive !== false;
1261
- const tag = recursive ? "chown -R" : "chown";
1262
- process.stdout.write(` [lifecycle:${label}] ${tag} ${uid}:${gid} ${p}\n`);
1263
- emitInstallTaskLog(task, `[lifecycle:${label}] ${tag} ${uid}:${gid} ${p}`);
1264
- if (!existsSync(p)) {
1265
- // chown only makes sense if the target exists; surface a clear
1266
- // error rather than letting fs throw an opaque ENOENT later.
1267
- throw new Error(`chown target does not exist: ${p}`);
1268
- }
1269
- try {
1270
- chownWithSudoFallback(p, uid, gid, recursive);
1271
- }
1272
- catch (chownErr) {
1273
- // In pre_start, chown failures are non-fatal: on macOS Docker/Colima
1274
- // the VM handles UID mapping for bind-mounts, so the container can
1275
- // write even without matching ownership. Failing fatally here blocks
1276
- // any non-root panel user from starting the app.
1277
- if (label === "pre_start") {
1278
- const msg = `[lifecycle:${label}] ${tag} ${uid}:${gid} ${p} failed (non-fatal): ${chownErr.message}`;
1279
- process.stdout.write(` ${msg}\n`);
1280
- emitInstallTaskLog(task, msg);
1281
- }
1282
- else {
1283
- throw chownErr;
1284
- }
1285
- }
1286
- }
1287
- else if ("deleteDir" in step) {
1288
- const p = expandPath(step.deleteDir);
1289
- process.stdout.write(` [lifecycle:${label}] deleteDir: ${p}\n`);
1290
- emitInstallTaskLog(task, `[lifecycle:${label}] deleteDir: ${p}`);
1291
- rmSync(p, { recursive: true, force: true });
1292
- }
1293
- }
1294
- }
1295
- function cleanupArtifacts(artifacts, task) {
1296
- for (let i = artifacts.length - 1; i >= 0; i--) {
1297
- const a = artifacts[i];
1298
- try {
1299
- switch (a.type) {
1300
- case "image":
1301
- process.stdout.write(` [cleanup] removing image: ${a.path}\n`);
1302
- emitInstallTaskLog(task, `[cleanup] removing image: ${a.path}`);
1303
- spawn("docker", ["rmi", "-f", a.path], { stdio: "ignore" }).unref();
1304
- break;
1305
- case "binary":
1306
- process.stdout.write(` [cleanup] removing binary: ${a.path}\n`);
1307
- emitInstallTaskLog(task, `[cleanup] removing binary: ${a.path}`);
1308
- unlinkSync(a.path);
1309
- break;
1310
- case "dir":
1311
- process.stdout.write(` [cleanup] removing dir: ${a.path}\n`);
1312
- emitInstallTaskLog(task, `[cleanup] removing dir: ${a.path}`);
1313
- rmSync(a.path, { recursive: true, force: true });
1314
- break;
1315
- }
1316
- }
1317
- catch {
1318
- // best-effort
1319
- }
1320
- }
1321
- }
1322
- const DOCKER_IMAGE_RE = /^[a-zA-Z0-9][a-zA-Z0-9\-_.:/@]*$/;
1323
- const APP_ID_RE = /^[a-z0-9][a-z0-9-]{0,62}$/;
1324
- const _REGISTRY_PATH = join(APPS_DIR, "capability-registry.json");
1325
- const INSTALL_LOCK_FILENAME = "install.lock";
1326
- // ── Directory helpers ─────────────────────────────────────────────────────
1327
- function appDirForId(appId) {
1328
- return join(APPS_DIR, appId);
1329
- }
1330
- function installLockPathForDir(appDir) {
1331
- return join(appDir, INSTALL_LOCK_FILENAME);
1332
- }
1333
- function hasInstallLock(appDir) {
1334
- return existsSync(installLockPathForDir(appDir));
1335
- }
1336
- function readInstallLockMetadata(appDir) {
1337
- const lockPath = installLockPathForDir(appDir);
1338
- if (!existsSync(lockPath))
1339
- return null;
1340
- try {
1341
- const parsed = JSON.parse(readFileSync(lockPath, "utf-8"));
1342
- return parsed && typeof parsed === "object" ? parsed : null;
1343
- }
1344
- catch {
1345
- return null;
1346
- }
1347
- }
1348
- function installDirLooksComplete(appDir) {
1349
- return (existsSync(join(appDir, "app-spec.yaml"))
1350
- && existsSync(join(appDir, "manifest.json"))
1351
- && existsSync(join(appDir, "instance.json")));
1352
- }
1353
- function isProcessAlive(pid) {
1354
- if (!Number.isInteger(pid) || pid <= 0)
1355
- return false;
1356
- try {
1357
- process.kill(pid, 0);
1358
- return true;
1359
- }
1360
- catch {
1361
- return false;
1362
- }
1363
- }
1364
- function isStaleInstallLock(appDir) {
1365
- if (!hasInstallLock(appDir))
1366
- return false;
1367
- const metadata = readInstallLockMetadata(appDir);
1368
- if (!metadata)
1369
- return true;
1370
- const taskId = typeof metadata.taskId === "string" ? metadata.taskId.trim() : "";
1371
- if (taskId) {
1372
- return getTask(taskId)?.status !== "running";
1373
- }
1374
- if (typeof metadata.pid === "number") {
1375
- if (isProcessAlive(metadata.pid)) {
1376
- const specId = typeof metadata.specId === "string" ? metadata.specId.trim() : "";
1377
- if (installDirLooksComplete(appDir) && (!specId || getRunningTasks(`app-install-${specId}`).length === 0)) {
1378
- return true;
1379
- }
1380
- return false;
1381
- }
1382
- return !isProcessAlive(metadata.pid);
1383
- }
1384
- const specId = typeof metadata.specId === "string" ? metadata.specId.trim() : "";
1385
- return specId ? getRunningTasks(`app-install-${specId}`).length === 0 : true;
1386
- }
1387
- function cleanupStaleInstallDir(appDir) {
1388
- if (!isStaleInstallLock(appDir))
1389
- return false;
1390
- if (installDirLooksComplete(appDir)) {
1391
- process.stdout.write(` [app-manager] removing stale install lock: ${appDir}\n`);
1392
- removeInstallLock(appDir);
1393
- return false;
1394
- }
1395
- process.stdout.write(` [app-manager] removing stale install dir: ${appDir}\n`);
1396
- rmSync(appDir, { recursive: true, force: true });
1397
- return true;
1398
- }
1399
- function createInstallLock(appDir, appId, specId, task) {
1400
- writeFileSync(installLockPathForDir(appDir), JSON.stringify({ appId, specId, started_at: new Date().toISOString(), pid: process.pid, taskId: task?.id }, null, 2) + "\n", { mode: 0o644 });
1401
- }
1402
- function removeInstallLock(appDir) {
1403
- const lockPath = installLockPathForDir(appDir);
1404
- if (existsSync(lockPath)) {
1405
- unlinkSync(lockPath);
1406
- }
1407
- }
1408
- function appTaskName(kind, appId) {
1409
- return `app-${kind}:${appId}`;
1410
- }
1411
- function findRunningInstallTask(appDir) {
1412
- const metadata = readInstallLockMetadata(appDir);
1413
- const taskId = typeof metadata?.taskId === "string" ? metadata.taskId.trim() : "";
1414
- if (!taskId)
1415
- return undefined;
1416
- const status = getTask(taskId)?.status;
1417
- if (status !== "running")
1418
- return undefined;
1419
- return { id: taskId, kind: "install", status };
1420
- }
1421
- function findRunningNamedTask(taskName, kind) {
1422
- const running = getRunningTasks(taskName)[0];
1423
- if (!running)
1424
- return undefined;
1425
- const status = getTask(running.id)?.status;
1426
- if (status !== "running")
1427
- return undefined;
1428
- return { id: running.id, kind, status };
1429
- }
1430
- export function getRunningAppTask(appId, appDir) {
1431
- const resolvedAppDir = appDir ?? resolveAppLocation(appId)?.dir;
1432
- if (resolvedAppDir && hasInstallLock(resolvedAppDir)) {
1433
- const installTask = findRunningInstallTask(resolvedAppDir);
1434
- if (installTask)
1435
- return installTask;
1436
- }
1437
- for (const kind of ["uninstall", "restart", "stop", "start"]) {
1438
- const task = findRunningNamedTask(appTaskName(kind, appId), kind);
1439
- if (task)
1440
- return task;
1441
- }
1442
- return undefined;
1443
- }
1444
- function startAppLifecycleTask(appId, kind, startMessage, doneMessage, action) {
1445
- const currentTask = getRunningAppTask(appId);
1446
- if (currentTask) {
1447
- if (currentTask.kind === kind) {
1448
- return { ok: true, taskId: currentTask.id, reused: true, kind };
1449
- }
1450
- return {
1451
- ok: false,
1452
- error: `App '${appId}' 正在执行 ${currentTask.kind} 操作,请等待完成后再试`,
1453
- code: "TASK_BUSY",
1454
- kind,
1455
- };
1456
- }
1457
- const task = createTask(appTaskName(kind, appId));
1458
- emitAppTaskProgress(task, startMessage, 0);
1459
- void (async () => {
1460
- try {
1461
- await action();
1462
- task.status = "done";
1463
- emitTask(task, { type: "done", message: doneMessage, progress: 100 });
1464
- }
1465
- catch (e) {
1466
- task.status = "error";
1467
- emitTask(task, {
1468
- type: "error",
1469
- message: e?.message || `App '${appId}' ${kind} 失败`,
1470
- });
1471
- }
1472
- })();
1473
- return { ok: true, taskId: task.id, kind };
1474
- }
1475
- function instanceAppDirForId(appId) {
1476
- return join(INSTANCES_DIR, appId);
1477
- }
1478
- function resolveAppLocation(appId) {
1479
- const candidates = [
1480
- { dir: appDirForId(appId), installMode: "app-dir" },
1481
- { dir: instanceAppDirForId(appId), installMode: "instance-dir" },
1482
- ];
1483
- for (const candidate of candidates) {
1484
- cleanupStaleInstallDir(candidate.dir);
1485
- if (existsSync(join(candidate.dir, "app-spec.yaml"))
1486
- && existsSync(join(candidate.dir, "manifest.json"))) {
1487
- return candidate;
1488
- }
1489
- }
1490
- return null;
1491
- }
1492
- function isInstanceBackedApp(appData) {
1493
- return appData?.manifest.install_mode === "instance-dir";
1494
- }
1495
- function getSingleServiceTask(spec) {
1496
- const serviceTasks = spec.tasks.filter((task) => (task.role ?? "service") === "service");
1497
- if (spec.tasks.length !== 1 || serviceTasks.length !== 1)
1498
- return null;
1499
- return serviceTasks[0];
1500
- }
1501
- function inferLegacyAppType(spec) {
1502
- return /ollama/i.test(`${spec.id} ${spec.name ?? ""}`) ? "ollama" : "custom";
1503
- }
1504
- function rewriteInstanceScopedPathText(value, appId) {
1505
- return value
1506
- .split(`~/.jishushell/apps/${appId}`).join(`~/.jishushell/instances/${appId}`)
1507
- .split(`$HOME/.jishushell/apps/${appId}`).join(`$HOME/.jishushell/instances/${appId}`)
1508
- .split(`${homedir()}/.jishushell/apps/${appId}`).join(`${homedir()}/.jishushell/instances/${appId}`);
1509
- }
1510
- function rewriteInstanceScopedPaths(value, appId) {
1511
- if (typeof value === "string") {
1512
- return rewriteInstanceScopedPathText(value, appId);
1513
- }
1514
- if (Array.isArray(value)) {
1515
- return value.map((entry) => rewriteInstanceScopedPaths(entry, appId));
1516
- }
1517
- if (value && typeof value === "object") {
1518
- return Object.fromEntries(Object.entries(value).map(([key, entry]) => [
1519
- key,
1520
- rewriteInstanceScopedPaths(entry, appId),
1521
- ]));
1522
- }
1523
- return value;
1524
- }
1525
- function buildGenericInstanceBackedMeta(appId, spec) {
1526
- return {
1527
- id: appId,
1528
- name: spec.name || appId,
1529
- description: spec.description || "",
1530
- // See buildGenericAppMeta for the dual-write rationale: legacy
1531
- // `app_type` keeps V1 dispatch alive, `app_spec_ref` is the V2
1532
- // discriminator recognized by resolveAgentType.
1533
- app_type: inferLegacyAppType(spec),
1534
- app_spec_ref: spec.id,
1535
- ...(spec.singleInstance ? { singleInstance: true } : {}),
1536
- runtime: {},
1537
- created_at: new Date().toISOString(),
1538
- app_id: spec.app_id ?? appId,
1539
- };
1540
- }
1541
- function explicitAgentTypeForSpec(spec) {
1542
- if (typeof spec.agentType === "string" && spec.agentType.trim()) {
1543
- return spec.agentType.trim();
1544
- }
1545
- if (typeof spec._engine?.agentType === "string" && spec._engine.agentType.trim()) {
1546
- return spec._engine.agentType.trim();
1547
- }
1548
- return "";
1549
- }
1550
- function buildGenericAppRuntime(spec, appId) {
1551
- const serviceTask = spec.tasks.find((task) => (task.role ?? "service") === "service");
1552
- if (!serviceTask)
1553
- return {};
1554
- const runtime = compileTaskRuntime(serviceTask, appId);
1555
- if (Array.isArray(serviceTask.ports) && serviceTask.ports.length > 0) {
1556
- runtime.ports = serviceTask.ports.map((port) => ({
1557
- name: port.name,
1558
- containerPort: port.container_port ?? port.port,
1559
- hostPort: port.host_port ?? port.port,
1560
- visibility: port.visibility ?? "external",
1561
- }));
1562
- }
1563
- if (serviceTask.health?.http) {
1564
- const healthPortEntry = serviceTask.ports?.find((port) => port.port === serviceTask.health?.http?.port
1565
- || port.host_port === serviceTask.health?.http?.port
1566
- || port.container_port === serviceTask.health?.http?.port);
1567
- runtime.health = {
1568
- type: "http",
1569
- path: serviceTask.health.http.path,
1570
- port: healthPortEntry?.host_port ?? healthPortEntry?.port ?? serviceTask.health.http.port,
1571
- interval: serviceTask.health.interval,
1572
- timeout: serviceTask.health.timeout,
1573
- retries: serviceTask.health.retries,
1574
- };
1575
- }
1576
- if (Array.isArray(serviceTask.volumes)) {
1577
- runtime.volumes = serviceTask.volumes.map((volume) => ({
1578
- hostPath: expandPath(String(volume.source ?? "")),
1579
- containerPath: String(volume.target ?? ""),
1580
- mode: volume.readonly ? "ro" : "rw",
1581
- }));
1582
- }
1583
- return runtime;
1584
- }
1585
- function buildGenericAppMeta(appId, spec, createdAt) {
1586
- const explicitAgentType = explicitAgentTypeForSpec(spec);
1587
- return {
1588
- id: appId,
1589
- name: spec.name || appId,
1590
- description: spec.description || "",
1591
- runtime: buildGenericAppRuntime(spec, appId),
1592
- created_at: createdAt,
1593
- app_id: spec.app_id ?? appId,
1594
- ...(explicitAgentType
1595
- ? { agentType: explicitAgentType }
1596
- : {
1597
- // `app_type: "custom"` is the V1 legacy marker; `app_spec_ref`
1598
- // is the V2 discriminator that resolveAgentType (runtime/
1599
- // instance.ts) uses to route to the custom adapter. Writing
1600
- // both makes dispatch survive the eventual removal of the
1601
- // resolveLegacyAppType bridge without touching each instance.
1602
- app_type: inferLegacyAppType(spec),
1603
- app_spec_ref: spec.id,
1604
- ...(spec.singleInstance ? { singleInstance: true } : {}),
1605
- }),
1606
- };
1607
- }
1608
- async function bootstrapAdapterManagedApp(appId, spec, options) {
1609
- const agentType = explicitAgentTypeForSpec(spec);
1610
- if (!agentType)
1611
- return false;
1612
- const { hasAdapter, getAdapter } = await import("../runtime/index.js");
1613
- if (!hasAdapter(agentType))
1614
- return false;
1615
- const adapter = getAdapter(agentType);
1616
- if (!adapter.createInstance)
1617
- return false;
1618
- await adapter.createInstance({
1619
- instanceId: appId,
1620
- name: options.bootstrap?.name ?? spec.name ?? appId,
1621
- description: options.bootstrap?.description ?? spec.description ?? "",
1622
- cloneFrom: options.bootstrap?.cloneFrom,
1623
- agentHome: options.bootstrap?.agentHome,
1624
- cloneOptions: options.bootstrap?.cloneOptions,
1625
- appSpec: spec,
1626
- });
1627
- return true;
1628
- }
1629
- function getAdapterManagedAgentType(appData) {
1630
- if (!appData || appData.manifest.install_mode !== "app-dir")
1631
- return null;
1632
- const meta = legacyInstanceManager.getInstance(appData.manifest.id);
1633
- const agentType = typeof meta?.agentType === "string" ? meta.agentType.trim() : "";
1634
- const legacyAppType = typeof meta?.app_type === "string" ? meta.app_type.trim() : "";
1635
- if (!agentType || legacyAppType)
1636
- return null;
1637
- return agentType;
1638
- }
1639
- async function installIntoInstanceDir(spec, specYaml, requestedAppId, options = {}) {
1640
- if (options.preferInstanceDir !== true)
1641
- return null;
1642
- const serviceTask = getSingleServiceTask(spec);
1643
- if (!serviceTask)
1644
- return null;
1645
- const explicitAgentType = typeof spec.agentType === "string" && spec.agentType.trim()
1646
- ? spec.agentType.trim()
1647
- : typeof spec._engine?.agentType === "string" && spec._engine.agentType.trim()
1648
- ? spec._engine.agentType.trim()
1649
- : "";
1650
- const { hasAdapter, getAdapter } = await import("../runtime/index.js");
1651
- let installTarget = null;
1652
- if (explicitAgentType) {
1653
- if (hasAdapter(explicitAgentType) && getAdapter(explicitAgentType).createInstance) {
1654
- installTarget = { kind: "adapter", agentType: explicitAgentType };
1655
- }
1656
- }
1657
- else {
1658
- const hintText = `${spec.id} ${spec.name ?? ""}`.toLowerCase();
1659
- for (const hintedAgentType of ["openclaw", "hermes"]) {
1660
- if (hintText.includes(hintedAgentType) && hasAdapter(hintedAgentType) && getAdapter(hintedAgentType).createInstance) {
1661
- installTarget = { kind: "adapter", agentType: hintedAgentType };
1662
- break;
1663
- }
1664
- }
1665
- if (!installTarget && serviceTask.runtime === "container") {
1666
- installTarget = { kind: "legacy", appType: inferLegacyAppType(spec) };
1667
- }
1668
- }
1669
- if (!installTarget)
1670
- return null;
1671
- const { appId, installedSpec, } = await resolveInstallTarget(spec, specYaml, requestedAppId);
1672
- let instanceSpec = rewriteInstanceScopedPaths(installedSpec, appId);
1673
- // PR 3 sub-step 3c: switch from legacy `resolveRequires(spec)` to the new
1674
- // resolveConnections in preCreate mode. Legacy single-candidate fallback
1675
- // still materializes its env (so meta-apps stay "open the box and it
1676
- // works"); category-prefix requires + missing required producers fall
1677
- // into `pending` for UI display via the install task event (PR 4 wires
1678
- // task.event.affectedConsumers etc.). install never fails here — even if
1679
- // a required capability is unavailable; start time will surface the
1680
- // error. The previous `ensureRequiredCapabilitiesAvailable` block has
1681
- // been removed for the same reason.
1682
- const { resolveConnections, resolvedToLegacyEnv } = await import("../connection-resolver.js");
1683
- const { resolved, pending } = resolveConnections(installedSpec, { connections: {} }, "preCreate");
1684
- if (pending.length > 0) {
1685
- console.log(`[install] ${appId}: ${pending.length} pending connection(s): ` +
1686
- pending.map((p) => `${p.slot} (${p.capability}, ${p.reason})`).join(", "));
1687
- }
1688
- const resolvedRequires = resolvedToLegacyEnv(resolved);
1689
- if (Object.keys(resolvedRequires).length > 0) {
1690
- instanceSpec = {
1691
- ...installedSpec,
1692
- tasks: installedSpec.tasks.map((task) => (task.role ?? "service") === "service"
1693
- ? { ...task, env: { ...task.env, ...resolvedRequires } }
1694
- : task),
1695
- };
1696
- instanceSpec = rewriteInstanceScopedPaths(instanceSpec, appId);
1697
- }
1698
- const persistedSpecYaml = stringify(instanceSpec);
1699
- const instanceDir = instanceAppDirForId(appId);
1700
- const manifest = {
1701
- id: appId,
1702
- installed_at: new Date().toISOString(),
1703
- spec_hash: createHash("sha256").update(persistedSpecYaml).digest("hex"),
1704
- install_mode: "instance-dir",
1705
- };
1706
- const { getAppManager } = await import("./registry.js");
1707
- const instanceName = instanceSpec.name || appId;
1708
- const instanceDescription = instanceSpec.description || "";
1709
- const artifacts = [];
1710
- try {
1711
- if (installTarget?.kind === "adapter") {
1712
- const adapter = getAdapter(installTarget.agentType);
1713
- if (!adapter.createInstance)
1714
- return null;
1715
- await adapter.createInstance({
1716
- instanceId: appId,
1717
- name: instanceName,
1718
- description: instanceDescription,
1719
- appSpec: instanceSpec,
1720
- });
1721
- }
1722
- else if (installTarget?.kind === "legacy") {
1723
- await getAppManager(installTarget.appType).createInstance(appId, instanceName, instanceDescription, { appSpec: instanceSpec });
1724
- }
1725
- else {
1726
- ensureDirHost(instanceDir);
1727
- safeWriteJson(join(instanceDir, "instance.json"), buildGenericInstanceBackedMeta(appId, instanceSpec), true);
1728
- }
1729
- ensureDirHost(instanceDir);
1730
- const yamlPath = join(instanceDir, "app-spec.yaml");
1731
- const yamlTmp = yamlPath + ".tmp";
1732
- writeFileSync(yamlTmp, persistedSpecYaml, { mode: 0o644 });
1733
- renameSync(yamlTmp, yamlPath);
1734
- safeWriteJson(join(instanceDir, "manifest.json"), manifest, true);
1735
- await runLifecycleSteps(instanceSpec.lifecycle?.pre_install, "pre_install", artifacts, options.task, options.exec);
1736
- }
1737
- catch (e) {
1738
- cleanupArtifacts(artifacts, options.task);
1739
- try {
1740
- const instanceManager = await import("../instance-manager.js");
1741
- await instanceManager.deleteInstance(appId);
1742
- }
1743
- catch {
1744
- rmSync(instanceDir, { recursive: true, force: true });
1745
- }
1746
- throw decorateInstallError(e, instanceSpec);
1747
- }
1748
- try {
1749
- await runLifecycleSteps(instanceSpec.lifecycle?.install, "install", artifacts, options.task, options.exec);
1750
- const pulledImages = new Set(artifacts.filter((artifact) => artifact.type === "image").map((artifact) => artifact.path));
1751
- const imagesToPull = [...new Set(instanceSpec.tasks.filter((task) => task.image).map((task) => task.image))];
1752
- for (const image of imagesToPull) {
1753
- if (!pulledImages.has(image)) {
1754
- await pullDockerImageStep("install", image, `docker pull ${image}`, options.task);
1755
- artifacts.push({ type: "image", path: image });
1756
- }
1757
- }
1758
- }
1759
- catch (e) {
1760
- try {
1761
- await runLifecycleSteps(instanceSpec.lifecycle?.uninstall, "rollback_uninstall", undefined, options.task, options.exec);
1762
- }
1763
- catch (rollbackError) {
1764
- process.stdout.write(` [app-manager] rollback uninstall failed: ${rollbackError.message}\n`);
1765
- emitInstallTaskLog(options.task, `[app-manager] rollback uninstall failed: ${rollbackError.message}`);
1766
- }
1767
- cleanupArtifacts(artifacts, options.task);
1768
- try {
1769
- const instanceManager = await import("../instance-manager.js");
1770
- await instanceManager.deleteInstance(appId);
1771
- }
1772
- catch {
1773
- rmSync(instanceDir, { recursive: true, force: true });
1774
- }
1775
- throw decorateInstallError(e, instanceSpec);
1776
- }
1777
- if (artifacts.length > 0) {
1778
- manifest.artifacts = artifacts;
1779
- safeWriteJson(join(instanceDir, "manifest.json"), manifest, true);
1780
- }
1781
- return { spec: instanceSpec, manifest };
1782
- }
1783
- /**
1784
- * Check whether an app with this id is installed (has manifest.json + app-spec.yaml).
1785
- * Exported so nomad-manager can use it for routing without the old prefix convention.
1786
- */
1787
- export function isAppInstalled(appId) {
1788
- const location = resolveAppLocation(appId);
1789
- return location != null && !hasInstallLock(location.dir);
1790
- }
1791
- function resolveAppDir(appId) {
1792
- return resolveAppLocation(appId)?.dir ?? null;
1793
- }
1794
- function readAppFromDir(appDir, appId, installModeHint = "app-dir") {
1795
- if (cleanupStaleInstallDir(appDir))
1796
- return null;
1797
- const yamlPath = join(appDir, "app-spec.yaml");
1798
- const manifestPath = join(appDir, "manifest.json");
1799
- if (!existsSync(yamlPath) || !existsSync(manifestPath))
1800
- return null;
1801
- try {
1802
- const spec = normalizeAppSpec(parse(readFileSync(yamlPath, "utf-8")));
1803
- const manifest = safeReadJson(manifestPath, `app:${appId}`);
1804
- if (!manifest)
1805
- return null;
1806
- return {
1807
- spec,
1808
- manifest: {
1809
- ...manifest,
1810
- install_mode: manifest.install_mode ?? installModeHint,
1811
- },
1812
- install_state: hasInstallLock(appDir) ? "installing" : "installed",
1813
- ...(getRunningAppTask(appId, appDir) ? { current_task: getRunningAppTask(appId, appDir) } : {}),
1814
- };
1815
- }
1816
- catch {
1817
- return null;
1818
- }
1819
- }
1820
- export function getAppInstallState(appId) {
1821
- const location = resolveAppLocation(appId);
1822
- if (!location)
1823
- return null;
1824
- return hasInstallLock(location.dir) ? "installing" : "installed";
1825
- }
1826
- const BROWSERLESS_DEBUGGER_CAPABILITY = "browserless-debugger";
1827
- const BROWSERLESS_API_CAPABILITY = "browserless-api";
1828
- const BROWSERLESS_DOCS_CAPABILITY = "browserless-docs";
1829
- /**
1830
- * Compat-view registry reader. Returns the legacy `{ capabilities: {} }`
1831
- * shape that older call sites expect. The new `capability-registry.ts`
1832
- * module migrates dual-shape entries on every read so the legacy view is
1833
- * always populated. PR 3 sub-step 3f deletes this shim.
1834
- */
1835
- function readRegistry() {
1836
- const file = capabilityRegistry.readRegistry();
1837
- return { capabilities: file.capabilities ?? {}, providersByCapability: file.providersByCapability };
1838
- }
1839
- // `ensureRequiredCapabilitiesAvailable` was removed in PR 3 sub-step 3c.
1840
- // install never blocks on missing required providers any more —
1841
- // resolveConnections(..., "preCreate") collects them into the `pending`
1842
- // list and the UI surfaces them after install completes.
1843
- // `listProvidedCapabilities()` does a full filesystem app scan (listApps →
1844
- // readdir + per-app spec parse) plus a registry read. `augmentInstanceMetadata`
1845
- // calls it ~2× per instance (getProvidedCapabilitiesForApp +
1846
- // getEmbeddedUiHintForApp), so `GET /api/instances` over N instances did ~2N
1847
- // full disk scans per request — the dashboard warm-path cost.
1848
- //
1849
- // Cache the result, but key validity on a CHEAP fingerprint of the
1850
- // underlying state, not on time alone. A time-only TTL left a staleness
1851
- // window where a freshly installed/uninstalled app (or created/deleted
1852
- // instance — INSTANCES_DIR also feeds listApps) was missing from / lingered
1853
- // in the list until the TTL expired, which broke the Connections UI and the
1854
- // embedded-UI hint. The fingerprint (sorted dir entries of APPS_DIR +
1855
- // INSTANCES_DIR, plus the registry file mtime) changes the instant the app
1856
- // set or registry changes — including external mutations — so the cache
1857
- // self-busts without having to hook every mutation site. It costs two
1858
- // readdir + one stat, still vastly cheaper than re-parsing every app spec.
1859
- // The short TTL stays only as a safety net for in-place spec edits that
1860
- // don't change the dir set; the explicit register/unregister/markStopped
1861
- // invalidations remain as a precise fast-path for sub-millisecond registry
1862
- // writes that could share an mtime tick.
1863
- const PROVIDED_CAPS_TTL_MS = 5_000;
1864
- let _providedCapsEntry = null;
1865
- function providedCapabilitiesFingerprint() {
1866
- const dirEntries = (dir) => {
1867
- try {
1868
- return existsSync(dir) ? readdirSync(dir).sort().join(",") : "";
1869
- }
1870
- catch {
1871
- return "";
1872
- }
1873
- };
1874
- let registryMtime = 0;
1875
- try {
1876
- registryMtime = lstatSync(_REGISTRY_PATH).mtimeMs;
1877
- }
1878
- catch {
1879
- /* registry file not written yet → 0 */
1880
- }
1881
- return `${dirEntries(APPS_DIR)}|${dirEntries(INSTANCES_DIR)}|${registryMtime}`;
1882
- }
1883
- export function invalidateProvidedCapabilitiesCache() {
1884
- _providedCapsEntry = null;
1885
- }
1886
- export function listProvidedCapabilities() {
1887
- const fp = providedCapabilitiesFingerprint();
1888
- const now = Date.now();
1889
- if (_providedCapsEntry &&
1890
- _providedCapsEntry.fp === fp &&
1891
- now - _providedCapsEntry.ts < PROVIDED_CAPS_TTL_MS) {
1892
- return _providedCapsEntry.data;
1893
- }
1894
- const data = computeProvidedCapabilities();
1895
- _providedCapsEntry = { data, fp, ts: now };
1896
- return data;
1897
- }
1898
- function computeProvidedCapabilities() {
1899
- const reg = readRegistry();
1900
- return listApps().flatMap((app) => (app.spec.provides ?? []).map((provide) => {
1901
- const url = getProvideUrl(provide) ?? undefined;
1902
- const port = getProvidePort(app.spec, provide) ?? undefined;
1903
- const address = !url && typeof port === "number" ? buildCapabilityAddress(port, provide.path) : undefined;
1904
- const providers = reg.providersByCapability?.[provide.capability] ?? [];
1905
- const registered = providers.find((e) => e.instanceId === app.manifest.id)
1906
- ?? providers.find((e) => e.status === "running")
1907
- ?? providers[0];
1908
- const protocol = resolveProvideProtocol(provide);
1909
- return {
1910
- appId: app.manifest.id,
1911
- capability: provide.capability,
1912
- ...(typeof port === "number" ? { port } : {}),
1913
- ...(provide.path ? { path: provide.path } : {}),
1914
- ...(url ? { url } : {}),
1915
- protocol,
1916
- ...(provide.visibility ? { visibility: provide.visibility } : {}),
1917
- ...(provide.description ? { description: provide.description } : {}),
1918
- ...(provide.terminal ? { terminal: provide.terminal } : {}),
1919
- ...(provide.embedded ? { embedded: provide.embedded } : {}),
1920
- ...(address ? { address } : {}),
1921
- registered: Boolean(registered),
1922
- ...(registered?.address ? { registeredAddress: registered.address } : {}),
1923
- ...(registered?.instanceId ? { providerInstanceId: registered.instanceId } : {}),
1924
- };
1925
- }));
1926
- }
1927
- export function getProvidedCapabilitiesForApp(appId) {
1928
- return listProvidedCapabilities().filter((entry) => entry.appId === appId);
1929
- }
1930
- /**
1931
- * Resolve the runtime endpoint (host + port) for a given app's capability.
1932
- * Returns the runtime-resolved port when available, falling back to the
1933
- * declared AppSpec port. This is used by the capability proxy to target the
1934
- * correct live endpoint after potential port reallocation.
1935
- */
1936
- export function resolveRuntimeCapabilityPort(appId, capabilityName) {
1937
- const app = getApp(appId);
1938
- if (!app)
1939
- return null;
1940
- const provide = (app.spec.provides ?? []).find((p) => p.capability === capabilityName);
1941
- if (!provide)
1942
- return null;
1943
- const resolved = resolveProvideEndpoint(appId, app.spec, provide);
1944
- return resolved?.hostPort ?? getProvidePort(app.spec, provide);
1945
- }
1946
- export function getEmbeddedUiHintForApp(appId) {
1947
- const provides = getProvidedCapabilitiesForApp(appId);
1948
- if (!provides.length)
1949
- return null;
1950
- // Selection priority for which provide becomes the embedded UI:
1951
- // 1. browserless-debugger (special — dev console, not the API)
1952
- // 2. any capability whose name ends in "-ui" (the canonical Web UI slot,
1953
- // by convention served at "/"). Apps like AnythingLLM provide both an
1954
- // API capability (`knowledge-anythingllm`, path `/api/v1`) AND a UI
1955
- // capability (`anythingllm-ui`, path `/`). Without this preference
1956
- // the first-iterated provide wins and the iframe ends up pointing
1957
- // at `/api/v1` → 404.
1958
- // 3. fall back to natural order for legacy single-capability apps.
1959
- const browserlessPreferred = provides.find((provide) => provide.capability === BROWSERLESS_DEBUGGER_CAPABILITY);
1960
- const uiPreferred = provides.find((provide) => provide.capability.endsWith("-ui"));
1961
- const preferred = browserlessPreferred ?? uiPreferred ?? null;
1962
- const orderedProvides = preferred
1963
- ? [preferred, ...provides.filter((provide) => provide !== preferred)]
1964
- : provides;
1965
- for (const provide of orderedProvides) {
1966
- const protocol = normalizeProvideProtocol(provide.protocol);
1967
- if (provide.visibility === "internal")
1968
- continue;
1969
- if (protocol !== "http" && protocol !== "https")
1970
- continue;
1971
- if (typeof provide.url === "string" && provide.url.trim()) {
1972
- const url = provide.url.trim();
1973
- return {
1974
- capability: provide.capability,
1975
- protocol,
1976
- url,
1977
- };
1978
- }
1979
- if (typeof provide.port !== "number" || provide.port < 1)
1980
- continue;
1981
- // Honor explicit `embedded` opt-in/out on the provide before the
1982
- // auto-detection logic runs. `"proxy"` short-circuits to the
1983
- // same-origin proxy path (needed when upstream is firewall-blocked,
1984
- // emits X-Frame-Options, or otherwise can't be reached by the
1985
- // browser directly). `"direct"` forces the direct URL even when
1986
- // listening only on loopback — caller asserts they know what
1987
- // they're doing.
1988
- const embeddedMode = provide.embedded ?? "auto";
1989
- // Prefer a direct upstream URL when the container port is published to
1990
- // a LAN-reachable address (Pi with host_network "external", etc.). The
1991
- // same-origin reverse-proxy path is necessary only when the container
1992
- // is bound to 127.0.0.1 (macOS+Colima, dev laptops without LAN
1993
- // exposure) — there it's the only way for a remote browser to reach
1994
- // the iframe content. Going through the proxy when the upstream is
1995
- // already public causes path-collision bugs for apps that fetch
1996
- // absolute URLs starting with `/api/...` (e.g. OpenWebUI), because
1997
- // those calls bypass `<base href>` and hit the panel API instead.
1998
- const listeningHost = legacyInstanceManager.getListeningHostForPort(provide.port);
1999
- const isLoopback = listeningHost === "127.0.0.1" || listeningHost === "::1";
2000
- const directlyReachable = embeddedMode !== "proxy"
2001
- && listeningHost
2002
- && (!isLoopback || embeddedMode === "direct");
2003
- if (directlyReachable) {
2004
- const advertised = legacyInstanceManager.getAdvertisedHostForPort(provide.port);
2005
- const directUrl = `${protocol}://${advertised}:${provide.port}${provide.path ?? ""}`;
2006
- return {
2007
- capability: provide.capability,
2008
- protocol,
2009
- port: provide.port,
2010
- url: directUrl,
2011
- };
2012
- }
2013
- // Use same-origin reverse-proxy path so the frontend iframe works for
2014
- // remote browsers and macOS+Colima environments where the container
2015
- // port is only published to 127.0.0.1.
2016
- // Root-path UIs (path omitted) still need a trailing slash so the
2017
- // browser treats the iframe src as a directory URL. Without it, some
2018
- // SPA runtimes compute relative URLs from `/.../provides/<capability>`
2019
- // as if `<capability>` were a file segment, which breaks boot under the
2020
- // proxy even when the HTML/base rewrite succeeded.
2021
- const normalizedProvidePath = typeof provide.path === "string" ? provide.path.trim() : "";
2022
- const needsTrailingSlash = !normalizedProvidePath || normalizedProvidePath.endsWith("/");
2023
- const proxyPath = `/api/instances/${encodeURIComponent(appId)}/provides/${encodeURIComponent(provide.capability)}${needsTrailingSlash ? "/" : ""}`;
2024
- return {
2025
- capability: provide.capability,
2026
- protocol,
2027
- port: provide.port,
2028
- url: proxyPath,
2029
- };
2030
- }
2031
- return null;
2032
- }
2033
- export async function installApp(specYaml, requestedAppId, options = {}) {
2034
- let spec;
2035
- try {
2036
- spec = normalizeAppSpec(parse(specYaml));
2037
- }
2038
- catch (e) {
2039
- throw new Error(`YAML 解析失败: ${e.message}`);
2040
- }
2041
- if (!spec || !spec.id || !APP_ID_RE.test(spec.id)) {
2042
- throw new Error(`App id '${spec?.id}' 格式无效,必须符合 /^[a-z0-9][a-z0-9-]{0,62}$/`);
2043
- }
2044
- ensureCompatibleJishuShellVersion(spec);
2045
- if (!Array.isArray(spec.tasks) || spec.tasks.length === 0) {
2046
- throw new Error("tasks 不能为空");
2047
- }
2048
- const hasService = spec.tasks.some((t) => t.role === "service");
2049
- if (!hasService) {
2050
- throw new Error("tasks 中至少需要一个 role 为 'service' 的任务");
2051
- }
2052
- for (const task of spec.tasks) {
2053
- if (task.runtime === "vm") {
2054
- throw new Error(`runtime 'vm' 暂不支持,请使用 runtime: container 或 process`);
2055
- }
2056
- if (task.runtime === "container" && !task.image) {
2057
- throw new Error(`container task '${task.name}' 需要指定 image 字段`);
2058
- }
2059
- if (task.runtime === "process" && !task.command) {
2060
- throw new Error(`process task '${task.name}' 需要指定 command 或 binary 字段`);
2061
- }
2062
- if (task.image && !DOCKER_IMAGE_RE.test(task.image)) {
2063
- throw new Error(`task '${task.name}' 的 image '${task.image}' 格式无效`);
2064
- }
2065
- }
2066
- // PR 3 sub-step 3c: removed the legacy `ensureRequiredCapabilitiesAvailable`
2067
- // hard-stop. install now never blocks on missing required providers —
2068
- // resolveConnections(..., "preCreate") records them as `pending` on the
2069
- // install task event so the UI can prompt the user; start time surfaces
2070
- // the error if still unresolved.
2071
- const instanceBackedInstall = await installIntoInstanceDir(spec, specYaml, requestedAppId, options);
2072
- if (instanceBackedInstall) {
2073
- return instanceBackedInstall;
2074
- }
2075
- const { appId, installedSpec, installedSpecYaml, } = await resolveInstallTarget(spec, specYaml, requestedAppId);
2076
- const appDir = appDirForId(appId);
2077
- ensureDirHost(appDir);
2078
- createInstallLock(appDir, appId, spec.id, options.task);
2079
- emitInstallTaskLog(options.task, `[app-manager] created ${INSTALL_LOCK_FILENAME} for ${appId}`);
2080
- const yamlPath = join(appDir, "app-spec.yaml");
2081
- const yamlTmp = yamlPath + ".tmp";
2082
- writeFileSync(yamlTmp, installedSpecYaml, { mode: 0o644 });
2083
- renameSync(yamlTmp, yamlPath);
2084
- const manifest = {
2085
- id: appId,
2086
- installed_at: new Date().toISOString(),
2087
- spec_hash: createHash("sha256").update(installedSpecYaml).digest("hex"),
2088
- install_mode: "app-dir",
2089
- };
2090
- safeWriteJson(join(appDir, "manifest.json"), manifest, true);
2091
- const artifacts = [];
2092
- try {
2093
- await runLifecycleSteps(installedSpec.lifecycle?.pre_install, "pre_install", artifacts, options.task, options.exec);
2094
- }
2095
- catch (e) {
2096
- cleanupArtifacts(artifacts, options.task);
2097
- rmSync(appDir, { recursive: true, force: true });
2098
- throw decorateInstallError(e, installedSpec);
2099
- }
2100
- try {
2101
- await runLifecycleSteps(installedSpec.lifecycle?.install, "install", artifacts, options.task, options.exec);
2102
- // Auto-pull docker images declared in tasks (deduplicated, skip already-pulled by lifecycle steps)
2103
- const pulledImages = new Set(artifacts.filter(a => a.type === "image").map(a => a.path));
2104
- const imagesToPull = [...new Set(installedSpec.tasks.filter(t => t.image).map(t => t.image))];
2105
- for (const image of imagesToPull) {
2106
- if (!pulledImages.has(image)) {
2107
- await pullDockerImageStep("install", image, `docker pull ${image}`, options.task);
2108
- artifacts.push({ type: "image", path: image });
2109
- }
2110
- }
2111
- const bootstrappedByAdapter = await bootstrapAdapterManagedApp(appId, installedSpec, options);
2112
- if (!bootstrappedByAdapter) {
2113
- safeWriteJson(join(appDir, "instance.json"), buildGenericAppMeta(appId, installedSpec, manifest.installed_at), true);
2114
- }
2115
- }
2116
- catch (e) {
2117
- try {
2118
- await runLifecycleSteps(installedSpec.lifecycle?.uninstall, "rollback_uninstall", undefined, options.task, options.exec);
2119
- }
2120
- catch (rollbackError) {
2121
- process.stdout.write(` [app-manager] rollback uninstall failed: ${rollbackError.message}\n`);
2122
- emitInstallTaskLog(options.task, `[app-manager] rollback uninstall failed: ${rollbackError.message}`);
2123
- }
2124
- cleanupArtifacts(artifacts, options.task);
2125
- rmSync(appDir, { recursive: true, force: true });
2126
- throw decorateInstallError(e, installedSpec);
2127
- }
2128
- if (artifacts.length > 0) {
2129
- manifest.artifacts = artifacts;
2130
- safeWriteJson(join(appDir, "manifest.json"), manifest, true);
2131
- }
2132
- removeInstallLock(appDir);
2133
- emitInstallTaskLog(options.task, `[app-manager] removed ${INSTALL_LOCK_FILENAME} for ${appId}`);
2134
- return { spec: installedSpec, manifest };
2135
- }
2136
- export function listApps() {
2137
- const results = [];
2138
- for (const { rootDir, installMode } of [
2139
- { rootDir: APPS_DIR, installMode: "app-dir" },
2140
- { rootDir: INSTANCES_DIR, installMode: "instance-dir" },
2141
- ]) {
2142
- if (!existsSync(rootDir))
2143
- continue;
2144
- let entries;
2145
- try {
2146
- entries = readdirSync(rootDir, { withFileTypes: true });
2147
- }
2148
- catch {
2149
- continue;
2150
- }
2151
- for (const entry of entries) {
2152
- if (!entry.isDirectory())
2153
- continue;
2154
- const appId = entry.name;
2155
- const appDir = join(rootDir, appId);
2156
- try {
2157
- const appData = readAppFromDir(appDir, appId, installMode);
2158
- if (!appData)
2159
- continue;
2160
- results.push(appData);
2161
- }
2162
- catch (e) {
2163
- console.warn(`[app-manager] Skipping app '${appId}': ${e.message}`);
2164
- }
2165
- }
2166
- }
2167
- const deduped = new Map();
2168
- for (const item of results) {
2169
- deduped.set(item.manifest.id, item);
2170
- }
2171
- return [...deduped.values()];
2172
- }
2173
- export function getApp(id) {
2174
- if (!APP_ID_RE.test(id))
2175
- return null;
2176
- const location = resolveAppLocation(id);
2177
- if (!location)
2178
- return null;
2179
- return readAppFromDir(location.dir, id, location.installMode);
2180
- }
2181
- function writeAppManagerWarnings(warnings) {
2182
- for (const warning of warnings) {
2183
- process.stdout.write(` [app-manager] ${warning}\n`);
2184
- }
2185
- }
2186
- export async function uninstallApp(id, options = {}) {
2187
- if (!APP_ID_RE.test(id))
2188
- return;
2189
- const appData = getApp(id);
2190
- const warnings = [];
2191
- if (isInstanceBackedApp(appData)) {
2192
- const { stopNomadJobInstance } = await import("../nomad-manager.js");
2193
- const stopResult = await stopNomadJobInstance(id, true);
2194
- if (!stopResult.ok && stopResult.error && !stopResult.error.includes("not found") && !stopResult.error.includes("not running")) {
2195
- warnings.push(`应用 '${id}' 停止失败: ${stopResult.error}`);
2196
- }
2197
- if (appData) {
2198
- // For multi-instance container apps the uninstalled app is the base
2199
- // template and may have spawned children via copyApp. Children carry
2200
- // `app_id === id`; stop + delete them here so they don't outlive the
2201
- // template that described their lifecycle.
2202
- if (appData.spec.singleInstance === false) {
2203
- warnings.push(...await deleteLinkedInstances(appData.manifest.id));
2204
- }
2205
- const uninstallSteps = selectUninstallLifecycleSteps(appData);
2206
- if (uninstallSteps?.length) {
2207
- try {
2208
- await runLifecycleSteps(uninstallSteps, "uninstall", undefined, undefined, options.exec);
2209
- }
2210
- catch (e) {
2211
- writeAppManagerWarnings(warnings);
2212
- throw new Error(`卸载生命周期执行失败: ${e.message}`);
2213
- }
2214
- }
2215
- const cleanupList = selectCleanupArtifacts(appData);
2216
- if (cleanupList.length > 0) {
2217
- cleanupArtifacts(cleanupList);
2218
- }
2219
- }
2220
- unregisterCapabilities(id);
2221
- const instanceManager = await import("../instance-manager.js");
2222
- const deleteResult = await instanceManager.deleteInstance(id);
2223
- if (!deleteResult.ok && deleteResult.warnings?.length) {
2224
- warnings.push(...deleteResult.warnings);
2225
- }
2226
- writeAppManagerWarnings(warnings);
2227
- return;
2228
- }
2229
- const adapterManagedAgentType = getAdapterManagedAgentType(appData);
2230
- if (adapterManagedAgentType) {
2231
- const { stopNomadJobInstance } = await import("../nomad-manager.js");
2232
- const stopResult = await stopNomadJobInstance(id, true);
2233
- if (!stopResult.ok && stopResult.error && !stopResult.error.includes("not found") && !stopResult.error.includes("not running")) {
2234
- warnings.push(`应用 '${id}' 停止失败: ${stopResult.error}`);
2235
- }
2236
- if (appData) {
2237
- warnings.push(...await deleteLinkedInstances(appData.manifest.id));
2238
- const uninstallSteps = selectUninstallLifecycleSteps(appData);
2239
- if (uninstallSteps?.length) {
2240
- try {
2241
- await runLifecycleSteps(uninstallSteps, "uninstall", undefined, undefined, options.exec);
2242
- }
2243
- catch (e) {
2244
- writeAppManagerWarnings(warnings);
2245
- throw new Error(`卸载生命周期执行失败: ${e.message}`);
2246
- }
2247
- }
2248
- const cleanupList = selectCleanupArtifacts(appData);
2249
- if (cleanupList.length > 0) {
2250
- cleanupArtifacts(cleanupList);
2251
- }
2252
- }
2253
- unregisterCapabilities(id);
2254
- const deleteResult = await legacyInstanceManager.deleteInstance(id);
2255
- if (!deleteResult.ok && deleteResult.warnings?.length) {
2256
- warnings.push(...deleteResult.warnings);
2257
- }
2258
- writeAppManagerWarnings(warnings);
2259
- return;
2260
- }
2261
- const stopResult = await stopApp(id, true);
2262
- if (stopResult.ok) {
2263
- process.stdout.write(` [app-manager] Stopped running job for "${id}"\n`);
2264
- }
2265
- else if (stopResult.error && !stopResult.error.includes("not found") && !stopResult.error.includes("not running")) {
2266
- warnings.push(`应用 '${id}' 停止失败: ${stopResult.error}`);
2267
- }
2268
- if (appData) {
2269
- warnings.push(...await deleteLinkedInstances(appData.manifest.id));
2270
- const uninstallSteps = selectUninstallLifecycleSteps(appData);
2271
- if (uninstallSteps?.length) {
2272
- try {
2273
- await runLifecycleSteps(uninstallSteps, "uninstall", undefined, undefined, options.exec);
2274
- }
2275
- catch (e) {
2276
- writeAppManagerWarnings(warnings);
2277
- throw new Error(`卸载生命周期执行失败: ${e.message}`);
2278
- }
2279
- }
2280
- const cleanupList = selectCleanupArtifacts(appData);
2281
- if (cleanupList.length > 0) {
2282
- cleanupArtifacts(cleanupList);
2283
- }
2284
- }
2285
- unregisterCapabilities(id);
2286
- const appDir = resolveAppDir(id) ?? appDirForId(id);
2287
- rmSync(appDir, { recursive: true, force: true });
2288
- writeAppManagerWarnings(warnings);
2289
- }
2290
- export function uninstallAppTask(id, exec) {
2291
- if (!getApp(id)) {
2292
- return { ok: false, error: `App '${id}' not found`, kind: "uninstall" };
2293
- }
2294
- return startAppLifecycleTask(id, "uninstall", `开始卸载应用 ${id}...`, `应用 ${id} 卸载完成`, async () => {
2295
- await uninstallApp(id, { exec });
2296
- });
2297
- }
2298
- export async function runPostStartSteps(spec) {
2299
- await runLifecycleSteps(spec.lifecycle?.post_start, "post_start");
2300
- }
2301
- /**
2302
- * Register all `provides` for an instance. PR 1 routes through the new
2303
- * `capability-registry.ts` module (which dual-writes the legacy
2304
- * `capabilities` map for compat). `portOverride` is preserved as a
2305
- * temporary parameter for the existing server.ts startup-rebuild path
2306
- * (`server.ts:266-282`); PR 1 step 0 of `resolveProvideEndpoint` reads
2307
- * the actual allocated port from instance runtime when available, so
2308
- * once PR 3 lands `portOverride` becomes redundant and gets removed.
2309
- */
2310
- export function registerCapabilities(instanceId, spec, portOverride) {
2311
- if (!spec.provides || spec.provides.length === 0)
2312
- return;
2313
- const now = new Date().toISOString();
2314
- const appName = spec.name ?? spec.id;
2315
- for (const provide of spec.provides) {
2316
- // url-only provide — out of capability registry scope (§5.1 boundary).
2317
- if (typeof provide.url === "string" && provide.url.trim())
2318
- continue;
2319
- let host = "127.0.0.1";
2320
- let hostPort;
2321
- if (typeof portOverride === "number" && portOverride > 0) {
2322
- // Legacy startup-rebuild path: server.ts already resolved the actual
2323
- // listening port via `instanceManager.getGatewayPort()`. Honor it for
2324
- // the gateway-port provide (typically `provides[0]`); other provides
2325
- // fall through to the spec-derived port.
2326
- hostPort = portOverride;
2327
- host = legacyInstanceManager.getAdvertisedHostForPort(portOverride);
2328
- }
2329
- if (typeof hostPort !== "number") {
2330
- const resolved = resolveProvideEndpoint(instanceId, spec, provide);
2331
- if (resolved) {
2332
- host = resolved.host;
2333
- hostPort = resolved.hostPort;
2334
- }
2335
- else {
2336
- const declared = getProvidePort(spec, provide);
2337
- if (declared == null)
2338
- continue;
2339
- hostPort = declared;
2340
- host = legacyInstanceManager.getAdvertisedHostForPort(declared);
2341
- }
2342
- }
2343
- const protocol = resolveProvideProtocol(provide);
2344
- const entry = {
2345
- instanceId,
2346
- name: appName,
2347
- capability: provide.capability,
2348
- host,
2349
- hostPort,
2350
- ...(provide.path ? { path: provide.path } : {}),
2351
- address: buildCapabilityAddress(hostPort, provide.path),
2352
- protocol,
2353
- ...(provide.visibility ? { visibility: String(provide.visibility) } : {}),
2354
- status: "running",
2355
- lastSeenRunningAt: now,
2356
- registeredAt: now,
2357
- // §17 (PR 8) — carry MCP firewall canonical schema through so
2358
- // adapters can resolve it during applyConnectionEnv without
2359
- // reading the spec a second time.
2360
- ...(provide.tool_schema ? { toolSchema: provide.tool_schema } : {}),
2361
- // §6 (PR B) — carry auth config through so apply hooks can resolve
2362
- // tokens at apply/runtime time without re-reading the spec.
2363
- ...(provide.auth ? { auth: provide.auth } : {}),
2364
- };
2365
- capabilityRegistry.registerProvider(entry);
2366
- }
2367
- invalidateProvidedCapabilitiesCache();
2368
- }
2369
- /**
2370
- * Mark an instance's providers as `stopped` (preferred for stop) or
2371
- * remove them entirely (uninstall / delete). Defaults to remove for
2372
- * back-compat with existing call sites; new code should prefer
2373
- * `markCapabilitiesStopped` to keep entries visible in the Connections UI.
2374
- */
2375
- export function unregisterCapabilities(instanceId) {
2376
- capabilityRegistry.unregisterProviders(instanceId);
2377
- invalidateProvidedCapabilitiesCache();
2378
- }
2379
- export function markCapabilitiesStopped(instanceId) {
2380
- capabilityRegistry.setProviderStatus(instanceId, "stopped");
2381
- invalidateProvidedCapabilitiesCache();
2382
- }
2383
- export function resolveRequires(spec) {
2384
- if (!spec.requires || spec.requires.length === 0)
2385
- return {};
2386
- const result = {};
2387
- for (const req of spec.requires) {
2388
- const entry = capabilityRegistry.getCapabilityEntry(req.capability);
2389
- if (entry) {
2390
- result[req.inject_as] = entry.address;
2391
- }
2392
- else if (req.required !== false) {
2393
- throw new Error(`Required capability '${req.capability}' is not registered`);
2394
- }
2395
- }
2396
- return result;
2397
- }
2398
- // ── App Lifecycle (delegates to nomad-manager) ───────────────────
2399
- /**
2400
- * Read `instance.json` for a generic container app. Returns the parsed
2401
- * record or `null` if missing/unreadable. Adapter-managed consumers
2402
- * (OpenClaw, Hermes) keep their state elsewhere; this is the generic
2403
- * app-dir layout under `~/.jishushell/apps/<appId>/`.
2404
- */
2405
- function readAppInstanceJson(appId) {
2406
- try {
2407
- const path = join(APPS_DIR, appId, "instance.json");
2408
- return safeReadJson(path, `app-instance:${appId}`) ?? null;
2409
- }
2410
- catch (e) {
2411
- console.warn(`[app-instance] read failed for ${appId}: ${e?.message ?? e}`);
2412
- return null;
2413
- }
2414
- }
2415
- /**
2416
- * Read `instance.json["connections-env"]` for a generic container app and
2417
- * return a copy of the persisted env vars. Adapter-managed consumers
2418
- * (OpenClaw, Hermes) route connections through `applyConnectionEnv` and
2419
- * don't write to this field. Best-effort — failures return empty object
2420
- * so they never block startup.
2421
- */
2422
- function loadConnectionsEnv(appId) {
2423
- const inst = readAppInstanceJson(appId);
2424
- const env = inst?.["connections-env"];
2425
- if (env && typeof env === "object" && !Array.isArray(env)) {
2426
- const out = {};
2427
- for (const [k, v] of Object.entries(env)) {
2428
- if (typeof v === "string")
2429
- out[k] = v;
2430
- }
2431
- return out;
2432
- }
2433
- return {};
2434
- }
2435
- export async function startApp(appId) {
2436
- // Serialize against PUT /connections, stopApp and concurrent startApp on
2437
- // the same instance — see `utils/instance-lock.ts` and §10.3 of the
2438
- // app-interconnect design.
2439
- return withInstanceLock(appId, () => startAppImpl(appId));
2440
- }
2441
- async function startAppImpl(appId) {
2442
- const appData = getApp(appId);
2443
- if (!appData) {
2444
- return { ok: false, error: `App '${appId}' not found` };
2445
- }
2446
- if (appData.install_state === "installing") {
2447
- return { ok: false, error: `App '${appId}' is still installing` };
2448
- }
2449
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2450
- if (appData.spec.lifecycle?.pre_start?.length) {
2451
- await runLifecycleSteps(appData.spec.lifecycle.pre_start, "pre_start");
2452
- }
2453
- const { startNomadJobInstance } = await import("../nomad-manager.js");
2454
- const result = await startNomadJobInstance(appId);
2455
- if (!result.ok)
2456
- return result;
2457
- if (appData.spec.provides?.length) {
2458
- registerCapabilities(appId, appData.spec);
2459
- }
2460
- if (appData.spec.lifecycle?.post_start?.length) {
2461
- await runPostStartSteps(appData.spec);
2462
- }
2463
- return result;
2464
- }
2465
- // Resolve requires through the v3 connection-resolver in runtime mode so
2466
- // missing-required / ambiguous-prefix / invalid-binding all surface with
2467
- // the structured 412/409/400 codes (§6.4 Phase 4 of the app-interconnect
2468
- // design). The legacy `resolveRequires` path threw a bare Error which the
2469
- // route handler could only forward as a generic 400 — losing the bind-vs-
2470
- // start-vs-pick distinction the UI needs.
2471
- const instJson = readAppInstanceJson(appId);
2472
- const persistedEnv = loadConnectionsEnv(appId);
2473
- let extraEnv = {};
2474
- try {
2475
- const { resolveConnections, resolvedToLegacyEnv } = await import("../connection-resolver.js");
2476
- const { renderRuntimeConnectionsEnv } = await import("../connection-apply.js");
2477
- const { resolved } = resolveConnections(appData.spec, { connections: instJson?.connections ?? {} }, "runtime");
2478
- const runtimeEnv = await renderRuntimeConnectionsEnv(appData.spec, {
2479
- id: appId,
2480
- connections: instJson?.connections,
2481
- });
2482
- // Frozen `connections-env` is the lowest-priority fallback for legacy
2483
- // apps that pre-date resolveConnections. Runtime-rendered env wins so
2484
- // provider port/IP changes propagate without re-binding.
2485
- extraEnv = { ...persistedEnv, ...resolvedToLegacyEnv(resolved), ...runtimeEnv };
2486
- }
2487
- catch (e) {
2488
- return {
2489
- ok: false,
2490
- error: e.message,
2491
- ...(e.code ? { code: e.code } : {}),
2492
- ...(typeof e.statusCode === "number" ? { statusCode: e.statusCode } : {}),
2493
- };
2494
- }
2495
- const { startAppJob: nomadStart, checkDependencies, waitForRunning } = await import("../nomad-manager.js");
2496
- const depCheck = await checkDependencies(appData.spec);
2497
- if (!depCheck.ok) {
2498
- return { ok: false, error: depCheck.errors.join("; ") };
2499
- }
2500
- // Run pre_start steps right before submitting the Nomad job — gives
2501
- // apps a place to enforce per-start invariants (e.g. chown the
2502
- // bind-mount source so the container's runtime uid can write).
2503
- if (appData.spec.lifecycle?.pre_start?.length) {
2504
- await runLifecycleSteps(appData.spec.lifecycle.pre_start, "pre_start");
2505
- }
2506
- const result = await nomadStart(appData.spec, appId, extraEnv);
2507
- if (!result.ok) {
2508
- return result;
2509
- }
2510
- if (appData.spec.provides?.length) {
2511
- registerCapabilities(appId, appData.spec);
2512
- }
2513
- if (appData.spec.lifecycle?.post_start?.length) {
2514
- const running = await waitForRunning(appId);
2515
- if (running) {
2516
- await runPostStartSteps(appData.spec);
2517
- }
2518
- }
2519
- return result;
2520
- }
2521
- export function startAppTask(appId) {
2522
- if (!getApp(appId)) {
2523
- return { ok: false, error: `App '${appId}' not found`, kind: "start" };
2524
- }
2525
- return startAppLifecycleTask(appId, "start", `开始启动应用 ${appId}...`, `应用 ${appId} 已启动`, async () => {
2526
- const result = await startApp(appId);
2527
- if (!result.ok) {
2528
- throw new Error(result.error || `App '${appId}' start failed`);
2529
- }
2530
- });
2531
- }
2532
- export async function stopApp(appId, purge = false) {
2533
- return withInstanceLock(appId, () => stopAppImpl(appId, purge));
2534
- }
2535
- async function stopAppImpl(appId, purge) {
2536
- const appData = getApp(appId);
2537
- if (appData?.install_state === "installing") {
2538
- return { ok: false, error: `App '${appId}' is still installing` };
2539
- }
2540
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2541
- const { stopNomadJobInstance } = await import("../nomad-manager.js");
2542
- const result = await stopNomadJobInstance(appId, purge);
2543
- if (result.ok || result.error?.includes("not running") || result.error?.includes("not found")) {
2544
- // Stop = mark stopped (keep entry visible in Connections UI as a
2545
- // greyed candidate); only purge / uninstall fully unregisters.
2546
- if (purge)
2547
- unregisterCapabilities(appId);
2548
- else
2549
- markCapabilitiesStopped(appId);
2550
- }
2551
- return result;
2552
- }
2553
- const { stopAppJob } = await import("../nomad-manager.js");
2554
- const result = await stopAppJob(appId, purge);
2555
- if (result.ok || result.error?.includes("not running") || result.error?.includes("not found")) {
2556
- if (purge)
2557
- unregisterCapabilities(appId);
2558
- else
2559
- markCapabilitiesStopped(appId);
2560
- }
2561
- return result;
2562
- }
2563
- export function stopAppTask(appId, purge = false) {
2564
- if (!getApp(appId)) {
2565
- return { ok: false, error: `App '${appId}' not found`, kind: "stop" };
2566
- }
2567
- return startAppLifecycleTask(appId, "stop", `开始停止应用 ${appId}${purge ? "(purge)" : ""}...`, `应用 ${appId} 已停止${purge ? "(purged)" : ""}`, async () => {
2568
- const result = await stopApp(appId, purge);
2569
- if (!result.ok) {
2570
- throw new Error(result.error || `App '${appId}' stop failed`);
2571
- }
2572
- });
2573
- }
2574
- export async function restartApp(appId) {
2575
- // Hold the instance lock for the entire restart sequence so a concurrent
2576
- // PUT /connections / startApp / stopApp on the same id can't observe a
2577
- // half-restarted state. Inner stop/start calls reuse the same lock id;
2578
- // we route them through the *Impl helpers to avoid re-acquiring.
2579
- return withInstanceLock(appId, async () => {
2580
- const appData = getApp(appId);
2581
- if (appData?.install_state === "installing") {
2582
- return { ok: false, error: `App '${appId}' is still installing` };
2583
- }
2584
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2585
- const { restartNomadJobInstance } = await import("../nomad-manager.js");
2586
- const result = await restartNomadJobInstance(appId);
2587
- if (!result.ok)
2588
- return result;
2589
- if (appData?.spec.provides?.length) {
2590
- registerCapabilities(appId, appData.spec);
2591
- }
2592
- if (appData?.spec.lifecycle?.post_start?.length) {
2593
- await runPostStartSteps(appData.spec);
2594
- }
2595
- return result;
2596
- }
2597
- const stopResult = await stopAppImpl(appId, true);
2598
- if (!stopResult.ok && !stopResult.error?.includes("not found")) {
2599
- return stopResult;
2600
- }
2601
- return startAppImpl(appId);
2602
- });
2603
- }
2604
- export function restartAppTask(appId) {
2605
- if (!getApp(appId)) {
2606
- return { ok: false, error: `App '${appId}' not found`, kind: "restart" };
2607
- }
2608
- return startAppLifecycleTask(appId, "restart", `开始重启应用 ${appId}...`, `应用 ${appId} 已重启`, async () => {
2609
- const result = await restartApp(appId);
2610
- if (!result.ok) {
2611
- throw new Error(result.error || `App '${appId}' restart failed`);
2612
- }
2613
- });
2614
- }
2615
- export async function getAppRuntimeStatus(appId) {
2616
- const appData = getApp(appId);
2617
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2618
- const { getInstanceStatus } = await import("../nomad-manager.js");
2619
- const st = await getInstanceStatus(appId);
2620
- return {
2621
- status: st.status,
2622
- uptime: st.uptime ?? undefined,
2623
- memory_mb: st.memory_mb ?? undefined,
2624
- };
2625
- }
2626
- const { getAppStatus, isBinaryRunning } = await import("../nomad-manager.js");
2627
- const st = await getAppStatus(appId);
2628
- // For process-runtime apps: if Nomad can't place the job (pending/unplaced due
2629
- // to missing raw_exec driver) but the binary is already running on the host,
2630
- // report the real status as "running" so the UI doesn't show a failure.
2631
- if (st.status === "pending" || st.status === "stopped") {
2632
- const appData = getApp(appId);
2633
- if (appData) {
2634
- const processTask = appData.spec.tasks.find((t) => t.runtime === "process" && (t.role ?? "service") === "service" && t.command);
2635
- if (processTask) {
2636
- const running = await isBinaryRunning(processTask.command);
2637
- if (running) {
2638
- return { status: "running" };
2639
- }
2640
- }
2641
- }
2642
- }
2643
- return {
2644
- status: st.status,
2645
- uptime: st.uptime ?? undefined,
2646
- memory_mb: st.memory_mb ?? undefined,
2647
- tasks: st.tasks,
2648
- error: st.error,
2649
- };
2650
- }
2651
- export async function getAppStatus(appId) {
2652
- const appData = getApp(appId);
2653
- if (appData?.install_state === "installing") {
2654
- return {
2655
- status: "installing",
2656
- tasks: {},
2657
- pid: null,
2658
- uptime: null,
2659
- memory_mb: null,
2660
- cpu_percent: null,
2661
- restarts: 0,
2662
- error: undefined,
2663
- };
2664
- }
2665
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2666
- const { getInstanceStatus } = await import("../nomad-manager.js");
2667
- const st = await getInstanceStatus(appId);
2668
- return {
2669
- status: st.status,
2670
- tasks: {},
2671
- pid: null,
2672
- uptime: st.uptime,
2673
- memory_mb: st.memory_mb,
2674
- cpu_percent: st.cpu_percent,
2675
- restarts: 0,
2676
- error: undefined,
2677
- };
2678
- }
2679
- const { getAppStatus: nomadGetAppStatus } = await import("../nomad-manager.js");
2680
- return nomadGetAppStatus(appId);
2681
- }
2682
- export async function getAppLogs(appId, taskName, lines = 200, logType = "stderr") {
2683
- const appData = getApp(appId);
2684
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2685
- const { getInstanceLogs } = await import("../nomad-manager.js");
2686
- return getInstanceLogs(appId, lines, logType);
2687
- }
2688
- const { getAppLogs: nomadGetAppLogs } = await import("../nomad-manager.js");
2689
- return nomadGetAppLogs(appId, taskName, lines, logType);
2690
- }
2691
- export async function execInApp(appId, command, timeoutMs) {
2692
- const appData = getApp(appId);
2693
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2694
- const { execInInstance } = await import("../nomad-manager.js");
2695
- return execInInstance(appId, command, timeoutMs ?? 120_000);
2696
- }
2697
- const { execInApp: nomadExecInApp } = await import("../nomad-manager.js");
2698
- return nomadExecInApp(appId, "", command, timeoutMs ?? 120_000);
2699
- }
2700
- export async function streamExecInApp(appId, command, handlers, options) {
2701
- const timeoutMs = options?.timeoutMs ?? 120_000;
2702
- const taskName = options?.taskName ?? "";
2703
- const appData = getApp(appId);
2704
- if (isInstanceBackedApp(appData) || getAdapterManagedAgentType(appData)) {
2705
- const { streamExecInInstance } = await import("../nomad-manager.js");
2706
- return streamExecInInstance(appId, command, handlers, timeoutMs, taskName);
2707
- }
2708
- const { streamExecInApp: nomadStreamExecInApp } = await import("../nomad-manager.js");
2709
- return nomadStreamExecInApp(appId, taskName, command, handlers, timeoutMs);
2710
- }
2711
- export async function copyApp(sourceId) {
2712
- const source = getApp(sourceId);
2713
- if (!source)
2714
- throw new Error(`App '${sourceId}' not found`);
2715
- if (source.spec.singleInstance)
2716
- throw new Error(`App '${sourceId}' is singleInstance — cannot copy`);
2717
- // A faithful copy requires re-materialization: ${app_id} tokens, port
2718
- // shifts, and app-scoped paths all need to be recomputed for the new
2719
- // slot. Naively swapping the `id:` line leaves lifecycle scripts and
2720
- // volume sources pointing at the source's settings dir, which then
2721
- // collides on start and leaks state across instances.
2722
- //
2723
- // The base app's on-disk yaml for offset=0 is written as the pristine
2724
- // originalSpecYaml (see resolveInstallTarget → installedSpecYaml), so
2725
- // reading from the base dir recovers the template that installApp can
2726
- // re-materialize. The source's own yaml is already baked to its own
2727
- // offset when source is itself a copy, and installApp cannot cleanly
2728
- // un-do that substitution from a string diff alone.
2729
- const baseId = source.spec.id;
2730
- const baseDir = resolveAppDir(baseId);
2731
- if (!baseDir) {
2732
- throw new Error(`App '${sourceId}' base '${baseId}' is not installed; cannot copy without the pristine spec. Reinstall the base app first.`);
2733
- }
2734
- const baseYaml = readFileSync(join(baseDir, "app-spec.yaml"), "utf-8");
2735
- // Delegate: installApp runs resolveInstallTarget (which picks the next
2736
- // free <baseId>-<prefix><n> slot and applies a fresh port shift) and
2737
- // executes the install lifecycle in the new app dir.
2738
- return installApp(baseYaml);
2739
- }
2740
- export { onConfigChange, notifyConfigChange, instanceDir, instanceMetaPath, defaultModelEnvFile, normalizePath, extractGatewayPort, isPortInUse, allocateGatewayPort, releasePendingPort, getResolvedOpenclawBin, resolveServiceUser, chownToServiceUser, parseEnvFile, updateEnvFile, inferProviderApiKeyEnvName, listInstances, getInstance, updateInstanceMeta, deleteInstance, getConfig, getStoredConfig, saveConfig, CHANNEL_PLUGIN_MAP, isChannelPluginInstalled, createInstance, getOpenclawHome, saveFeishuCredentials, saveWeixinCredentials, getWeixinAccounts, getOpenclawConfigPath, getLegacyOpenclawConfigPath, getInstanceRuntime, getRuntimeEnvFiles, getGatewayPort, getGatewayHost, getListeningHostForPort, getHostForAppPort, urlHost, findInstancesSharingOpenclawHome, reallocateGatewayPort, findInstancesSharingGatewayPort, getRuntimeEnv, defaultGatewayPort, releasePort, } from "../instance-manager.js";
2741
- //# sourceMappingURL=app-manager.js.map