@geminilight/mindos-windows-arm64 1.0.6 → 1.0.8

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 (483) hide show
  1. package/_standalone/.mindos-build-version +1 -1
  2. package/_standalone/__next/BUILD_ID +1 -1
  3. package/_standalone/__next/app-path-routes-manifest.json +24 -24
  4. package/_standalone/__next/build-manifest.json +3 -3
  5. package/_standalone/__next/prerender-manifest.json +3 -3
  6. package/_standalone/__next/react-loadable-manifest.json +48 -7
  7. package/_standalone/__next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
  8. package/_standalone/__next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/_standalone/__next/server/app/_global-error.html +2 -2
  10. package/_standalone/__next/server/app/_global-error.rsc +1 -1
  11. package/_standalone/__next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/_standalone/__next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/_standalone/__next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/_standalone/__next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/_standalone/__next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/_standalone/__next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/_standalone/__next/server/app/_not-found/page.js +1 -1
  18. package/_standalone/__next/server/app/_not-found/page.js.nft.json +1 -1
  19. package/_standalone/__next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  20. package/_standalone/__next/server/app/agents/[agentKey]/page.js +2 -2
  21. package/_standalone/__next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
  22. package/_standalone/__next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
  23. package/_standalone/__next/server/app/agents/page.js +2 -2
  24. package/_standalone/__next/server/app/agents/page.js.nft.json +1 -1
  25. package/_standalone/__next/server/app/agents/page_client-reference-manifest.js +1 -1
  26. package/_standalone/__next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
  27. package/_standalone/__next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
  28. package/_standalone/__next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
  29. package/_standalone/__next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
  30. package/_standalone/__next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
  31. package/_standalone/__next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
  32. package/_standalone/__next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
  33. package/_standalone/__next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
  34. package/_standalone/__next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
  35. package/_standalone/__next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
  36. package/_standalone/__next/server/app/api/agents/copy-skill/route_client-reference-manifest.js +1 -1
  37. package/_standalone/__next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
  38. package/_standalone/__next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
  39. package/_standalone/__next/server/app/api/ask/route.js +2 -2
  40. package/_standalone/__next/server/app/api/ask/route_client-reference-manifest.js +1 -1
  41. package/_standalone/__next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
  42. package/_standalone/__next/server/app/api/auth/route_client-reference-manifest.js +1 -1
  43. package/_standalone/__next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
  44. package/_standalone/__next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
  45. package/_standalone/__next/server/app/api/changes/route_client-reference-manifest.js +1 -1
  46. package/_standalone/__next/server/app/api/channels/verify/route_client-reference-manifest.js +1 -1
  47. package/_standalone/__next/server/app/api/connect/route_client-reference-manifest.js +1 -1
  48. package/_standalone/__next/server/app/api/embedding/route_client-reference-manifest.js +1 -1
  49. package/_standalone/__next/server/app/api/export/route_client-reference-manifest.js +1 -1
  50. package/_standalone/__next/server/app/api/extract-docx/route_client-reference-manifest.js +1 -1
  51. package/_standalone/__next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
  52. package/_standalone/__next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
  53. package/_standalone/__next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
  54. package/_standalone/__next/server/app/api/file/route_client-reference-manifest.js +1 -1
  55. package/_standalone/__next/server/app/api/files/route_client-reference-manifest.js +1 -1
  56. package/_standalone/__next/server/app/api/git/route_client-reference-manifest.js +1 -1
  57. package/_standalone/__next/server/app/api/graph/route_client-reference-manifest.js +1 -1
  58. package/_standalone/__next/server/app/api/health/route_client-reference-manifest.js +1 -1
  59. package/_standalone/__next/server/app/api/im/activity/route_client-reference-manifest.js +1 -1
  60. package/_standalone/__next/server/app/api/im/config/route_client-reference-manifest.js +1 -1
  61. package/_standalone/__next/server/app/api/im/feishu/long-connection/event/route_client-reference-manifest.js +1 -1
  62. package/_standalone/__next/server/app/api/im/feishu/long-connection/route_client-reference-manifest.js +1 -1
  63. package/_standalone/__next/server/app/api/im/status/route_client-reference-manifest.js +1 -1
  64. package/_standalone/__next/server/app/api/im/test/route_client-reference-manifest.js +1 -1
  65. package/_standalone/__next/server/app/api/im/webhook/feishu/route_client-reference-manifest.js +1 -1
  66. package/_standalone/__next/server/app/api/im/webhook-status/route_client-reference-manifest.js +1 -1
  67. package/_standalone/__next/server/app/api/inbox/clip/route_client-reference-manifest.js +1 -1
  68. package/_standalone/__next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
  69. package/_standalone/__next/server/app/api/init/route_client-reference-manifest.js +1 -1
  70. package/_standalone/__next/server/app/api/lint/route_client-reference-manifest.js +1 -1
  71. package/_standalone/__next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
  72. package/_standalone/__next/server/app/api/mcp/direct-tools/route_client-reference-manifest.js +1 -1
  73. package/_standalone/__next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
  74. package/_standalone/__next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
  75. package/_standalone/__next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
  76. package/_standalone/__next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
  77. package/_standalone/__next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
  78. package/_standalone/__next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
  79. package/_standalone/__next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
  80. package/_standalone/__next/server/app/api/obsidian/compat-report/route_client-reference-manifest.js +1 -1
  81. package/_standalone/__next/server/app/api/obsidian/import/route_client-reference-manifest.js +1 -1
  82. package/_standalone/__next/server/app/api/obsidian-plugins/settings/route_client-reference-manifest.js +1 -1
  83. package/_standalone/__next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
  84. package/_standalone/__next/server/app/api/restart/route_client-reference-manifest.js +1 -1
  85. package/_standalone/__next/server/app/api/search/prewarm/route_client-reference-manifest.js +1 -1
  86. package/_standalone/__next/server/app/api/search/route_client-reference-manifest.js +1 -1
  87. package/_standalone/__next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
  88. package/_standalone/__next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
  89. package/_standalone/__next/server/app/api/settings/route_client-reference-manifest.js +1 -1
  90. package/_standalone/__next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
  91. package/_standalone/__next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
  92. package/_standalone/__next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
  93. package/_standalone/__next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
  94. package/_standalone/__next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
  95. package/_standalone/__next/server/app/api/setup/route_client-reference-manifest.js +1 -1
  96. package/_standalone/__next/server/app/api/skills/route_client-reference-manifest.js +1 -1
  97. package/_standalone/__next/server/app/api/space-overview/route_client-reference-manifest.js +1 -1
  98. package/_standalone/__next/server/app/api/sync/route_client-reference-manifest.js +1 -1
  99. package/_standalone/__next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
  100. package/_standalone/__next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
  101. package/_standalone/__next/server/app/api/update/route_client-reference-manifest.js +1 -1
  102. package/_standalone/__next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
  103. package/_standalone/__next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
  104. package/_standalone/__next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
  105. package/_standalone/__next/server/app/capture/history/page.js +1 -1
  106. package/_standalone/__next/server/app/capture/history/page.js.nft.json +1 -1
  107. package/_standalone/__next/server/app/capture/history/page_client-reference-manifest.js +1 -1
  108. package/_standalone/__next/server/app/capture/page.js +1 -1
  109. package/_standalone/__next/server/app/capture/page.js.nft.json +1 -1
  110. package/_standalone/__next/server/app/capture/page_client-reference-manifest.js +1 -1
  111. package/_standalone/__next/server/app/changelog/page.js +1 -1
  112. package/_standalone/__next/server/app/changelog/page.js.nft.json +1 -1
  113. package/_standalone/__next/server/app/changelog/page_client-reference-manifest.js +1 -1
  114. package/_standalone/__next/server/app/changes/page.js +1 -1
  115. package/_standalone/__next/server/app/changes/page.js.nft.json +1 -1
  116. package/_standalone/__next/server/app/changes/page_client-reference-manifest.js +1 -1
  117. package/_standalone/__next/server/app/echo/[segment]/page.js +4 -4
  118. package/_standalone/__next/server/app/echo/[segment]/page.js.nft.json +1 -1
  119. package/_standalone/__next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
  120. package/_standalone/__next/server/app/echo/page.js +1 -1
  121. package/_standalone/__next/server/app/echo/page.js.nft.json +1 -1
  122. package/_standalone/__next/server/app/echo/page_client-reference-manifest.js +1 -1
  123. package/_standalone/__next/server/app/explore/page.js +3 -3
  124. package/_standalone/__next/server/app/explore/page.js.nft.json +1 -1
  125. package/_standalone/__next/server/app/explore/page_client-reference-manifest.js +1 -1
  126. package/_standalone/__next/server/app/help/page.js +2 -2
  127. package/_standalone/__next/server/app/help/page.js.nft.json +1 -1
  128. package/_standalone/__next/server/app/help/page_client-reference-manifest.js +1 -1
  129. package/_standalone/__next/server/app/inbox/history/page.js +1 -1
  130. package/_standalone/__next/server/app/inbox/history/page.js.nft.json +1 -1
  131. package/_standalone/__next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
  132. package/_standalone/__next/server/app/login/page.js +1 -1
  133. package/_standalone/__next/server/app/login/page.js.nft.json +1 -1
  134. package/_standalone/__next/server/app/login/page_client-reference-manifest.js +1 -1
  135. package/_standalone/__next/server/app/page.js +1 -1
  136. package/_standalone/__next/server/app/page.js.nft.json +1 -1
  137. package/_standalone/__next/server/app/page_client-reference-manifest.js +1 -1
  138. package/_standalone/__next/server/app/settings/page.js +8 -3
  139. package/_standalone/__next/server/app/settings/page.js.nft.json +1 -1
  140. package/_standalone/__next/server/app/settings/page_client-reference-manifest.js +1 -1
  141. package/_standalone/__next/server/app/setup/page.js +1 -1
  142. package/_standalone/__next/server/app/setup/page.js.nft.json +1 -1
  143. package/_standalone/__next/server/app/setup/page_client-reference-manifest.js +1 -1
  144. package/_standalone/__next/server/app/todo/page.js +1 -1
  145. package/_standalone/__next/server/app/todo/page.js.nft.json +1 -1
  146. package/_standalone/__next/server/app/todo/page_client-reference-manifest.js +1 -1
  147. package/_standalone/__next/server/app/trash/page.js +2 -2
  148. package/_standalone/__next/server/app/trash/page.js.nft.json +1 -1
  149. package/_standalone/__next/server/app/trash/page_client-reference-manifest.js +1 -1
  150. package/_standalone/__next/server/app/view/[...path]/page.js +3 -3
  151. package/_standalone/__next/server/app/view/[...path]/page.js.nft.json +1 -1
  152. package/_standalone/__next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
  153. package/_standalone/__next/server/app/wiki/page.js +1 -1
  154. package/_standalone/__next/server/app/wiki/page.js.nft.json +1 -1
  155. package/_standalone/__next/server/app/wiki/page_client-reference-manifest.js +1 -1
  156. package/_standalone/__next/server/app-paths-manifest.json +24 -24
  157. package/_standalone/__next/server/chunks/103.js +1 -1
  158. package/_standalone/__next/server/chunks/1976.js +1 -1
  159. package/_standalone/__next/server/chunks/6602.js +43 -66
  160. package/_standalone/__next/server/chunks/6646.js +16 -0
  161. package/_standalone/__next/server/chunks/8461.js +7 -7
  162. package/_standalone/__next/server/chunks/9868.js +2 -0
  163. package/_standalone/__next/server/chunks/{3219.js → 9969.js} +4 -4
  164. package/_standalone/__next/server/middleware-build-manifest.js +1 -1
  165. package/_standalone/__next/server/middleware-react-loadable-manifest.js +1 -1
  166. package/_standalone/__next/server/pages/500.html +2 -2
  167. package/_standalone/__next/server/server-reference-manifest.js +1 -1
  168. package/_standalone/__next/server/server-reference-manifest.json +1 -1
  169. package/_standalone/__next/static/chunks/{1430-c4ffa328888515c1.js → 1104-0822d9349a412b9b.js} +7 -2
  170. package/_standalone/__next/static/chunks/1655.0a559759973b42e9.js +1 -0
  171. package/_standalone/__next/static/chunks/{2073-3f913ebb13702b7e.js → 2073-fadffc82a27afdc7.js} +2 -2
  172. package/{static-web/_next/static/chunks/9216.d3339c27169b21bf.js → _standalone/__next/static/chunks/2245.ef71edb24c5232c2.js} +1 -1
  173. package/_standalone/__next/static/chunks/2258-2d3b5aac6a1fa92a.js +53 -0
  174. package/{static-web/_next/static/chunks/4937-4101fcdadacf46e3.js → _standalone/__next/static/chunks/2409-244f9b90dceb0c04.js} +1 -1
  175. package/_standalone/__next/static/chunks/3279-b49c25a4f2964b16.js +1 -0
  176. package/_standalone/__next/static/chunks/3807-115388f118106ca8.js +1 -0
  177. package/_standalone/__next/static/chunks/3966.ea75f9c5490955de.js +1 -0
  178. package/_standalone/__next/static/chunks/4010.48b219cb22dfa5d8.js +10 -0
  179. package/_standalone/__next/static/chunks/5026-7fed7ca22272c18f.js +1 -0
  180. package/_standalone/__next/static/chunks/5152-87e6ed56dfd7d17d.js +1 -0
  181. package/_standalone/__next/static/chunks/577.5e448c99068f1323.js +1 -0
  182. package/_standalone/__next/static/chunks/5913.a0a734f87b13f81a.js +1 -0
  183. package/_standalone/__next/static/chunks/596.9cbaf6ba90cb204f.js +7 -0
  184. package/_standalone/__next/static/chunks/6223-3fb90852221bda56.js +1 -0
  185. package/_standalone/__next/static/chunks/6343.582d063078c45d73.js +6 -0
  186. package/_standalone/__next/static/chunks/8174-50048777dc2469c0.js +1 -0
  187. package/_standalone/__next/static/chunks/{5913.3cee388e26959b62.js → 8294.cc9f9ff2f8b219ed.js} +1 -1
  188. package/_standalone/__next/static/chunks/8626-7da79d9ab2504eed.js +1 -0
  189. package/_standalone/__next/static/chunks/{8732.9002f42201b06fe8.js → 8732.87554c78e8825fac.js} +4 -4
  190. package/_standalone/__next/static/chunks/8922-3babcd35e18e9e4f.js +1 -0
  191. package/_standalone/__next/static/chunks/9440-eee639175695be7d.js +33 -0
  192. package/_standalone/__next/static/chunks/9479-b48d19e3588823c1.js +34 -0
  193. package/_standalone/__next/static/chunks/{9602.4e99e3525e5f062c.js → 9602.218427fc7b3d6b11.js} +1 -1
  194. package/_standalone/__next/static/chunks/app/agents/[agentKey]/page-ef111ea0a3368752.js +1 -0
  195. package/_standalone/__next/static/chunks/app/agents/page-aacead0f47cedb0d.js +1 -0
  196. package/_standalone/__next/static/chunks/app/layout-ed608bbf9585e78f.js +99 -0
  197. package/_standalone/__next/static/chunks/app/page-d22928276c36528c.js +1 -0
  198. package/_standalone/__next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-045afd8c0908f923.js} +1 -1
  199. package/{static-web/_next/static/chunks/app/setup/page-f5de08d0d588c778.js → _standalone/__next/static/chunks/app/setup/page-034a608f19d04653.js} +1 -1
  200. package/_standalone/__next/static/chunks/app/trash/page-251aaf5aac9d5a0b.js +1 -0
  201. package/_standalone/__next/static/chunks/app/view/[...path]/page-7e17c3d13fe2e275.js +12 -0
  202. package/_standalone/__next/static/chunks/webpack-1decda0633a8a874.js +1 -0
  203. package/_standalone/__next/static/css/5f000212c8b2e09a.css +1 -0
  204. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  205. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  206. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  207. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  208. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  209. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  210. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  211. package/_standalone/__node_modules/@aws-sdk/client-bedrock-runtime/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  212. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  213. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  214. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  215. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  216. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  217. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  218. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  219. package/_standalone/__node_modules/@aws-sdk/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  220. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  221. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  222. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  223. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  224. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  225. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  226. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  227. package/_standalone/__node_modules/@aws-sdk/middleware-sdk-s3/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  228. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  229. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  230. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  231. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  232. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  233. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  234. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  235. package/_standalone/__node_modules/@aws-sdk/middleware-websocket/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  236. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  237. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  238. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  239. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  240. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  241. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  242. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  243. package/_standalone/__node_modules/@aws-sdk/nested-clients/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  244. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/index.js +14 -0
  245. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/license +9 -0
  246. package/_standalone/__node_modules/@mariozechner/pi-coding-agent/node_modules/strip-ansi/node_modules/ansi-regex/package.json +61 -0
  247. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  248. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  249. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  250. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  251. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  252. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  253. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  254. package/_standalone/__node_modules/@smithy/core/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  255. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  256. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  257. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  258. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  259. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  260. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  261. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  262. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  263. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  264. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  265. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  266. package/_standalone/__node_modules/@smithy/hash-node/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  267. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  268. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  269. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  270. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  271. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  272. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  273. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  274. package/_standalone/__node_modules/@smithy/signature-v4/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  275. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  276. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  277. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  278. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  279. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  280. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  281. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  282. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  283. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  284. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  285. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  286. package/_standalone/__node_modules/@smithy/util-base64/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  287. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  288. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  289. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  290. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  291. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/LICENSE +201 -0
  292. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-cjs/index.js +20 -0
  293. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/dist-es/index.js +14 -0
  294. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/LICENSE +201 -0
  295. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-cjs/index.js +6 -0
  296. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/dist-es/index.js +2 -0
  297. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/node_modules/@smithy/is-array-buffer/package.json +61 -0
  298. package/_standalone/__node_modules/@smithy/util-stream/node_modules/@smithy/util-utf8/node_modules/@smithy/util-buffer-from/package.json +62 -0
  299. package/_standalone/__node_modules/bignumber.js/doc/API.html +2249 -0
  300. package/_standalone/__node_modules/entities/LICENSE +11 -0
  301. package/_standalone/__node_modules/entities/dist/decode-codepoint.js +46 -0
  302. package/_standalone/__node_modules/entities/dist/decode.js +544 -0
  303. package/_standalone/__node_modules/entities/dist/encode.js +90 -0
  304. package/_standalone/__node_modules/entities/dist/escape.js +132 -0
  305. package/_standalone/__node_modules/entities/dist/generated/decode-data-html.js +5 -0
  306. package/_standalone/__node_modules/entities/dist/generated/decode-data-xml.js +5 -0
  307. package/_standalone/__node_modules/entities/dist/generated/encode-html.js +12 -0
  308. package/_standalone/__node_modules/entities/dist/index.js +91 -0
  309. package/_standalone/__node_modules/entities/dist/internal/bin-trie-flags.js +18 -0
  310. package/_standalone/__node_modules/entities/dist/internal/decode-shared.js +17 -0
  311. package/_standalone/__node_modules/entities/dist/internal/encode-shared.js +93 -0
  312. package/_standalone/__node_modules/entities/package.json +83 -0
  313. package/_standalone/__node_modules/entities/src/decode-codepoint.ts +50 -0
  314. package/_standalone/__node_modules/entities/src/decode.ts +671 -0
  315. package/_standalone/__node_modules/entities/src/encode.ts +95 -0
  316. package/_standalone/__node_modules/entities/src/escape.ts +160 -0
  317. package/_standalone/__node_modules/entities/src/generated/decode-data-html.ts +7 -0
  318. package/_standalone/__node_modules/entities/src/generated/decode-data-xml.ts +7 -0
  319. package/_standalone/__node_modules/entities/src/generated/encode-html.ts +18 -0
  320. package/_standalone/__node_modules/entities/src/index.ts +162 -0
  321. package/_standalone/__node_modules/entities/src/internal/bin-trie-flags.ts +16 -0
  322. package/_standalone/__node_modules/entities/src/internal/decode-shared.ts +18 -0
  323. package/_standalone/__node_modules/entities/src/internal/encode-shared.ts +123 -0
  324. package/_standalone/__node_modules/has-flag/index.js +8 -0
  325. package/_standalone/__node_modules/has-flag/license +9 -0
  326. package/_standalone/__node_modules/has-flag/package.json +46 -0
  327. package/_standalone/__node_modules/koffi/doc/benchmarks.md +126 -0
  328. package/_standalone/__node_modules/koffi/doc/callbacks.md +210 -0
  329. package/_standalone/__node_modules/koffi/doc/contribute.md +148 -0
  330. package/_standalone/__node_modules/koffi/doc/functions.md +250 -0
  331. package/_standalone/__node_modules/koffi/doc/index.md +61 -0
  332. package/_standalone/__node_modules/koffi/doc/input.md +471 -0
  333. package/_standalone/__node_modules/koffi/doc/migration.md +159 -0
  334. package/_standalone/__node_modules/koffi/doc/misc.md +180 -0
  335. package/_standalone/__node_modules/koffi/doc/output.md +305 -0
  336. package/_standalone/__node_modules/koffi/doc/packaging.md +88 -0
  337. package/_standalone/__node_modules/koffi/doc/platforms.md +36 -0
  338. package/_standalone/__node_modules/koffi/doc/pointers.md +328 -0
  339. package/_standalone/__node_modules/koffi/doc/start.md +118 -0
  340. package/_standalone/__node_modules/koffi/doc/unions.md +186 -0
  341. package/_standalone/__node_modules/koffi/doc/variables.md +102 -0
  342. package/_standalone/__node_modules/supports-color/browser.js +5 -0
  343. package/_standalone/__node_modules/supports-color/index.js +135 -0
  344. package/_standalone/__node_modules/supports-color/license +9 -0
  345. package/_standalone/__node_modules/supports-color/package.json +53 -0
  346. package/_standalone/__node_modules/yaml/browser/dist/doc/Document.js +335 -0
  347. package/_standalone/__node_modules/yaml/browser/dist/doc/anchors.js +71 -0
  348. package/_standalone/__node_modules/yaml/browser/dist/doc/applyReviver.js +55 -0
  349. package/_standalone/__node_modules/yaml/browser/dist/doc/createNode.js +88 -0
  350. package/_standalone/__node_modules/yaml/browser/dist/doc/directives.js +176 -0
  351. package/_standalone/__node_modules/yaml/dist/doc/Document.js +337 -0
  352. package/_standalone/__node_modules/yaml/dist/doc/anchors.js +76 -0
  353. package/_standalone/__node_modules/yaml/dist/doc/applyReviver.js +57 -0
  354. package/_standalone/__node_modules/yaml/dist/doc/createNode.js +90 -0
  355. package/_standalone/__node_modules/yaml/dist/doc/directives.js +178 -0
  356. package/_standalone/public/agent-icons/claude.svg +1 -0
  357. package/_standalone/public/agent-icons/cursor.svg +1 -0
  358. package/_standalone/public/agent-icons/github-copilot.svg +1 -0
  359. package/_standalone/public/agent-icons/google.svg +1 -0
  360. package/_standalone/public/agent-icons/openai.svg +1 -0
  361. package/_standalone/public/agent-icons/windsurf.svg +1 -0
  362. package/bin/lib/stop.js +45 -0
  363. package/bin/lib/sync.js +32 -19
  364. package/dist/server/handlers/file.js +5 -2
  365. package/dist/server/handlers/file.js.map +1 -1
  366. package/dist/server/handlers/mcp-restart.d.ts +2 -0
  367. package/dist/server/handlers/mcp-restart.d.ts.map +1 -1
  368. package/dist/server/handlers/mcp-restart.js +45 -2
  369. package/dist/server/handlers/mcp-restart.js.map +1 -1
  370. package/dist/server/handlers/skills.d.ts.map +1 -1
  371. package/dist/server/handlers/skills.js +17 -3
  372. package/dist/server/handlers/skills.js.map +1 -1
  373. package/dist/server/handlers/sync.d.ts.map +1 -1
  374. package/dist/server/handlers/sync.js +28 -10
  375. package/dist/server/handlers/sync.js.map +1 -1
  376. package/dist/server/index.d.ts +1 -1
  377. package/dist/server/index.d.ts.map +1 -1
  378. package/dist/server/index.js +1 -1
  379. package/dist/server/index.js.map +1 -1
  380. package/dist/server/runtime.d.ts.map +1 -1
  381. package/dist/server/runtime.js +20 -21
  382. package/dist/server/runtime.js.map +1 -1
  383. package/package.json +1 -1
  384. package/runtime-manifest.json +1 -1
  385. package/scripts/build-bun-binary.mjs +139 -6
  386. package/scripts/prepare-standalone.mjs +0 -1
  387. package/scripts/prepare-static-web.mjs +52 -4
  388. package/scripts/release.sh +1 -1
  389. package/scripts/setup.js +115 -2
  390. package/scripts/verify-standalone.mjs +12 -0
  391. package/static-web/.mindos-build-version +1 -1
  392. package/static-web/_next/static/chunks/{1430-c4ffa328888515c1.js → 1104-0822d9349a412b9b.js} +7 -2
  393. package/static-web/_next/static/chunks/1655.0a559759973b42e9.js +1 -0
  394. package/static-web/_next/static/chunks/{2073-3f913ebb13702b7e.js → 2073-fadffc82a27afdc7.js} +2 -2
  395. package/{_standalone/__next/static/chunks/9216.d3339c27169b21bf.js → static-web/_next/static/chunks/2245.ef71edb24c5232c2.js} +1 -1
  396. package/static-web/_next/static/chunks/2258-2d3b5aac6a1fa92a.js +53 -0
  397. package/{_standalone/__next/static/chunks/4937-4101fcdadacf46e3.js → static-web/_next/static/chunks/2409-244f9b90dceb0c04.js} +1 -1
  398. package/static-web/_next/static/chunks/3279-b49c25a4f2964b16.js +1 -0
  399. package/static-web/_next/static/chunks/3807-115388f118106ca8.js +1 -0
  400. package/static-web/_next/static/chunks/3966.ea75f9c5490955de.js +1 -0
  401. package/static-web/_next/static/chunks/4010.48b219cb22dfa5d8.js +10 -0
  402. package/static-web/_next/static/chunks/5026-7fed7ca22272c18f.js +1 -0
  403. package/static-web/_next/static/chunks/5152-87e6ed56dfd7d17d.js +1 -0
  404. package/static-web/_next/static/chunks/577.5e448c99068f1323.js +1 -0
  405. package/static-web/_next/static/chunks/5913.a0a734f87b13f81a.js +1 -0
  406. package/static-web/_next/static/chunks/596.9cbaf6ba90cb204f.js +7 -0
  407. package/static-web/_next/static/chunks/6223-3fb90852221bda56.js +1 -0
  408. package/static-web/_next/static/chunks/6343.582d063078c45d73.js +6 -0
  409. package/static-web/_next/static/chunks/8174-50048777dc2469c0.js +1 -0
  410. package/static-web/_next/static/chunks/{5913.3cee388e26959b62.js → 8294.cc9f9ff2f8b219ed.js} +1 -1
  411. package/static-web/_next/static/chunks/8626-7da79d9ab2504eed.js +1 -0
  412. package/static-web/_next/static/chunks/{8732.9002f42201b06fe8.js → 8732.87554c78e8825fac.js} +4 -4
  413. package/static-web/_next/static/chunks/8922-3babcd35e18e9e4f.js +1 -0
  414. package/static-web/_next/static/chunks/9440-eee639175695be7d.js +33 -0
  415. package/static-web/_next/static/chunks/9479-b48d19e3588823c1.js +34 -0
  416. package/static-web/_next/static/chunks/{9602.4e99e3525e5f062c.js → 9602.218427fc7b3d6b11.js} +1 -1
  417. package/static-web/_next/static/chunks/app/agents/[agentKey]/page-ef111ea0a3368752.js +1 -0
  418. package/static-web/_next/static/chunks/app/agents/page-aacead0f47cedb0d.js +1 -0
  419. package/static-web/_next/static/chunks/app/layout-ed608bbf9585e78f.js +99 -0
  420. package/static-web/_next/static/chunks/app/page-d22928276c36528c.js +1 -0
  421. package/static-web/_next/static/chunks/app/settings/{page-c9f44b3447a41431.js → page-045afd8c0908f923.js} +1 -1
  422. package/{_standalone/__next/static/chunks/app/setup/page-f5de08d0d588c778.js → static-web/_next/static/chunks/app/setup/page-034a608f19d04653.js} +1 -1
  423. package/static-web/_next/static/chunks/app/trash/page-251aaf5aac9d5a0b.js +1 -0
  424. package/static-web/_next/static/chunks/app/view/[...path]/page-7e17c3d13fe2e275.js +12 -0
  425. package/static-web/_next/static/chunks/webpack-1decda0633a8a874.js +1 -0
  426. package/static-web/_next/static/css/5f000212c8b2e09a.css +1 -0
  427. package/static-web/agent-icons/claude.svg +1 -0
  428. package/static-web/agent-icons/cursor.svg +1 -0
  429. package/static-web/agent-icons/github-copilot.svg +1 -0
  430. package/static-web/agent-icons/google.svg +1 -0
  431. package/static-web/agent-icons/openai.svg +1 -0
  432. package/static-web/agent-icons/windsurf.svg +1 -0
  433. package/static-web/help/index.html +5 -20
  434. package/static-web/index.html +8 -22
  435. package/static-web/setup/index.html +5 -20
  436. package/static-web/static-web-manifest.json +1 -1
  437. package/static-web/wiki/index.html +5 -20
  438. package/_standalone/__next/server/chunks/2037.js +0 -2
  439. package/_standalone/__next/server/chunks/9350.js +0 -11
  440. package/_standalone/__next/static/chunks/2288-4dcb8ad3ccbd651e.js +0 -1
  441. package/_standalone/__next/static/chunks/2461-a1073a0bd04c228a.js +0 -33
  442. package/_standalone/__next/static/chunks/3424-060f01a8983e438d.js +0 -1
  443. package/_standalone/__next/static/chunks/4172-4fc551f07f7d082f.js +0 -1
  444. package/_standalone/__next/static/chunks/4454-f582e17b76ccf1d1.js +0 -1
  445. package/_standalone/__next/static/chunks/47-41e1a06e6d389b69.js +0 -48
  446. package/_standalone/__next/static/chunks/5152-2db55438be7ecb94.js +0 -1
  447. package/_standalone/__next/static/chunks/5200-6c82e5ce54a95b4b.js +0 -6
  448. package/_standalone/__next/static/chunks/6274-f173cb227ad1ef21.js +0 -1
  449. package/_standalone/__next/static/chunks/6947.7e50e18da7dc4aef.js +0 -1
  450. package/_standalone/__next/static/chunks/725-3b648bf7929ff78d.js +0 -1
  451. package/_standalone/__next/static/chunks/9479-7b304601a56304cd.js +0 -32
  452. package/_standalone/__next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js +0 -1
  453. package/_standalone/__next/static/chunks/app/agents/page-6591b482a193e657.js +0 -1
  454. package/_standalone/__next/static/chunks/app/layout-5966cd317bbed698.js +0 -114
  455. package/_standalone/__next/static/chunks/app/page-5c9489e28657376e.js +0 -1
  456. package/_standalone/__next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  457. package/_standalone/__next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  458. package/_standalone/__next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  459. package/_standalone/__next/static/css/0d2fd378b5449176.css +0 -1
  460. package/static-web/_next/static/chunks/2288-4dcb8ad3ccbd651e.js +0 -1
  461. package/static-web/_next/static/chunks/2461-a1073a0bd04c228a.js +0 -33
  462. package/static-web/_next/static/chunks/3424-060f01a8983e438d.js +0 -1
  463. package/static-web/_next/static/chunks/4172-4fc551f07f7d082f.js +0 -1
  464. package/static-web/_next/static/chunks/4454-f582e17b76ccf1d1.js +0 -1
  465. package/static-web/_next/static/chunks/47-41e1a06e6d389b69.js +0 -48
  466. package/static-web/_next/static/chunks/5152-2db55438be7ecb94.js +0 -1
  467. package/static-web/_next/static/chunks/5200-6c82e5ce54a95b4b.js +0 -6
  468. package/static-web/_next/static/chunks/6274-f173cb227ad1ef21.js +0 -1
  469. package/static-web/_next/static/chunks/6947.7e50e18da7dc4aef.js +0 -1
  470. package/static-web/_next/static/chunks/725-3b648bf7929ff78d.js +0 -1
  471. package/static-web/_next/static/chunks/9479-7b304601a56304cd.js +0 -32
  472. package/static-web/_next/static/chunks/app/agents/[agentKey]/page-44c493b744d18249.js +0 -1
  473. package/static-web/_next/static/chunks/app/agents/page-6591b482a193e657.js +0 -1
  474. package/static-web/_next/static/chunks/app/layout-5966cd317bbed698.js +0 -114
  475. package/static-web/_next/static/chunks/app/page-5c9489e28657376e.js +0 -1
  476. package/static-web/_next/static/chunks/app/trash/page-d87207a63591ee16.js +0 -1
  477. package/static-web/_next/static/chunks/app/view/[...path]/page-1898f4ae4ab28db0.js +0 -12
  478. package/static-web/_next/static/chunks/webpack-75abef9cbb1ea912.js +0 -1
  479. package/static-web/_next/static/css/0d2fd378b5449176.css +0 -1
  480. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_buildManifest.js +0 -0
  481. /package/_standalone/__next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_ssgManifest.js +0 -0
  482. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_buildManifest.js +0 -0
  483. /package/static-web/_next/static/{J9M4pgRyRHH7Ofbxuuklh → apol5mbXb7N_sqaKgpXN1}/_ssgManifest.js +0 -0
