@sonordev/site-kit 7.1.1 → 7.2.0
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/AGENTS.md +3 -3
- package/CHANGELOG.md +68 -3426
- package/README.md +9 -8
- package/agent-manifest.json +12 -4
- package/dist/{AnalyticsProvider-3MI5RCTL.js → AnalyticsProvider-SLFFBRPE.js} +4 -4
- package/dist/{ArticleViewTracker-CMBSJR3N.js → ArticleViewTracker-TM5AMGN2.js} +3 -3
- package/dist/{BlocksPopup-X3OAAK2L.js → BlocksPopup-YJNJIVPO.js} +5 -5
- package/dist/ChatWidget-XKOSH66S.js +17 -0
- package/dist/{FileField-QRSEGO6D.js → FileField-CI4UL5SH.js} +3 -3
- package/dist/{FormSpotlight-XKV7VTN4.js → FormSpotlight-F2AAEGBN.js} +20 -6
- package/dist/{FormStage-C3YGYAUZ.js → FormStage-BI5R5CNC.js} +27 -7
- package/dist/ManagedForm-G6COGHXL.js +16 -0
- package/dist/{ManagedNewsletterForm-LPIKGJF4.js → ManagedNewsletterForm-BO3WCGXX.js} +7 -5
- package/dist/{SignalCore-ICXXZBYI.js → SignalCore-ZA6WHKBR.js} +3 -3
- package/dist/SiteChat-YJADDTKG.js +5 -0
- package/dist/{SiteDesignReporter-A7MS2CIP.js → SiteDesignReporter-5YAW36AQ.js} +5 -5
- package/dist/SitePopups-ST5PMKZE.js +10 -0
- package/dist/SitemapSync-RJTEBINX.js +8 -0
- package/dist/SitemapSync.d.ts +1 -1
- package/dist/_client/booking-widget.js +5 -5
- package/dist/_client/testimonial-section.d.ts +1 -1
- package/dist/affiliates/api.d.ts +1 -1
- package/dist/affiliates/index.js +3 -3
- package/dist/analytics/AnalyticsProvider.d.ts +1 -1
- package/dist/analytics/index.js +4 -4
- package/dist/analytics/send-gate.d.ts +13 -26
- package/dist/articles/Article.d.ts +1 -1
- package/dist/articles/ArticleList.d.ts +1 -1
- package/dist/articles/ClusterLandingPage.d.ts +2 -2
- package/dist/articles/PublicationLayout.d.ts +1 -1
- package/dist/articles/PublicationSidebar.d.ts +1 -1
- package/dist/articles/RelatedPosts.d.ts +1 -1
- package/dist/articles/author-schema.d.ts +1 -1
- package/dist/articles/excerpt.d.ts +3 -4
- package/dist/articles/index.d.ts +2 -2
- package/dist/articles/index.js +2 -2
- package/dist/articles/news-sitemap.d.ts +1 -1
- package/dist/articles/processArticleHtml.d.ts +1 -1
- package/dist/articles/server-core.d.ts +4 -4
- package/dist/articles/server-ui.js +3 -2
- package/dist/articles/server.d.ts +4 -4
- package/dist/articles/server.js +2 -1
- package/dist/articles/types.d.ts +1 -1
- package/dist/{engage → chat}/ChatWidget.d.ts +8 -7
- package/dist/{engage → chat}/EchoUiActions.d.ts +4 -4
- package/dist/chat/SiteChat.d.ts +25 -0
- package/dist/{engage → chat}/brand-color.d.ts +2 -2
- package/dist/{engage → chat}/chat-messages.d.ts +1 -1
- package/dist/{engage → chat}/echo-config.d.ts +1 -1
- package/dist/chat/index.d.ts +10 -6
- package/dist/chat/index.js +14 -8
- package/dist/{engage → chat}/launcher-placement.d.ts +1 -7
- package/dist/{engage → chat}/socket-loader.d.ts +2 -2
- package/dist/chat/types.d.ts +136 -0
- package/dist/chunk-27FISYK4.js +4 -0
- package/dist/{chunk-QPEEKFCA.js → chunk-4NTBQNHA.js} +249 -80
- package/dist/{chunk-RK7GF7PQ.js → chunk-5V2V5C3Y.js} +2 -4
- package/dist/{chunk-ICFRH2ED.js → chunk-5YCEMV2L.js} +1 -1
- package/dist/{chunk-V4HUSHZO.js → chunk-64DKGVEI.js} +41 -7
- package/dist/{chunk-GLHQ3LRO.js → chunk-6U3VLV2C.js} +1 -1
- package/dist/{chunk-ZETJTCMV.js → chunk-BC4Y3S3D.js} +1 -1
- package/dist/{chunk-JSZN6LDZ.js → chunk-BF7TZYC3.js} +38 -31
- package/dist/{chunk-EFPS56JA.js → chunk-BKY2ZNM7.js} +1 -1
- package/dist/{chunk-AQSNPZY4.js → chunk-C2FZBUSS.js} +80 -1
- package/dist/{chunk-H42PZKVC.js → chunk-CF5QNFYU.js} +2 -2
- package/dist/{chunk-JC7KXNNM.js → chunk-D5DCBD4Y.js} +2 -2
- package/dist/{chunk-PXZ7LAOY.js → chunk-D6ZC7XKZ.js} +2 -2
- package/dist/chunk-EJVQJCG5.js +370 -0
- package/dist/{chunk-6OL23QYD.js → chunk-F24FNCTK.js} +1 -1
- package/dist/{chunk-NEKEH4CK.js → chunk-FR6BYFPC.js} +53 -21
- package/dist/{chunk-KOPVJQ2P.js → chunk-GEXT7BTE.js} +1 -1
- package/dist/{chunk-ZAWANWUS.js → chunk-GGORNBSC.js} +18 -6
- package/dist/{chunk-DUQMSNF2.js → chunk-HGFAEDG3.js} +1 -1
- package/dist/chunk-HODO5BX5.js +28 -0
- package/dist/chunk-HW7B43E5.js +14 -0
- package/dist/{chunk-EQBZ24VH.js → chunk-IAM3D3RL.js} +43 -24
- package/dist/{chunk-ODADQM6Z.js → chunk-JJ3DELUL.js} +2 -2
- package/dist/{chunk-542MIHNP.js → chunk-JMLK6MH7.js} +1 -1
- package/dist/{chunk-7FWA3I6A.js → chunk-JWTQS5F5.js} +1 -1
- package/dist/{chunk-OUNRFXDC.js → chunk-K4ZHAURD.js} +1 -1
- package/dist/chunk-NV72HZ4W.js +45 -0
- package/dist/{chunk-4Y5FWDPM.js → chunk-NZ4RXN3G.js} +55 -7
- package/dist/chunk-OWZ7ATLZ.js +187 -0
- package/dist/{chunk-TXBAOEKG.js → chunk-PKGN32AU.js} +5 -4
- package/dist/chunk-Q6E4OPGG.js +40 -0
- package/dist/{chunk-J4D6ZXRW.js → chunk-QL6XNPSD.js} +3 -3
- package/dist/{chunk-HAG4YIZY.js → chunk-R46IQIGK.js} +6 -6
- package/dist/{chunk-R3VKF43H.js → chunk-RPZ7OQGD.js} +1 -1
- package/dist/{chunk-Q3S26EQA.js → chunk-S54ECQGY.js} +1 -1
- package/dist/{chunk-JIL5VY2R.js → chunk-VHKEF5ZB.js} +1 -1
- package/dist/{chunk-ILAW3XKD.js → chunk-VO3JYRT5.js} +43 -29
- package/dist/chunk-VWWITFWM.js +300 -0
- package/dist/{chunk-OPRBF7VE.js → chunk-ZTLMPUO6.js} +3 -2
- package/dist/client/index.js +3 -3
- package/dist/cms/CmsPreview.d.ts +2 -2
- package/dist/cms/index.d.ts +3 -3
- package/dist/cms/server-api.d.ts +1 -1
- package/dist/cms/types.d.ts +1 -1
- package/dist/commerce/EventCheckout.d.ts +1 -1
- package/dist/commerce/EventsAgenda.d.ts +3 -3
- package/dist/commerce/api.d.ts +1 -1
- package/dist/commerce/index.js +4 -4
- package/dist/commerce/server.d.ts +3 -4
- package/dist/contracts/color.d.ts +1 -1
- package/dist/contracts/entries.d.ts +1 -1
- package/dist/contracts/error-page.d.ts +183 -0
- package/dist/contracts/fleet.d.ts +9 -9
- package/dist/contracts/forms.d.ts +4 -10
- package/dist/contracts/llms.d.ts +2 -1
- package/dist/contracts/portfolio.d.ts +11 -15
- package/dist/contracts/proposal-sitemap.d.ts +130 -0
- package/dist/contracts/schema-placeholders.d.ts +87 -0
- package/dist/contracts/seo-meta.d.ts +11 -12
- package/dist/contracts/seo-pages.d.ts +12 -18
- package/dist/contracts/site-cache.d.ts +4 -4
- package/dist/contracts/sites-normalize.d.ts +2 -4
- package/dist/contracts/sites.d.ts +3 -5
- package/dist/contracts/slot-content.d.ts +2 -2
- package/dist/contracts/slots.d.ts +6 -6
- package/dist/contracts/voice.d.ts +56 -0
- package/dist/contracts/website.d.ts +2 -2
- package/dist/engage/EngageWidget.d.ts +13 -12
- package/dist/engage/index.d.ts +10 -9
- package/dist/engage/index.js +31 -35
- package/dist/engage/types.d.ts +19 -244
- package/dist/fleet/FleetHeartbeat.d.ts +2 -2
- package/dist/fleet/index.js +4 -4
- package/dist/forms/FormEnhancer.d.ts +25 -12
- package/dist/forms/FormSpotlight.d.ts +2 -2
- package/dist/forms/ManagedForm.d.ts +1 -1
- package/dist/forms/ServerForm.d.ts +11 -10
- package/dist/forms/StaticForm.d.ts +4 -2
- package/dist/forms/field-autocomplete.d.ts +28 -0
- package/dist/forms/field-interactions.d.ts +2 -2
- package/dist/forms/form-dom-values.d.ts +42 -0
- package/dist/forms/form-loaded-at.d.ts +2 -2
- package/dist/forms/formsApi.d.ts +2 -2
- package/dist/forms/index.d.ts +1 -1
- package/dist/forms/index.js +11 -9
- package/dist/forms/server.d.ts +1 -1
- package/dist/forms/server.js +6 -4
- package/dist/forms/static.js +3 -2
- package/dist/forms/submitForm.d.ts +9 -2
- package/dist/forms/types.d.ts +44 -5
- package/dist/forms/useForm.d.ts +21 -4
- package/dist/forms/webmcp.d.ts +38 -0
- package/dist/images/ManagedFavicon.d.ts +1 -1
- package/dist/images/ManagedImage.d.ts +4 -4
- package/dist/images/api.d.ts +1 -1
- package/dist/images/index.d.ts +2 -2
- package/dist/images/index.js +4 -4
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/landing/contract.d.ts +3 -4
- package/dist/layout/SiteKitClientProviders.d.ts +4 -4
- package/dist/layout/SiteKitLayout.d.ts +11 -11
- package/dist/layout/client.d.ts +4 -4
- package/dist/layout/client.js +7 -7
- package/dist/layout/index.js +8 -8
- package/dist/layout/types.d.ts +7 -6
- package/dist/llms/SpeakableSchema.d.ts +2 -2
- package/dist/llms/agent-access.d.ts +2 -2
- package/dist/llms/aiRobots.d.ts +4 -4
- package/dist/llms/api.d.ts +2 -2
- package/dist/llms/contract.js +1 -1
- package/dist/llms/generateLLMsTxt.d.ts +1 -1
- package/dist/llms/index.js +6 -6
- package/dist/llms/links.d.ts +1 -1
- package/dist/llms/revalidate.d.ts +1 -1
- package/dist/llms/seo-revalidate.d.ts +2 -3
- package/dist/llms/types.d.ts +6 -6
- package/dist/llms/writeLLMsTxt.d.ts +10 -10
- package/dist/manifest/index.d.ts +8 -8
- package/dist/maps/index.js +3 -3
- package/dist/mcp/WebMcpTools.d.ts +1 -1
- package/dist/mcp/index.js +2 -14
- package/dist/mcp/report.d.ts +2 -2
- package/dist/mcp/serverCard.d.ts +1 -1
- package/dist/mcp/sonor.d.ts +5 -6
- package/dist/mcp/sonor.js +14 -11
- package/dist/mcp/transport.d.ts +1 -2
- package/dist/mcp/types.d.ts +4 -5
- package/dist/motion/engine.d.ts +2 -3
- package/dist/motion/failsafe.d.ts +1 -2
- package/dist/motion/gsap.d.ts +2 -2
- package/dist/motion/three.d.ts +1 -1
- package/dist/og/config.d.ts +4 -4
- package/dist/og/contrast.d.ts +2 -2
- package/dist/og/pages.d.ts +5 -5
- package/dist/og/route-fit.d.ts +2 -2
- package/dist/og/route.d.ts +1 -2
- package/dist/og/template.d.ts +1 -1
- package/dist/proxy/index.d.ts +2 -2
- package/dist/proxy/securityHeaders.d.ts +10 -12
- package/dist/redirects/index.d.ts +7 -7
- package/dist/reputation/TestimonialSection.d.ts +1 -1
- package/dist/reputation/api.d.ts +1 -1
- package/dist/revalidate/index.js +2 -2
- package/dist/robots/index.d.ts +5 -5
- package/dist/robots/indexnow.d.ts +2 -3
- package/dist/seo/ManagedScripts.d.ts +2 -2
- package/dist/seo/client.js +4 -4
- package/dist/seo/getManagedMetadata.d.ts +1 -1
- package/dist/seo/groundingSchema.d.ts +2 -2
- package/dist/seo/index.js +15 -8
- package/dist/seo/llms/contract.js +1 -1
- package/dist/seo/llms.js +6 -6
- package/dist/seo/register-sitemap-cli-impl.d.ts +1 -1
- package/dist/seo/register-sitemap-cli.d.ts +1 -1
- package/dist/seo/register-sitemap-cli.js +2 -2
- package/dist/seo/schema-filter.d.ts +5 -6
- package/dist/seo/server-api.d.ts +1 -1
- package/dist/seo/sitemap.js +4 -4
- package/dist/seo/types.d.ts +4 -4
- package/dist/seo/withManagedMetadata.d.ts +4 -4
- package/dist/server/index.js +2 -2
- package/dist/server/mint-site-token.d.ts +1 -2
- package/dist/server/server-fetch.d.ts +5 -5
- package/dist/shared/build-entries.d.ts +4 -4
- package/dist/shared/dialog.d.ts +27 -0
- package/dist/shared/frame.d.ts +8 -9
- package/dist/shared/fresh-fetch.d.ts +1 -2
- package/dist/shared/identity.d.ts +1 -1
- package/dist/shared/layers.d.ts +7 -0
- package/dist/shared/mid-form.d.ts +53 -0
- package/dist/shared/next-files.d.ts +1 -1
- package/dist/shared/publishCredential.d.ts +1 -1
- package/dist/shared/reporting-gate.d.ts +1 -1
- package/dist/shared/uuid.d.ts +1 -2
- package/dist/shared/version.d.ts +1 -1
- package/dist/shared/visual-viewport-gap.d.ts +3 -3
- package/dist/signal/index.js +2 -2
- package/dist/signal/types.d.ts +1 -1
- package/dist/site-config/index.d.ts +2 -2
- package/dist/sitemap/index.d.ts +13 -13
- package/dist/sitemap/index.js +4 -4
- package/dist/sitemap/shared.d.ts +3 -3
- package/dist/sites/site-param.d.ts +2 -2
- package/dist/slots/ManagedRichText.d.ts +1 -1
- package/dist/slots/ManagedSlot.d.ts +1 -1
- package/dist/slots/index.d.ts +1 -3
- package/dist/{socket-loader-R24ZSRSQ.js → socket-loader-CGIPEG74.js} +1 -1
- package/dist/sync/index.js +5 -5
- package/dist/types.d.ts +4 -2
- package/dist/website/BlocksPopup.d.ts +1 -1
- package/dist/website/PopupBlocks.d.ts +8 -6
- package/dist/website/SitePopups.d.ts +25 -0
- package/dist/website/images.js +4 -4
- package/dist/website/index.js +6 -6
- package/dist/website/popup-rules.d.ts +46 -0
- package/dist/website/popup-types.d.ts +113 -0
- package/dist/website/popups.d.ts +2 -6
- package/dist/website/popups.js +6 -14
- package/dist/{writeLLMsTxt-QR23OQUE.js → writeLLMsTxt-OV24LQVL.js} +3 -3
- package/docs/MIGRATING-TO-7.md +50 -22
- package/docs.json +2 -1
- package/package.json +2 -2
- package/src/admin-auth/README.md +3 -3
- package/src/analytics/README.md +9 -11
- package/src/articles/README.md +10 -7
- package/src/{engage → chat}/README.md +63 -62
- package/src/cta-bar/README.md +11 -11
- package/src/forms/README.md +60 -12
- package/src/layout/README.md +8 -5
- package/src/llms/README.md +3 -3
- package/src/mcp/README.md +7 -7
- package/src/motion/README.md +1 -1
- package/src/og/README.md +26 -27
- package/src/proxy/README.md +14 -14
- package/src/seo/README.md +4 -2
- package/src/slots/README.md +1 -1
- package/src/sync/README.md +10 -0
- package/src/website/README.md +133 -0
- package/dist/ChatWidget-JMFBXJ75.js +0 -15
- package/dist/EngageWidget-A3QKZ3SU.js +0 -11
- package/dist/ManagedForm-2GSSDJPP.js +0 -14
- package/dist/SitemapSync-4U654SEA.js +0 -8
- package/dist/chunk-B73QPZPH.js +0 -837
- package/dist/chunk-NDF4A5JM.js +0 -37
- package/dist/chunk-RTMMHTEQ.js +0 -100
- package/dist/engage/DesignRenderer.d.ts +0 -57
- package/dist/engage/element-rules.d.ts +0 -38
package/dist/llms/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-
|
|
1
|
+
export { createLLMsFullTxtHandler, createLLMsTxtHandler, formatSourcedFactsSection, llmsResponseHeaders } from '../chunk-BC4Y3S3D.js';
|
|
2
2
|
export { buildAiDiscoveryHeaders, wantsLlmsDiscoveryLink } from '../chunk-PO2TRJPY.js';
|
|
3
3
|
export { AI_RETRIEVAL_CRAWLERS, AI_TRAINING_CRAWLERS, buildAiCrawlerRules, createRobotsTxtHandler } from '../chunk-QLTDFUJ7.js';
|
|
4
|
-
export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-
|
|
4
|
+
export { LEGACY_PUBLICATION_PATH, SEO_REVALIDATION_MAX_BODY_BYTES, SEO_REVALIDATION_MAX_ITEMS, createLlmsRevalidateHandler, createSeoRevalidationHandler, parseSeoRevalidationPayload } from '../chunk-VHKEF5ZB.js';
|
|
5
5
|
import '../chunk-XTRZGXB2.js';
|
|
6
6
|
export { AEOBlock, AEOCitedContent, AEOClaim, AEOComparison, AEODefinition, AEOEntity, AEOProvenanceList, AEOStep, AEOSteps, AEOSummary, DEFAULT_SPEAKABLE_SELECTORS, SpeakableSchema, createSpeakableSchema, getSpeakableSelectorsForPage } from '../chunk-PSAG45YF.js';
|
|
7
|
-
export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-
|
|
8
|
-
export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-
|
|
7
|
+
export { AGENT_ACCESS_HEADING, appendAgentAccessSection, describesMcp, detectMcpServer, formatAgentAccessSection, generateLLMsFullTxt, generateLLMsTxt, writeLLMsTxtToPublic } from '../chunk-QL6XNPSD.js';
|
|
8
|
+
export { getBusinessInfo, getFAQItems, getLLMsData, getOptimizedLLMsTxt, getPageSummaries, getServices } from '../chunk-6U3VLV2C.js';
|
|
9
9
|
import '../chunk-L5UOHS6E.js';
|
|
10
10
|
import '../chunk-WMVK77ND.js';
|
|
11
11
|
import '../chunk-VX5CMNMM.js';
|
|
12
|
-
export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from '../chunk-
|
|
12
|
+
export { LLMS_DISCLAIMER_MAX_LENGTH, LLMS_PUBLIC_SUMMARY_MAX_LENGTH, LLM_GEO_CONTRACT_VERSION, MANAGED_LLM_SCHEMA_KNOWN_KEYS, pickManagedLlmSchemaForJsonLd, sanitizeLlmsDisclaimerLine, sanitizeLlmsPublicSummary, sanitizePrimaryLanguageTag } from '../chunk-NZ4RXN3G.js';
|
|
13
13
|
import '../chunk-4KZ6W3ZH.js';
|
|
14
14
|
import '../chunk-MJP63SSS.js';
|
|
15
15
|
import '../chunk-YVKRYQRG.js';
|
|
16
16
|
import '../chunk-FESKKJAS.js';
|
|
17
17
|
import '../chunk-A4CC4ZG3.js';
|
|
18
|
-
import '../chunk-
|
|
18
|
+
import '../chunk-F24FNCTK.js';
|
|
19
19
|
import '../chunk-PKBMQBKP.js';
|
package/dist/llms/links.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Single source of truth for putting llms.txt links into the site's
|
|
5
5
|
* trailing-slash shape. Two writers produce this text and neither knows the
|
|
6
|
-
* site's next.config:
|
|
6
|
+
* site's next.config: Sonor's AI-optimized file (built server-side from
|
|
7
7
|
* `business.website` + the unslashed seo_pages path) and the local generator.
|
|
8
8
|
* Both pass their output through here, so on a `trailingSlash: true` site an
|
|
9
9
|
* AI crawler following a link gets the page instead of a 308. The path rule
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @sonordev/site-kit/llms - On-demand Revalidation
|
|
3
3
|
*
|
|
4
|
-
* Provides a route handler that
|
|
4
|
+
* Provides a route handler that Sonor can call when llms-relevant data changes
|
|
5
5
|
* (page summaries, FAQs, services, etc.) to bust the Next.js ISR cache.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
* the site, authenticated with the project key. This handler regenerates those
|
|
7
7
|
* pages, the sitemap and both llms files without a rebuild.
|
|
8
8
|
*
|
|
9
|
-
* Single source of truth for
|
|
10
|
-
* replaced per-site copies
|
|
11
|
-
* (`lib/seo-revalidation.ts`), and agency-site-kit's portfolio
|
|
9
|
+
* Single source of truth for every site's `/api/seo-revalidate` handler. It
|
|
10
|
+
* replaced per-site copies, and agency-site-kit's portfolio
|
|
12
11
|
* `createRevalidateHandler` is built on it (`extraPaths` + `extendPayload`);
|
|
13
12
|
* don't fork it back into a site or package.
|
|
14
13
|
*
|
package/dist/llms/types.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export interface LLMPageSummary {
|
|
|
63
63
|
/** Brief description of page content */
|
|
64
64
|
description?: string;
|
|
65
65
|
/**
|
|
66
|
-
* Public-safe summary for llms.txt link notes (
|
|
66
|
+
* Public-safe summary for llms.txt link notes (Sonor/Signal validated).
|
|
67
67
|
* Prefer this over `description` when building spec-aligned page lists.
|
|
68
68
|
*/
|
|
69
69
|
llms_public_summary?: string | null;
|
|
@@ -90,7 +90,7 @@ export interface GenerateLLMSTxtOptions {
|
|
|
90
90
|
/**
|
|
91
91
|
* Canonical site origin used to absolutize links (e.g. `https://example.com`),
|
|
92
92
|
* matching the sitemap helper's `baseUrl` convention. When omitted, falls back
|
|
93
|
-
* to
|
|
93
|
+
* to Sonor/local `business.website`, then `NEXT_PUBLIC_SITE_URL` / `SITE_URL`.
|
|
94
94
|
* Never derived from request headers, so /llms.txt stays statically
|
|
95
95
|
* prerenderable.
|
|
96
96
|
*/
|
|
@@ -111,7 +111,7 @@ export interface GenerateLLMSTxtOptions {
|
|
|
111
111
|
* generating outside a Next build.
|
|
112
112
|
*/
|
|
113
113
|
trailingSlash?: boolean;
|
|
114
|
-
/** When
|
|
114
|
+
/** When Sonor returns empty services/faq/pages, use this to supply local site data */
|
|
115
115
|
getLocalData?: () => Promise<LLMsDataResponse | null>;
|
|
116
116
|
/** Include business info section */
|
|
117
117
|
includeBusinessInfo?: boolean;
|
|
@@ -162,7 +162,7 @@ export interface GenerateLLMSTxtOptions {
|
|
|
162
162
|
fullLlmsTxtPath?: string;
|
|
163
163
|
/**
|
|
164
164
|
* When true, page list link notes use only validated `llms_public_summary` (no `description` fallback).
|
|
165
|
-
* Use for strict GEO alignment when every listed page must have
|
|
165
|
+
* Use for strict GEO alignment when every listed page must have Sonor-generated public summaries.
|
|
166
166
|
*/
|
|
167
167
|
pageListNotesFromPublicSummaryOnly?: boolean;
|
|
168
168
|
/**
|
|
@@ -172,9 +172,9 @@ export interface GenerateLLMSTxtOptions {
|
|
|
172
172
|
* off in route handlers so they keep their revalidate window.
|
|
173
173
|
*/
|
|
174
174
|
fresh?: boolean;
|
|
175
|
-
/** When set, overrides
|
|
175
|
+
/** When set, overrides Sonor `meta.primary_language` for the llms.txt header blockquote. */
|
|
176
176
|
headerPrimaryLanguage?: string;
|
|
177
|
-
/** When set, overrides
|
|
177
|
+
/** When set, overrides Sonor `meta.llms_disclaimer` for the llms.txt header blockquote. */
|
|
178
178
|
headerDisclaimer?: string;
|
|
179
179
|
/** Maximum number of article links to show per topic cluster (default: 5) */
|
|
180
180
|
maxArticlesPerCluster?: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @sonordev/site-kit/llms - Build-Time Write
|
|
3
3
|
*
|
|
4
|
-
* Fetches AI-optimized llms.txt from
|
|
4
|
+
* Fetches AI-optimized llms.txt from Sonor API and writes to public/llms.txt
|
|
5
5
|
* at build time. Integrates with sitemap flow when optimizedLLMsTxt is enabled.
|
|
6
6
|
*/
|
|
7
7
|
import type { PublicationRoutingOptions } from '../articles/routes';
|
|
@@ -16,14 +16,14 @@ export interface WriteLLMsTxtOptions {
|
|
|
16
16
|
outputDir?: string;
|
|
17
17
|
/** Write llms-full.txt as well */
|
|
18
18
|
full?: boolean;
|
|
19
|
-
/**
|
|
19
|
+
/** Sonor API URL */
|
|
20
20
|
apiUrl?: string;
|
|
21
|
-
/**
|
|
21
|
+
/** Sonor API key */
|
|
22
22
|
apiKey?: string;
|
|
23
23
|
/** Fallback to non-optimized when API fails */
|
|
24
24
|
fallbackToLocal?: boolean;
|
|
25
25
|
/**
|
|
26
|
-
* Sub-site host this build belongs to (e.g. `
|
|
26
|
+
* Sub-site host this build belongs to (e.g. `charlotte.example.com`). Scopes the
|
|
27
27
|
* page index to THIS domain: one Sonor project can host many domains, and
|
|
28
28
|
* seo_pages then holds one row PER HOST for shared paths like `/` and
|
|
29
29
|
* `/terms`. Without it the API resolves an arbitrary sibling's row, so each
|
|
@@ -38,21 +38,21 @@ export interface WriteLLMsTxtOptions {
|
|
|
38
38
|
publication?: PublicationRoutingOptions;
|
|
39
39
|
/**
|
|
40
40
|
* Match Next's `trailingSlash` in the written files' links to this site.
|
|
41
|
-
*
|
|
41
|
+
* Sonor builds its links from unslashed paths, so on a `trailingSlash: true`
|
|
42
42
|
* site they're rewritten here before the write. createSitemap passes its
|
|
43
43
|
* resolved value. The default reads next.config through Next's bundle,
|
|
44
44
|
* which a plain-Node postbuild script doesn't have, so pass it explicitly
|
|
45
45
|
* there.
|
|
46
46
|
*/
|
|
47
47
|
trailingSlash?: boolean;
|
|
48
|
-
/** When
|
|
48
|
+
/** When Sonor returns empty services/faq/pages, use this to supply local site data */
|
|
49
49
|
getLocalData?: () => Promise<LLMsDataResponse | null>;
|
|
50
50
|
/** Forward to GET /api/public/llms/txt and align local fallback with site-kit strict page notes */
|
|
51
51
|
publicSummaryOnly?: boolean;
|
|
52
52
|
/**
|
|
53
53
|
* Site-authored sections appended to llms-full.txt (never llms.txt — that
|
|
54
54
|
* file stays a compact index). Applied on BOTH content paths: appended to
|
|
55
|
-
*
|
|
55
|
+
* Sonor-optimized markdown, and forwarded to the local generator's
|
|
56
56
|
* customSections on fallback. A function form is resolved at write time so
|
|
57
57
|
* sites can build sections from local data (e.g. a verified citation
|
|
58
58
|
* registry → a "Sourced facts" section via formatSourcedFactsSection).
|
|
@@ -64,17 +64,17 @@ export interface WriteLLMsTxtOptions {
|
|
|
64
64
|
* The "Agent access" section (the site's MCP endpoint and server card), on
|
|
65
65
|
* both files and both content paths. Default: on only for site-kit's
|
|
66
66
|
* built-in MCP server (what `npx sonor-setup mcp` writes). A site that runs
|
|
67
|
-
* its own MCP server
|
|
67
|
+
* its own MCP server gets nothing unless it passes `true`, and
|
|
68
68
|
* the section is never added to markdown that already names a server card.
|
|
69
69
|
* `false` leaves it out everywhere.
|
|
70
70
|
*/
|
|
71
71
|
mcp?: boolean | AgentAccessOptions;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Fetch optimized llms.txt from
|
|
74
|
+
* Fetch optimized llms.txt from Sonor and write to public/llms.txt
|
|
75
75
|
* Called at build time after sitemap sync (when optimizedLLMsTxt is enabled)
|
|
76
76
|
*
|
|
77
|
-
* Never persists a failure stub: when neither the
|
|
77
|
+
* Never persists a failure stub: when neither the Sonor API nor local data
|
|
78
78
|
* yields real content, the write is skipped entirely so a previously
|
|
79
79
|
* generated (or committed) file keeps serving.
|
|
80
80
|
*/
|
package/dist/manifest/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @sonordev/site-kit/manifest
|
|
3
3
|
*
|
|
4
4
|
* PWA manifest generator. Fetches project name, description, brand colors,
|
|
5
|
-
* and logo from
|
|
5
|
+
* and logo from Sonor to generate a compliant Web App Manifest.
|
|
6
6
|
*
|
|
7
7
|
* @example
|
|
8
8
|
* ```ts
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
23
|
export interface ManifestConfig {
|
|
24
|
-
/** App name. Defaults to
|
|
24
|
+
/** App name. Defaults to Sonor project name. */
|
|
25
25
|
name?: string;
|
|
26
26
|
/** Short name for home screen. Defaults to first word of name. */
|
|
27
27
|
shortName?: string;
|
|
28
|
-
/** App description. Defaults to
|
|
28
|
+
/** App description. Defaults to Sonor project description. */
|
|
29
29
|
description?: string;
|
|
30
|
-
/** Theme color for browser chrome. Defaults to
|
|
30
|
+
/** Theme color for browser chrome. Defaults to Sonor brand color or #4bbf39. */
|
|
31
31
|
themeColor?: string;
|
|
32
32
|
/** Background color for splash screen. Default: '#ffffff' */
|
|
33
33
|
backgroundColor?: string;
|
|
@@ -41,20 +41,20 @@ export interface ManifestConfig {
|
|
|
41
41
|
scope?: string;
|
|
42
42
|
/** App categories */
|
|
43
43
|
categories?: string[];
|
|
44
|
-
/** Custom icons. If not provided, derived from
|
|
44
|
+
/** Custom icons. If not provided, derived from the project logo in Sonor. */
|
|
45
45
|
icons?: Array<{
|
|
46
46
|
src: string;
|
|
47
47
|
sizes: string;
|
|
48
48
|
type: string;
|
|
49
49
|
purpose?: string;
|
|
50
50
|
}>;
|
|
51
|
-
/**
|
|
51
|
+
/** Sonor API key. Defaults from env. */
|
|
52
52
|
apiKey?: string;
|
|
53
|
-
/**
|
|
53
|
+
/** Sonor API URL. Defaults from env. */
|
|
54
54
|
apiUrl?: string;
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* Create a route handler that serves the PWA manifest.
|
|
58
|
-
* Fetches project data from
|
|
58
|
+
* Fetches project data from Sonor and merges with config overrides.
|
|
59
59
|
*/
|
|
60
60
|
export declare function createManifest(config?: ManifestConfig): () => Promise<Response>;
|
package/dist/maps/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { monotonicMs } from '../chunk-MH2DSGC6.js';
|
|
3
|
-
import { sonorFetch } from '../chunk-
|
|
4
|
-
import '../chunk-
|
|
5
|
-
import '../chunk-
|
|
3
|
+
import { sonorFetch } from '../chunk-D6ZC7XKZ.js';
|
|
4
|
+
import '../chunk-K4ZHAURD.js';
|
|
5
|
+
import '../chunk-F24FNCTK.js';
|
|
6
6
|
import '../chunk-PKBMQBKP.js';
|
|
7
7
|
import { useState, useCallback, useEffect } from 'react';
|
|
8
8
|
import { APIProvider, Map as Map$1, AdvancedMarker, Pin, InfoWindow } from '@vis.gl/react-google-maps';
|
|
@@ -47,7 +47,7 @@ export interface WebMcpToolsProps {
|
|
|
47
47
|
*
|
|
48
48
|
* Renders nothing. Mount it as a CHILDLESS sibling in the layout — never as a
|
|
49
49
|
* wrapper around `{children}`, which would de-opt the whole route to client
|
|
50
|
-
* rendering
|
|
50
|
+
* rendering.
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* ```tsx
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MCP_SUPPORTED_PROTOCOL_VERSIONS, dispatch, errorOutcome, JSONRPC_INVALID_REQUEST, META_CLIENT_INFO, JSONRPC_PARSE_ERROR, MCP_PROTOCOL_VERSION_MODERN } from '../chunk-FYAB6CXS.js';
|
|
2
2
|
export { JSONRPC_METHOD_NOT_FOUND, MCP_ERROR_HEADER_MISMATCH, MCP_ERROR_UNSUPPORTED_PROTOCOL_VERSION, MCP_PROTOCOL_VERSIONS_LEGACY, MCP_PROTOCOL_VERSION_MODERN, MCP_SUPPORTED_PROTOCOL_VERSIONS, META_CLIENT_INFO, META_PROTOCOL_VERSION, META_SERVER_INFO, dispatch, isSupportedVersion, toToolDescriptor, toToolResult, toolErrorResult, validateArgs } from '../chunk-FYAB6CXS.js';
|
|
3
|
+
export { declarativeToolField, declarativeToolForm } from '../chunk-HW7B43E5.js';
|
|
3
4
|
import '../chunk-PKBMQBKP.js';
|
|
4
5
|
|
|
5
6
|
// src/mcp/types.ts
|
|
@@ -273,17 +274,4 @@ function createMcpServerCardHandler(options) {
|
|
|
273
274
|
};
|
|
274
275
|
}
|
|
275
276
|
|
|
276
|
-
|
|
277
|
-
function declarativeToolForm(options) {
|
|
278
|
-
const attributes = {
|
|
279
|
-
toolname: options.name,
|
|
280
|
-
tooldescription: options.description
|
|
281
|
-
};
|
|
282
|
-
if (options.autoSubmit) attributes.toolautosubmit = "";
|
|
283
|
-
return attributes;
|
|
284
|
-
}
|
|
285
|
-
function declarativeToolField(description) {
|
|
286
|
-
return { toolparamdescription: description };
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
export { MCP_SERVER_CARD_LEGACY_PATH, MCP_SERVER_CARD_PATH, MCP_SERVER_CARD_SCHEMA, SITE_KIT_CARD_META_KEY, WEBMCP_SURFACE_HEADER, buildMcpServerCard, createMcpHandler, createMcpServerCardHandler, declarativeToolField, declarativeToolForm, decodeHeaderValue, defineMcpTool, toolCallRecord, validateMcpServerCard };
|
|
277
|
+
export { MCP_SERVER_CARD_LEGACY_PATH, MCP_SERVER_CARD_PATH, MCP_SERVER_CARD_SCHEMA, SITE_KIT_CARD_META_KEY, WEBMCP_SURFACE_HEADER, buildMcpServerCard, createMcpHandler, createMcpServerCardHandler, decodeHeaderValue, defineMcpTool, toolCallRecord, validateMcpServerCard };
|
package/dist/mcp/report.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Sends each MCP tool call to Sonor, so the dashboard can say which agents
|
|
3
|
-
* used a site, which tools, and whether they worked (
|
|
4
|
-
*
|
|
3
|
+
* used a site, which tools, and whether they worked (every agent gets a
|
|
4
|
+
* badge: the record carries the agent's own name).
|
|
5
5
|
*
|
|
6
6
|
* Fire-and-forget, after the response: Next's `after()` keeps a serverless
|
|
7
7
|
* function alive for it without the agent waiting. It carries no person's
|
package/dist/mcp/serverCard.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export interface McpServerCard {
|
|
|
57
57
|
}
|
|
58
58
|
export interface BuildMcpServerCardOptions {
|
|
59
59
|
info: McpServerInfo;
|
|
60
|
-
/** Absolute site origin, e.g. `https://
|
|
60
|
+
/** Absolute site origin, e.g. `https://example.com` (no trailing slash). */
|
|
61
61
|
baseUrl: string;
|
|
62
62
|
/** Path of the MCP endpoint on this origin (default `/api/mcp`). */
|
|
63
63
|
mcpPath?: string;
|
package/dist/mcp/sonor.d.ts
CHANGED
|
@@ -23,8 +23,7 @@
|
|
|
23
23
|
* send_inquiry goes through Sonor's agent-inquiry door, not the browser form
|
|
24
24
|
* endpoint: the form must opt in (embed_config.agent_inquiries in Sonor), the
|
|
25
25
|
* call carries the agent's badge (`agent_identity`) and `human_approved`, and
|
|
26
|
-
* the row lands in Forms as an agent inquiry.
|
|
27
|
-
* src/modules/forms/agent-inquiry.ts.
|
|
26
|
+
* the row lands in Forms as an agent inquiry.
|
|
28
27
|
*
|
|
29
28
|
* @example
|
|
30
29
|
* ```ts
|
|
@@ -33,7 +32,7 @@
|
|
|
33
32
|
* import { sonorMcpServer, reportToolCallsToSonor } from '@sonordev/site-kit/mcp/sonor'
|
|
34
33
|
*
|
|
35
34
|
* export const { POST, GET, DELETE, OPTIONS } = createMcpHandler({
|
|
36
|
-
* server: sonorMcpServer({ businessName: '
|
|
35
|
+
* server: sonorMcpServer({ businessName: 'Example Law', inquiry: { form: 'contact' } }),
|
|
37
36
|
* baseUrl: process.env.NEXT_PUBLIC_SITE_URL,
|
|
38
37
|
* onToolCall: reportToolCallsToSonor(),
|
|
39
38
|
* })
|
|
@@ -46,7 +45,7 @@ export { reportToolCallsToSonor } from './report';
|
|
|
46
45
|
export type { ReportToolCallsOptions } from './report';
|
|
47
46
|
export type SonorMcpToolName = 'get_business_profile' | 'list_services' | 'search_faq' | 'find_pages' | 'list_articles' | 'get_article' | 'get_reviews' | 'list_offerings' | 'check_availability' | 'get_inquiry_form' | 'send_inquiry';
|
|
48
47
|
export interface SonorMcpOptions {
|
|
49
|
-
/** The business, as tool descriptions name it ("…at
|
|
48
|
+
/** The business, as tool descriptions name it ("…at Example Law"). */
|
|
50
49
|
businessName: string;
|
|
51
50
|
/** Absolute site origin for links. Default: NEXT_PUBLIC_SITE_URL. */
|
|
52
51
|
siteUrl?: string;
|
|
@@ -83,11 +82,11 @@ export interface SonorMcpOptions {
|
|
|
83
82
|
* a hit in the primary field twice. No query keeps the given order.
|
|
84
83
|
*/
|
|
85
84
|
export declare function rankByQuery<T>(items: T[], query: string, fields: (item: T) => [primary: string, secondary: string], limit: number): T[];
|
|
86
|
-
/** `<host> MCP <tool> via <assistant>`: the badge an agent's write carries
|
|
85
|
+
/** `<host> MCP <tool> via <assistant>`: the badge an agent's write carries. */
|
|
87
86
|
export declare function formatAgentIdentity(host: string, tool: string, assistant: string): string;
|
|
88
87
|
/** The built-in tools for this site, in the order agents should reach for them. */
|
|
89
88
|
export declare function sonorMcpTools(options: SonorMcpOptions): SiteKitMcpTool[];
|
|
90
|
-
/** `
|
|
89
|
+
/** `examplelaw.com` → `com.examplelaw/site`, the reverse-DNS server name SEP-2127 asks for. */
|
|
91
90
|
export declare function serverNameForHost(host: string): string;
|
|
92
91
|
export interface SonorMcpServerOptions extends SonorMcpOptions {
|
|
93
92
|
/** Override any of the server card's fields. */
|
package/dist/mcp/sonor.js
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
1
|
import { toolErrorResult } from '../chunk-FYAB6CXS.js';
|
|
2
2
|
import { fetchReviews, fetchReviewStats } from '../chunk-EDYHROQ7.js';
|
|
3
3
|
import { getOfferings } from '../chunk-G3NHWMP5.js';
|
|
4
|
-
import { fetchBookingTypes, fetchAvailability } from '../chunk-
|
|
5
|
-
import { getLLMsData, getServices, getFAQItems, getPageSummaries } from '../chunk-
|
|
6
|
-
import { getFormConfig } from '../chunk-
|
|
7
|
-
import '../chunk-
|
|
4
|
+
import { fetchBookingTypes, fetchAvailability } from '../chunk-BKY2ZNM7.js';
|
|
5
|
+
import { getLLMsData, getServices, getFAQItems, getPageSummaries } from '../chunk-6U3VLV2C.js';
|
|
6
|
+
import { getFormConfig } from '../chunk-5V2V5C3Y.js';
|
|
7
|
+
import '../chunk-OWZ7ATLZ.js';
|
|
8
8
|
import '../chunk-YC7ELZS3.js';
|
|
9
|
-
import '../chunk-
|
|
9
|
+
import '../chunk-ZTLMPUO6.js';
|
|
10
10
|
import '../chunk-DXO6SBMD.js';
|
|
11
|
-
import '../chunk-
|
|
12
|
-
import { getAllArticles, getArticle } from '../chunk-
|
|
11
|
+
import '../chunk-4NTBQNHA.js';
|
|
12
|
+
import { getAllArticles, getArticle } from '../chunk-PKGN32AU.js';
|
|
13
13
|
import '../chunk-Y3INC4QJ.js';
|
|
14
14
|
import '../chunk-QXMIKDOL.js';
|
|
15
15
|
import '../chunk-WMVK77ND.js';
|
|
16
16
|
import { resolveFetch } from '../chunk-VX5CMNMM.js';
|
|
17
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-NZ4RXN3G.js';
|
|
18
|
+
import '../chunk-VWWITFWM.js';
|
|
18
19
|
import '../chunk-MJP63SSS.js';
|
|
19
20
|
import { resolveServerApiConfig } from '../chunk-X6F6SO4S.js';
|
|
20
21
|
import '../chunk-MH2DSGC6.js';
|
|
21
22
|
import { resolveSiteHost } from '../chunk-FESKKJAS.js';
|
|
22
23
|
import '../chunk-A4CC4ZG3.js';
|
|
24
|
+
import '../chunk-C2FZBUSS.js';
|
|
23
25
|
import '../chunk-5SQK3D53.js';
|
|
26
|
+
import '../chunk-HW7B43E5.js';
|
|
24
27
|
import '../chunk-NJCTQH2P.js';
|
|
25
|
-
import '../chunk-
|
|
26
|
-
import '../chunk-
|
|
27
|
-
import { SITE_KIT_VERSION } from '../chunk-
|
|
28
|
+
import '../chunk-D6ZC7XKZ.js';
|
|
29
|
+
import '../chunk-K4ZHAURD.js';
|
|
30
|
+
import { SITE_KIT_VERSION } from '../chunk-F24FNCTK.js';
|
|
28
31
|
import '../chunk-PKBMQBKP.js';
|
|
29
32
|
import 'server-only';
|
|
30
33
|
import { after } from 'next/server.js';
|
package/dist/mcp/transport.d.ts
CHANGED
|
@@ -19,8 +19,7 @@
|
|
|
19
19
|
* answered by the same immutable deploy that received it, and the base URL
|
|
20
20
|
* comes from the platform (`context`), never from a client header.
|
|
21
21
|
*
|
|
22
|
-
* Single source of truth for the relay. It replaced per-site copies
|
|
23
|
-
* upforge-nextjs and wirsch-law-nextjs (`lib/mcp/transport-auth.ts`, the
|
|
22
|
+
* Single source of truth for the relay. It replaced per-site copies (the
|
|
24
23
|
* `protect()` wrapper, the `/api/mcp-internal` relay and the function body);
|
|
25
24
|
* don't fork it back into a site.
|
|
26
25
|
*
|
package/dist/mcp/types.d.ts
CHANGED
|
@@ -10,8 +10,7 @@
|
|
|
10
10
|
* Keeping the definition in one shape is the whole point: the tool an agent
|
|
11
11
|
* finds by crawling `/.well-known/mcp.json` and the tool it finds by driving a
|
|
12
12
|
* browser to the page are the same tool, with the same schema and the same
|
|
13
|
-
* handler. Two definitions would drift
|
|
14
|
-
* drifted (see the root CLAUDE.md "Consolidate Duplicated Logic" note).
|
|
13
|
+
* handler. Two definitions would drift.
|
|
15
14
|
*/
|
|
16
15
|
/** A JSON Schema node. Deliberately loose — MCP passes these through verbatim. */
|
|
17
16
|
export interface JsonSchemaNode {
|
|
@@ -84,7 +83,7 @@ export interface McpToolAnnotations {
|
|
|
84
83
|
export interface McpToolContext {
|
|
85
84
|
/** Where the call came in from: the remote endpoint or the in-page API. */
|
|
86
85
|
surface: 'http' | 'webmcp';
|
|
87
|
-
/** Absolute site origin, e.g. `https://
|
|
86
|
+
/** Absolute site origin, e.g. `https://example.com`. */
|
|
88
87
|
baseUrl?: string;
|
|
89
88
|
/** The originating Request, when the call arrived over HTTP. */
|
|
90
89
|
request?: Request;
|
|
@@ -95,7 +94,7 @@ export interface McpToolContext {
|
|
|
95
94
|
}
|
|
96
95
|
/**
|
|
97
96
|
* One tool call, as the endpoint saw it: the record an agent leaves
|
|
98
|
-
* (
|
|
97
|
+
* (every agent gets a badge). `createMcpHandler`'s `onToolCall`
|
|
99
98
|
* receives it; `reportToolCallsToSonor` sends it to Sonor, which is how the
|
|
100
99
|
* dashboard knows which agents used a site and what for.
|
|
101
100
|
*/
|
|
@@ -153,7 +152,7 @@ export declare function defineMcpTool<Args = Record<string, unknown>>(tool: Site
|
|
|
153
152
|
export interface McpServerInfo {
|
|
154
153
|
/**
|
|
155
154
|
* Reverse-DNS name with exactly one forward slash, per SEP-2127:
|
|
156
|
-
* `io.
|
|
155
|
+
* `io.example/site`. The part before the slash is a namespace you control.
|
|
157
156
|
*/
|
|
158
157
|
name: string;
|
|
159
158
|
/** Semver. No ranges. */
|
package/dist/motion/engine.d.ts
CHANGED
|
@@ -19,9 +19,8 @@
|
|
|
19
19
|
* - Nothing here touches the DOM at import time, so it is safe in any module
|
|
20
20
|
* graph a server component reaches; scenes register from effects.
|
|
21
21
|
*
|
|
22
|
-
* Zero dependencies, ~2KB. Extracted from the
|
|
23
|
-
*
|
|
24
|
-
* full playbook for building scenes on top of it.
|
|
22
|
+
* Zero dependencies, ~2KB. Extracted from the engine behind
|
|
23
|
+
* upforgelabs.com.
|
|
25
24
|
*/
|
|
26
25
|
export type SceneMode = 'pin' | 'view';
|
|
27
26
|
/**
|
|
@@ -9,8 +9,7 @@
|
|
|
9
9
|
* arms, we assume nobody is going to and show the content. Real visitors
|
|
10
10
|
* scroll well inside the window, so animations are unaffected.
|
|
11
11
|
*
|
|
12
|
-
* Single source of truth for every reveal system in the kit.
|
|
13
|
-
* upforge.io's lib/reveal-failsafe.
|
|
12
|
+
* Single source of truth for every reveal system in the kit.
|
|
14
13
|
*/
|
|
15
14
|
/**
|
|
16
15
|
* Run `fn` after `ms` milliseconds unless the visitor scrolls first.
|
package/dist/motion/gsap.d.ts
CHANGED
|
@@ -88,8 +88,8 @@ export interface UseGsapOptions {
|
|
|
88
88
|
* `plugins`, so setup can stay synchronous. That matters: gsap.context
|
|
89
89
|
* only records what runs synchronously inside it, so a plugin imported
|
|
90
90
|
* from within setup did its work outside the context, unscoped and never
|
|
91
|
-
* reverted on unmount (
|
|
92
|
-
*
|
|
91
|
+
* reverted on unmount (a split-text heading had to build a second context
|
|
92
|
+
* of its own to clean up).
|
|
93
93
|
*/
|
|
94
94
|
plugins?: GsapPluginLoaders;
|
|
95
95
|
}
|
package/dist/motion/three.d.ts
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* server-rendered still. Mobile gets composed stills by design.
|
|
27
27
|
* - Byte budget: ≤5MB of models/textures per scene, fetched on approach.
|
|
28
28
|
*
|
|
29
|
-
* upforgelabs.com is the reference build
|
|
29
|
+
* upforgelabs.com is the reference build.
|
|
30
30
|
*/
|
|
31
31
|
import { type RefObject } from 'react';
|
|
32
32
|
import { PerspectiveCamera, Scene, WebGLRenderer, type Object3D, type Texture } from 'three';
|
package/dist/og/config.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* @sonordev/site-kit/og — OG card config contract.
|
|
3
3
|
*
|
|
4
4
|
* THE SITE OWNS THE THEME. Sonor stores one brand_primary/secondary per
|
|
5
|
-
* project; real sites have full palettes (
|
|
6
|
-
*
|
|
5
|
+
* project; real sites have full palettes (red, ink, cream, scrim: four
|
|
6
|
+
* tokens where Sonor stores two). So the card's colors, fonts, and
|
|
7
7
|
* layout come from a repo-owned og.config.ts, typically importing the same
|
|
8
8
|
* constants the site itself uses. Sonor brand data is only the zero-config
|
|
9
9
|
* seed used by `sonor-setup og` when no og.config.ts exists.
|
|
@@ -61,7 +61,7 @@ export interface OgContent {
|
|
|
61
61
|
subtitle?: string;
|
|
62
62
|
/** Handwritten-style accent line (rendered in the last configured font). */
|
|
63
63
|
hand?: string;
|
|
64
|
-
/** Bottom bar segments, e.g. ['
|
|
64
|
+
/** Bottom bar segments, e.g. ['Free estimate', 'example.com']. */
|
|
65
65
|
bar?: string[];
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
@@ -82,7 +82,7 @@ export interface OgCardConfig {
|
|
|
82
82
|
logo?: string;
|
|
83
83
|
background?: OgBackground;
|
|
84
84
|
/**
|
|
85
|
-
* 'plate-left': logo plate left, copy right
|
|
85
|
+
* 'plate-left': logo plate left, copy right.
|
|
86
86
|
* 'centered': stacked, logo above title.
|
|
87
87
|
* 'banner': no plate, full-bleed copy.
|
|
88
88
|
* 'split': copy left, content photo right — for cards that show the page's
|
package/dist/og/contrast.d.ts
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
* build-time template (template.ts) and the runtime card (route.tsx). The two
|
|
6
6
|
* disagreed: the template set the bar in `theme.surface`, the runtime card in
|
|
7
7
|
* `theme.text`, and on a site whose text and accent are both strong colors the
|
|
8
|
-
* runtime bar came out unreadable (navy on crimson on
|
|
9
|
-
*
|
|
8
|
+
* runtime bar came out unreadable (navy on crimson, ink on green), and sites
|
|
9
|
+
* dropped the bar rather than ship it.
|
|
10
10
|
*
|
|
11
11
|
* `theme.barText` always wins. Otherwise the first candidate that reaches
|
|
12
12
|
* WCAG AA for large text against the accent is used, in the order the
|
package/dist/og/pages.d.ts
CHANGED
|
@@ -43,10 +43,10 @@ export declare const DYNAMIC = "*";
|
|
|
43
43
|
* not — the logo, the photo and the bar are already saying whose it is, and
|
|
44
44
|
* every character spent on the brand is one not spent on the page.
|
|
45
45
|
*
|
|
46
|
-
* Also drops the two broken suffixes managed titles turn up with,
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
46
|
+
* Also drops the two broken suffixes managed titles turn up with, each once
|
|
47
|
+
* worked around by hand in a site's `cards`: a dangling separator with no
|
|
48
|
+
* brand after it ("About Us |"), and the domain after a comma ("Privacy
|
|
49
|
+
* Policy, example.com").
|
|
50
50
|
*/
|
|
51
51
|
export declare function stripBrandSuffix(title: string, brand?: string): string;
|
|
52
52
|
/**
|
|
@@ -98,7 +98,7 @@ export declare function slugForPath(path: string): string;
|
|
|
98
98
|
export declare function unmatchedCardKeys(cards: Record<string, unknown> | undefined, paths: string[]): string[];
|
|
99
99
|
/**
|
|
100
100
|
* Does a concrete URL fall under a dynamic route pattern? One `*` matches
|
|
101
|
-
* exactly one segment: `/properties/
|
|
101
|
+
* exactly one segment: `/properties/maple-court/about` is under
|
|
102
102
|
* `/properties/*` + `/about`, and `/floor-plans/1-bedroom` under
|
|
103
103
|
* `/floor-plans/*`. A key that is itself a pattern matches nothing.
|
|
104
104
|
*/
|
package/dist/og/route-fit.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Satori, which has no DOM to measure, so its title sat at a fixed 84px,
|
|
7
7
|
* uppercase, with no fitting. Beside the 430px photo that holds about 11
|
|
8
8
|
* characters a line, so a real post title ran off the bottom of the card.
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* Sites worked around it by dropping the photo past a hand-picked length
|
|
10
|
+
* (40 or 50 characters).
|
|
11
11
|
*
|
|
12
12
|
* This does what the build-time fitter does, from an estimate instead of a
|
|
13
13
|
* measurement: the same size range (TITLE_MAX_PX down to TITLE_MIN_PX, in 2px
|
package/dist/og/route.d.ts
CHANGED
|
@@ -42,8 +42,7 @@
|
|
|
42
42
|
* Next doesn't wire it into metadata; the page declares it.
|
|
43
43
|
*
|
|
44
44
|
* Sites needed an adapter between the two before `createOgImage` existed
|
|
45
|
-
* (
|
|
46
|
-
* built a dummy Request to call the GET handler).
|
|
45
|
+
* (a default export that built a dummy Request to call the GET handler).
|
|
47
46
|
*
|
|
48
47
|
* SATORI CONSTRAINTS (why this is not the static template): flexbox-only CSS
|
|
49
48
|
* subset, no external stylesheets, images must be absolute URLs or data URIs,
|
package/dist/og/template.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* OG card HTML template builder.
|
|
3
3
|
*
|
|
4
4
|
* Turns an OgCardConfig into a self-contained 1200x630 HTML document rendered
|
|
5
|
-
* by headless Chrome. Layout rules baked in from
|
|
5
|
+
* by headless Chrome. Layout rules baked in from real cards:
|
|
6
6
|
* - content held inside the middle ~80% (platforms crop toward 2:1 and the
|
|
7
7
|
* bottom bar is the first casualty)
|
|
8
8
|
* - script/hand faces never below 40px — under that they turn to mush at
|
package/dist/proxy/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Also served on the deprecated `/middleware` subpath. Handles:
|
|
6
6
|
* - Security headers (CSP frame-ancestors, nosniff, referrer/permissions
|
|
7
7
|
* policy — deliberately NO X-Frame-Options; see securityHeaders.ts)
|
|
8
|
-
* -
|
|
8
|
+
* - Sonor-managed redirects (rule list cached in memory, see the
|
|
9
9
|
* `redirects` option below)
|
|
10
10
|
* - Optional before/after hooks for custom logic
|
|
11
11
|
*
|
|
@@ -70,7 +70,7 @@ export interface LlmsDiscoveryConfig {
|
|
|
70
70
|
}
|
|
71
71
|
export interface SiteKitProxyConfig {
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Sonor-managed redirects, checked before each page render. Default: true,
|
|
74
74
|
* and the recommended setting.
|
|
75
75
|
*
|
|
76
76
|
* The rule list is cached in memory for `cacheSeconds` (default 300) per
|