@treeseed/core 0.1.2
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/README.md +145 -0
- package/dist/agents/index.js +5 -0
- package/dist/agents/registry-helper.js +14 -0
- package/dist/agents/registry.js +88 -0
- package/dist/components/DevWatchReload.astro +45 -0
- package/dist/components/SiteTitle.astro +51 -0
- package/dist/components/content/ContentStatusLegend.astro +18 -0
- package/dist/components/content/StatusBadge.astro +11 -0
- package/dist/components/docs/BookFontControls.astro +180 -0
- package/dist/components/docs/DesktopSidebarToggle.astro +88 -0
- package/dist/components/docs/DownloadBook.astro +34 -0
- package/dist/components/docs/Footer.astro +196 -0
- package/dist/components/docs/Header.astro +150 -0
- package/dist/components/docs/PageFrame.astro +260 -0
- package/dist/components/docs/PageSidebar.astro +63 -0
- package/dist/components/docs/PageTitle.astro +39 -0
- package/dist/components/docs/Sidebar.astro +41 -0
- package/dist/components/docs/ThemeSelect.astro +3 -0
- package/dist/components/forms/ContactForm.astro +234 -0
- package/dist/components/forms/FooterSubscribeForm.astro +189 -0
- package/dist/components/site/BookList.astro +27 -0
- package/dist/components/site/CTASection.astro +24 -0
- package/dist/components/site/ChronicleList.astro +33 -0
- package/dist/components/site/Hero.astro +18 -0
- package/dist/components/site/NotesList.astro +18 -0
- package/dist/components/site/PathCard.astro +16 -0
- package/dist/components/site/ProfileList.astro +30 -0
- package/dist/components/site/SectionIntro.astro +9 -0
- package/dist/components/site/StageBanner.astro +8 -0
- package/dist/components/site/TrustCallout.astro +9 -0
- package/dist/components/starlight.js +6 -0
- package/dist/config.js +8 -0
- package/dist/content-config.js +9 -0
- package/dist/content.js +230 -0
- package/dist/contracts.d.ts +130 -0
- package/dist/contracts.js +0 -0
- package/dist/deploy/config.d.ts +4 -0
- package/dist/deploy/config.js +154 -0
- package/dist/deploy/runtime.js +77 -0
- package/dist/env.yaml +322 -0
- package/dist/environment.d.ts +130 -0
- package/dist/environment.js +324 -0
- package/dist/index.js +81 -0
- package/dist/layouts/AuthoredEntryLayout.astro +87 -0
- package/dist/layouts/BookLayout.astro +35 -0
- package/dist/layouts/BridgeLayout.astro +11 -0
- package/dist/layouts/ContentLayout.astro +24 -0
- package/dist/layouts/MainLayout.astro +203 -0
- package/dist/layouts/NoteLayout.astro +26 -0
- package/dist/layouts/ProfileLayout.astro +81 -0
- package/dist/middleware/starlightRouteData.js +45 -0
- package/dist/pages/404.astro +29 -0
- package/dist/pages/[slug].astro +30 -0
- package/dist/pages/agents/[slug].astro +29 -0
- package/dist/pages/agents/index.astro +27 -0
- package/dist/pages/api/form/submit.js +14 -0
- package/dist/pages/books/[slug].astro +19 -0
- package/dist/pages/books/index.astro +28 -0
- package/dist/pages/contact.astro +27 -0
- package/dist/pages/feed.xml.js +34 -0
- package/dist/pages/index.astro +290 -0
- package/dist/pages/notes/[slug].astro +19 -0
- package/dist/pages/notes/index.astro +21 -0
- package/dist/pages/objectives/[slug].astro +31 -0
- package/dist/pages/objectives/index.astro +30 -0
- package/dist/pages/people/[slug].astro +29 -0
- package/dist/pages/people/index.astro +28 -0
- package/dist/pages/questions/[slug].astro +31 -0
- package/dist/pages/questions/index.astro +30 -0
- package/dist/plugin-default.js +4 -0
- package/dist/plugins/builtin/default-plugin.d.ts +21 -0
- package/dist/plugins/builtin/default-plugin.js +32 -0
- package/dist/plugins/constants.d.ts +21 -0
- package/dist/plugins/constants.js +28 -0
- package/dist/plugins/plugin.d.ts +42 -0
- package/dist/plugins/plugin.js +6 -0
- package/dist/plugins/runtime.d.ts +31 -0
- package/dist/plugins/runtime.js +120 -0
- package/dist/scripts/aggregate-book.js +112 -0
- package/dist/scripts/assert-release-tag-version.js +21 -0
- package/dist/scripts/build-dist.js +384 -0
- package/dist/scripts/build-tenant-worker.js +36 -0
- package/dist/scripts/package-tools.js +88 -0
- package/dist/scripts/patch-starlight-content-path.js +172 -0
- package/dist/scripts/paths.js +11 -0
- package/dist/scripts/publish-package.js +20 -0
- package/dist/scripts/release-verify.js +52 -0
- package/dist/scripts/run-fixture-astro-command.js +21 -0
- package/dist/scripts/tenant-astro-command.js +3 -0
- package/dist/scripts/tenant-build.js +16 -0
- package/dist/scripts/tenant-check.js +7 -0
- package/dist/scripts/test-smoke.js +105 -0
- package/dist/server.js +53 -0
- package/dist/site-resources.d.ts +29 -0
- package/dist/site-resources.js +127 -0
- package/dist/site.js +313 -0
- package/dist/styles/global.css +683 -0
- package/dist/styles/prose.css +89 -0
- package/dist/styles/tokens.css +24 -0
- package/dist/tenant/bridge.js +5 -0
- package/dist/tenant/config.d.ts +9 -0
- package/dist/tenant/config.js +124 -0
- package/dist/tenant/runtime-config.js +20 -0
- package/dist/tsconfigs/strict.json +3 -0
- package/dist/types/agents.d.ts +1 -0
- package/dist/types/agents.js +1 -0
- package/dist/types/astro-build.d.js +0 -0
- package/dist/types/cloudflare-sockets.d.js +0 -0
- package/dist/types/cloudflare.d.ts +1 -0
- package/dist/types/cloudflare.js +1 -0
- package/dist/types/forms.js +4 -0
- package/dist/utils/agents/adapters/execution.js +90 -0
- package/dist/utils/agents/adapters/mutations.js +30 -0
- package/dist/utils/agents/adapters/notification.js +16 -0
- package/dist/utils/agents/adapters/repository.js +61 -0
- package/dist/utils/agents/adapters/research.js +25 -0
- package/dist/utils/agents/adapters/verification.js +62 -0
- package/dist/utils/agents/cli-tools.js +5 -0
- package/dist/utils/agents/contracts/messages.d.ts +88 -0
- package/dist/utils/agents/contracts/messages.js +138 -0
- package/dist/utils/agents/contracts/run.d.ts +20 -0
- package/dist/utils/agents/contracts/run.js +0 -0
- package/dist/utils/agents/runtime-types.d.ts +117 -0
- package/dist/utils/agents/runtime-types.js +4 -0
- package/dist/utils/books-data.js +82 -0
- package/dist/utils/content-status.js +38 -0
- package/dist/utils/forms/config.js +87 -0
- package/dist/utils/forms/constants.js +27 -0
- package/dist/utils/forms/contact-submissions-local.js +19 -0
- package/dist/utils/forms/contact-submissions.js +72 -0
- package/dist/utils/forms/crypto.js +64 -0
- package/dist/utils/forms/guard.js +76 -0
- package/dist/utils/forms/http.js +51 -0
- package/dist/utils/forms/provider-core.js +88 -0
- package/dist/utils/forms/routing-core.js +7 -0
- package/dist/utils/forms/routing.js +13 -0
- package/dist/utils/forms/runtime-core.js +17 -0
- package/dist/utils/forms/runtime.js +27 -0
- package/dist/utils/forms/service-core.js +256 -0
- package/dist/utils/forms/service.js +55 -0
- package/dist/utils/forms/session.js +57 -0
- package/dist/utils/forms/smtp-cloudflare.js +107 -0
- package/dist/utils/forms/smtp-node.js +27 -0
- package/dist/utils/forms/smtp.js +10 -0
- package/dist/utils/forms/subscribers-local.js +21 -0
- package/dist/utils/forms/subscribers.js +53 -0
- package/dist/utils/forms/turnstile.js +31 -0
- package/dist/utils/forms/validation.js +58 -0
- package/dist/utils/hub-content.js +28 -0
- package/dist/utils/plugin-runtime.js +158 -0
- package/dist/utils/routes.js +17 -0
- package/dist/utils/seo.js +4 -0
- package/dist/utils/site-config-schema.js +282 -0
- package/dist/utils/site-config.js +122 -0
- package/dist/utils/starlight-nav.js +62 -0
- package/dist/utils/theme.js +49 -0
- package/dist/vendor/starlight/components/AnchorHeading.astro +53 -0
- package/dist/vendor/starlight/components/Banner.astro +23 -0
- package/dist/vendor/starlight/components/ContentNotice.astro +33 -0
- package/dist/vendor/starlight/components/ContentPanel.astro +27 -0
- package/dist/vendor/starlight/components/DraftContentNotice.astro +5 -0
- package/dist/vendor/starlight/components/EditLink.astro +28 -0
- package/dist/vendor/starlight/components/FallbackContentNotice.astro +5 -0
- package/dist/vendor/starlight/components/Footer.astro +61 -0
- package/dist/vendor/starlight/components/Head.astro +5 -0
- package/dist/vendor/starlight/components/Header.astro +94 -0
- package/dist/vendor/starlight/components/Hero.astro +143 -0
- package/dist/vendor/starlight/components/Icons.js +121 -0
- package/dist/vendor/starlight/components/LanguageSelect.astro +57 -0
- package/dist/vendor/starlight/components/LastUpdated.astro +14 -0
- package/dist/vendor/starlight/components/MarkdownContent.astro +5 -0
- package/dist/vendor/starlight/components/MobileMenuFooter.astro +35 -0
- package/dist/vendor/starlight/components/MobileMenuToggle.astro +107 -0
- package/dist/vendor/starlight/components/MobileTableOfContents.astro +151 -0
- package/dist/vendor/starlight/components/Page.astro +126 -0
- package/dist/vendor/starlight/components/PageFrame.astro +97 -0
- package/dist/vendor/starlight/components/PageSidebar.astro +59 -0
- package/dist/vendor/starlight/components/PageTitle.astro +17 -0
- package/dist/vendor/starlight/components/Pagination.astro +79 -0
- package/dist/vendor/starlight/components/Search.astro +488 -0
- package/dist/vendor/starlight/components/Select.astro +99 -0
- package/dist/vendor/starlight/components/Sidebar.astro +15 -0
- package/dist/vendor/starlight/components/SidebarPersistState.js +43 -0
- package/dist/vendor/starlight/components/SidebarPersister.astro +78 -0
- package/dist/vendor/starlight/components/SidebarRestorePoint.astro +12 -0
- package/dist/vendor/starlight/components/SidebarSublist.astro +154 -0
- package/dist/vendor/starlight/components/SiteTitle.astro +59 -0
- package/dist/vendor/starlight/components/SkipLink.astro +26 -0
- package/dist/vendor/starlight/components/SocialIcons.astro +32 -0
- package/dist/vendor/starlight/components/StarlightPage.astro +17 -0
- package/dist/vendor/starlight/components/TableOfContents/TableOfContentsList.astro +79 -0
- package/dist/vendor/starlight/components/TableOfContents/starlight-toc.js +93 -0
- package/dist/vendor/starlight/components/TableOfContents.astro +18 -0
- package/dist/vendor/starlight/components/ThemeProvider.astro +38 -0
- package/dist/vendor/starlight/components/ThemeSelect.astro +73 -0
- package/dist/vendor/starlight/components/TwoColumnContent.astro +54 -0
- package/dist/vendor/starlight/components.js +26 -0
- package/dist/vendor/starlight/constants.js +4 -0
- package/dist/vendor/starlight/expressive-code.d.js +1 -0
- package/dist/vendor/starlight/global.d.js +0 -0
- package/dist/vendor/starlight/i18n.d.js +1 -0
- package/dist/vendor/starlight/index.js +119 -0
- package/dist/vendor/starlight/integrations/asides-error.js +12 -0
- package/dist/vendor/starlight/integrations/asides.js +179 -0
- package/dist/vendor/starlight/integrations/code-rtl-support.js +21 -0
- package/dist/vendor/starlight/integrations/expressive-code/hast.d.js +1 -0
- package/dist/vendor/starlight/integrations/expressive-code/index.js +63 -0
- package/dist/vendor/starlight/integrations/expressive-code/preprocessor.js +92 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-dark.jsonc +1796 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-dark.jsonc.js +1 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-light.jsonc +1695 -0
- package/dist/vendor/starlight/integrations/expressive-code/themes/night-owl-light.jsonc.js +1 -0
- package/dist/vendor/starlight/integrations/expressive-code/theming.js +62 -0
- package/dist/vendor/starlight/integrations/expressive-code/translations.js +29 -0
- package/dist/vendor/starlight/integrations/heading-links.js +61 -0
- package/dist/vendor/starlight/integrations/pagefind.js +43 -0
- package/dist/vendor/starlight/integrations/remark-rehype.js +68 -0
- package/dist/vendor/starlight/integrations/shared/absolutePathToLang.js +15 -0
- package/dist/vendor/starlight/integrations/shared/localeToLang.js +9 -0
- package/dist/vendor/starlight/integrations/shared/slugToLocale.js +10 -0
- package/dist/vendor/starlight/integrations/sitemap.js +20 -0
- package/dist/vendor/starlight/integrations/virtual-user-config.js +110 -0
- package/dist/vendor/starlight/integrations/vite-layer-order.js +42 -0
- package/dist/vendor/starlight/internal.js +6 -0
- package/dist/vendor/starlight/loaders.js +36 -0
- package/dist/vendor/starlight/locals.d.js +0 -0
- package/dist/vendor/starlight/locals.js +30 -0
- package/dist/vendor/starlight/package.json +231 -0
- package/dist/vendor/starlight/package.json.js +248 -0
- package/dist/vendor/starlight/props.js +0 -0
- package/dist/vendor/starlight/route-data.js +6 -0
- package/dist/vendor/starlight/routes/common.astro +23 -0
- package/dist/vendor/starlight/routes/ssr/404.astro +7 -0
- package/dist/vendor/starlight/routes/ssr/index.astro +14 -0
- package/dist/vendor/starlight/routes/static/404.astro +7 -0
- package/dist/vendor/starlight/routes/static/index.astro +12 -0
- package/dist/vendor/starlight/schema.js +102 -0
- package/dist/vendor/starlight/schemas/badge.js +26 -0
- package/dist/vendor/starlight/schemas/components.js +235 -0
- package/dist/vendor/starlight/schemas/expressiveCode.js +12 -0
- package/dist/vendor/starlight/schemas/favicon.js +33 -0
- package/dist/vendor/starlight/schemas/head.js +32 -0
- package/dist/vendor/starlight/schemas/hero.js +57 -0
- package/dist/vendor/starlight/schemas/i18n.js +101 -0
- package/dist/vendor/starlight/schemas/icon.js +7 -0
- package/dist/vendor/starlight/schemas/logo.js +24 -0
- package/dist/vendor/starlight/schemas/pagefind.js +108 -0
- package/dist/vendor/starlight/schemas/prevNextLink.js +14 -0
- package/dist/vendor/starlight/schemas/sidebar.js +80 -0
- package/dist/vendor/starlight/schemas/site-title.js +19 -0
- package/dist/vendor/starlight/schemas/social.js +19 -0
- package/dist/vendor/starlight/schemas/tableOfContents.js +16 -0
- package/dist/vendor/starlight/style/anchor-links.css +131 -0
- package/dist/vendor/starlight/style/asides.css +51 -0
- package/dist/vendor/starlight/style/layers.css +1 -0
- package/dist/vendor/starlight/style/markdown.css +253 -0
- package/dist/vendor/starlight/style/print.css +175 -0
- package/dist/vendor/starlight/style/props.css +188 -0
- package/dist/vendor/starlight/style/reset.css +52 -0
- package/dist/vendor/starlight/style/util.css +63 -0
- package/dist/vendor/starlight/translations/ar.json +30 -0
- package/dist/vendor/starlight/translations/ar.json.js +32 -0
- package/dist/vendor/starlight/translations/ca.json +43 -0
- package/dist/vendor/starlight/translations/ca.json.js +45 -0
- package/dist/vendor/starlight/translations/cs.json +43 -0
- package/dist/vendor/starlight/translations/cs.json.js +45 -0
- package/dist/vendor/starlight/translations/da.json +30 -0
- package/dist/vendor/starlight/translations/da.json.js +32 -0
- package/dist/vendor/starlight/translations/de.json +30 -0
- package/dist/vendor/starlight/translations/de.json.js +32 -0
- package/dist/vendor/starlight/translations/el.json +30 -0
- package/dist/vendor/starlight/translations/el.json.js +32 -0
- package/dist/vendor/starlight/translations/en.json +30 -0
- package/dist/vendor/starlight/translations/en.json.js +32 -0
- package/dist/vendor/starlight/translations/es.json +43 -0
- package/dist/vendor/starlight/translations/es.json.js +45 -0
- package/dist/vendor/starlight/translations/fa.json +30 -0
- package/dist/vendor/starlight/translations/fa.json.js +32 -0
- package/dist/vendor/starlight/translations/fi.json +30 -0
- package/dist/vendor/starlight/translations/fi.json.js +32 -0
- package/dist/vendor/starlight/translations/fr.json +33 -0
- package/dist/vendor/starlight/translations/fr.json.js +35 -0
- package/dist/vendor/starlight/translations/gl.json +43 -0
- package/dist/vendor/starlight/translations/gl.json.js +45 -0
- package/dist/vendor/starlight/translations/he.json +30 -0
- package/dist/vendor/starlight/translations/he.json.js +32 -0
- package/dist/vendor/starlight/translations/hi.json +30 -0
- package/dist/vendor/starlight/translations/hi.json.js +32 -0
- package/dist/vendor/starlight/translations/hu.json +43 -0
- package/dist/vendor/starlight/translations/hu.json.js +45 -0
- package/dist/vendor/starlight/translations/id.json +30 -0
- package/dist/vendor/starlight/translations/id.json.js +32 -0
- package/dist/vendor/starlight/translations/index.js +77 -0
- package/dist/vendor/starlight/translations/it.json +30 -0
- package/dist/vendor/starlight/translations/it.json.js +32 -0
- package/dist/vendor/starlight/translations/ja.json +30 -0
- package/dist/vendor/starlight/translations/ja.json.js +32 -0
- package/dist/vendor/starlight/translations/ko.json +30 -0
- package/dist/vendor/starlight/translations/ko.json.js +32 -0
- package/dist/vendor/starlight/translations/lv.json +30 -0
- package/dist/vendor/starlight/translations/lv.json.js +32 -0
- package/dist/vendor/starlight/translations/nb.json +30 -0
- package/dist/vendor/starlight/translations/nb.json.js +32 -0
- package/dist/vendor/starlight/translations/nl.json +30 -0
- package/dist/vendor/starlight/translations/nl.json.js +32 -0
- package/dist/vendor/starlight/translations/pl.json +33 -0
- package/dist/vendor/starlight/translations/pl.json.js +35 -0
- package/dist/vendor/starlight/translations/pt.json +30 -0
- package/dist/vendor/starlight/translations/pt.json.js +32 -0
- package/dist/vendor/starlight/translations/ro.json +30 -0
- package/dist/vendor/starlight/translations/ro.json.js +32 -0
- package/dist/vendor/starlight/translations/ru.json +33 -0
- package/dist/vendor/starlight/translations/ru.json.js +35 -0
- package/dist/vendor/starlight/translations/sk.json +30 -0
- package/dist/vendor/starlight/translations/sk.json.js +32 -0
- package/dist/vendor/starlight/translations/sv.json +30 -0
- package/dist/vendor/starlight/translations/sv.json.js +32 -0
- package/dist/vendor/starlight/translations/th.json +30 -0
- package/dist/vendor/starlight/translations/th.json.js +32 -0
- package/dist/vendor/starlight/translations/tr.json +30 -0
- package/dist/vendor/starlight/translations/tr.json.js +32 -0
- package/dist/vendor/starlight/translations/uk.json +30 -0
- package/dist/vendor/starlight/translations/uk.json.js +32 -0
- package/dist/vendor/starlight/translations/vi.json +30 -0
- package/dist/vendor/starlight/translations/vi.json.js +32 -0
- package/dist/vendor/starlight/translations/zh-CN.json +30 -0
- package/dist/vendor/starlight/translations/zh-CN.json.js +32 -0
- package/dist/vendor/starlight/translations/zh-TW.json +30 -0
- package/dist/vendor/starlight/translations/zh-TW.json.js +32 -0
- package/dist/vendor/starlight/types.js +0 -0
- package/dist/vendor/starlight/user-components/Aside.astro +40 -0
- package/dist/vendor/starlight/user-components/Badge.astro +148 -0
- package/dist/vendor/starlight/user-components/Card.astro +68 -0
- package/dist/vendor/starlight/user-components/CardGrid.astro +38 -0
- package/dist/vendor/starlight/user-components/FileTree.astro +137 -0
- package/dist/vendor/starlight/user-components/Icon.astro +42 -0
- package/dist/vendor/starlight/user-components/LinkButton.astro +78 -0
- package/dist/vendor/starlight/user-components/LinkCard.astro +78 -0
- package/dist/vendor/starlight/user-components/Steps.astro +90 -0
- package/dist/vendor/starlight/user-components/TabItem.astro +19 -0
- package/dist/vendor/starlight/user-components/Tabs.astro +268 -0
- package/dist/vendor/starlight/user-components/file-tree-icons.js +608 -0
- package/dist/vendor/starlight/user-components/rehype-file-tree.js +160 -0
- package/dist/vendor/starlight/user-components/rehype-steps.js +53 -0
- package/dist/vendor/starlight/user-components/rehype-tabs.js +73 -0
- package/dist/vendor/starlight/utils/base.js +14 -0
- package/dist/vendor/starlight/utils/canonical.js +13 -0
- package/dist/vendor/starlight/utils/collection-fs.js +13 -0
- package/dist/vendor/starlight/utils/collection.js +16 -0
- package/dist/vendor/starlight/utils/createPathFormatter.js +39 -0
- package/dist/vendor/starlight/utils/createTranslationSystem.js +60 -0
- package/dist/vendor/starlight/utils/error-map.js +110 -0
- package/dist/vendor/starlight/utils/format-path.js +9 -0
- package/dist/vendor/starlight/utils/generateToC.js +18 -0
- package/dist/vendor/starlight/utils/git.js +92 -0
- package/dist/vendor/starlight/utils/gitInlined.js +13 -0
- package/dist/vendor/starlight/utils/head.js +156 -0
- package/dist/vendor/starlight/utils/i18n.js +121 -0
- package/dist/vendor/starlight/utils/localizedUrl.js +37 -0
- package/dist/vendor/starlight/utils/navigation.js +320 -0
- package/dist/vendor/starlight/utils/path.js +52 -0
- package/dist/vendor/starlight/utils/plugins.js +355 -0
- package/dist/vendor/starlight/utils/routing/data.js +116 -0
- package/dist/vendor/starlight/utils/routing/index.js +107 -0
- package/dist/vendor/starlight/utils/routing/middleware.js +40 -0
- package/dist/vendor/starlight/utils/routing/types.js +0 -0
- package/dist/vendor/starlight/utils/routing.js +1 -0
- package/dist/vendor/starlight/utils/slugs.js +70 -0
- package/dist/vendor/starlight/utils/starlight-page.js +123 -0
- package/dist/vendor/starlight/utils/translations-fs.js +31 -0
- package/dist/vendor/starlight/utils/translations.js +31 -0
- package/dist/vendor/starlight/utils/types.js +0 -0
- package/dist/vendor/starlight/utils/url.js +5 -0
- package/dist/vendor/starlight/utils/user-config.js +255 -0
- package/dist/vendor/starlight/utils/validateLogoImports.js +22 -0
- package/dist/vendor/starlight/virtual-internal.d.js +0 -0
- package/dist/vendor/starlight/virtual.d.js +0 -0
- package/dist/worker/forms-worker.js +141 -0
- package/package.json +156 -0
- package/style/anchor-links.css +131 -0
- package/templates/github/deploy.workflow.yml +47 -0
- package/tsconfigs/strict.json +3 -0
- package/utils/git.ts +121 -0
- package/utils/gitInlined.ts +20 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { TreeseedDeployConfig, TreeseedTenantConfig } from '../contracts';
|
|
2
|
+
import type { TreeseedEnvironmentRegistryOverlay } from '../environment';
|
|
3
|
+
import type { TreeseedSiteLayerDefinition } from '../site-resources';
|
|
4
|
+
export type TreeseedSiteRouteContribution = {
|
|
5
|
+
pattern: string;
|
|
6
|
+
entrypoint?: string;
|
|
7
|
+
resourcePath?: string;
|
|
8
|
+
};
|
|
9
|
+
export type TreeseedSiteExtensionContribution = {
|
|
10
|
+
routes?: TreeseedSiteRouteContribution[];
|
|
11
|
+
starlightComponents?: Record<string, string>;
|
|
12
|
+
customCss?: string[];
|
|
13
|
+
remarkPlugins?: unknown[];
|
|
14
|
+
rehypePlugins?: unknown[];
|
|
15
|
+
envSchema?: Record<string, unknown>;
|
|
16
|
+
vitePlugins?: unknown[];
|
|
17
|
+
integrations?: unknown[];
|
|
18
|
+
routeMiddleware?: unknown[];
|
|
19
|
+
};
|
|
20
|
+
export type TreeseedPluginSiteContext = {
|
|
21
|
+
projectRoot: string;
|
|
22
|
+
tenantConfig: TreeseedTenantConfig;
|
|
23
|
+
siteConfig?: unknown;
|
|
24
|
+
deployConfig?: TreeseedDeployConfig;
|
|
25
|
+
pluginConfig: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
export type TreeseedPluginEnvironmentContext = {
|
|
28
|
+
projectRoot: string;
|
|
29
|
+
tenantConfig?: TreeseedTenantConfig;
|
|
30
|
+
deployConfig?: TreeseedDeployConfig;
|
|
31
|
+
pluginConfig: Record<string, unknown>;
|
|
32
|
+
};
|
|
33
|
+
export interface TreeseedPlugin {
|
|
34
|
+
id?: string;
|
|
35
|
+
provides?: Record<string, any>;
|
|
36
|
+
siteProviders?: Record<string, TreeseedSiteExtensionContribution | ((context: TreeseedPluginSiteContext) => TreeseedSiteExtensionContribution)>;
|
|
37
|
+
siteHooks?: TreeseedSiteExtensionContribution | ((context: TreeseedPluginSiteContext) => TreeseedSiteExtensionContribution);
|
|
38
|
+
siteLayers?: TreeseedSiteLayerDefinition[] | ((context: TreeseedPluginSiteContext) => TreeseedSiteLayerDefinition[] | undefined);
|
|
39
|
+
environmentRegistry?: TreeseedEnvironmentRegistryOverlay | ((context: TreeseedPluginEnvironmentContext) => TreeseedEnvironmentRegistryOverlay | undefined);
|
|
40
|
+
[key: string]: unknown;
|
|
41
|
+
}
|
|
42
|
+
export declare function defineTreeseedPlugin<T extends TreeseedPlugin>(plugin: T): T;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { TreeseedDeployConfig } from '../contracts';
|
|
2
|
+
type LoadedPluginEntry = {
|
|
3
|
+
package: string;
|
|
4
|
+
config: Record<string, unknown>;
|
|
5
|
+
baseDir: string;
|
|
6
|
+
plugin: Record<string, any>;
|
|
7
|
+
};
|
|
8
|
+
export type LoadedTreeseedPluginEntry = LoadedPluginEntry;
|
|
9
|
+
export declare function loadTreeseedPlugins(config?: TreeseedDeployConfig): LoadedPluginEntry[];
|
|
10
|
+
export declare function loadTreeseedPluginRuntime(config?: TreeseedDeployConfig): {
|
|
11
|
+
config: TreeseedDeployConfig;
|
|
12
|
+
plugins: LoadedPluginEntry[];
|
|
13
|
+
provided: {
|
|
14
|
+
forms: Set<string>;
|
|
15
|
+
agents: {
|
|
16
|
+
execution: Set<string>;
|
|
17
|
+
mutation: Set<string>;
|
|
18
|
+
repository: Set<string>;
|
|
19
|
+
verification: Set<string>;
|
|
20
|
+
notification: Set<string>;
|
|
21
|
+
research: Set<string>;
|
|
22
|
+
handlers: Set<string>;
|
|
23
|
+
};
|
|
24
|
+
deploy: Set<string>;
|
|
25
|
+
content: {
|
|
26
|
+
docs: Set<string>;
|
|
27
|
+
};
|
|
28
|
+
site: Set<string>;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { loadTreeseedDeployConfig } from "../deploy/config.js";
|
|
5
|
+
import { TREESEED_DEFAULT_PLUGIN_PACKAGE } from "./constants.js";
|
|
6
|
+
import builtinDefaultPlugin from "./builtin/default-plugin.js";
|
|
7
|
+
const require2 = createRequire(import.meta.url);
|
|
8
|
+
function normalizeLoadedPlugin(moduleExports, packageName) {
|
|
9
|
+
const plugin = moduleExports?.default ?? moduleExports;
|
|
10
|
+
if (!plugin || typeof plugin !== "object") {
|
|
11
|
+
throw new Error(`Treeseed plugin "${packageName}" did not export a plugin object.`);
|
|
12
|
+
}
|
|
13
|
+
return plugin;
|
|
14
|
+
}
|
|
15
|
+
function isPathLikePluginReference(packageName) {
|
|
16
|
+
return packageName.startsWith(".") || packageName.startsWith("/") || packageName.startsWith("file:");
|
|
17
|
+
}
|
|
18
|
+
function loadPluginModule(packageName, tenantRoot) {
|
|
19
|
+
if (packageName === TREESEED_DEFAULT_PLUGIN_PACKAGE) {
|
|
20
|
+
return {
|
|
21
|
+
moduleExports: builtinDefaultPlugin,
|
|
22
|
+
baseDir: fileURLToPath(new URL("..", import.meta.url))
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (isPathLikePluginReference(packageName)) {
|
|
26
|
+
const resolvedPath2 = packageName.startsWith("file:") ? fileURLToPath(packageName) : path.resolve(tenantRoot, packageName);
|
|
27
|
+
return {
|
|
28
|
+
moduleExports: require2(resolvedPath2),
|
|
29
|
+
baseDir: path.dirname(resolvedPath2)
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const resolvedPath = require2.resolve(packageName);
|
|
33
|
+
return {
|
|
34
|
+
moduleExports: require2(resolvedPath),
|
|
35
|
+
baseDir: path.dirname(resolvedPath)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function loadTreeseedPlugins(config = loadTreeseedDeployConfig()) {
|
|
39
|
+
const tenantRoot = config.__tenantRoot ?? process.cwd();
|
|
40
|
+
const plugins = [];
|
|
41
|
+
for (const pluginRef of config.plugins ?? []) {
|
|
42
|
+
if (pluginRef?.enabled === false) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const loaded = loadPluginModule(pluginRef.package, tenantRoot);
|
|
46
|
+
const plugin = normalizeLoadedPlugin(loaded.moduleExports, pluginRef.package);
|
|
47
|
+
plugins.push({
|
|
48
|
+
package: pluginRef.package,
|
|
49
|
+
config: pluginRef.config ?? {},
|
|
50
|
+
baseDir: loaded.baseDir,
|
|
51
|
+
plugin
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return plugins;
|
|
55
|
+
}
|
|
56
|
+
function collectProvidedIds(plugins) {
|
|
57
|
+
const provided = {
|
|
58
|
+
forms: /* @__PURE__ */ new Set(),
|
|
59
|
+
agents: {
|
|
60
|
+
execution: /* @__PURE__ */ new Set(),
|
|
61
|
+
mutation: /* @__PURE__ */ new Set(),
|
|
62
|
+
repository: /* @__PURE__ */ new Set(),
|
|
63
|
+
verification: /* @__PURE__ */ new Set(),
|
|
64
|
+
notification: /* @__PURE__ */ new Set(),
|
|
65
|
+
research: /* @__PURE__ */ new Set(),
|
|
66
|
+
handlers: /* @__PURE__ */ new Set()
|
|
67
|
+
},
|
|
68
|
+
deploy: /* @__PURE__ */ new Set(),
|
|
69
|
+
content: {
|
|
70
|
+
docs: /* @__PURE__ */ new Set()
|
|
71
|
+
},
|
|
72
|
+
site: /* @__PURE__ */ new Set()
|
|
73
|
+
};
|
|
74
|
+
for (const { plugin } of plugins) {
|
|
75
|
+
for (const id of plugin.provides?.forms ?? []) provided.forms.add(id);
|
|
76
|
+
for (const id of plugin.provides?.agents?.execution ?? []) provided.agents.execution.add(id);
|
|
77
|
+
for (const id of plugin.provides?.agents?.mutation ?? []) provided.agents.mutation.add(id);
|
|
78
|
+
for (const id of plugin.provides?.agents?.repository ?? []) provided.agents.repository.add(id);
|
|
79
|
+
for (const id of plugin.provides?.agents?.verification ?? []) provided.agents.verification.add(id);
|
|
80
|
+
for (const id of plugin.provides?.agents?.notification ?? []) provided.agents.notification.add(id);
|
|
81
|
+
for (const id of plugin.provides?.agents?.research ?? []) provided.agents.research.add(id);
|
|
82
|
+
for (const id of plugin.provides?.agents?.handlers ?? []) provided.agents.handlers.add(id);
|
|
83
|
+
for (const id of plugin.provides?.deploy ?? []) provided.deploy.add(id);
|
|
84
|
+
for (const id of plugin.provides?.content?.docs ?? []) provided.content.docs.add(id);
|
|
85
|
+
for (const id of plugin.provides?.site ?? []) provided.site.add(id);
|
|
86
|
+
}
|
|
87
|
+
return provided;
|
|
88
|
+
}
|
|
89
|
+
function assertSelectedProvider(provided, label, id) {
|
|
90
|
+
if (!id) {
|
|
91
|
+
throw new Error(`Treeseed plugin runtime is missing selected provider id for ${label}.`);
|
|
92
|
+
}
|
|
93
|
+
if (!provided.has(id)) {
|
|
94
|
+
throw new Error(`Treeseed plugin runtime could not resolve ${label} provider "${id}".`);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function loadTreeseedPluginRuntime(config = loadTreeseedDeployConfig()) {
|
|
98
|
+
const plugins = loadTreeseedPlugins(config);
|
|
99
|
+
const provided = collectProvidedIds(plugins);
|
|
100
|
+
const providers = config.providers;
|
|
101
|
+
assertSelectedProvider(provided.forms, "forms", providers.forms);
|
|
102
|
+
assertSelectedProvider(provided.agents.execution, "agents.execution", providers.agents.execution);
|
|
103
|
+
assertSelectedProvider(provided.agents.mutation, "agents.mutation", providers.agents.mutation);
|
|
104
|
+
assertSelectedProvider(provided.agents.repository, "agents.repository", providers.agents.repository);
|
|
105
|
+
assertSelectedProvider(provided.agents.verification, "agents.verification", providers.agents.verification);
|
|
106
|
+
assertSelectedProvider(provided.agents.notification, "agents.notification", providers.agents.notification);
|
|
107
|
+
assertSelectedProvider(provided.agents.research, "agents.research", providers.agents.research);
|
|
108
|
+
assertSelectedProvider(provided.deploy, "deploy", providers.deploy);
|
|
109
|
+
assertSelectedProvider(provided.content.docs, "content.docs", providers.content?.docs);
|
|
110
|
+
assertSelectedProvider(provided.site, "site", providers.site);
|
|
111
|
+
return {
|
|
112
|
+
config,
|
|
113
|
+
plugins,
|
|
114
|
+
provided
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
export {
|
|
118
|
+
loadTreeseedPluginRuntime,
|
|
119
|
+
loadTreeseedPlugins
|
|
120
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { BOOKS, TREESEED_LIBRARY_DOWNLOAD } from '../utils/books-data.js';
|
|
4
|
+
import { PROJECT_TENANT } from '../tenant/bridge.js';
|
|
5
|
+
const projectRoot = PROJECT_TENANT.__tenantRoot ?? process.cwd();
|
|
6
|
+
const outputDir = path.join(projectRoot, 'public', 'books');
|
|
7
|
+
const legacyOutputFile = path.join(projectRoot, 'public', 'book.md');
|
|
8
|
+
function sortPaths(paths) {
|
|
9
|
+
return [...paths].sort((left, right) => left.localeCompare(right, undefined, { numeric: true, sensitivity: 'base' }));
|
|
10
|
+
}
|
|
11
|
+
function getSidebarOrder(filePath) {
|
|
12
|
+
const rawContent = fs.readFileSync(filePath, 'utf8');
|
|
13
|
+
const frontmatterMatch = rawContent.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
14
|
+
if (!frontmatterMatch)
|
|
15
|
+
return Number.POSITIVE_INFINITY;
|
|
16
|
+
const orderMatch = frontmatterMatch[1].match(/^\s{2}order:\s*(\d+)\s*$/m);
|
|
17
|
+
return orderMatch ? Number.parseInt(orderMatch[1], 10) : Number.POSITIVE_INFINITY;
|
|
18
|
+
}
|
|
19
|
+
function collectMarkdownFiles(rootPath) {
|
|
20
|
+
if (!fs.existsSync(rootPath)) {
|
|
21
|
+
throw new Error(`Book export root not found: ${rootPath}`);
|
|
22
|
+
}
|
|
23
|
+
const stats = fs.statSync(rootPath);
|
|
24
|
+
if (stats.isFile()) {
|
|
25
|
+
return [rootPath];
|
|
26
|
+
}
|
|
27
|
+
const entries = fs.readdirSync(rootPath, { withFileTypes: true });
|
|
28
|
+
return sortPaths(entries.flatMap((entry) => {
|
|
29
|
+
const fullPath = path.join(rootPath, entry.name);
|
|
30
|
+
if (entry.isDirectory()) {
|
|
31
|
+
return collectMarkdownFiles(fullPath);
|
|
32
|
+
}
|
|
33
|
+
if (entry.isFile() && (entry.name.endsWith('.md') || entry.name.endsWith('.mdx'))) {
|
|
34
|
+
return [fullPath];
|
|
35
|
+
}
|
|
36
|
+
return [];
|
|
37
|
+
}));
|
|
38
|
+
}
|
|
39
|
+
function stripFrontmatter(content) {
|
|
40
|
+
return content.replace(/^---\r?\n[\s\S]*?\r?\n---\r?\n?/, '').trim();
|
|
41
|
+
}
|
|
42
|
+
function stripMdxOnlySyntax(content) {
|
|
43
|
+
return content
|
|
44
|
+
.replace(/^import\s.+$/gm, '')
|
|
45
|
+
.replace(/^\s*<\/?[A-Z][^>]*>\s*$/gm, '')
|
|
46
|
+
.replace(/\n{3,}/g, '\n\n')
|
|
47
|
+
.trim();
|
|
48
|
+
}
|
|
49
|
+
function inferExportRootFromBasePath(book) {
|
|
50
|
+
const normalizedBasePath = String(book.basePath || '').trim();
|
|
51
|
+
const knowledgePrefix = '/knowledge/';
|
|
52
|
+
if (!normalizedBasePath.startsWith(knowledgePrefix)) {
|
|
53
|
+
throw new Error(`Book basePath must start with "${knowledgePrefix}" to infer exports: ${book.basePath}`);
|
|
54
|
+
}
|
|
55
|
+
const relativeKnowledgePath = normalizedBasePath
|
|
56
|
+
.slice(knowledgePrefix.length)
|
|
57
|
+
.replace(/^\/+|\/+$/g, '');
|
|
58
|
+
if (!relativeKnowledgePath) {
|
|
59
|
+
throw new Error(`Book basePath must identify a knowledge directory: ${book.basePath}`);
|
|
60
|
+
}
|
|
61
|
+
return path.join(PROJECT_TENANT.content.docs, relativeKnowledgePath);
|
|
62
|
+
}
|
|
63
|
+
function resolveExportRoots(book) {
|
|
64
|
+
if (Array.isArray(book.exportRoots) && book.exportRoots.length > 0) {
|
|
65
|
+
return book.exportRoots;
|
|
66
|
+
}
|
|
67
|
+
return [inferExportRootFromBasePath(book)];
|
|
68
|
+
}
|
|
69
|
+
function resolveBookFiles(book) {
|
|
70
|
+
const files = resolveExportRoots(book).flatMap((root) => collectMarkdownFiles(path.resolve(projectRoot, root)).sort((left, right) => {
|
|
71
|
+
const orderDelta = getSidebarOrder(left) - getSidebarOrder(right);
|
|
72
|
+
if (orderDelta !== 0)
|
|
73
|
+
return orderDelta;
|
|
74
|
+
return left.localeCompare(right, undefined, { numeric: true, sensitivity: 'base' });
|
|
75
|
+
}));
|
|
76
|
+
return Array.from(new Set(files));
|
|
77
|
+
}
|
|
78
|
+
function buildBookMarkdown(book) {
|
|
79
|
+
const sections = resolveBookFiles(book).map((filePath) => {
|
|
80
|
+
const rawContent = fs.readFileSync(filePath, 'utf8');
|
|
81
|
+
return stripMdxOnlySyntax(stripFrontmatter(rawContent));
|
|
82
|
+
});
|
|
83
|
+
return `# ${book.downloadTitle}\n\n> This document is auto-generated from the TreeSeed knowledge source.\n\n${sections.join('\n\n---\n\n')}\n`;
|
|
84
|
+
}
|
|
85
|
+
function ensureOutputDir() {
|
|
86
|
+
fs.mkdirSync(outputDir, { recursive: true });
|
|
87
|
+
}
|
|
88
|
+
function writeBookOutput(fileName, content) {
|
|
89
|
+
const outputPath = path.join(outputDir, fileName);
|
|
90
|
+
fs.writeFileSync(outputPath, content);
|
|
91
|
+
return outputPath;
|
|
92
|
+
}
|
|
93
|
+
function main() {
|
|
94
|
+
console.log('Generating TreeSeed knowledge exports...');
|
|
95
|
+
ensureOutputDir();
|
|
96
|
+
const bookOutputs = BOOKS.map((book) => {
|
|
97
|
+
const content = buildBookMarkdown(book);
|
|
98
|
+
const outputPath = writeBookOutput(book.downloadFileName, content);
|
|
99
|
+
console.log(`Generated ${path.relative(projectRoot, outputPath)}`);
|
|
100
|
+
return { book, content };
|
|
101
|
+
});
|
|
102
|
+
const compositeContent = `# ${TREESEED_LIBRARY_DOWNLOAD.downloadTitle}\n\n> This document is auto-generated from the TreeSeed knowledge source.\n\n${bookOutputs
|
|
103
|
+
.map(({ content }) => content.trim())
|
|
104
|
+
.join('\n\n---\n\n')}\n`;
|
|
105
|
+
const compositeOutputPath = writeBookOutput(TREESEED_LIBRARY_DOWNLOAD.downloadFileName, compositeContent);
|
|
106
|
+
console.log(`Generated ${path.relative(projectRoot, compositeOutputPath)}`);
|
|
107
|
+
if (fs.existsSync(legacyOutputFile)) {
|
|
108
|
+
fs.rmSync(legacyOutputFile);
|
|
109
|
+
console.log(`Removed legacy export ${path.relative(projectRoot, legacyOutputFile)}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
main();
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
const packageRoot = resolve(fileURLToPath(new URL('..', import.meta.url)));
|
|
5
|
+
const packageJsonPath = resolve(packageRoot, 'package.json');
|
|
6
|
+
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
7
|
+
const packageVersion = packageJson.version;
|
|
8
|
+
const legacyPrefix = 'treeseed-core-v';
|
|
9
|
+
const tagName = process.argv[2] || process.env.GITHUB_REF_NAME;
|
|
10
|
+
if (!tagName) {
|
|
11
|
+
console.error('Release tag validation requires a tag name argument or GITHUB_REF_NAME.');
|
|
12
|
+
process.exit(1);
|
|
13
|
+
}
|
|
14
|
+
const taggedVersion = tagName.startsWith(legacyPrefix)
|
|
15
|
+
? tagName.slice(legacyPrefix.length)
|
|
16
|
+
: tagName;
|
|
17
|
+
if (taggedVersion !== packageVersion) {
|
|
18
|
+
console.error(`Release tag version "${taggedVersion}" does not match @treeseed/core version "${packageVersion}".`);
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
console.log(`Release tag "${tagName}" matches @treeseed/core version "${packageVersion}".`);
|