@@ -0,0 +1,328 @@
1
+ # How pointers are used
2
+
3
+ In C, pointer arguments are used for differenty purposes. It is important to distinguish these use cases because Koffi provides different ways to deal with each of them:
4
+
5
+ - **Struct pointers**: Use of struct pointers by C libraries fall in two cases: avoid (potentially) expensive copies, and to let the function change struct contents (output or input/output arguments).
6
+ - **Opaque pointers**: the library does not expose the contents of the structs, and only provides you with a pointer to it (e.g. `FILE *`). Only the functions provided by the library can do something with this pointer, in Koffi we call this an opaque type. This is usually done for ABI-stability reason, and to prevent library users from messing directly with library internals.
7
+ - **Pointers to primitive types**: This is more rare, and generally used for output or input/output arguments. The Win32 API has a lot of these.
8
+ - **Arrays**: in C, you dynamically-sized arrays are usually passed to functions with pointers, either NULL-terminated (or any other sentinel value) or with an additional length argument.
9
+
10
+ # Pointer types
11
+
12
+ ## Struct pointers
13
+
14
+ The following Win32 example uses `GetCursorPos()` (with an output parameter) to retrieve and show the current cursor position.
15
+
16
+ ```js
17
+ // ES6 syntax: import koffi from 'koffi';
18
+ const koffi = require('koffi');
19
+
20
+ const lib = koffi.load('user32.dll');
21
+
22
+ // Type declarations
23
+ const POINT = koffi.struct('POINT', {
24
+ x: 'long',
25
+ y: 'long'
26
+ });
27
+
28
+ // Functions declarations
29
+ const GetCursorPos = lib.func('int __stdcall GetCursorPos(_Out_ POINT *pos)');
30
+
31
+ // Get and show cursor position
32
+ let pos = {};
33
+ if (!GetCursorPos(pos))
34
+ throw new Error('Failed to get cursor position');
35
+ console.log(pos);
36
+ ```
37
+
38
+ ## Opaque pointers
39
+
40
+ *New in Koffi 2.0*
41
+
42
+ Some C libraries use handles, which behave as pointers to opaque structs. An example of this is the HANDLE type in the Win32 API. If you want to reproduce this behavior, you can define a **named pointer type** to an opaque type, like so:
43
+
44
+ ```js
45
+ const HANDLE = koffi.pointer('HANDLE', koffi.opaque());
46
+
47
+ // And now you get to use it this way:
48
+ const GetHandleInformation = lib.func('bool __stdcall GetHandleInformation(HANDLE h, _Out_ uint32_t *flags)');
49
+ const CloseHandle = lib.func('bool __stdcall CloseHandle(HANDLE h)');
50
+ ```
51
+
52
+ ## Pointer to primitive types
53
+
54
+ In javascript, it is not possible to pass a primitive value by reference to another function. This means that you cannot call a function and expect it to modify the value of one of its number or string parameter.
55
+
56
+ However, arrays and objects (among others) are reference type values. Assigning an array or an object from one variable to another does not invole any copy. Instead, as the following example illustrates, the new variable references the same array as the first:
57
+
58
+ ```js
59
+ let list1 = [1, 2];
60
+ let list2 = list1;
61
+
62
+ list2[1] = 42;
63
+
64
+ console.log(list1); // Prints [1, 42]
65
+ ```
66
+
67
+ All of this means that C functions that are expected to modify their primitive output values (such as an `int *` parameter) cannot be used directly. However, thanks to Koffi's transparent array support, you can use Javascript arrays to approximate reference semantics with single-element arrays.
68
+
69
+ Below, you can find an example of an addition function where the result is stored in an `int *` input/output parameter and how to use this function from Koffi.
70
+
71
+ ```c
72
+ void AddInt(int *dest, int add)
73
+ {
74
+ *dest += add;
75
+ }
76
+ ```
77
+
78
+ You can simply pass a single-element array as the first argument:
79
+
80
+ ```js
81
+ const AddInt = lib.func('void AddInt(_Inout_ int *dest, int add)');
82
+
83
+ let sum = [36];
84
+ AddInt(sum, 6);
85
+
86
+ console.log(sum[0]); // Prints 42
87
+ ```
88
+
89
+ ## Dynamic arrays
90
+
91
+ In C, dynamically-sized arrays are usually passed around as pointers. The length is either passed as an additional argument, or inferred from the array content itself, for example with a terminating sentinel value (such as a NULL pointers in the case of an array of strings).
92
+
93
+ Koffi can translate JS arrays and TypedArrays to pointer arguments. However, because C does not have a proper notion of dynamically-sized arrays (fat pointers), you need to provide the length or the sentinel value yourself depending on the API.
94
+
95
+ Here is a simple example of a C function taking a NULL-terminated list of strings as input, to calculate the total length of all strings.
96
+
97
+ ```c
98
+ // Build with: clang -fPIC -o length.so -shared length.c -Wall -O2
99
+
100
+ #include <stdlib.h>
101
+ #include <stdint.h>
102
+ #include <string.h>
103
+
104
+ int64_t ComputeTotalLength(const char **strings)
105
+ {
106
+ int64_t total = 0;
107
+
108
+ for (const char **ptr = strings; *ptr; ptr++) {
109
+ const char *str = *ptr;
110
+ total += strlen(str);
111
+ }
112
+
113
+ return total;
114
+ }
115
+ ```
116
+
117
+ ```js
118
+ // ES6 syntax: import koffi from 'koffi';
119
+ const koffi = require('koffi');
120
+
121
+ const lib = koffi.load('./length.so');
122
+
123
+ const ComputeTotalLength = lib.func('int64_t ComputeTotalLength(const char **strings)');
124
+
125
+ let strings = ['Get', 'Total', 'Length', null];
126
+ let total = ComputeTotalLength(strings);
127
+
128
+ console.log(total); // Prints 14
129
+ ```
130
+
131
+ By default, just like for objects, array arguments are copied from JS to C but not vice-versa. You can however change the direction as documented in the section on [output parameters](output).
132
+
133
+ # Handling void pointers
134
+
135
+ *New in Koffi 2.1*
136
+
137
+ Many C functions use `void *` parameters in order to pass polymorphic objects and arrays, meaning that the data format changes can change depending on one other argument, or on some kind of struct tag member.
138
+
139
+ Koffi provides two features to deal with this:
140
+
141
+ - You can use `koffi.as(value, type)` to tell Koffi what kind of type is actually expected, as shown in the example below.
142
+ - Buffers and typed JS arrays can be used as values in place everywhere a pointer is expected. See [dynamic arrays](#dynamic-arrays) for more information, for input or output.
143
+
144
+ The example below shows the use of `koffi.as()` to read the header of a PNG file with `fread()` directly to a JS object.
145
+
146
+ ```js
147
+ // ES6 syntax: import koffi from 'koffi';
148
+ const koffi = require('koffi');
149
+
150
+ const lib = koffi.load('libc.so.6');
151
+
152
+ const FILE = koffi.opaque('FILE');
153
+
154
+ const PngHeader = koffi.pack('PngHeader', {
155
+ signature: koffi.array('uint8_t', 8),
156
+ ihdr: koffi.pack({
157
+ length: 'uint32_be_t',
158
+ chunk: koffi.array('char', 4),
159
+ width: 'uint32_be_t',
160
+ height: 'uint32_be_t',
161
+ depth: 'uint8_t',
162
+ color: 'uint8_t',
163
+ compression: 'uint8_t',
164
+ filter: 'uint8_t',
165
+ interlace: 'uint8_t',
166
+ crc: 'uint32_be_t'
167
+ })
168
+ });
169
+
170
+ const fopen = lib.func('FILE *fopen(const char *path, const char *mode)');
171
+ const fclose = lib.func('int fclose(FILE *fp)');
172
+ const fread = lib.func('size_t fread(_Out_ void *ptr, size_t size, size_t nmemb, FILE *fp)');
173
+
174
+ let filename = process.argv[2];
175
+ if (filename == null)
176
+ throw new Error('Usage: node png.js <image.png>');
177
+
178
+ let hdr = {};
179
+ {
180
+ let fp = fopen(filename, 'rb');
181
+ if (!fp)
182
+ throw new Error(`Failed to open '${filename}'`);
183
+
184
+ try {
185
+ let len = fread(koffi.as(hdr, 'PngHeader *'), 1, koffi.sizeof(PngHeader), fp);
186
+ if (len < koffi.sizeof(PngHeader))
187
+ throw new Error('Failed to read PNG header');
188
+ } finally {
189
+ fclose(fp);
190
+ }
191
+ }
192
+
193
+ console.log('PNG header:', hdr);
194
+ ```
195
+
196
+ # Disposable types
197
+
198
+ *New in Koffi 2.0*
199
+
200
+ Disposable types allow you to register a function that will automatically called after each C to JS conversion performed by Koffi. This can be used to avoid leaking heap-allocated strings, for example.
201
+
202
+ Some C functions return heap-allocated values directly or through output parameters. While Koffi automatically converts values from C to JS (to a string or an object), it does not know when something needs to be freed, or how.
203
+
204
+ For opaque types, such as FILE, this does not matter because you will explicitly call `fclose()` on them. But some values (such as strings) get implicitly converted by Koffi, and you lose access to the original pointer. This creates a leak if the string is heap-allocated.
205
+
206
+ To avoid this, you can instruct Koffi to call a function on the original pointer once the conversion is done, by creating a **disposable type** with `koffi.dispose(name, type, func)`. This creates a type derived from another type, the only difference being that *func* gets called with the original pointer once the value has been converted and is not needed anymore.
207
+
208
+ The *name* can be omitted to create an anonymous disposable type. If *func* is omitted or is null, Koffi will use `koffi.free(ptr)` (which calls the standard C library *free* function under the hood).
209
+
210
+ ```js
211
+ const AnonHeapStr = koffi.disposable('str'); // Anonymous type (cannot be used in function prototypes)
212
+ const NamedHeapStr = koffi.disposable('HeapStr', 'str'); // Same thing, but named so usable in function prototypes
213
+ const ExplicitFree = koffi.disposable('HeapStr16', 'str16', koffi.free); // You can specify any other JS function
214
+ ```
215
+
216
+ The following example illustrates the use of a disposable type derived from *str*.
217
+
218
+ ```js
219
+ // ES6 syntax: import koffi from 'koffi';
220
+ const koffi = require('koffi');
221
+
222
+ const lib = koffi.load('libc.so.6');
223
+
224
+ const HeapStr = koffi.disposable('str');
225
+ const strdup = lib.cdecl('strdup', HeapStr, ['str']);
226
+
227
+ let copy = strdup('Hello!');
228
+ console.log(copy); // Prints Hello!
229
+ ```
230
+
231
+ When you declare functions with the [prototype-like syntax](functions#definition-syntax), you can either use named disposable types or use the '!' shortcut qualifier with compatibles types, as shown in the example below. This qualifier creates an anonymous disposable type that calls `koffi.free(ptr)`.
232
+
233
+ ```js
234
+ // ES6 syntax: import koffi from 'koffi';
235
+ const koffi = require('koffi');
236
+
237
+ const lib = koffi.load('libc.so.6');
238
+
239
+ // You can also use: const strdup = lib.func('const char *! strdup(const char *str)')
240
+ const strdup = lib.func('str! strdup(const char *str)');
241
+
242
+ let copy = strdup('World!');
243
+ console.log(copy); // Prints World!
244
+ ```
245
+
246
+ Disposable types can only be created from pointer or string types.
247
+
248
+ > [!WARNING]
249
+ > Be careful on Windows: if your shared library uses a different CRT (such as msvcrt), the memory could have been allocated by a different malloc/free implementation or heap, resulting in undefined behavior if you use `koffi.free()`.
250
+
251
+ # External buffers (views)
252
+
253
+ *New in Koffi 2.11.0*
254
+
255
+ You can access unmanaged memory with `koffi.view(ptr, len)`. This function takes a pointer and a length, and creates an ArrayBuffer through which you can access the underlying memory without copy.
256
+
257
+ > [!NOTE]
258
+ > Some runtimes (such as Electron) forbid the use of external buffers. In this case, trying to create a view will trigger an exception.
259
+
260
+ The following Linux example writes the string "Hello World!" to a file named "hello.txt" through mmaped memory, to demontrate the use of `koffi.view()`:
261
+
262
+ ```js
263
+ // ES6 syntax: import koffi from 'koffi';
264
+ const koffi = require('koffi');
265
+
266
+ const libc = koffi.load('libc.so.6');
267
+
268
+ const mode_t = koffi.alias('mode_t', 'uint32_t');
269
+ const off_t = koffi.alias('off_t', 'int64_t');
270
+
271
+ // These values are used on Linux and may differ on other systems
272
+ const O_RDONLY = 00000000;
273
+ const O_WRONLY = 00000001;
274
+ const O_RDWR = 00000002;
275
+ const O_CREAT = 00000100;
276
+ const O_EXCL = 00000200;
277
+ const O_CLOEXEC = 02000000;
278
+
279
+ // These values are used on Linux and may differ on other systems
280
+ const PROT_READ = 0x01;
281
+ const PROT_WRITE = 0x02;
282
+ const PROT_EXEC = 0x04;
283
+ const MAP_SHARED = 0x01;
284
+ const MAP_PRIVATE = 0x02;
285
+
286
+ const open = libc.func('int open(const char *path, int flags, uint32_t mode)');
287
+ const close = libc.func('int close(int fd)');
288
+ const ftruncate = libc.func('int ftruncate(int fd, off_t length)');
289
+ const mmap = libc.func('void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset)');
290
+ const munmap = libc.func('int munmap(void *addr, size_t length)');
291
+ const strerror = libc.func('const char *strerror(int errnum)');
292
+
293
+ write('hello.txt', 'Hello World!');
294
+
295
+ function write(filename, str) {
296
+ let fd = -1;
297
+ let ptr = null;
298
+
299
+ // Work with encoded string
300
+ str = Buffer.from(str);
301
+
302
+ try {
303
+ fd = open(filename, O_CREAT | O_EXCL | O_RDWR | O_CLOEXEC, 0644);
304
+ if (fd < 0)
305
+ throw new Error(`Failed to create '${filename}': ` + strerror(koffi.errno()));
306
+
307
+ if (ftruncate(fd, str.length) < 0)
308
+ throw new Error(`Failed to resize '${filename}': ` + strerror(koffi.errno()));
309
+
310
+ ptr = mmap(null, str.length, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
311
+ if (ptr == null)
312
+ throw new Error(`Failed to map '${filename}' to memory: ` + strerror(koffi.errno()));
313
+
314
+ let ab = koffi.view(ptr, str.length);
315
+ let view = new Uint8Array(ab);
316
+
317
+ str.copy(view);
318
+ } finally {
319
+ if (ptr != null)
320
+ munmap(ptr, str.length);
321
+ close(fd);
322
+ }
323
+ }
324
+ ```
325
+
326
+ # Unwrap pointers
327
+
328
+ You can use `koffi.address(ptr)` on a pointer to get the numeric value as a [BigInt object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt).
@@ -0,0 +1,118 @@
1
+ # Install Koffi
2
+
3
+ You can install Koffi with npm:
4
+
5
+ ```sh
6
+ npm install koffi
7
+ ```
8
+
9
+ Once you have installed Koffi, you can start by loading it:
10
+
11
+ ```js
12
+ // CommonJS syntax
13
+ const koffi = require('koffi');
14
+
15
+ // ES6 modules
16
+ import koffi from 'koffi';
17
+ ```
18
+
19
+ # Simple examples
20
+
21
+ Below you can find two examples:
22
+
23
+ * The first one runs on Linux. The functions are declared with the C-like prototype language.
24
+ * The second one runs on Windows, and uses the node-ffi like syntax to declare functions.
25
+
26
+ ## For Linux
27
+
28
+ This is a small example for Linux systems, which uses `gettimeofday()`, `localtime_r()` and `printf()` to print the current time.
29
+
30
+ It illustrates the use of output parameters.
31
+
32
+ ```js
33
+ // ES6 syntax: import koffi from 'koffi';
34
+ const koffi = require('koffi');
35
+
36
+ // Load the shared library
37
+ const lib = koffi.load('libc.so.6');
38
+
39
+ // Declare struct types
40
+ const timeval = koffi.struct('timeval', {
41
+ tv_sec: 'unsigned int',
42
+ tv_usec: 'unsigned int'
43
+ });
44
+ const timezone = koffi.struct('timezone', {
45
+ tz_minuteswest: 'int',
46
+ tz_dsttime: 'int'
47
+ });
48
+ const time_t = koffi.struct('time_t', { value: 'int64_t' });
49
+ const tm = koffi.struct('tm', {
50
+ tm_sec: 'int',
51
+ tm_min: 'int',
52
+ tm_hour: 'int',
53
+ tmay: 'int',
54
+ tm_mon: 'int',
55
+ tm_year: 'int',
56
+ tm_wday: 'int',
57
+ tm_yday: 'int',
58
+ tm_isdst: 'int'
59
+ });
60
+
61
+ // Find functions
62
+ const gettimeofday = lib.func('int gettimeofday(_Out_ timeval *tv, _Out_ timezone *tz)');
63
+ const localtime_r = lib.func('tm *localtime_r(const time_t *timeval, _Out_ tm *result)');
64
+ const printf = lib.func('int printf(const char *format, ...)');
65
+
66
+ // Get local time
67
+ let tv = {};
68
+ let now = {};
69
+ gettimeofday(tv, null);
70
+ localtime_r({ value: tv.tv_sec }, now);
71
+
72
+ // And format it with printf (variadic function)
73
+ printf('Hello World!\n');
74
+ printf('Local time: %02d:%02d:%02d\n', 'int', now.tm_hour, 'int', now.tm_min, 'int', now.tm_sec);
75
+ ```
76
+
77
+ ## For Windows
78
+
79
+ This is a small example targeting the Win32 API, using `MessageBox()` to show a *Hello World!* message to the user.
80
+
81
+ It illustrates the use of the x86 stdcall calling convention, and the use of UTF-8 and UTF-16 string arguments.
82
+
83
+ ```js
84
+ // ES6 syntax: import koffi from 'koffi';
85
+ const koffi = require('koffi');
86
+
87
+ // Load the shared library
88
+ const lib = koffi.load('user32.dll');
89
+
90
+ // Declare constants
91
+ const MB_OK = 0x0;
92
+ const MB_YESNO = 0x4;
93
+ const MB_ICONQUESTION = 0x20;
94
+ const MB_ICONINFORMATION = 0x40;
95
+ const IDOK = 1;
96
+ const IDYES = 6;
97
+ const IDNO = 7;
98
+
99
+ // Find functions
100
+ const MessageBoxA = lib.func('__stdcall', 'MessageBoxA', 'int', ['void *', 'str', 'str', 'uint']);
101
+ const MessageBoxW = lib.func('__stdcall', 'MessageBoxW', 'int', ['void *', 'str16', 'str16', 'uint']);
102
+
103
+ let ret = MessageBoxA(null, 'Do you want another message box?', 'Koffi', MB_YESNO | MB_ICONQUESTION);
104
+
105
+ if (ret == IDYES)
106
+ MessageBoxW(null, 'Hello World!', 'Koffi', MB_ICONINFORMATION);
107
+ ```
108
+
109
+ # Bundling Koffi
110
+
111
+ Please read the [dedicated page](packaging) for information about bundling and packaging applications using Koffi.
112
+
113
+ # Build manually
114
+
115
+ Follow the [build instrutions](contribute#build-from-source) if you want to build the native Koffi code yourself.
116
+
117
+ > [!NOTE]
118
+ > This is only needed if you want to hack on Koffi. The official NPM package provide prebuilt binaries and you don't need to compile anything if you only want to use Koffi in Node.js.
@@ -0,0 +1,186 @@
1
+ # Union definition
2
+
3
+ *New in Koffi 2.5*
4
+
5
+ You can declare unions with a syntax similar to structs, but with the `koffi.union()` function. This function takes two arguments: the first one is the name of the type, and the second one is an object containing the union member names and types. You can omit the first argument to declare an anonymous union.
6
+
7
+ The following example illustrates how to declare the same union in C and in JS with Koffi:
8
+
9
+ ```c
10
+ typedef union IntOrDouble {
11
+ int64_t i;
12
+ double d;
13
+ } IntOrDouble;
14
+ ```
15
+
16
+ ```js
17
+ const IntOrDouble = koffi.union('IntOrDouble', {
18
+ i: 'int64_t',
19
+ d: 'double'
20
+ });
21
+ ```
22
+
23
+ # Input unions
24
+
25
+ ## Passing union values to C
26
+
27
+ You can instantiate an union object with `koffi.Union(type)`. This will create a special object that contains at most one active member.
28
+
29
+ Once you have created an instance of your union, you can simply set the member with the dot operator as you would with a basic object. Then, simply pass your union value to the C function you wish.
30
+
31
+ ```js
32
+ const U = koffi.union('U', { i: 'int', str: 'char *' });
33
+
34
+ const DoSomething = lib.func('void DoSomething(const char *type, U u)');
35
+
36
+ const u1 = new koffi.Union('U'); u1.i = 42;
37
+ const u2 = new koffi.Union('U'); u2.str = 'Hello!';
38
+
39
+ DoSomething('int', u1);
40
+ DoSomething('string', u2);
41
+ ```
42
+
43
+ For simplicity, Koffi also accepts object literals with one property (no more, no less) setting the corresponding union member. The example belows uses this to simplify the code shown above:
44
+
45
+ ```js
46
+ const U = koffi.union('U', { i: 'int', str: 'char *' });
47
+
48
+ const DoSomething = lib.func('void DoSomething(const char *type, U u)');
49
+
50
+ DoSomething('int', { i: 42 });
51
+ DoSomething('string', { str: 'Hello!' });
52
+ ```
53
+
54
+ ## Win32 example
55
+
56
+ The following example uses the [SendInput](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput) Win32 API to emit the Win+D shortcut and hide windows (show the desktop).
57
+
58
+ ```js
59
+ // ES6 syntax: import koffi from 'koffi';
60
+ const koffi = require('koffi');
61
+
62
+ // Win32 type and functions
63
+
64
+ const user32 = koffi.load('user32.dll');
65
+
66
+ const INPUT_MOUSE = 0;
67
+ const INPUT_KEYBOARD = 1;
68
+ const INPUT_HARDWARE = 2;
69
+
70
+ const KEYEVENTF_KEYUP = 0x2;
71
+ const KEYEVENTF_SCANCODE = 0x8;
72
+
73
+ const VK_LWIN = 0x5B;
74
+ const VK_D = 0x44;
75
+
76
+ const MOUSEINPUT = koffi.struct('MOUSEINPUT', {
77
+ dx: 'long',
78
+ dy: 'long',
79
+ mouseData: 'uint32_t',
80
+ dwFlags: 'uint32_t',
81
+ time: 'uint32_t',
82
+ dwExtraInfo: 'uintptr_t'
83
+ });
84
+ const KEYBDINPUT = koffi.struct('KEYBDINPUT', {
85
+ wVk: 'uint16_t',
86
+ wScan: 'uint16_t',
87
+ dwFlags: 'uint32_t',
88
+ time: 'uint32_t',
89
+ dwExtraInfo: 'uintptr_t'
90
+ });
91
+ const HARDWAREINPUT = koffi.struct('HARDWAREINPUT', {
92
+ uMsg: 'uint32_t',
93
+ wParamL: 'uint16_t',
94
+ wParamH: 'uint16_t'
95
+ });
96
+
97
+ const INPUT = koffi.struct('INPUT', {
98
+ type: 'uint32_t',
99
+ u: koffi.union({
100
+ mi: MOUSEINPUT,
101
+ ki: KEYBDINPUT,
102
+ hi: HARDWAREINPUT
103
+ })
104
+ });
105
+
106
+ const SendInput = user32.func('unsigned int __stdcall SendInput(unsigned int cInputs, INPUT *pInputs, int cbSize)');
107
+
108
+ // Show/hide desktop with Win+D shortcut
109
+
110
+ let events = [
111
+ make_keyboard_event(VK_LWIN, true),
112
+ make_keyboard_event(VK_D, true),
113
+ make_keyboard_event(VK_D, false),
114
+ make_keyboard_event(VK_LWIN, false)
115
+ ];
116
+
117
+ SendInput(events.length, events, koffi.sizeof(INPUT));
118
+
119
+ // Utility
120
+
121
+ function make_keyboard_event(vk, down) {
122
+ let event = {
123
+ type: INPUT_KEYBOARD,
124
+ u: {
125
+ ki: {
126
+ wVk: vk,
127
+ wScan: 0,
128
+ dwFlags: down ? 0 : KEYEVENTF_KEYUP,
129
+ time: 0,
130
+ dwExtraInfo: 0
131
+ }
132
+ }
133
+ };
134
+
135
+ return event;
136
+ }
137
+ ```
138
+
139
+ # Output unions
140
+
141
+ Unlike structs, Koffi does not know which union member is valid, and it cannot decode it automatically. You can however use special `koffi.Union` objects for output parameters, and decode the memory after the call.
142
+
143
+ To decode an output union pointer parameter, create a placeholder object with `new koffi.Union(type)` and pass the resulting object to the function.
144
+
145
+ After the call, you can dereference the member value you want on this object and Koffi will decode it at this moment.
146
+
147
+ The following example illustrates the use of `koffi.Union()` to decode output unions after the call.
148
+
149
+ ```c
150
+ #include <stdint.h>
151
+
152
+ typedef union IntOrDouble {
153
+ int64_t i;
154
+ double d;
155
+ } IntOrDouble;
156
+
157
+ void SetUnionInt(int64_t i, IntOrDouble *out)
158
+ {
159
+ out->i = i;
160
+ }
161
+
162
+ void SetUnionDouble(double d, IntOrDouble *out)
163
+ {
164
+ out->d = d;
165
+ }
166
+ ```
167
+
168
+ ```js
169
+ const IntOrDouble = koffi.union('IntOrDouble', {
170
+ i: 'int64_t',
171
+ d: 'double',
172
+ raw: koffi.array('uint8_t', 8)
173
+ });
174
+
175
+ const SetUnionInt = lib.func('void SetUnionInt(int64_t i, _Out_ IntOrDouble *out)');
176
+ const SetUnionDouble = lib.func('void SetUnionDouble(double d, _Out_ IntOrDouble *out)');
177
+
178
+ let u1 = new koffi.Union('IntOrDouble');
179
+ let u2 = new koffi.Union('IntOrDouble');
180
+
181
+ SetUnionInt(123, u1);
182
+ SetUnionDouble(123, u2);
183
+
184
+ console.log(u1.i, '---', u1.raw); // Prints 123 --- Uint8Array(8) [123, 0, 0, 0, 0, 0, 0, 0]
185
+ console.log(u2.d, '---', u2.raw); // Prints 123 --- Uint8Array(8) [0, 0, 0, 0, 0, 0, 69, 64]
186
+ ```