blume 2.1.1 → 2.1.3
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/CHANGELOG.md +23 -0
- package/dist/cli/{chunk-ncj7w596.js → chunk-0pmb4tr4.js} +22 -18
- package/dist/cli/{chunk-ncj7w596.js.map → chunk-0pmb4tr4.js.map} +3 -3
- package/dist/cli/{chunk-nq1d20w2.js → chunk-0w6hs479.js} +15 -15
- package/dist/cli/{chunk-ehweg4fr.js → chunk-124fvmzq.js} +1031 -903
- package/dist/cli/{chunk-ehweg4fr.js.map → chunk-124fvmzq.js.map} +20 -18
- package/dist/cli/{chunk-kma9f6sf.js → chunk-1f882900.js} +2 -2
- package/dist/cli/{chunk-e8xw9qkh.js → chunk-297ajdcv.js} +4 -4
- package/dist/cli/{chunk-e6atmn4h.js → chunk-32khwcb6.js} +7 -7
- package/dist/cli/{chunk-073rdvgb.js → chunk-36bxs9c7.js} +16 -16
- package/dist/cli/{chunk-mrcccgnh.js → chunk-53jqw8z0.js} +3 -3
- package/dist/cli/{chunk-ft9vfys6.js → chunk-58bt3hag.js} +4 -4
- package/dist/cli/{chunk-sds923fa.js → chunk-5cmts6dv.js} +3 -3
- package/dist/cli/{chunk-cfyg47zg.js → chunk-60hz265r.js} +4 -4
- package/dist/cli/{chunk-j134vrp2.js → chunk-74wfhv79.js} +1 -1
- package/dist/cli/{chunk-nrns10mj.js → chunk-9qzgg6mj.js} +3 -3
- package/dist/cli/{chunk-tphac74f.js → chunk-a57yh0h9.js} +5 -5
- package/dist/cli/{chunk-hebn0tpx.js → chunk-ave1wcbr.js} +1 -1
- package/dist/cli/{chunk-htrwgabr.js → chunk-bqxaqn5p.js} +6 -6
- package/dist/cli/{chunk-5vjtgs6e.js → chunk-bxwhtvw8.js} +5 -5
- package/dist/cli/{chunk-66w9j7p6.js → chunk-ckrcm08h.js} +5 -3
- package/dist/cli/{chunk-66w9j7p6.js.map → chunk-ckrcm08h.js.map} +3 -3
- package/dist/cli/{chunk-n0v7m8ry.js → chunk-desvm72z.js} +3 -3
- package/dist/cli/{chunk-3v3ffbrj.js → chunk-dhwtqnnd.js} +2 -2
- package/dist/cli/{chunk-gb420vvz.js → chunk-dpy8qdjf.js} +7 -4
- package/dist/cli/chunk-dpy8qdjf.js.map +17 -0
- package/dist/cli/{chunk-c1y538kd.js → chunk-dqhg54mr.js} +1 -1
- package/dist/cli/{chunk-42t4jxdx.js → chunk-dv2z0rzf.js} +1 -1
- package/dist/cli/{chunk-cm89scdv.js → chunk-es8h0v3j.js} +9 -11
- package/dist/cli/{chunk-cm89scdv.js.map → chunk-es8h0v3j.js.map} +3 -3
- package/dist/cli/{chunk-hx3xqnk9.js → chunk-gfc5fqvf.js} +14 -14
- package/dist/cli/{chunk-7ppf1rva.js → chunk-gxtg6ed2.js} +16 -16
- package/dist/cli/{chunk-8y2kmjv8.js → chunk-hvcxng5f.js} +6 -6
- package/dist/cli/{chunk-54ztw1nj.js → chunk-j1x92mx9.js} +1 -1
- package/dist/cli/{chunk-313vnn40.js → chunk-k3gr1nm9.js} +11 -9
- package/dist/cli/chunk-k3gr1nm9.js.map +10 -0
- package/dist/cli/{chunk-c887fj0s.js → chunk-kdpzw38a.js} +2 -2
- package/dist/cli/{chunk-t2m5j4pr.js → chunk-ms9z66nz.js} +2 -2
- package/dist/cli/{chunk-t2m5j4pr.js.map → chunk-ms9z66nz.js.map} +2 -2
- package/dist/cli/{chunk-ep6nd0rn.js → chunk-nbyvgnnm.js} +26 -14
- package/dist/cli/{chunk-ep6nd0rn.js.map → chunk-nbyvgnnm.js.map} +7 -7
- package/dist/cli/{chunk-w1r4vase.js → chunk-s0bdnc7v.js} +2 -2
- package/dist/cli/{chunk-fdrkhpjy.js → chunk-sc93apfs.js} +14 -14
- package/dist/cli/{chunk-dzwehpy7.js → chunk-tfycddbt.js} +2 -2
- package/dist/cli/{chunk-3x6x3pph.js → chunk-twy7psdz.js} +7 -7
- package/dist/cli/{chunk-e9q7a2ak.js → chunk-y4msrwm9.js} +15 -15
- package/dist/cli/{chunk-tdqhyxfz.js → chunk-ydp3065p.js} +5 -5
- package/dist/cli/index.js +18 -18
- package/dist/types/ai/ask.d.ts +24 -5
- package/dist/types/analytics/clics.d.ts +37 -0
- package/dist/types/analytics/index.d.ts +2 -0
- package/dist/types/analytics/schema.d.ts +18 -0
- package/dist/types/astro/integration.d.ts +6 -0
- package/dist/types/core/config-input.d.ts +7 -3
- package/dist/types/core/powered-by.d.ts +12 -0
- package/dist/types/core/schema.d.ts +109 -3
- package/dist/types/core/sources/lower.d.ts +10 -2
- package/dist/types/core/sources/notion.d.ts +8 -0
- package/dist/types/deploy/cloudflare-negotiation.d.ts +5 -2
- package/dist/types/deploy/node-headers.d.ts +12 -4
- package/dist/types/deploy/platforms/vercel.d.ts +2 -2
- package/dist/types/deploy/vercel-negotiation.d.ts +4 -2
- package/dist/types/narration/build.d.ts +34 -12
- package/dist/types/narration/provider.d.ts +96 -8
- package/dist/types/openapi/sentence.d.ts +11 -1
- package/dist/types/seo/jsonld.d.ts +11 -6
- package/dist/types/sources/notion.d.ts +8 -0
- package/dist/types/sources/registry.d.ts +9 -0
- package/docs/02-deployment.mdx +29 -1
- package/docs/03-upgrading.mdx +2 -1
- package/docs/04-migrating.mdx +9 -9
- package/docs/08-faq.mdx +12 -12
- package/docs/advanced/changelog.mdx +19 -2
- package/docs/advanced/custom-pages.mdx +1 -1
- package/docs/cli/doctor.mdx +1 -1
- package/docs/configuration/analytics.mdx +19 -1
- package/docs/configuration/index.mdx +1 -0
- package/docs/configuration/narration.mdx +43 -6
- package/docs/content/navigation.mdx +4 -2
- package/docs/content/sources/contentful.mdx +2 -0
- package/docs/content/sources/github-releases.mdx +2 -0
- package/docs/content/sources/notion.mdx +16 -1
- package/docs/content/sources/obsidian.mdx +2 -0
- package/docs/content/sources/payload.mdx +2 -0
- package/docs/content/sources/remote-mdx.mdx +2 -0
- package/docs/content/sources/sanity.mdx +2 -0
- package/docs/content/sources/strapi.mdx +2 -0
- package/docs/discoverability/mcp.mdx +2 -0
- package/docs/discoverability/structured-data.mdx +8 -6
- package/docs/references/asyncapi.mdx +2 -0
- package/docs/references/graphql.mdx +2 -0
- package/docs/references/openapi.mdx +14 -0
- package/package.json +7 -6
- package/skills/blume/SKILL.md +1 -1
- package/skills/blume-migrate/SKILL.md +1 -1
- package/skills/blume-migrate/assets/{oxfmt@0.67.0.patch → oxfmt@0.71.0.patch} +7 -7
- package/skills/blume-migrate/references/monorepo.md +5 -5
- package/src/ai/ask.ts +24 -6
- package/src/analytics/clics.ts +58 -0
- package/src/analytics/head.ts +5 -0
- package/src/analytics/index.ts +2 -0
- package/src/analytics/schema.ts +2 -0
- package/src/astro/generate.ts +13 -8
- package/src/astro/integration.ts +56 -9
- package/src/astro/render-deps.ts +10 -5
- package/src/astro/runtime-deps.ts +23 -2
- package/src/astro/templates.ts +4 -1
- package/src/cli/init/scaffold.ts +6 -3
- package/src/cli/required-secrets.ts +2 -1
- package/src/components/content/view-switcher.ts +7 -4
- package/src/components/layout/NavTree.astro +49 -5
- package/src/components/layout/NavTreeScript.astro +18 -0
- package/src/components/layout/PageLayout.astro +13 -3
- package/src/components/layout/RootLayout.astro +17 -12
- package/src/components/layout/analytics-client.ts +8 -8
- package/src/components/openapi/playground-client.ts +53 -53
- package/src/components/powered-by-middleware.ts +33 -0
- package/src/core/config-input.ts +11 -3
- package/src/core/powered-by.ts +12 -0
- package/src/core/schema.ts +5 -4
- package/src/core/sources/lower.ts +19 -3
- package/src/core/sources/notion.ts +27 -9
- package/src/deploy/cloudflare-negotiation.ts +36 -7
- package/src/deploy/headers.ts +15 -1
- package/src/deploy/node-headers.ts +32 -20
- package/src/deploy/platforms/cloudflare.ts +1 -0
- package/src/deploy/platforms/vercel.ts +4 -3
- package/src/deploy/vercel-negotiation.ts +38 -4
- package/src/markdown/base-links.ts +15 -14
- package/src/markdown/package-commands.ts +9 -8
- package/src/narration/build.ts +218 -40
- package/src/narration/provider.ts +89 -9
- package/src/openapi/render-mdx.ts +68 -8
- package/src/openapi/sentence.ts +29 -2
- package/src/registry/eject.ts +5 -1
- package/src/seo/jsonld.ts +38 -20
- package/src/sources/notion.ts +7 -0
- package/src/theme/color.ts +9 -10
- package/src/theme/entry.ts +14 -3
- package/dist/cli/chunk-313vnn40.js.map +0 -10
- package/dist/cli/chunk-gb420vvz.js.map +0 -17
- /package/dist/cli/{chunk-nq1d20w2.js.map → chunk-0w6hs479.js.map} +0 -0
- /package/dist/cli/{chunk-kma9f6sf.js.map → chunk-1f882900.js.map} +0 -0
- /package/dist/cli/{chunk-e8xw9qkh.js.map → chunk-297ajdcv.js.map} +0 -0
- /package/dist/cli/{chunk-e6atmn4h.js.map → chunk-32khwcb6.js.map} +0 -0
- /package/dist/cli/{chunk-073rdvgb.js.map → chunk-36bxs9c7.js.map} +0 -0
- /package/dist/cli/{chunk-mrcccgnh.js.map → chunk-53jqw8z0.js.map} +0 -0
- /package/dist/cli/{chunk-ft9vfys6.js.map → chunk-58bt3hag.js.map} +0 -0
- /package/dist/cli/{chunk-sds923fa.js.map → chunk-5cmts6dv.js.map} +0 -0
- /package/dist/cli/{chunk-cfyg47zg.js.map → chunk-60hz265r.js.map} +0 -0
- /package/dist/cli/{chunk-j134vrp2.js.map → chunk-74wfhv79.js.map} +0 -0
- /package/dist/cli/{chunk-nrns10mj.js.map → chunk-9qzgg6mj.js.map} +0 -0
- /package/dist/cli/{chunk-tphac74f.js.map → chunk-a57yh0h9.js.map} +0 -0
- /package/dist/cli/{chunk-hebn0tpx.js.map → chunk-ave1wcbr.js.map} +0 -0
- /package/dist/cli/{chunk-htrwgabr.js.map → chunk-bqxaqn5p.js.map} +0 -0
- /package/dist/cli/{chunk-5vjtgs6e.js.map → chunk-bxwhtvw8.js.map} +0 -0
- /package/dist/cli/{chunk-n0v7m8ry.js.map → chunk-desvm72z.js.map} +0 -0
- /package/dist/cli/{chunk-3v3ffbrj.js.map → chunk-dhwtqnnd.js.map} +0 -0
- /package/dist/cli/{chunk-c1y538kd.js.map → chunk-dqhg54mr.js.map} +0 -0
- /package/dist/cli/{chunk-42t4jxdx.js.map → chunk-dv2z0rzf.js.map} +0 -0
- /package/dist/cli/{chunk-hx3xqnk9.js.map → chunk-gfc5fqvf.js.map} +0 -0
- /package/dist/cli/{chunk-7ppf1rva.js.map → chunk-gxtg6ed2.js.map} +0 -0
- /package/dist/cli/{chunk-8y2kmjv8.js.map → chunk-hvcxng5f.js.map} +0 -0
- /package/dist/cli/{chunk-54ztw1nj.js.map → chunk-j1x92mx9.js.map} +0 -0
- /package/dist/cli/{chunk-c887fj0s.js.map → chunk-kdpzw38a.js.map} +0 -0
- /package/dist/cli/{chunk-w1r4vase.js.map → chunk-s0bdnc7v.js.map} +0 -0
- /package/dist/cli/{chunk-fdrkhpjy.js.map → chunk-sc93apfs.js.map} +0 -0
- /package/dist/cli/{chunk-dzwehpy7.js.map → chunk-tfycddbt.js.map} +0 -0
- /package/dist/cli/{chunk-3x6x3pph.js.map → chunk-twy7psdz.js.map} +0 -0
- /package/dist/cli/{chunk-e9q7a2ak.js.map → chunk-y4msrwm9.js.map} +0 -0
- /package/dist/cli/{chunk-tdqhyxfz.js.map → chunk-ydp3065p.js.map} +0 -0
|
@@ -1169,6 +1169,15 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
1169
1169
|
}, z.core.$strict>;
|
|
1170
1170
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
1171
1171
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
1172
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1173
|
+
kind: z.ZodLiteral<"clics">;
|
|
1174
|
+
options: z.ZodObject<{
|
|
1175
|
+
allowLocalhost: z.ZodOptional<z.ZodBoolean>;
|
|
1176
|
+
disableOutboundLinks: z.ZodOptional<z.ZodBoolean>;
|
|
1177
|
+
projectId: z.ZodString;
|
|
1178
|
+
}, z.core.$strict>;
|
|
1179
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
1180
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
1172
1181
|
}, z.core.$strict>, z.ZodObject<{
|
|
1173
1182
|
kind: z.ZodLiteral<"cloudflare">;
|
|
1174
1183
|
options: z.ZodObject<{
|
|
@@ -1494,6 +1503,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
1494
1503
|
pollInterval?: number | undefined;
|
|
1495
1504
|
prefix?: string | undefined;
|
|
1496
1505
|
concurrency?: number | undefined;
|
|
1506
|
+
mdx?: boolean | undefined;
|
|
1497
1507
|
properties?: {
|
|
1498
1508
|
description?: string | undefined;
|
|
1499
1509
|
order?: string | undefined;
|
|
@@ -1653,6 +1663,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
1653
1663
|
pollInterval?: number | undefined;
|
|
1654
1664
|
prefix?: string | undefined;
|
|
1655
1665
|
concurrency?: number | undefined;
|
|
1666
|
+
mdx?: boolean | undefined;
|
|
1656
1667
|
properties?: {
|
|
1657
1668
|
description?: string | undefined;
|
|
1658
1669
|
order?: string | undefined;
|
|
@@ -1812,6 +1823,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
1812
1823
|
prefix: z.ZodOptional<z.ZodString>;
|
|
1813
1824
|
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
1814
1825
|
database: z.ZodString;
|
|
1826
|
+
mdx: z.ZodOptional<z.ZodBoolean>;
|
|
1815
1827
|
properties: z.ZodOptional<z.ZodObject<{
|
|
1816
1828
|
description: z.ZodOptional<z.ZodString>;
|
|
1817
1829
|
order: z.ZodOptional<z.ZodString>;
|
|
@@ -1971,6 +1983,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
1971
1983
|
pollInterval?: number | undefined;
|
|
1972
1984
|
prefix?: string | undefined;
|
|
1973
1985
|
concurrency?: number | undefined;
|
|
1986
|
+
mdx?: boolean | undefined;
|
|
1974
1987
|
properties?: {
|
|
1975
1988
|
description?: string | undefined;
|
|
1976
1989
|
order?: string | undefined;
|
|
@@ -2130,6 +2143,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2130
2143
|
pollInterval?: number | undefined;
|
|
2131
2144
|
prefix?: string | undefined;
|
|
2132
2145
|
concurrency?: number | undefined;
|
|
2146
|
+
mdx?: boolean | undefined;
|
|
2133
2147
|
properties?: {
|
|
2134
2148
|
description?: string | undefined;
|
|
2135
2149
|
order?: string | undefined;
|
|
@@ -2295,6 +2309,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2295
2309
|
pollInterval?: number | undefined;
|
|
2296
2310
|
prefix?: string | undefined;
|
|
2297
2311
|
concurrency?: number | undefined;
|
|
2312
|
+
mdx?: boolean | undefined;
|
|
2298
2313
|
properties?: {
|
|
2299
2314
|
description?: string | undefined;
|
|
2300
2315
|
order?: string | undefined;
|
|
@@ -2471,6 +2486,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2471
2486
|
pollInterval?: number | undefined;
|
|
2472
2487
|
prefix?: string | undefined;
|
|
2473
2488
|
concurrency?: number | undefined;
|
|
2489
|
+
mdx?: boolean | undefined;
|
|
2474
2490
|
properties?: {
|
|
2475
2491
|
description?: string | undefined;
|
|
2476
2492
|
order?: string | undefined;
|
|
@@ -2854,11 +2870,11 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2854
2870
|
}, z.core.$strict>>;
|
|
2855
2871
|
narration: z.ZodPrefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
2856
2872
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2857
|
-
provider: z.ZodOptional<z.ZodObject<{
|
|
2873
|
+
provider: z.ZodOptional<z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2858
2874
|
kind: z.ZodLiteral<"gateway">;
|
|
2859
2875
|
options: z.ZodObject<{
|
|
2860
|
-
instructions: z.ZodOptional<z.ZodString>;
|
|
2861
2876
|
model: z.ZodDefault<z.ZodString>;
|
|
2877
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2862
2878
|
voice: z.ZodDefault<z.ZodString>;
|
|
2863
2879
|
apiKeyEnv: z.ZodDefault<z.ZodString>;
|
|
2864
2880
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -2866,7 +2882,70 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2866
2882
|
}, z.core.$strict>;
|
|
2867
2883
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
2868
2884
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
2869
|
-
}, z.core.$strict
|
|
2885
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
2886
|
+
kind: z.ZodLiteral<"openai">;
|
|
2887
|
+
options: z.ZodObject<{
|
|
2888
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
2889
|
+
baseUrl: z.ZodOptional<z.ZodURL>;
|
|
2890
|
+
model: z.ZodString;
|
|
2891
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
2892
|
+
voice: z.ZodDefault<z.ZodString>;
|
|
2893
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
2894
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
2895
|
+
}, z.core.$strict>;
|
|
2896
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
2897
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
2898
|
+
}, z.core.$strict>], "kind">, z.ZodTransform<{
|
|
2899
|
+
kind: "gateway";
|
|
2900
|
+
options: {
|
|
2901
|
+
model: string;
|
|
2902
|
+
voice: string;
|
|
2903
|
+
apiKeyEnv: string;
|
|
2904
|
+
instructions?: string | undefined;
|
|
2905
|
+
headers?: Record<string, string> | undefined;
|
|
2906
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
2907
|
+
};
|
|
2908
|
+
requiredSecrets: string[];
|
|
2909
|
+
runtimeDeps: string[];
|
|
2910
|
+
} | {
|
|
2911
|
+
options: {
|
|
2912
|
+
model: string;
|
|
2913
|
+
voice: string;
|
|
2914
|
+
apiKeyEnv?: string | undefined;
|
|
2915
|
+
baseUrl?: string | undefined;
|
|
2916
|
+
instructions?: string | undefined;
|
|
2917
|
+
headers?: Record<string, string> | undefined;
|
|
2918
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
2919
|
+
};
|
|
2920
|
+
requiredSecrets: string[];
|
|
2921
|
+
runtimeDeps: string[];
|
|
2922
|
+
kind: "openai";
|
|
2923
|
+
}, {
|
|
2924
|
+
kind: "gateway";
|
|
2925
|
+
options: {
|
|
2926
|
+
model: string;
|
|
2927
|
+
voice: string;
|
|
2928
|
+
apiKeyEnv: string;
|
|
2929
|
+
instructions?: string | undefined;
|
|
2930
|
+
headers?: Record<string, string> | undefined;
|
|
2931
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
2932
|
+
};
|
|
2933
|
+
requiredSecrets: string[];
|
|
2934
|
+
runtimeDeps: string[];
|
|
2935
|
+
} | {
|
|
2936
|
+
kind: "openai";
|
|
2937
|
+
options: {
|
|
2938
|
+
model: string;
|
|
2939
|
+
voice: string;
|
|
2940
|
+
apiKeyEnv?: string | undefined;
|
|
2941
|
+
baseUrl?: string | undefined;
|
|
2942
|
+
instructions?: string | undefined;
|
|
2943
|
+
headers?: Record<string, string> | undefined;
|
|
2944
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
2945
|
+
};
|
|
2946
|
+
requiredSecrets: string[];
|
|
2947
|
+
runtimeDeps: string[];
|
|
2948
|
+
}>>>;
|
|
2870
2949
|
}, z.core.$strict>]>, z.ZodTransform<{
|
|
2871
2950
|
enabled: boolean;
|
|
2872
2951
|
provider: {
|
|
@@ -2881,6 +2960,19 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2881
2960
|
};
|
|
2882
2961
|
requiredSecrets: string[];
|
|
2883
2962
|
runtimeDeps: string[];
|
|
2963
|
+
} | {
|
|
2964
|
+
options: {
|
|
2965
|
+
model: string;
|
|
2966
|
+
voice: string;
|
|
2967
|
+
apiKeyEnv?: string | undefined;
|
|
2968
|
+
baseUrl?: string | undefined;
|
|
2969
|
+
instructions?: string | undefined;
|
|
2970
|
+
headers?: Record<string, string> | undefined;
|
|
2971
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
2972
|
+
};
|
|
2973
|
+
requiredSecrets: string[];
|
|
2974
|
+
runtimeDeps: string[];
|
|
2975
|
+
kind: "openai";
|
|
2884
2976
|
} | null;
|
|
2885
2977
|
}, boolean | {
|
|
2886
2978
|
enabled: boolean;
|
|
@@ -2896,6 +2988,19 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2896
2988
|
};
|
|
2897
2989
|
requiredSecrets: string[];
|
|
2898
2990
|
runtimeDeps: string[];
|
|
2991
|
+
} | {
|
|
2992
|
+
options: {
|
|
2993
|
+
model: string;
|
|
2994
|
+
voice: string;
|
|
2995
|
+
apiKeyEnv?: string | undefined;
|
|
2996
|
+
baseUrl?: string | undefined;
|
|
2997
|
+
instructions?: string | undefined;
|
|
2998
|
+
headers?: Record<string, string> | undefined;
|
|
2999
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
3000
|
+
};
|
|
3001
|
+
requiredSecrets: string[];
|
|
3002
|
+
runtimeDeps: string[];
|
|
3003
|
+
kind: "openai";
|
|
2899
3004
|
} | undefined;
|
|
2900
3005
|
}>>>;
|
|
2901
3006
|
navigation: z.ZodPrefault<z.ZodObject<{
|
|
@@ -2957,6 +3062,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
2957
3062
|
path: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
2958
3063
|
}, z.core.$strict>>>;
|
|
2959
3064
|
}, z.core.$strict>>;
|
|
3065
|
+
poweredBy: z.ZodDefault<z.ZodBoolean>;
|
|
2960
3066
|
rateLimit: z.ZodPipe<z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<false>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2961
3067
|
kind: z.ZodLiteral<"cloudflare">;
|
|
2962
3068
|
options: z.ZodObject<{
|
|
@@ -45,6 +45,13 @@ export declare const codeSpan: (code: string) => string;
|
|
|
45
45
|
export declare const guardBlockStart: (text: string) => string;
|
|
46
46
|
/** A block's inline content as Markdown. */
|
|
47
47
|
export declare const renderInline: (parts: InlinePart[]) => string;
|
|
48
|
+
/**
|
|
49
|
+
* A block's inline content as MDX source, for a source whose site author
|
|
50
|
+
* opted in to reading its text that way: marks still become delimiters and
|
|
51
|
+
* code stays a code span, but the text goes in as typed, so a component, an
|
|
52
|
+
* expression, or Markdown written in the CMS renders.
|
|
53
|
+
*/
|
|
54
|
+
export declare const renderInlineMdx: (parts: InlinePart[]) => string;
|
|
48
55
|
/** A link or image destination as Markdown carries it verbatim. */
|
|
49
56
|
export declare const destination: (url: string) => string;
|
|
50
57
|
/**
|
|
@@ -54,9 +61,10 @@ export declare const destination: (url: string) => string;
|
|
|
54
61
|
* `data:`) never becomes a clickable link on the docs site (see
|
|
55
62
|
* `safe-links.ts`). The parts stay parts then, so their runs merge with their
|
|
56
63
|
* neighbors'. A label escapes a bare URL too: GFM autolinks nothing inside a
|
|
57
|
-
* link, so its specials would read as syntax
|
|
64
|
+
* link, so its specials would read as syntax — unless `mdx` reads the label
|
|
65
|
+
* as MDX source, like {@link renderInlineMdx}.
|
|
58
66
|
*/
|
|
59
|
-
export declare const linkParts: (parts: InlinePart[], href?: string) => InlinePart[];
|
|
67
|
+
export declare const linkParts: (parts: InlinePart[], href?: string, mdx?: boolean) => InlinePart[];
|
|
60
68
|
/** The ATX prefix for a heading level, clamped to Markdown's six. */
|
|
61
69
|
export declare const headingPrefix: (level: number) => string;
|
|
62
70
|
/** Quote every line of a block. */
|
|
@@ -115,6 +115,14 @@ export interface NotionSourceOptions {
|
|
|
115
115
|
* Status/select property are always imported as published.
|
|
116
116
|
*/
|
|
117
117
|
publishedValue?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Read the text of text blocks (paragraphs, headings, list items, quotes,
|
|
120
|
+
* callouts) as MDX source, so a component, expression, or Markdown typed in
|
|
121
|
+
* Notion renders instead of showing as written. MDX runs code at build
|
|
122
|
+
* time, so this hands everyone who can edit the database the site's build:
|
|
123
|
+
* set it only when you trust them with that. Default false.
|
|
124
|
+
*/
|
|
125
|
+
mdx?: boolean;
|
|
118
126
|
/** Opt-in dev polling interval (seconds); omit to freeze for the session. */
|
|
119
127
|
pollInterval?: number;
|
|
120
128
|
/** Injected for tests; otherwise built from `@notionhq/client`. */
|
|
@@ -40,8 +40,9 @@
|
|
|
40
40
|
* Cloudflare does not apply `_headers` to worker-first routes, so the wrapper
|
|
41
41
|
* also re-stamps what the static layer would otherwise add on the routes it
|
|
42
42
|
* takes over: the homepage agent-discovery `Link` header, the Markdown
|
|
43
|
-
* `charset=utf-8`,
|
|
44
|
-
*
|
|
43
|
+
* `charset=utf-8`, the sandbox on the SVGs a content source downloaded (see
|
|
44
|
+
* `deploy/headers.ts`), and `X-Powered-By` unless `poweredBy` is `false`. The
|
|
45
|
+
* raw `.md`/`.mdx` URLs are
|
|
45
46
|
* exempted from worker-first routing with negative rules, keeping their
|
|
46
47
|
* `_headers` treatment and their zero-Worker serving path.
|
|
47
48
|
*
|
|
@@ -133,6 +134,8 @@ export interface NegotiationWorkerOptions {
|
|
|
133
134
|
base?: string;
|
|
134
135
|
/** Homepage agent-discovery `Link` header (see `ai/link-headers.ts`). */
|
|
135
136
|
homeLinkHeader?: string | null;
|
|
137
|
+
/** Whether responses identify Blume with `X-Powered-By`. Defaults to `true`. */
|
|
138
|
+
poweredBy?: boolean;
|
|
136
139
|
/** Estimated token count of the homepage Markdown mirror. */
|
|
137
140
|
homeTokens?: number;
|
|
138
141
|
/** Configured redirects the wrapper answers with their exact status. */
|
|
@@ -54,6 +54,8 @@ export declare const nodePatternRedirects: (project: BlumeProject) => CompiledRe
|
|
|
54
54
|
export interface NodeEntryOptions {
|
|
55
55
|
/** `deployment.base`, normalized (`""` at the root). */
|
|
56
56
|
base?: string;
|
|
57
|
+
/** Whether responses identify Blume with `X-Powered-By`. Defaults to `true`. */
|
|
58
|
+
poweredBy?: boolean;
|
|
57
59
|
/** The configured redirects, from {@link nodeRedirects}. */
|
|
58
60
|
redirects?: NodeRedirects;
|
|
59
61
|
/** The configured pattern redirects, from {@link nodePatternRedirects}. */
|
|
@@ -63,7 +65,12 @@ export interface NodeEntryOptions {
|
|
|
63
65
|
* The entry that replaces Astro's: it answers a configured redirect with its
|
|
64
66
|
* exact status, and otherwise stamps the rules' headers on the response and
|
|
65
67
|
* hands the request to Astro's handler. `send` leaves a Content-Type that is
|
|
66
|
-
* already set alone, so the registered media type wins.
|
|
68
|
+
* already set alone, so the registered media type wins. Unless `poweredBy` is
|
|
69
|
+
* `false`, every answer also names Blume in `X-Powered-By` — the redirects,
|
|
70
|
+
* and the prerendered pages and files the static handler serves, which
|
|
71
|
+
* Blume's runtime middleware never sees. A middleware-mode entry leaves that
|
|
72
|
+
* header to the middleware: Astro hands a request it has no route for back to
|
|
73
|
+
* the host app through `next()`, and that response is the host's own.
|
|
67
74
|
*
|
|
68
75
|
* A rule matches the file the static handler will serve, not the raw URL:
|
|
69
76
|
* Astro strips the base when it leads the path and serves the rest from the
|
|
@@ -81,8 +88,9 @@ export interface NodeEntryOptions {
|
|
|
81
88
|
*/
|
|
82
89
|
export declare const nodeEntryWrapper: (rules: readonly NodeHeaderRule[], options?: NodeEntryOptions) => string;
|
|
83
90
|
/**
|
|
84
|
-
* Put the wrapper in front of a Node server build's entry. A build with
|
|
85
|
-
* rule (no API catalog, AI catalog, MCP server,
|
|
86
|
-
* downloaded content assets) and no redirect leaves
|
|
91
|
+
* Put the wrapper in front of a Node server build's entry. A build with
|
|
92
|
+
* `poweredBy` off, no rule (no API catalog, AI catalog, MCP server,
|
|
93
|
+
* signatures directory, or downloaded content assets), and no redirect leaves
|
|
94
|
+
* Astro's entry alone.
|
|
87
95
|
*/
|
|
88
96
|
export declare const wrapNodeEntry: (project: BlumeProject, log: BuildLog) => Promise<void>;
|
|
@@ -50,8 +50,8 @@ export declare const rebaseVercelRoutes: (project: BlumeProject, log: BuildLog)
|
|
|
50
50
|
* hidden runtime silently drops the function's chunks and `node_modules`.
|
|
51
51
|
* Static assets are served from the tree's `static/` half, so the deploy
|
|
52
52
|
* artifacts are written there; headers (the discovery files', the sandbox on
|
|
53
|
-
* downloaded SVGs) arrive through the routing config rather
|
|
54
|
-
* `_headers` file, which Vercel never reads. The adapter ignores
|
|
53
|
+
* downloaded SVGs, `X-Powered-By`) arrive through the routing config rather
|
|
54
|
+
* than a `_headers` file, which Vercel never reads. The adapter ignores
|
|
55
55
|
* `deployment.base`, so under one the build moves the static files and the
|
|
56
56
|
* routes beneath it.
|
|
57
57
|
*/
|
|
@@ -106,14 +106,16 @@ export declare const buildNegotiationRoutes: (routePaths: readonly string[], hom
|
|
|
106
106
|
* phase right before the adapter's `/404.html` fallback — and nowhere when
|
|
107
107
|
* that fallback is absent, since a `dest` with no file behind it would serve
|
|
108
108
|
* nothing. With `svgAssets`, a main-phase route also sandboxes the SVGs a
|
|
109
|
-
* content source downloaded (see {@link svgAssetRoute}).
|
|
109
|
+
* content source downloaded (see {@link svgAssetRoute}). With `poweredBy`, a
|
|
110
|
+
* route at the head of the config, ahead of the adapter's redirects, names
|
|
111
|
+
* Blume on every response (see {@link poweredByRoute}). Under a `base`, every
|
|
110
112
|
* route matches and names paths beneath it, and the fallback anchor is the
|
|
111
113
|
* one {@link rebaseAdapterRoutes} moved there. Returns the updated JSON
|
|
112
114
|
* text (tab-indented, like the adapter's own output), or `null` when there is
|
|
113
115
|
* nowhere safe to splice: an unparsable config, no `routes` array, or no
|
|
114
116
|
* `handle: "filesystem"` marker to anchor the splice.
|
|
115
117
|
*/
|
|
116
|
-
export declare const injectNegotiationRoutes: (configText: string, routePaths: readonly string[], homeLinkHeader?: string | null, contentTypeOverrides?: Record<string, string>, homeTokens?: number, notFound?: NotFoundVariants, corsPaths?: readonly string[], svgAssets?: boolean, base?: string) => string | null;
|
|
118
|
+
export declare const injectNegotiationRoutes: (configText: string, routePaths: readonly string[], homeLinkHeader?: string | null, contentTypeOverrides?: Record<string, string>, homeTokens?: number, notFound?: NotFoundVariants, corsPaths?: readonly string[], svgAssets?: boolean, base?: string, poweredBy?: boolean) => string | null;
|
|
117
119
|
/**
|
|
118
120
|
* Splice routes for the pattern redirects (see `vercelPatternRoutes`) into a
|
|
119
121
|
* Build Output `config.json`, in the main phase just ahead of
|
|
@@ -2,17 +2,18 @@ import { HTMLElement } from "node-html-parser";
|
|
|
2
2
|
import type { Node } from "node-html-parser";
|
|
3
3
|
import type { BlumeProject } from "../core/project-graph.ts";
|
|
4
4
|
import type { ProjectContext } from "../core/types.ts";
|
|
5
|
-
import type { NarrationProvider } from "./provider.ts";
|
|
5
|
+
import type { GatewayNarrationProvider, NarrationProvider, OpenAINarrationProvider } from "./provider.ts";
|
|
6
6
|
import type { NarrationCues, NarrationTree } from "./script.ts";
|
|
7
7
|
/**
|
|
8
8
|
* Generated narration: after Astro writes the HTML, read every page that
|
|
9
9
|
* carries the player exactly as the browser will (same walker, same blocks),
|
|
10
10
|
* split it into sentences, and give each sentence a clip from the configured
|
|
11
11
|
* speech model. Clips are cached by what decides their sound (text, language,
|
|
12
|
-
* model, voice, instructions, provider options), so a rebuild only
|
|
13
|
-
* sentences that changed, and one sentence shared by many pages is
|
|
14
|
-
* once. Each page gets a manifest listing its clips; the player
|
|
15
|
-
* order and falls back to browser voices wherever a manifest is
|
|
12
|
+
* model, voice, instructions, provider options, endpoint), so a rebuild only
|
|
13
|
+
* pays for sentences that changed, and one sentence shared by many pages is
|
|
14
|
+
* generated once. Each page gets a manifest listing its clips; the player
|
|
15
|
+
* plays them in order and falls back to browser voices wherever a manifest is
|
|
16
|
+
* missing.
|
|
16
17
|
*/
|
|
17
18
|
/** How the build logs: the integration's Astro logger. */
|
|
18
19
|
export interface NarrationLogger {
|
|
@@ -23,7 +24,10 @@ export interface NarrationLogger {
|
|
|
23
24
|
export type Speak = (text: string, lang: string) => Promise<Uint8Array>;
|
|
24
25
|
/** What a narration build did, for the log line and tests. */
|
|
25
26
|
export interface NarrationBuildResult {
|
|
26
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Clips that failed to generate, or that a missing key left ungenerated;
|
|
29
|
+
* their pages get no manifest.
|
|
30
|
+
*/
|
|
27
31
|
failed: number;
|
|
28
32
|
/** Clips generated by the speech model on this build. */
|
|
29
33
|
generated: number;
|
|
@@ -55,16 +59,34 @@ export declare const readPlayerPage: (html: string) => PlayerPage | null;
|
|
|
55
59
|
/**
|
|
56
60
|
* A clip's cache key: a digest of everything that decides how it sounds. The
|
|
57
61
|
* Blume version is deliberately left out, unlike the OG card's: an upgrade
|
|
58
|
-
* shouldn't pay to regenerate audio that would sound the same.
|
|
62
|
+
* shouldn't pay to regenerate audio that would sound the same. A build
|
|
63
|
+
* resolves `endpoint` once and passes it in, rather than reading the
|
|
64
|
+
* environment for every sentence.
|
|
59
65
|
*/
|
|
60
|
-
export declare const clipKey: (provider: NarrationProvider, lang: string, text: string) => string;
|
|
66
|
+
export declare const clipKey: (provider: NarrationProvider, lang: string, text: string, endpoint?: string | undefined) => string;
|
|
61
67
|
/** Speak through the Vercel AI Gateway with the provider's model and voice. */
|
|
62
|
-
export declare const gatewaySpeaker: (provider:
|
|
68
|
+
export declare const gatewaySpeaker: (provider: GatewayNarrationProvider) => Speak;
|
|
69
|
+
/**
|
|
70
|
+
* Speak through OpenAI's speech API, or with `baseUrl` through any server
|
|
71
|
+
* that serves it (`POST /audio/speech`): Kokoro-FastAPI, Speaches, LiteLLM.
|
|
72
|
+
* That API takes no language, so none is sent and the model or voice
|
|
73
|
+
* decides it. Without a key, no bearer token is sent (an `Authorization` in
|
|
74
|
+
* `headers` still is). A build resolves `baseURL` once and passes it in.
|
|
75
|
+
*/
|
|
76
|
+
export declare const openaiSpeaker: (provider: OpenAINarrationProvider, baseURL?: string) => Speak;
|
|
77
|
+
/**
|
|
78
|
+
* The env var a build needs to generate with `provider` and doesn't have, or
|
|
79
|
+
* `null` when it can go ahead: the key is set, Vercel's OIDC token stands in
|
|
80
|
+
* for the gateway's, or the provider names no key (`openai()` with a
|
|
81
|
+
* `baseUrl` and no `apiKeyEnv`).
|
|
82
|
+
*/
|
|
83
|
+
export declare const missingKey: (provider: NarrationProvider) => string | null;
|
|
63
84
|
/**
|
|
64
85
|
* Generate the narration for a built site in `distDir`: a clip per sentence
|
|
65
|
-
* and a manifest per page. Does nothing unless `narration.provider` is set
|
|
66
|
-
*
|
|
67
|
-
* pages
|
|
86
|
+
* and a manifest per page. Does nothing unless `narration.provider` is set.
|
|
87
|
+
* When new clips are needed and the provider's key is missing, it warns and
|
|
88
|
+
* generates nothing, so only pages whose clips are all cached get audio (the
|
|
89
|
+
* rest read with browser voices). `speak` replaces the provider call.
|
|
68
90
|
*/
|
|
69
91
|
export declare const buildNarration: (project: BlumeProject, distDir: string, logger: NarrationLogger, speak?: Speak) => Promise<NarrationBuildResult | null>;
|
|
70
92
|
export {};
|
|
@@ -1,19 +1,36 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
/** The speech model narration uses when `gateway()` names none. */
|
|
3
3
|
export declare const DEFAULT_NARRATION_MODEL = "openai/tts-1-hd";
|
|
4
|
-
/** The voice narration uses when
|
|
4
|
+
/** The voice narration uses when the provider names none. */
|
|
5
5
|
export declare const DEFAULT_NARRATION_VOICE = "alloy";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* `voice` and `instructions` are narration options and are rejected by the
|
|
10
|
-
* assistant.
|
|
7
|
+
* The AI SDK provider `openai()` narration speaks through, with or without a
|
|
8
|
+
* `baseUrl`: `@ai-sdk/openai-compatible` has no speech models.
|
|
11
9
|
*/
|
|
12
|
-
export declare const
|
|
10
|
+
export declare const OPENAI_SPEECH_DEP = "@ai-sdk/openai";
|
|
11
|
+
/**
|
|
12
|
+
* Whether `url` carries a username or password, which `fetch` refuses to
|
|
13
|
+
* send and whose error message would print them. A URL that doesn't parse
|
|
14
|
+
* has none.
|
|
15
|
+
*/
|
|
16
|
+
export declare const hasCredentials: (url: string) => boolean;
|
|
17
|
+
/**
|
|
18
|
+
* `narration.provider`: the `gateway()` or `openai()` descriptor from
|
|
19
|
+
* `blume/ai`, read with speech defaults. `reasoning` (and `openai()`'s
|
|
20
|
+
* `name`, which speech models don't read) are assistant options and are
|
|
21
|
+
* rejected here; `voice` and `instructions` are narration options and are
|
|
22
|
+
* rejected by the assistant.
|
|
23
|
+
*
|
|
24
|
+
* `openai()` is read for what narration needs, not what the assistant does:
|
|
25
|
+
* it speaks through `@ai-sdk/openai` whatever the `baseUrl`, and a custom
|
|
26
|
+
* endpoint gets only the key `apiKeyEnv` names, never `OPENAI_API_KEY` by
|
|
27
|
+
* default, so it may take none at all. A key that is named is required.
|
|
28
|
+
*/
|
|
29
|
+
export declare const narrationProviderSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
30
|
kind: z.ZodLiteral<"gateway">;
|
|
14
31
|
options: z.ZodObject<{
|
|
15
|
-
instructions: z.ZodOptional<z.ZodString>;
|
|
16
32
|
model: z.ZodDefault<z.ZodString>;
|
|
33
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
17
34
|
voice: z.ZodDefault<z.ZodString>;
|
|
18
35
|
apiKeyEnv: z.ZodDefault<z.ZodString>;
|
|
19
36
|
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
@@ -21,6 +38,77 @@ export declare const narrationProviderSchema: z.ZodObject<{
|
|
|
21
38
|
}, z.core.$strict>;
|
|
22
39
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
23
40
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
24
|
-
}, z.core.$strict
|
|
41
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
42
|
+
kind: z.ZodLiteral<"openai">;
|
|
43
|
+
options: z.ZodObject<{
|
|
44
|
+
apiKeyEnv: z.ZodOptional<z.ZodString>;
|
|
45
|
+
baseUrl: z.ZodOptional<z.ZodURL>;
|
|
46
|
+
model: z.ZodString;
|
|
47
|
+
instructions: z.ZodOptional<z.ZodString>;
|
|
48
|
+
voice: z.ZodDefault<z.ZodString>;
|
|
49
|
+
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
50
|
+
providerOptions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodJSONSchema>>>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
53
|
+
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
54
|
+
}, z.core.$strict>], "kind">, z.ZodTransform<{
|
|
55
|
+
kind: "gateway";
|
|
56
|
+
options: {
|
|
57
|
+
model: string;
|
|
58
|
+
voice: string;
|
|
59
|
+
apiKeyEnv: string;
|
|
60
|
+
instructions?: string | undefined;
|
|
61
|
+
headers?: Record<string, string> | undefined;
|
|
62
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
63
|
+
};
|
|
64
|
+
requiredSecrets: string[];
|
|
65
|
+
runtimeDeps: string[];
|
|
66
|
+
} | {
|
|
67
|
+
options: {
|
|
68
|
+
model: string;
|
|
69
|
+
voice: string;
|
|
70
|
+
apiKeyEnv?: string | undefined;
|
|
71
|
+
baseUrl?: string | undefined;
|
|
72
|
+
instructions?: string | undefined;
|
|
73
|
+
headers?: Record<string, string> | undefined;
|
|
74
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
75
|
+
};
|
|
76
|
+
requiredSecrets: string[];
|
|
77
|
+
runtimeDeps: string[];
|
|
78
|
+
kind: "openai";
|
|
79
|
+
}, {
|
|
80
|
+
kind: "gateway";
|
|
81
|
+
options: {
|
|
82
|
+
model: string;
|
|
83
|
+
voice: string;
|
|
84
|
+
apiKeyEnv: string;
|
|
85
|
+
instructions?: string | undefined;
|
|
86
|
+
headers?: Record<string, string> | undefined;
|
|
87
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
88
|
+
};
|
|
89
|
+
requiredSecrets: string[];
|
|
90
|
+
runtimeDeps: string[];
|
|
91
|
+
} | {
|
|
92
|
+
kind: "openai";
|
|
93
|
+
options: {
|
|
94
|
+
model: string;
|
|
95
|
+
voice: string;
|
|
96
|
+
apiKeyEnv?: string | undefined;
|
|
97
|
+
baseUrl?: string | undefined;
|
|
98
|
+
instructions?: string | undefined;
|
|
99
|
+
headers?: Record<string, string> | undefined;
|
|
100
|
+
providerOptions?: Record<string, Record<string, z.core.util.JSONType>> | undefined;
|
|
101
|
+
};
|
|
102
|
+
requiredSecrets: string[];
|
|
103
|
+
runtimeDeps: string[];
|
|
104
|
+
}>>;
|
|
25
105
|
/** A validated narration provider, defaults filled in. */
|
|
26
106
|
export type NarrationProvider = z.output<typeof narrationProviderSchema>;
|
|
107
|
+
/** A validated `gateway()` narration provider. */
|
|
108
|
+
export type GatewayNarrationProvider = Extract<NarrationProvider, {
|
|
109
|
+
kind: "gateway";
|
|
110
|
+
}>;
|
|
111
|
+
/** A validated `openai()` narration provider. */
|
|
112
|
+
export type OpenAINarrationProvider = Extract<NarrationProvider, {
|
|
113
|
+
kind: "openai";
|
|
114
|
+
}>;
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
+
/** Whether `text` ends in a colon that leads in to what follows it. */
|
|
2
|
+
export declare const endsInLeadIn: (text: string) => boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Close prose with a period unless it already ends a sentence. A colon at the
|
|
5
|
+
* end is kept and gains the period: use this when the caller has already told
|
|
6
|
+
* a lead-in apart from a literal (`tenant:` in inline code). Empty text stays
|
|
7
|
+
* empty.
|
|
8
|
+
*/
|
|
9
|
+
export declare const closeSentence: (text: string) => string;
|
|
1
10
|
/**
|
|
2
11
|
* Close a fragment of spec prose as a sentence. OpenAPI `summary` values are
|
|
3
12
|
* usually title-like ("Get a flag", no period), so prose that runs straight
|
|
4
13
|
* into the next generated sentence ("Get a flag Reference for …") needs one.
|
|
5
|
-
*
|
|
14
|
+
* A lead-in colon becomes the period rather than gaining one after it, and
|
|
15
|
+
* prose that already ended before it ("e.g.:") keeps its own mark.
|
|
6
16
|
*/
|
|
7
17
|
export declare const asSentence: (text: string) => string;
|
|
@@ -11,7 +11,7 @@ export interface PostalAddressIdentity {
|
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
13
|
* `seo.organization`: the organization behind the site, emitted on every page
|
|
14
|
-
* as an `Organization` node the WebSite and
|
|
14
|
+
* as an `Organization` node the WebSite and page nodes cite as publisher.
|
|
15
15
|
*/
|
|
16
16
|
export interface OrganizationIdentity {
|
|
17
17
|
address?: PostalAddressIdentity;
|
|
@@ -62,6 +62,12 @@ export interface StructuredDataInput {
|
|
|
62
62
|
description?: string;
|
|
63
63
|
/** Page route, e.g. `/blog/post`. */
|
|
64
64
|
route: string;
|
|
65
|
+
/**
|
|
66
|
+
* The route of this page's homepage: the navigation tree root
|
|
67
|
+
* (`navigation.root` — `/fr` for a locale, `/docs` under a `basePath`,
|
|
68
|
+
* `/v1.0` in an archived version). Defaults to `/`.
|
|
69
|
+
*/
|
|
70
|
+
homeRoute?: string;
|
|
65
71
|
/** Deployment base (`import.meta.env.BASE_URL`); prefixed onto absolute URLs. */
|
|
66
72
|
base?: string;
|
|
67
73
|
/** Content type — `blog` and `changelog` map to richer article types. */
|
|
@@ -96,10 +102,9 @@ export declare const toIso: (value: DateInput | undefined) => string | undefined
|
|
|
96
102
|
/**
|
|
97
103
|
* Build a schema.org JSON-LD `@graph` for a page: site identity (the WebSite,
|
|
98
104
|
* plus the configured Organization everywhere and the SoftwareApplication on
|
|
99
|
-
* the homepage), the page
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
* route-relative.
|
|
105
|
+
* the homepage), the page itself (a WebPage on the homepage, an article
|
|
106
|
+
* elsewhere), and an article's breadcrumb trail. URLs are absolute when
|
|
107
|
+
* `siteUrl` is set, otherwise route-relative.
|
|
103
108
|
*/
|
|
104
|
-
export declare const buildStructuredData: (input: StructuredDataInput) => JsonLdNode
|
|
109
|
+
export declare const buildStructuredData: (input: StructuredDataInput) => JsonLdNode;
|
|
105
110
|
export {};
|
|
@@ -7,6 +7,12 @@ export interface NotionOptions extends SharedSourceOptions {
|
|
|
7
7
|
concurrency?: number;
|
|
8
8
|
/** Notion database id. */
|
|
9
9
|
database: string;
|
|
10
|
+
/**
|
|
11
|
+
* Read text typed in Notion as MDX, so components and Markdown in it
|
|
12
|
+
* render. Anyone who can edit the database can then run code at build
|
|
13
|
+
* time. Default false: text renders as written.
|
|
14
|
+
*/
|
|
15
|
+
mdx?: boolean;
|
|
10
16
|
/** Notion property names mapped onto Blume meta. */
|
|
11
17
|
properties?: {
|
|
12
18
|
/** Property holding the page description. */
|
|
@@ -28,6 +34,7 @@ export declare const notionOptionsSchema: z.ZodObject<{
|
|
|
28
34
|
prefix: z.ZodOptional<z.ZodString>;
|
|
29
35
|
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
30
36
|
database: z.ZodString;
|
|
37
|
+
mdx: z.ZodOptional<z.ZodBoolean>;
|
|
31
38
|
properties: z.ZodOptional<z.ZodObject<{
|
|
32
39
|
description: z.ZodOptional<z.ZodString>;
|
|
33
40
|
order: z.ZodOptional<z.ZodString>;
|
|
@@ -45,6 +52,7 @@ export declare const notionAdapterSchema: z.ZodObject<{
|
|
|
45
52
|
prefix: z.ZodOptional<z.ZodString>;
|
|
46
53
|
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
47
54
|
database: z.ZodString;
|
|
55
|
+
mdx: z.ZodOptional<z.ZodBoolean>;
|
|
48
56
|
properties: z.ZodOptional<z.ZodObject<{
|
|
49
57
|
description: z.ZodOptional<z.ZodString>;
|
|
50
58
|
order: z.ZodOptional<z.ZodString>;
|