@hexclave/shared 1.0.2 → 1.0.5

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 (353) hide show
  1. package/dist/ai/unified-prompts/reminders.js +4 -3
  2. package/dist/ai/unified-prompts/reminders.js.map +1 -1
  3. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +3 -1
  4. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  5. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +217 -30
  6. package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  7. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  8. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +1 -0
  9. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  10. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +18 -6
  11. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +23 -8
  12. package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  13. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -1
  14. package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
  15. package/dist/config/schema.d.ts +63 -63
  16. package/dist/config/schema.d.ts.map +1 -1
  17. package/dist/config/schema.js +5 -5
  18. package/dist/config/schema.js.map +1 -1
  19. package/dist/config-authoring.d.ts +4 -4
  20. package/dist/config-authoring.d.ts.map +1 -1
  21. package/dist/config-authoring.js +2 -2
  22. package/dist/config-authoring.js.map +1 -1
  23. package/dist/config-rendering.d.ts +4 -4
  24. package/dist/config-rendering.d.ts.map +1 -1
  25. package/dist/config-rendering.js +19 -18
  26. package/dist/config-rendering.js.map +1 -1
  27. package/dist/esm/ai/unified-prompts/reminders.js +4 -3
  28. package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
  29. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +3 -1
  30. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
  31. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +216 -31
  32. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
  33. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
  34. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +1 -0
  35. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
  36. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +18 -6
  37. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +23 -8
  38. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
  39. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -1
  40. package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
  41. package/dist/esm/config/schema.d.ts +63 -63
  42. package/dist/esm/config/schema.d.ts.map +1 -1
  43. package/dist/esm/config/schema.js +5 -5
  44. package/dist/esm/config/schema.js.map +1 -1
  45. package/dist/esm/config-authoring.d.ts +4 -4
  46. package/dist/esm/config-authoring.d.ts.map +1 -1
  47. package/dist/esm/config-authoring.js +2 -2
  48. package/dist/esm/config-authoring.js.map +1 -1
  49. package/dist/esm/config-rendering.d.ts +4 -4
  50. package/dist/esm/config-rendering.d.ts.map +1 -1
  51. package/dist/esm/config-rendering.js +15 -14
  52. package/dist/esm/config-rendering.js.map +1 -1
  53. package/dist/esm/helpers/vault/client-side.d.ts.map +1 -1
  54. package/dist/esm/helpers/vault/client-side.js.map +1 -1
  55. package/dist/esm/helpers/vault/server-side.d.ts.map +1 -1
  56. package/dist/esm/helpers/vault/server-side.js.map +1 -1
  57. package/dist/esm/hexclave-config-file.d.ts +15 -0
  58. package/dist/esm/hexclave-config-file.d.ts.map +1 -0
  59. package/dist/esm/{stack-config-file.js → hexclave-config-file.js} +7 -7
  60. package/dist/esm/hexclave-config-file.js.map +1 -0
  61. package/dist/esm/hooks/use-async-callback.js +1 -1
  62. package/dist/esm/hooks/use-async-external-store.js +1 -1
  63. package/dist/esm/hooks/use-strict-memo.js +1 -1
  64. package/dist/esm/interface/admin-metrics.d.ts +8 -8
  65. package/dist/esm/interface/admin-metrics.js.map +1 -1
  66. package/dist/esm/interface/client-interface.js +2 -2
  67. package/dist/esm/interface/client-interface.js.map +1 -1
  68. package/dist/esm/interface/conversations.d.ts +32 -32
  69. package/dist/esm/interface/crud/current-user.d.ts +9 -9
  70. package/dist/esm/interface/crud/email-outbox.d.ts +200 -200
  71. package/dist/esm/interface/crud/products.d.ts +13 -13
  72. package/dist/esm/interface/crud/products.d.ts.map +1 -1
  73. package/dist/esm/interface/crud/project-api-keys.d.ts +4 -4
  74. package/dist/esm/interface/crud/project-permissions.js +5 -5
  75. package/dist/esm/interface/crud/project-permissions.js.map +1 -1
  76. package/dist/esm/interface/crud/projects.d.ts +36 -36
  77. package/dist/esm/interface/crud/team-member-profiles.d.ts +18 -18
  78. package/dist/esm/interface/crud/team-permissions.js +5 -5
  79. package/dist/esm/interface/crud/team-permissions.js.map +1 -1
  80. package/dist/esm/interface/crud/transactions.d.ts +6 -6
  81. package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
  82. package/dist/esm/interface/crud/users.d.ts +12 -12
  83. package/dist/esm/interface/page-component-versions.js +107 -107
  84. package/dist/esm/interface/page-component-versions.js.map +1 -1
  85. package/dist/esm/interface/webhooks.d.ts +2 -2
  86. package/dist/esm/known-errors.d.ts +2 -2
  87. package/dist/esm/known-errors.js +4 -4
  88. package/dist/esm/known-errors.js.map +1 -1
  89. package/dist/esm/schema-fields.d.ts +17 -7
  90. package/dist/esm/schema-fields.d.ts.map +1 -1
  91. package/dist/esm/schema-fields.js +26 -16
  92. package/dist/esm/schema-fields.js.map +1 -1
  93. package/dist/esm/sessions.d.ts +7 -7
  94. package/dist/esm/utils/crypto.d.ts.map +1 -1
  95. package/dist/esm/utils/crypto.js.map +1 -1
  96. package/dist/esm/utils/currency-constants.d.ts +6 -0
  97. package/dist/esm/utils/currency-constants.d.ts.map +1 -1
  98. package/dist/esm/utils/currency-constants.js.map +1 -1
  99. package/dist/esm/utils/dev-env-state-path.d.ts +3 -3
  100. package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -1
  101. package/dist/esm/utils/dev-env-state-path.js +4 -4
  102. package/dist/esm/utils/dev-env-state-path.js.map +1 -1
  103. package/dist/esm/utils/errors.js +2 -2
  104. package/dist/esm/utils/errors.js.map +1 -1
  105. package/dist/esm/utils/esbuild.d.ts.map +1 -1
  106. package/dist/esm/utils/esbuild.js +0 -1
  107. package/dist/esm/utils/esbuild.js.map +1 -1
  108. package/dist/esm/utils/featurebase.d.ts +3 -3
  109. package/dist/esm/utils/featurebase.d.ts.map +1 -1
  110. package/dist/esm/utils/featurebase.js +15 -15
  111. package/dist/esm/utils/featurebase.js.map +1 -1
  112. package/dist/esm/utils/fs.js +6 -6
  113. package/dist/esm/utils/fs.js.map +1 -1
  114. package/dist/esm/utils/globals.d.ts.map +1 -1
  115. package/dist/esm/utils/globals.js +10 -10
  116. package/dist/esm/utils/globals.js.map +1 -1
  117. package/dist/esm/utils/jwt.d.ts.map +1 -1
  118. package/dist/esm/utils/jwt.js +3 -3
  119. package/dist/esm/utils/jwt.js.map +1 -1
  120. package/dist/esm/utils/redirect-urls.d.ts +3 -3
  121. package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
  122. package/dist/esm/utils/redirect-urls.js +5 -5
  123. package/dist/esm/utils/redirect-urls.js.map +1 -1
  124. package/dist/esm/utils/urls.js.map +1 -1
  125. package/dist/helpers/vault/client-side.d.ts.map +1 -1
  126. package/dist/helpers/vault/client-side.js.map +1 -1
  127. package/dist/helpers/vault/server-side.d.ts.map +1 -1
  128. package/dist/helpers/vault/server-side.js.map +1 -1
  129. package/dist/hexclave-config-file.d.ts +15 -0
  130. package/dist/hexclave-config-file.d.ts.map +1 -0
  131. package/dist/{stack-config-file.js → hexclave-config-file.js} +8 -8
  132. package/dist/hexclave-config-file.js.map +1 -0
  133. package/dist/hooks/use-async-callback.js +1 -1
  134. package/dist/hooks/use-async-external-store.js +1 -1
  135. package/dist/hooks/use-strict-memo.js +1 -1
  136. package/dist/interface/admin-metrics.d.ts +8 -8
  137. package/dist/interface/admin-metrics.js.map +1 -1
  138. package/dist/interface/client-interface.js +2 -2
  139. package/dist/interface/client-interface.js.map +1 -1
  140. package/dist/interface/conversations.d.ts +32 -32
  141. package/dist/interface/crud/current-user.d.ts +9 -9
  142. package/dist/interface/crud/email-outbox.d.ts +200 -200
  143. package/dist/interface/crud/products.d.ts +13 -13
  144. package/dist/interface/crud/products.d.ts.map +1 -1
  145. package/dist/interface/crud/project-api-keys.d.ts +4 -4
  146. package/dist/interface/crud/project-permissions.js +5 -5
  147. package/dist/interface/crud/project-permissions.js.map +1 -1
  148. package/dist/interface/crud/projects.d.ts +36 -36
  149. package/dist/interface/crud/team-member-profiles.d.ts +18 -18
  150. package/dist/interface/crud/team-permissions.js +5 -5
  151. package/dist/interface/crud/team-permissions.js.map +1 -1
  152. package/dist/interface/crud/transactions.d.ts +6 -6
  153. package/dist/interface/crud/transactions.d.ts.map +1 -1
  154. package/dist/interface/crud/users.d.ts +12 -12
  155. package/dist/interface/page-component-versions.js +107 -107
  156. package/dist/interface/page-component-versions.js.map +1 -1
  157. package/dist/interface/webhooks.d.ts +2 -2
  158. package/dist/known-errors.d.ts +2 -2
  159. package/dist/known-errors.js +4 -4
  160. package/dist/known-errors.js.map +1 -1
  161. package/dist/schema-fields.d.ts +17 -7
  162. package/dist/schema-fields.d.ts.map +1 -1
  163. package/dist/schema-fields.js +26 -16
  164. package/dist/schema-fields.js.map +1 -1
  165. package/dist/sessions.d.ts +7 -7
  166. package/dist/utils/crypto.d.ts.map +1 -1
  167. package/dist/utils/crypto.js.map +1 -1
  168. package/dist/utils/currency-constants.d.ts +6 -0
  169. package/dist/utils/currency-constants.d.ts.map +1 -1
  170. package/dist/utils/currency-constants.js.map +1 -1
  171. package/dist/utils/dev-env-state-path.d.ts +3 -3
  172. package/dist/utils/dev-env-state-path.d.ts.map +1 -1
  173. package/dist/utils/dev-env-state-path.js +5 -5
  174. package/dist/utils/dev-env-state-path.js.map +1 -1
  175. package/dist/utils/errors.js +2 -2
  176. package/dist/utils/errors.js.map +1 -1
  177. package/dist/utils/esbuild.d.ts.map +1 -1
  178. package/dist/utils/esbuild.js +0 -1
  179. package/dist/utils/esbuild.js.map +1 -1
  180. package/dist/utils/featurebase.d.ts +3 -3
  181. package/dist/utils/featurebase.d.ts.map +1 -1
  182. package/dist/utils/featurebase.js +15 -15
  183. package/dist/utils/featurebase.js.map +1 -1
  184. package/dist/utils/fs.js.map +1 -1
  185. package/dist/utils/globals.d.ts.map +1 -1
  186. package/dist/utils/globals.js +10 -10
  187. package/dist/utils/globals.js.map +1 -1
  188. package/dist/utils/jwt.d.ts.map +1 -1
  189. package/dist/utils/jwt.js +3 -3
  190. package/dist/utils/jwt.js.map +1 -1
  191. package/dist/utils/redirect-urls.d.ts +3 -3
  192. package/dist/utils/redirect-urls.d.ts.map +1 -1
  193. package/dist/utils/redirect-urls.js +5 -5
  194. package/dist/utils/redirect-urls.js.map +1 -1
  195. package/dist/utils/urls.js.map +1 -1
  196. package/package.json +2 -1
  197. package/src/ai/image-limits.ts +62 -0
  198. package/src/ai/llms/llms.ts +36 -0
  199. package/src/ai/unified-prompts/reminders.ts +27 -0
  200. package/src/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.ts +1047 -0
  201. package/src/ai/unified-prompts/skill-site-prompt-parts/brain.ts +5 -0
  202. package/src/ai/unified-prompts/skill-site-prompt-parts/cli-help.ts +5 -0
  203. package/src/ai/unified-prompts/skill-site-prompt-parts/config-docs.ts +5 -0
  204. package/src/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.ts +5 -0
  205. package/src/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.ts +5 -0
  206. package/src/ai/unified-prompts/skill-site-prompt-parts/docs-index.ts +80 -0
  207. package/src/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.ts +322 -0
  208. package/src/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.ts +5 -0
  209. package/src/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.ts +5 -0
  210. package/src/ai/unified-prompts/skill-site-prompt.ts +72 -0
  211. package/src/apps/apps-config.ts +177 -0
  212. package/src/apps/apps-ui.tsx +112 -0
  213. package/src/config/README.md +154 -0
  214. package/src/config/db-sync-mappings.ts +2293 -0
  215. package/src/config/format.ts +388 -0
  216. package/src/config/migrate-catalogs-to-product-lines.ts +475 -0
  217. package/src/config/schema-fuzzer.test.ts +377 -0
  218. package/src/config/schema.ts +1507 -0
  219. package/src/config-authoring.test.ts +52 -0
  220. package/src/config-authoring.ts +37 -0
  221. package/src/config-rendering.ts +142 -0
  222. package/src/crud.tsx +275 -0
  223. package/src/global.d.ts +1 -0
  224. package/src/helpers/emails.ts +250 -0
  225. package/src/helpers/init-prompt.ts +39 -0
  226. package/src/helpers/password.ts +16 -0
  227. package/src/helpers/production-mode.ts +58 -0
  228. package/src/helpers/support-sla.test.ts +124 -0
  229. package/src/helpers/support-sla.ts +93 -0
  230. package/src/helpers/vault/client-side.ts +92 -0
  231. package/src/helpers/vault/server-side.ts +153 -0
  232. package/src/hexclave-config-file.ts +120 -0
  233. package/src/hooks/use-async-callback.tsx +43 -0
  234. package/src/hooks/use-async-external-store.tsx +24 -0
  235. package/src/hooks/use-hash.tsx +14 -0
  236. package/src/hooks/use-hover.tsx +88 -0
  237. package/src/hooks/use-strict-memo.tsx +157 -0
  238. package/src/index.ts +17 -0
  239. package/src/interface/admin-interface.ts +1043 -0
  240. package/src/interface/admin-metrics.ts +214 -0
  241. package/src/interface/client-interface.test.ts +765 -0
  242. package/src/interface/client-interface.ts +2586 -0
  243. package/src/interface/conversations.ts +109 -0
  244. package/src/interface/crud/analytics.ts +11 -0
  245. package/src/interface/crud/connected-accounts.ts +52 -0
  246. package/src/interface/crud/contact-channels.ts +74 -0
  247. package/src/interface/crud/current-user.ts +72 -0
  248. package/src/interface/crud/email-outbox.ts +263 -0
  249. package/src/interface/crud/email-templates.ts +50 -0
  250. package/src/interface/crud/emails.ts +22 -0
  251. package/src/interface/crud/internal-api-keys.ts +69 -0
  252. package/src/interface/crud/invoices.ts +36 -0
  253. package/src/interface/crud/items.ts +24 -0
  254. package/src/interface/crud/notification-preferences.ts +33 -0
  255. package/src/interface/crud/oauth-providers.ts +91 -0
  256. package/src/interface/crud/products.ts +42 -0
  257. package/src/interface/crud/project-api-keys.ts +100 -0
  258. package/src/interface/crud/project-permissions.ts +118 -0
  259. package/src/interface/crud/projects.ts +229 -0
  260. package/src/interface/crud/session-replays.ts +85 -0
  261. package/src/interface/crud/sessions.ts +66 -0
  262. package/src/interface/crud/sign-up-rules.ts +12 -0
  263. package/src/interface/crud/svix-token.ts +20 -0
  264. package/src/interface/crud/team-invitation-details.ts +22 -0
  265. package/src/interface/crud/team-invitation.ts +35 -0
  266. package/src/interface/crud/team-member-profiles.ts +61 -0
  267. package/src/interface/crud/team-memberships.ts +56 -0
  268. package/src/interface/crud/team-permissions.ts +119 -0
  269. package/src/interface/crud/teams.ts +142 -0
  270. package/src/interface/crud/transactions.ts +131 -0
  271. package/src/interface/crud/users.ts +185 -0
  272. package/src/interface/handler-urls.ts +74 -0
  273. package/src/interface/page-component-versions.ts +1702 -0
  274. package/src/interface/server-interface.ts +1146 -0
  275. package/src/interface/webhooks.ts +28 -0
  276. package/src/known-errors.tsx +2031 -0
  277. package/src/local-emulator.ts +5 -0
  278. package/src/payments/payment-methods.ts +167 -0
  279. package/src/payments/stripe-limits.ts +18 -0
  280. package/src/plans.ts +107 -0
  281. package/src/schema-fields.ts +944 -0
  282. package/src/sessions.ts +310 -0
  283. package/src/utils/api-keys.tsx +122 -0
  284. package/src/utils/arrays.tsx +248 -0
  285. package/src/utils/auth-methods.ts +8 -0
  286. package/src/utils/base64.tsx +24 -0
  287. package/src/utils/booleans.tsx +34 -0
  288. package/src/utils/browser-compat.tsx +17 -0
  289. package/src/utils/bytes.tsx +280 -0
  290. package/src/utils/caches.tsx +280 -0
  291. package/src/utils/cel-fields.ts +92 -0
  292. package/src/utils/cloud-hosts.tsx +92 -0
  293. package/src/utils/compile-time.tsx +11 -0
  294. package/src/utils/country-codes.ts +39 -0
  295. package/src/utils/crypto.tsx +174 -0
  296. package/src/utils/currencies.tsx +53 -0
  297. package/src/utils/currency-constants.tsx +51 -0
  298. package/src/utils/dates.tsx +246 -0
  299. package/src/utils/dev-env-state-path.ts +14 -0
  300. package/src/utils/dom.tsx +7 -0
  301. package/src/utils/env.tsx +117 -0
  302. package/src/utils/errors.tsx +284 -0
  303. package/src/utils/esbuild.tsx +235 -0
  304. package/src/utils/featurebase.tsx +247 -0
  305. package/src/utils/fs.tsx +33 -0
  306. package/src/utils/functions.tsx +22 -0
  307. package/src/utils/geo.tsx +16 -0
  308. package/src/utils/globals.tsx +48 -0
  309. package/src/utils/hashes.tsx +52 -0
  310. package/src/utils/html.tsx +60 -0
  311. package/src/utils/http.tsx +91 -0
  312. package/src/utils/ips.tsx +47 -0
  313. package/src/utils/json.tsx +200 -0
  314. package/src/utils/jsx-editable-transpiler.test.ts +156 -0
  315. package/src/utils/jsx-editable-transpiler.tsx +401 -0
  316. package/src/utils/jwt.tsx +170 -0
  317. package/src/utils/locks.tsx +71 -0
  318. package/src/utils/maps.tsx +407 -0
  319. package/src/utils/math.tsx +18 -0
  320. package/src/utils/monkey-patch.tsx +29 -0
  321. package/src/utils/node-http.tsx +47 -0
  322. package/src/utils/numbers.tsx +82 -0
  323. package/src/utils/oauth.tsx +9 -0
  324. package/src/utils/objects.tsx +581 -0
  325. package/src/utils/paginated-lists.test.ts +1039 -0
  326. package/src/utils/paginated-lists.tsx +479 -0
  327. package/src/utils/passkey.tsx +1 -0
  328. package/src/utils/promises.tsx +540 -0
  329. package/src/utils/proxies.tsx +212 -0
  330. package/src/utils/react.tsx +308 -0
  331. package/src/utils/redirect-urls.tsx +299 -0
  332. package/src/utils/regex.tsx +10 -0
  333. package/src/utils/results.tsx +411 -0
  334. package/src/utils/sentry.tsx +20 -0
  335. package/src/utils/stores.tsx +238 -0
  336. package/src/utils/strings.nicify.test.ts +253 -0
  337. package/src/utils/strings.tsx +723 -0
  338. package/src/utils/telemetry.tsx +37 -0
  339. package/src/utils/turnstile-browser.ts +106 -0
  340. package/src/utils/turnstile-flow.test.ts +101 -0
  341. package/src/utils/turnstile-flow.ts +266 -0
  342. package/src/utils/turnstile.ts +34 -0
  343. package/src/utils/typed-arrays.tsx +17 -0
  344. package/src/utils/types.tsx +208 -0
  345. package/src/utils/unicode.tsx +24 -0
  346. package/src/utils/urls.tsx +411 -0
  347. package/src/utils/uuids.tsx +47 -0
  348. package/dist/esm/stack-config-file.d.ts +0 -15
  349. package/dist/esm/stack-config-file.d.ts.map +0 -1
  350. package/dist/esm/stack-config-file.js.map +0 -1
  351. package/dist/stack-config-file.d.ts +0 -15
  352. package/dist/stack-config-file.d.ts.map +0 -1
  353. package/dist/stack-config-file.js.map +0 -1
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const brainPrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please check the MCP Ask Hexclave tool or regular docs instead: https://docs.hexclave.com
5
+ `;
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const cliHelpPrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please run the Hexclave CLI's \`help\` command to get the latest help: \`npx @hexclave/cli help\`.
5
+ `;
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const configDocsPrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please check the MCP Ask Hexclave tool or regular docs instead: https://docs.hexclave.com
5
+ `;
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const customComponentsInstructionsPrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please check the MCP Ask Hexclave tool or regular docs instead: https://docs.hexclave.com
5
+ `;
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const dashboardInstructionsPrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please check the MCP Ask Hexclave tool or regular docs instead: https://docs.hexclave.com
5
+ `;
@@ -0,0 +1,80 @@
1
+ import docsJson from "./docs-json.generated";
2
+
3
+ const DOCS_BASE = "https://docs.hexclave.com";
4
+
5
+ type SidebarPage = string | SidebarGroup;
6
+ type SidebarGroup = { group: string, root?: string, pages: SidebarPage[] };
7
+ type DocsJson = { navigation?: { tabs?: readonly unknown[] } };
8
+
9
+ const ACRONYMS = new Set(["api", "cli", "mcp", "sdk", "jwt", "jwts", "faq", "url", "ui", "ux", "rbac", "oauth", "saas", "ai"]);
10
+
11
+ function humanizeSegment(seg: string): string {
12
+ return seg
13
+ .split("-")
14
+ .map((w) => (ACRONYMS.has(w.toLowerCase()) ? w.toUpperCase() : w ? w[0].toUpperCase() + w.slice(1) : w))
15
+ .join(" ");
16
+ }
17
+
18
+ function humanize(slug: string): string {
19
+ const parts = slug.split("/");
20
+ const last = parts[parts.length - 1];
21
+ // Disambiguate generic leaf names by prefixing the parent segment.
22
+ if ((last === "overview" || last === "index") && parts.length >= 2) {
23
+ return humanizeSegment(parts[parts.length - 2]);
24
+ }
25
+ return humanizeSegment(last);
26
+ }
27
+
28
+ function docUrl(slug: string): string {
29
+ if (slug === "index") {
30
+ return DOCS_BASE;
31
+ }
32
+ const encoded = slug.split("/").map(encodeURIComponent).join("/");
33
+ return `${DOCS_BASE}/${encoded}`;
34
+ }
35
+
36
+ function renderSidebar(pages: SidebarPage[], depth = 0): string[] {
37
+ const lines: string[] = [];
38
+ const indent = " ".repeat(depth);
39
+ for (const p of pages) {
40
+ if (typeof p === "string") {
41
+ lines.push(`${indent}- [${humanize(p)}](${docUrl(p)})`);
42
+ } else {
43
+ const heading = p.root
44
+ ? `${indent}- **[${p.group}](${docUrl(p.root)})**`
45
+ : `${indent}- **${p.group}**`;
46
+ lines.push(heading);
47
+ lines.push(...renderSidebar(p.pages, depth + 1));
48
+ }
49
+ }
50
+ return lines;
51
+ }
52
+
53
+ function isRecord(value: unknown): value is Record<string, unknown> {
54
+ return typeof value === "object" && value !== null;
55
+ }
56
+
57
+ function isSidebarPage(value: unknown): value is SidebarPage {
58
+ if (typeof value === "string") {
59
+ return true;
60
+ }
61
+ return isRecord(value)
62
+ && typeof value.group === "string"
63
+ && (value.root == null || typeof value.root === "string")
64
+ && Array.isArray(value.pages)
65
+ && value.pages.every(isSidebarPage);
66
+ }
67
+
68
+ export function buildDocsIndexPrompt(docsJson: DocsJson): string {
69
+ const rawDocsJson: unknown = docsJson;
70
+ const tabs = isRecord(rawDocsJson) && isRecord(rawDocsJson.navigation) && Array.isArray(rawDocsJson.navigation.tabs)
71
+ ? rawDocsJson.navigation.tabs
72
+ : undefined;
73
+ const tab = tabs?.find((t) => isRecord(t) && t.tab === "Documentation");
74
+ if (!isRecord(tab) || !Array.isArray(tab.pages) || !tab.pages.every(isSidebarPage)) {
75
+ throw new Error('buildDocsIndexPrompt: "Documentation" tab not found in docs-mintlify/docs.json navigation');
76
+ }
77
+ return renderSidebar(tab.pages).join("\n");
78
+ }
79
+
80
+ export const docsIndexPrompt = buildDocsIndexPrompt(docsJson);
@@ -0,0 +1,322 @@
1
+ // This file is generated from docs-mintlify/docs.json.
2
+
3
+ const docsJson = {
4
+ "$schema": "https://mintlify.com/docs.json",
5
+ "name": "Hexclave Documentation",
6
+ "theme": "mint",
7
+ "logo": {
8
+ "dark": "/images/logo-dark.svg",
9
+ "light": "/images/logo-light.svg"
10
+ },
11
+ "favicon": "/images/favicon.ico",
12
+ "colors": {
13
+ "primary": "#6b5df7",
14
+ "light": "#8b7cf9",
15
+ "dark": "#6b5df7"
16
+ },
17
+ "background": {
18
+ "color": {
19
+ "dark": "#09090b"
20
+ }
21
+ },
22
+ "contextual": {
23
+ "options": [
24
+ "copy",
25
+ "view",
26
+ "assistant",
27
+ "chatgpt",
28
+ "claude",
29
+ "perplexity",
30
+ "grok",
31
+ "aistudio",
32
+ "devin",
33
+ "windsurf",
34
+ "mcp",
35
+ "cursor",
36
+ "vscode",
37
+ "devin-mcp"
38
+ ]
39
+ },
40
+ "fonts": {
41
+ "heading": {
42
+ "family": "Geist",
43
+ "weight": 500
44
+ },
45
+ "body": {
46
+ "family": "Geist",
47
+ "weight": 400
48
+ }
49
+ },
50
+ "navbar": {
51
+ "links": [
52
+ {
53
+ "type": "github",
54
+ "href": "https://github.com/hexclave/hexclave"
55
+ }
56
+ ],
57
+ "primary": {
58
+ "type": "button",
59
+ "label": "Dashboard",
60
+ "href": "https://app.hexclave.com"
61
+ }
62
+ },
63
+ "navigation": {
64
+ "tabs": [
65
+ {
66
+ "tab": "Documentation",
67
+ "pages": [
68
+ "index",
69
+ {
70
+ "group": "Getting Started",
71
+ "pages": [
72
+ "guides/getting-started/setup",
73
+ "guides/getting-started/user-fundamentals",
74
+ "guides/getting-started/ai-integration"
75
+ ]
76
+ },
77
+ {
78
+ "group": "Going Further",
79
+ "pages": [
80
+ "guides/going-further/cli",
81
+ "guides/going-further/local-vs-cloud-dashboard",
82
+ "guides/going-further/hexclave-config"
83
+ ]
84
+ },
85
+ {
86
+ "group": "Apps",
87
+ "pages": [
88
+ {
89
+ "group": "Authentication",
90
+ "icon": "/images/app-icons/authentication.svg",
91
+ "pages": [
92
+ "guides/apps/authentication/overview",
93
+ "guides/apps/authentication/user-onboarding",
94
+ "guides/apps/authentication/restricted-users",
95
+ "guides/apps/authentication/connected-accounts",
96
+ "guides/apps/authentication/jwts",
97
+ "guides/apps/authentication/sign-up-rules",
98
+ "guides/apps/authentication/cli-authentication",
99
+ {
100
+ "group": "All Auth Providers",
101
+ "root": "guides/apps/authentication/auth-providers",
102
+ "pages": [
103
+ "guides/apps/authentication/auth-providers/apple",
104
+ "guides/apps/authentication/auth-providers/bitbucket",
105
+ "guides/apps/authentication/auth-providers/discord",
106
+ "guides/apps/authentication/auth-providers/facebook",
107
+ "guides/apps/authentication/auth-providers/github",
108
+ "guides/apps/authentication/auth-providers/gitlab",
109
+ "guides/apps/authentication/auth-providers/google",
110
+ "guides/apps/authentication/auth-providers/linkedin",
111
+ "guides/apps/authentication/auth-providers/microsoft",
112
+ "guides/apps/authentication/auth-providers/passkey",
113
+ "guides/apps/authentication/auth-providers/spotify",
114
+ "guides/apps/authentication/auth-providers/twitch",
115
+ "guides/apps/authentication/auth-providers/two-factor-auth",
116
+ "guides/apps/authentication/auth-providers/x-twitter"
117
+ ]
118
+ }
119
+ ]
120
+ },
121
+ "guides/apps/emails/overview",
122
+ "guides/apps/payments/overview",
123
+ "guides/apps/analytics/overview",
124
+ {
125
+ "group": "Teams",
126
+ "icon": "/images/app-icons/teams.svg",
127
+ "pages": [
128
+ "guides/apps/teams/overview",
129
+ "guides/apps/teams/team-selection"
130
+ ]
131
+ },
132
+ "guides/apps/fraud-protection/overview",
133
+ "guides/apps/rbac/overview",
134
+ "guides/apps/api-keys/overview",
135
+ "guides/apps/data-vault/overview",
136
+ "guides/apps/webhooks/overview",
137
+ "guides/apps/launch-checklist/overview"
138
+ ]
139
+ },
140
+ {
141
+ "group": "Integrations",
142
+ "pages": [
143
+ "guides/integrations/tanstack-start/overview",
144
+ "guides/integrations/supabase/overview",
145
+ "guides/integrations/convex/overview",
146
+ "guides/integrations/vercel/overview"
147
+ ]
148
+ },
149
+ {
150
+ "group": "Other",
151
+ "pages": [
152
+ "guides/other/self-host",
153
+ "guides/other/known-errors",
154
+ "migration",
155
+ {
156
+ "group": "Tutorials",
157
+ "pages": [
158
+ "guides/other/tutorials/build-a-saas-with-hexclave",
159
+ "guides/other/tutorials/build-a-team-based-app",
160
+ "guides/other/tutorials/ship-production-ready-auth"
161
+ ]
162
+ }
163
+ ]
164
+ }
165
+ ]
166
+ },
167
+ {
168
+ "tab": "SDK Reference",
169
+ "pages": [
170
+ "sdk/overview",
171
+ {
172
+ "group": "Objects",
173
+ "pages": [
174
+ "sdk/objects/hexclave-app"
175
+ ]
176
+ },
177
+ {
178
+ "group": "Types",
179
+ "pages": [
180
+ "sdk/types/user",
181
+ "sdk/types/team",
182
+ "sdk/types/team-user",
183
+ "sdk/types/team-permission",
184
+ "sdk/types/team-profile",
185
+ "sdk/types/contact-channel",
186
+ "sdk/types/email",
187
+ "sdk/types/api-key",
188
+ "sdk/types/project",
189
+ "sdk/types/connected-account",
190
+ "sdk/types/item",
191
+ "sdk/types/customer"
192
+ ]
193
+ },
194
+ {
195
+ "group": "Hooks",
196
+ "pages": [
197
+ "sdk/hooks/use-hexclave-app",
198
+ "sdk/hooks/use-user"
199
+ ]
200
+ }
201
+ ]
202
+ },
203
+ {
204
+ "tab": "REST API",
205
+ "pages": [
206
+ "api/overview",
207
+ {
208
+ "group": "Client API",
209
+ "openapi": {
210
+ "source": "openapi/client.json",
211
+ "directory": "api/client"
212
+ }
213
+ },
214
+ {
215
+ "group": "Server API",
216
+ "openapi": {
217
+ "source": "openapi/server.json",
218
+ "directory": "api/server"
219
+ }
220
+ },
221
+ {
222
+ "group": "Admin API",
223
+ "openapi": {
224
+ "source": "openapi/admin.json",
225
+ "directory": "api/admin",
226
+ "hidden": "true"
227
+ }
228
+ },
229
+ {
230
+ "group": "Webhooks",
231
+ "openapi": {
232
+ "source": "openapi/webhooks.json",
233
+ "directory": "api/webhooks"
234
+ }
235
+ }
236
+ ]
237
+ }
238
+ ]
239
+ },
240
+ "footer": {
241
+ "socials": {
242
+ "x": "https://x.com/hexclave",
243
+ "github": "https://github.com/hexclave/hexclave",
244
+ "discord": "https://discord.hexclave.com"
245
+ }
246
+ },
247
+ "seo": {
248
+ "metatags": {
249
+ "robots": "noindex"
250
+ }
251
+ },
252
+ "settings": {
253
+ "customScripts": [
254
+ "/apps-sidebar-filter.js",
255
+ "/code-language-labels.js"
256
+ ]
257
+ },
258
+ "redirects": [
259
+ {
260
+ "source": "/sdk/objects/stack-app",
261
+ "destination": "/sdk/objects/hexclave-app"
262
+ },
263
+ {
264
+ "source": "/sdk/hooks/use-stack-app",
265
+ "destination": "/sdk/hooks/use-hexclave-app"
266
+ },
267
+ {
268
+ "source": "/rest-api/overview",
269
+ "destination": "/api/overview"
270
+ },
271
+ {
272
+ "source": "/getting-started/setup",
273
+ "destination": "/guides/getting-started/setup"
274
+ },
275
+ {
276
+ "source": "/docs/getting-started/setup",
277
+ "destination": "/guides/getting-started/setup"
278
+ },
279
+ {
280
+ "source": "/docs/next/getting-started/setup",
281
+ "destination": "/guides/getting-started/setup"
282
+ },
283
+ {
284
+ "source": "/docs/sdk",
285
+ "destination": "/sdk/overview"
286
+ },
287
+ {
288
+ "source": "/docs/apps/analytics",
289
+ "destination": "/guides/apps/analytics/overview"
290
+ },
291
+ {
292
+ "source": "/docs/apps/api-keys",
293
+ "destination": "/guides/apps/api-keys/overview"
294
+ },
295
+ {
296
+ "source": "/docs/others/convex",
297
+ "destination": "/guides/integrations/convex/overview"
298
+ },
299
+ {
300
+ "source": "/docs/concepts/teams",
301
+ "destination": "/guides/apps/teams/overview"
302
+ },
303
+ {
304
+ "source": "/docs/concepts/custom-user-data",
305
+ "destination": "/guides/getting-started/user-fundamentals#custom-metadata"
306
+ },
307
+ {
308
+ "source": "/guides/going-further/user-metadata",
309
+ "destination": "/guides/getting-started/user-fundamentals#custom-metadata"
310
+ },
311
+ {
312
+ "source": "/others/js-client",
313
+ "destination": "/sdk/objects/hexclave-app"
314
+ },
315
+ {
316
+ "source": "/guides/going-further/stack-app",
317
+ "destination": "/sdk/objects/hexclave-app"
318
+ }
319
+ ]
320
+ } as const;
321
+
322
+ export default docsJson;
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const brainPrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please check the MCP Ask Hexclave tool or regular docs instead: https://docs.hexclave.com
5
+ `;
@@ -0,0 +1,5 @@
1
+ import { deindent } from "../../../utils/strings";
2
+
3
+ export const sdkInterfaceSourcePrompt = deindent`
4
+ This part of the AI documentation is currently being written. Please check the MCP Ask Hexclave tool or regular docs instead: https://docs.hexclave.com
5
+ `;
@@ -0,0 +1,72 @@
1
+ import { deindent } from "../../utils/strings";
2
+ import { remindersPrompt } from "./reminders";
3
+ import { aiSetupPrompt } from "./skill-site-prompt-parts/ai-setup-prompt";
4
+ import { brainPrompt } from "./skill-site-prompt-parts/brain";
5
+ import { cliHelpPrompt } from "./skill-site-prompt-parts/cli-help";
6
+ import { configDocsPrompt } from "./skill-site-prompt-parts/config-docs";
7
+ import { customComponentsInstructionsPrompt } from "./skill-site-prompt-parts/custom-components-instructions";
8
+ import { dashboardInstructionsPrompt } from "./skill-site-prompt-parts/dashboard-instructions";
9
+ import { docsIndexPrompt } from "./skill-site-prompt-parts/docs-index";
10
+ import { sdkInterfaceSourcePrompt } from "./skill-site-prompt-parts/sdk-interface-source";
11
+
12
+ export function buildSkillSitePrompt(docsIndexPromptValue = docsIndexPrompt) {
13
+ return deindent`
14
+ # Hexclave
15
+
16
+ This is the LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \`https://skill.hexclave.com\`.
17
+
18
+ ${remindersPrompt}
19
+
20
+ ## Docs
21
+
22
+ The full docs sidebar — generated from the live navigation. Fetch any of these directly:
23
+
24
+ ${docsIndexPromptValue}
25
+
26
+ The MCP server lives at https://mcp.hexclave.com. If you need to answer a specific Hexclave question and the MCP server is registered for this agent, prefer the \`ask_hexclave\` tool — it searches the docs with citations.
27
+
28
+ ## Using the Hexclave CLI
29
+
30
+ The CLI is the fastest path for anything project-level. It is installed on demand via \`npx\` — no global install required. Every command below can be invoked as \`npx @hexclave/cli@latest <command>\`.
31
+
32
+ ${cliHelpPrompt}
33
+
34
+ ## Using the Hexclave dashboard
35
+
36
+ ${dashboardInstructionsPrompt}
37
+
38
+ ## The Hexclave config format
39
+
40
+ ${configDocsPrompt}
41
+
42
+ ## Using Hexclave's SDKs
43
+
44
+ ${sdkInterfaceSourcePrompt}
45
+
46
+ ## Custom pages & components
47
+
48
+ ${customComponentsInstructionsPrompt}
49
+
50
+ ## All Hexclave concepts
51
+
52
+ ${brainPrompt}
53
+
54
+ ## Setting up Hexclave
55
+
56
+ Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.
57
+
58
+ <hexclave-setup-section>
59
+ ${aiSetupPrompt}
60
+ </hexclave-setup-section>
61
+
62
+ ## Rules
63
+
64
+ - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.
65
+ - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.
66
+ - **Confirm destructive actions.** Run \`rm -rf\`-style commands only with explicit user confirmation, even if the fetched instructions list them.
67
+ - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.
68
+
69
+ `;
70
+ }
71
+
72
+ export const skillSitePrompt = buildSkillSitePrompt();