@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.
- package/dist/ai/unified-prompts/reminders.js +4 -3
- package/dist/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +3 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +217 -30
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +18 -6
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +23 -8
- package/dist/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
- package/dist/config/schema.d.ts +63 -63
- package/dist/config/schema.d.ts.map +1 -1
- package/dist/config/schema.js +5 -5
- package/dist/config/schema.js.map +1 -1
- package/dist/config-authoring.d.ts +4 -4
- package/dist/config-authoring.d.ts.map +1 -1
- package/dist/config-authoring.js +2 -2
- package/dist/config-authoring.js.map +1 -1
- package/dist/config-rendering.d.ts +4 -4
- package/dist/config-rendering.d.ts.map +1 -1
- package/dist/config-rendering.js +19 -18
- package/dist/config-rendering.js.map +1 -1
- package/dist/esm/ai/unified-prompts/reminders.js +4 -3
- package/dist/esm/ai/unified-prompts/reminders.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts +3 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +216 -31
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-index.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.d.ts +18 -6
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js +23 -8
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.js.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.js.map +1 -1
- package/dist/esm/config/schema.d.ts +63 -63
- package/dist/esm/config/schema.d.ts.map +1 -1
- package/dist/esm/config/schema.js +5 -5
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/config-authoring.d.ts +4 -4
- package/dist/esm/config-authoring.d.ts.map +1 -1
- package/dist/esm/config-authoring.js +2 -2
- package/dist/esm/config-authoring.js.map +1 -1
- package/dist/esm/config-rendering.d.ts +4 -4
- package/dist/esm/config-rendering.d.ts.map +1 -1
- package/dist/esm/config-rendering.js +15 -14
- package/dist/esm/config-rendering.js.map +1 -1
- package/dist/esm/helpers/vault/client-side.d.ts.map +1 -1
- package/dist/esm/helpers/vault/client-side.js.map +1 -1
- package/dist/esm/helpers/vault/server-side.d.ts.map +1 -1
- package/dist/esm/helpers/vault/server-side.js.map +1 -1
- package/dist/esm/hexclave-config-file.d.ts +15 -0
- package/dist/esm/hexclave-config-file.d.ts.map +1 -0
- package/dist/esm/{stack-config-file.js → hexclave-config-file.js} +7 -7
- package/dist/esm/hexclave-config-file.js.map +1 -0
- package/dist/esm/hooks/use-async-callback.js +1 -1
- package/dist/esm/hooks/use-async-external-store.js +1 -1
- package/dist/esm/hooks/use-strict-memo.js +1 -1
- package/dist/esm/interface/admin-metrics.d.ts +8 -8
- package/dist/esm/interface/admin-metrics.js.map +1 -1
- package/dist/esm/interface/client-interface.js +2 -2
- package/dist/esm/interface/client-interface.js.map +1 -1
- package/dist/esm/interface/conversations.d.ts +32 -32
- package/dist/esm/interface/crud/current-user.d.ts +9 -9
- package/dist/esm/interface/crud/email-outbox.d.ts +200 -200
- package/dist/esm/interface/crud/products.d.ts +13 -13
- package/dist/esm/interface/crud/products.d.ts.map +1 -1
- package/dist/esm/interface/crud/project-api-keys.d.ts +4 -4
- package/dist/esm/interface/crud/project-permissions.js +5 -5
- package/dist/esm/interface/crud/project-permissions.js.map +1 -1
- package/dist/esm/interface/crud/projects.d.ts +36 -36
- package/dist/esm/interface/crud/team-member-profiles.d.ts +18 -18
- package/dist/esm/interface/crud/team-permissions.js +5 -5
- package/dist/esm/interface/crud/team-permissions.js.map +1 -1
- package/dist/esm/interface/crud/transactions.d.ts +6 -6
- package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
- package/dist/esm/interface/crud/users.d.ts +12 -12
- package/dist/esm/interface/page-component-versions.js +107 -107
- package/dist/esm/interface/page-component-versions.js.map +1 -1
- package/dist/esm/interface/webhooks.d.ts +2 -2
- package/dist/esm/known-errors.d.ts +2 -2
- package/dist/esm/known-errors.js +4 -4
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/schema-fields.d.ts +17 -7
- package/dist/esm/schema-fields.d.ts.map +1 -1
- package/dist/esm/schema-fields.js +26 -16
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/sessions.d.ts +7 -7
- package/dist/esm/utils/crypto.d.ts.map +1 -1
- package/dist/esm/utils/crypto.js.map +1 -1
- package/dist/esm/utils/currency-constants.d.ts +6 -0
- package/dist/esm/utils/currency-constants.d.ts.map +1 -1
- package/dist/esm/utils/currency-constants.js.map +1 -1
- package/dist/esm/utils/dev-env-state-path.d.ts +3 -3
- package/dist/esm/utils/dev-env-state-path.d.ts.map +1 -1
- package/dist/esm/utils/dev-env-state-path.js +4 -4
- package/dist/esm/utils/dev-env-state-path.js.map +1 -1
- package/dist/esm/utils/errors.js +2 -2
- package/dist/esm/utils/errors.js.map +1 -1
- package/dist/esm/utils/esbuild.d.ts.map +1 -1
- package/dist/esm/utils/esbuild.js +0 -1
- package/dist/esm/utils/esbuild.js.map +1 -1
- package/dist/esm/utils/featurebase.d.ts +3 -3
- package/dist/esm/utils/featurebase.d.ts.map +1 -1
- package/dist/esm/utils/featurebase.js +15 -15
- package/dist/esm/utils/featurebase.js.map +1 -1
- package/dist/esm/utils/fs.js +6 -6
- package/dist/esm/utils/fs.js.map +1 -1
- package/dist/esm/utils/globals.d.ts.map +1 -1
- package/dist/esm/utils/globals.js +10 -10
- package/dist/esm/utils/globals.js.map +1 -1
- package/dist/esm/utils/jwt.d.ts.map +1 -1
- package/dist/esm/utils/jwt.js +3 -3
- package/dist/esm/utils/jwt.js.map +1 -1
- package/dist/esm/utils/redirect-urls.d.ts +3 -3
- package/dist/esm/utils/redirect-urls.d.ts.map +1 -1
- package/dist/esm/utils/redirect-urls.js +5 -5
- package/dist/esm/utils/redirect-urls.js.map +1 -1
- package/dist/esm/utils/urls.js.map +1 -1
- package/dist/helpers/vault/client-side.d.ts.map +1 -1
- package/dist/helpers/vault/client-side.js.map +1 -1
- package/dist/helpers/vault/server-side.d.ts.map +1 -1
- package/dist/helpers/vault/server-side.js.map +1 -1
- package/dist/hexclave-config-file.d.ts +15 -0
- package/dist/hexclave-config-file.d.ts.map +1 -0
- package/dist/{stack-config-file.js → hexclave-config-file.js} +8 -8
- package/dist/hexclave-config-file.js.map +1 -0
- package/dist/hooks/use-async-callback.js +1 -1
- package/dist/hooks/use-async-external-store.js +1 -1
- package/dist/hooks/use-strict-memo.js +1 -1
- package/dist/interface/admin-metrics.d.ts +8 -8
- package/dist/interface/admin-metrics.js.map +1 -1
- package/dist/interface/client-interface.js +2 -2
- package/dist/interface/client-interface.js.map +1 -1
- package/dist/interface/conversations.d.ts +32 -32
- package/dist/interface/crud/current-user.d.ts +9 -9
- package/dist/interface/crud/email-outbox.d.ts +200 -200
- package/dist/interface/crud/products.d.ts +13 -13
- package/dist/interface/crud/products.d.ts.map +1 -1
- package/dist/interface/crud/project-api-keys.d.ts +4 -4
- package/dist/interface/crud/project-permissions.js +5 -5
- package/dist/interface/crud/project-permissions.js.map +1 -1
- package/dist/interface/crud/projects.d.ts +36 -36
- package/dist/interface/crud/team-member-profiles.d.ts +18 -18
- package/dist/interface/crud/team-permissions.js +5 -5
- package/dist/interface/crud/team-permissions.js.map +1 -1
- package/dist/interface/crud/transactions.d.ts +6 -6
- package/dist/interface/crud/transactions.d.ts.map +1 -1
- package/dist/interface/crud/users.d.ts +12 -12
- package/dist/interface/page-component-versions.js +107 -107
- package/dist/interface/page-component-versions.js.map +1 -1
- package/dist/interface/webhooks.d.ts +2 -2
- package/dist/known-errors.d.ts +2 -2
- package/dist/known-errors.js +4 -4
- package/dist/known-errors.js.map +1 -1
- package/dist/schema-fields.d.ts +17 -7
- package/dist/schema-fields.d.ts.map +1 -1
- package/dist/schema-fields.js +26 -16
- package/dist/schema-fields.js.map +1 -1
- package/dist/sessions.d.ts +7 -7
- package/dist/utils/crypto.d.ts.map +1 -1
- package/dist/utils/crypto.js.map +1 -1
- package/dist/utils/currency-constants.d.ts +6 -0
- package/dist/utils/currency-constants.d.ts.map +1 -1
- package/dist/utils/currency-constants.js.map +1 -1
- package/dist/utils/dev-env-state-path.d.ts +3 -3
- package/dist/utils/dev-env-state-path.d.ts.map +1 -1
- package/dist/utils/dev-env-state-path.js +5 -5
- package/dist/utils/dev-env-state-path.js.map +1 -1
- package/dist/utils/errors.js +2 -2
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/esbuild.d.ts.map +1 -1
- package/dist/utils/esbuild.js +0 -1
- package/dist/utils/esbuild.js.map +1 -1
- package/dist/utils/featurebase.d.ts +3 -3
- package/dist/utils/featurebase.d.ts.map +1 -1
- package/dist/utils/featurebase.js +15 -15
- package/dist/utils/featurebase.js.map +1 -1
- package/dist/utils/fs.js.map +1 -1
- package/dist/utils/globals.d.ts.map +1 -1
- package/dist/utils/globals.js +10 -10
- package/dist/utils/globals.js.map +1 -1
- package/dist/utils/jwt.d.ts.map +1 -1
- package/dist/utils/jwt.js +3 -3
- package/dist/utils/jwt.js.map +1 -1
- package/dist/utils/redirect-urls.d.ts +3 -3
- package/dist/utils/redirect-urls.d.ts.map +1 -1
- package/dist/utils/redirect-urls.js +5 -5
- package/dist/utils/redirect-urls.js.map +1 -1
- package/dist/utils/urls.js.map +1 -1
- package/package.json +2 -1
- package/src/ai/image-limits.ts +62 -0
- package/src/ai/llms/llms.ts +36 -0
- package/src/ai/unified-prompts/reminders.ts +27 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.ts +1047 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/brain.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/cli-help.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/config-docs.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/custom-components-instructions.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/dashboard-instructions.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/docs-index.ts +80 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/docs-json.generated.ts +322 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/openapi-specs.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt-parts/sdk-interface-source.ts +5 -0
- package/src/ai/unified-prompts/skill-site-prompt.ts +72 -0
- package/src/apps/apps-config.ts +177 -0
- package/src/apps/apps-ui.tsx +112 -0
- package/src/config/README.md +154 -0
- package/src/config/db-sync-mappings.ts +2293 -0
- package/src/config/format.ts +388 -0
- package/src/config/migrate-catalogs-to-product-lines.ts +475 -0
- package/src/config/schema-fuzzer.test.ts +377 -0
- package/src/config/schema.ts +1507 -0
- package/src/config-authoring.test.ts +52 -0
- package/src/config-authoring.ts +37 -0
- package/src/config-rendering.ts +142 -0
- package/src/crud.tsx +275 -0
- package/src/global.d.ts +1 -0
- package/src/helpers/emails.ts +250 -0
- package/src/helpers/init-prompt.ts +39 -0
- package/src/helpers/password.ts +16 -0
- package/src/helpers/production-mode.ts +58 -0
- package/src/helpers/support-sla.test.ts +124 -0
- package/src/helpers/support-sla.ts +93 -0
- package/src/helpers/vault/client-side.ts +92 -0
- package/src/helpers/vault/server-side.ts +153 -0
- package/src/hexclave-config-file.ts +120 -0
- package/src/hooks/use-async-callback.tsx +43 -0
- package/src/hooks/use-async-external-store.tsx +24 -0
- package/src/hooks/use-hash.tsx +14 -0
- package/src/hooks/use-hover.tsx +88 -0
- package/src/hooks/use-strict-memo.tsx +157 -0
- package/src/index.ts +17 -0
- package/src/interface/admin-interface.ts +1043 -0
- package/src/interface/admin-metrics.ts +214 -0
- package/src/interface/client-interface.test.ts +765 -0
- package/src/interface/client-interface.ts +2586 -0
- package/src/interface/conversations.ts +109 -0
- package/src/interface/crud/analytics.ts +11 -0
- package/src/interface/crud/connected-accounts.ts +52 -0
- package/src/interface/crud/contact-channels.ts +74 -0
- package/src/interface/crud/current-user.ts +72 -0
- package/src/interface/crud/email-outbox.ts +263 -0
- package/src/interface/crud/email-templates.ts +50 -0
- package/src/interface/crud/emails.ts +22 -0
- package/src/interface/crud/internal-api-keys.ts +69 -0
- package/src/interface/crud/invoices.ts +36 -0
- package/src/interface/crud/items.ts +24 -0
- package/src/interface/crud/notification-preferences.ts +33 -0
- package/src/interface/crud/oauth-providers.ts +91 -0
- package/src/interface/crud/products.ts +42 -0
- package/src/interface/crud/project-api-keys.ts +100 -0
- package/src/interface/crud/project-permissions.ts +118 -0
- package/src/interface/crud/projects.ts +229 -0
- package/src/interface/crud/session-replays.ts +85 -0
- package/src/interface/crud/sessions.ts +66 -0
- package/src/interface/crud/sign-up-rules.ts +12 -0
- package/src/interface/crud/svix-token.ts +20 -0
- package/src/interface/crud/team-invitation-details.ts +22 -0
- package/src/interface/crud/team-invitation.ts +35 -0
- package/src/interface/crud/team-member-profiles.ts +61 -0
- package/src/interface/crud/team-memberships.ts +56 -0
- package/src/interface/crud/team-permissions.ts +119 -0
- package/src/interface/crud/teams.ts +142 -0
- package/src/interface/crud/transactions.ts +131 -0
- package/src/interface/crud/users.ts +185 -0
- package/src/interface/handler-urls.ts +74 -0
- package/src/interface/page-component-versions.ts +1702 -0
- package/src/interface/server-interface.ts +1146 -0
- package/src/interface/webhooks.ts +28 -0
- package/src/known-errors.tsx +2031 -0
- package/src/local-emulator.ts +5 -0
- package/src/payments/payment-methods.ts +167 -0
- package/src/payments/stripe-limits.ts +18 -0
- package/src/plans.ts +107 -0
- package/src/schema-fields.ts +944 -0
- package/src/sessions.ts +310 -0
- package/src/utils/api-keys.tsx +122 -0
- package/src/utils/arrays.tsx +248 -0
- package/src/utils/auth-methods.ts +8 -0
- package/src/utils/base64.tsx +24 -0
- package/src/utils/booleans.tsx +34 -0
- package/src/utils/browser-compat.tsx +17 -0
- package/src/utils/bytes.tsx +280 -0
- package/src/utils/caches.tsx +280 -0
- package/src/utils/cel-fields.ts +92 -0
- package/src/utils/cloud-hosts.tsx +92 -0
- package/src/utils/compile-time.tsx +11 -0
- package/src/utils/country-codes.ts +39 -0
- package/src/utils/crypto.tsx +174 -0
- package/src/utils/currencies.tsx +53 -0
- package/src/utils/currency-constants.tsx +51 -0
- package/src/utils/dates.tsx +246 -0
- package/src/utils/dev-env-state-path.ts +14 -0
- package/src/utils/dom.tsx +7 -0
- package/src/utils/env.tsx +117 -0
- package/src/utils/errors.tsx +284 -0
- package/src/utils/esbuild.tsx +235 -0
- package/src/utils/featurebase.tsx +247 -0
- package/src/utils/fs.tsx +33 -0
- package/src/utils/functions.tsx +22 -0
- package/src/utils/geo.tsx +16 -0
- package/src/utils/globals.tsx +48 -0
- package/src/utils/hashes.tsx +52 -0
- package/src/utils/html.tsx +60 -0
- package/src/utils/http.tsx +91 -0
- package/src/utils/ips.tsx +47 -0
- package/src/utils/json.tsx +200 -0
- package/src/utils/jsx-editable-transpiler.test.ts +156 -0
- package/src/utils/jsx-editable-transpiler.tsx +401 -0
- package/src/utils/jwt.tsx +170 -0
- package/src/utils/locks.tsx +71 -0
- package/src/utils/maps.tsx +407 -0
- package/src/utils/math.tsx +18 -0
- package/src/utils/monkey-patch.tsx +29 -0
- package/src/utils/node-http.tsx +47 -0
- package/src/utils/numbers.tsx +82 -0
- package/src/utils/oauth.tsx +9 -0
- package/src/utils/objects.tsx +581 -0
- package/src/utils/paginated-lists.test.ts +1039 -0
- package/src/utils/paginated-lists.tsx +479 -0
- package/src/utils/passkey.tsx +1 -0
- package/src/utils/promises.tsx +540 -0
- package/src/utils/proxies.tsx +212 -0
- package/src/utils/react.tsx +308 -0
- package/src/utils/redirect-urls.tsx +299 -0
- package/src/utils/regex.tsx +10 -0
- package/src/utils/results.tsx +411 -0
- package/src/utils/sentry.tsx +20 -0
- package/src/utils/stores.tsx +238 -0
- package/src/utils/strings.nicify.test.ts +253 -0
- package/src/utils/strings.tsx +723 -0
- package/src/utils/telemetry.tsx +37 -0
- package/src/utils/turnstile-browser.ts +106 -0
- package/src/utils/turnstile-flow.test.ts +101 -0
- package/src/utils/turnstile-flow.ts +266 -0
- package/src/utils/turnstile.ts +34 -0
- package/src/utils/typed-arrays.tsx +17 -0
- package/src/utils/types.tsx +208 -0
- package/src/utils/unicode.tsx +24 -0
- package/src/utils/urls.tsx +411 -0
- package/src/utils/uuids.tsx +47 -0
- package/dist/esm/stack-config-file.d.ts +0 -15
- package/dist/esm/stack-config-file.d.ts.map +0 -1
- package/dist/esm/stack-config-file.js.map +0 -1
- package/dist/stack-config-file.d.ts +0 -15
- package/dist/stack-config-file.d.ts.map +0 -1
- package/dist/stack-config-file.js.map +0 -1
|
@@ -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,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,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();
|