blume 2.0.0 → 2.0.1
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 +1 -1
- package/CHANGELOG.md +28 -0
- package/README.md +2 -2
- package/dist/cli/{chunk-f7t03s3g.js → chunk-27g6wdth.js} +2 -2
- package/dist/cli/{chunk-mnqj32sj.js → chunk-2hn4b8z7.js} +13 -13
- package/dist/cli/chunk-2hn4b8z7.js.map +12 -0
- package/dist/cli/{chunk-by2290sx.js → chunk-5shv93fd.js} +2 -2
- package/dist/cli/{chunk-a9kptbw5.js → chunk-6crbhc3x.js} +3 -3
- package/dist/cli/{chunk-a9kptbw5.js.map → chunk-6crbhc3x.js.map} +1 -1
- package/dist/cli/{chunk-mwt1k8n7.js → chunk-6hsn950k.js} +20 -20
- package/dist/cli/chunk-6hsn950k.js.map +10 -0
- package/dist/cli/{chunk-11j0384y.js → chunk-6vm74dry.js} +13 -13
- package/dist/cli/{chunk-11j0384y.js.map → chunk-6vm74dry.js.map} +3 -3
- package/dist/cli/{chunk-j8mw0za6.js → chunk-79jhk4py.js} +8 -8
- package/dist/cli/{chunk-j8mw0za6.js.map → chunk-79jhk4py.js.map} +2 -2
- package/dist/cli/{chunk-nk3ts2xk.js → chunk-82bbrxdn.js} +2 -2
- package/dist/cli/{chunk-2q1dwty4.js → chunk-ah61y8py.js} +8 -8
- package/dist/cli/{chunk-2q1dwty4.js.map → chunk-ah61y8py.js.map} +4 -4
- package/dist/cli/{chunk-zxccj738.js → chunk-ce574jw2.js} +1 -1
- package/dist/cli/{chunk-y3e45rc8.js → chunk-ch6g3ar0.js} +3 -3
- package/dist/cli/{chunk-beat36xx.js → chunk-dh8cwk36.js} +5 -5
- package/dist/cli/{chunk-beat36xx.js.map → chunk-dh8cwk36.js.map} +2 -2
- package/dist/cli/{chunk-1w8dp3qb.js → chunk-epjnccmv.js} +13 -13
- package/dist/cli/{chunk-ernrthtr.js → chunk-f2z5v128.js} +13 -13
- package/dist/cli/{chunk-zg2gtj10.js → chunk-fs23ddbb.js} +2 -2
- package/dist/cli/{chunk-7ez8ny0t.js → chunk-fxypxtvm.js} +2 -2
- package/dist/cli/{chunk-tzne8qfq.js → chunk-fz5wtpmh.js} +13 -13
- package/dist/cli/{chunk-b5aj94ah.js → chunk-hdpx1tax.js} +4 -4
- package/dist/cli/{chunk-d80hr03s.js → chunk-jwyddg7y.js} +9 -9
- package/dist/cli/{chunk-d80hr03s.js.map → chunk-jwyddg7y.js.map} +2 -2
- package/dist/cli/{chunk-fh5hj5jt.js → chunk-kdp5q7ke.js} +15 -15
- package/dist/cli/{chunk-6k8vp3ta.js → chunk-kpf8rrjc.js} +9 -9
- package/dist/cli/{chunk-6k8vp3ta.js.map → chunk-kpf8rrjc.js.map} +3 -3
- package/dist/cli/{chunk-5a2z0198.js → chunk-m3vmjgmq.js} +9 -9
- package/dist/cli/{chunk-5a2z0198.js.map → chunk-m3vmjgmq.js.map} +2 -2
- package/dist/cli/{chunk-bctazmbk.js → chunk-mb2919y2.js} +4 -4
- package/dist/cli/{chunk-79njf86q.js → chunk-q5163e60.js} +13 -13
- package/dist/cli/{chunk-xaz13gwg.js → chunk-qkqwkpte.js} +196 -208
- package/dist/cli/{chunk-xaz13gwg.js.map → chunk-qkqwkpte.js.map} +48 -48
- package/dist/cli/{chunk-sqn5t4q0.js → chunk-qs4q5p4e.js} +3 -3
- package/dist/cli/{chunk-bw22s759.js → chunk-qwsrynx5.js} +1 -1
- package/dist/cli/{chunk-z01ze5c1.js → chunk-s1p84fyh.js} +15 -15
- package/dist/cli/{chunk-pnnvybbk.js → chunk-s6jhgk0q.js} +5 -5
- package/dist/cli/{chunk-pnnvybbk.js.map → chunk-s6jhgk0q.js.map} +2 -2
- package/dist/cli/{chunk-f2972sbt.js → chunk-vtk4a6dg.js} +1 -1
- package/dist/cli/{chunk-z1f5arsg.js → chunk-wgm7m9qk.js} +21 -21
- package/dist/cli/{chunk-z1f5arsg.js.map → chunk-wgm7m9qk.js.map} +4 -4
- package/dist/cli/{chunk-bnbmcwfb.js → chunk-wm7js3j9.js} +5 -5
- package/dist/cli/{chunk-bnbmcwfb.js.map → chunk-wm7js3j9.js.map} +3 -3
- package/dist/cli/{chunk-d1tadaw7.js → chunk-yt5n7ppj.js} +3 -3
- package/dist/cli/{chunk-pat2zzwc.js → chunk-yw7dm696.js} +1 -1
- package/dist/cli/{chunk-pat2zzwc.js.map → chunk-yw7dm696.js.map} +1 -1
- package/dist/cli/{chunk-88cpgt6h.js → chunk-zxcczpyx.js} +1 -1
- package/dist/cli/{chunk-41za066z.js → chunk-zxh4d9vy.js} +4 -4
- package/dist/cli/index.js +17 -17
- package/dist/types/ai/agent-readability.d.ts +1 -1
- package/dist/types/ai/api/paths.d.ts +1 -1
- package/dist/types/ai/ask-context.d.ts +7 -7
- package/dist/types/ai/ask.d.ts +43 -43
- package/dist/types/ai/index.d.ts +3 -3
- package/dist/types/ai/openapi-components.d.ts +1 -1
- package/dist/types/ai/serializers.d.ts +1 -1
- package/dist/types/ai/visibility.d.ts +1 -1
- package/dist/types/core/config-input.d.ts +17 -17
- package/dist/types/core/config.d.ts +3 -3
- package/dist/types/core/data.d.ts +3 -3
- package/dist/types/core/i18n-ui.d.ts +6 -8
- package/dist/types/core/schema.d.ts +5 -5
- package/dist/types/core/unrecognized-keys.d.ts +1 -1
- package/dist/types/search/documents.d.ts +1 -1
- package/dist/types/search/orama-index.d.ts +1 -1
- package/docs/02-deployment.mdx +4 -4
- package/docs/03-upgrading.mdx +22 -9
- package/docs/04-migrating.mdx +4 -4
- package/docs/08-faq.mdx +3 -3
- package/docs/advanced/custom-pages.mdx +2 -2
- package/docs/advanced/skills.mdx +1 -1
- package/docs/cli/audit.mdx +3 -3
- package/docs/cli/doctor.mdx +3 -3
- package/docs/cli/evals.mdx +7 -7
- package/docs/cli/index.mdx +2 -2
- package/docs/cli/translate.mdx +8 -8
- package/docs/configuration/{ask-ai.mdx → assistant.mdx} +19 -19
- package/docs/configuration/customization.mdx +2 -2
- package/docs/configuration/index.mdx +2 -2
- package/docs/configuration/meta.ts +1 -1
- package/docs/configuration/search.mdx +1 -1
- package/docs/content/i18n.mdx +2 -2
- package/docs/content/islands.mdx +1 -1
- package/docs/discoverability/agent-discovery.mdx +1 -1
- package/docs/discoverability/index.mdx +1 -1
- package/docs/index.mdx +2 -2
- package/package.json +1 -1
- package/skills/blume/SKILL.md +5 -5
- package/skills/blume-migrate/SKILL.md +2 -2
- package/src/ai/agent-readability.ts +4 -4
- package/src/ai/api/paths.ts +1 -1
- package/src/ai/ask-context.ts +7 -7
- package/src/ai/ask-data.ts +2 -2
- package/src/ai/ask.ts +84 -71
- package/src/ai/cors.ts +3 -3
- package/src/ai/index.ts +16 -16
- package/src/ai/openapi-components.ts +1 -1
- package/src/ai/serializers.ts +1 -1
- package/src/ai/visibility.ts +1 -1
- package/src/astro/generate.ts +19 -18
- package/src/astro/module-types.ts +1 -1
- package/src/astro/runtime-deps.ts +6 -6
- package/src/astro/templates.ts +26 -26
- package/src/blume-modules.d.ts +2 -2
- package/src/cli/commands/audit.ts +1 -1
- package/src/cli/commands/doctor.ts +7 -5
- package/src/cli/commands/eval.ts +3 -3
- package/src/cli/commands/migrate.ts +2 -2
- package/src/cli/commands/translate.ts +3 -3
- package/src/cli/commands/upgrade.ts +2 -2
- package/src/cli/required-secrets.ts +3 -3
- package/src/components/copy-feedback.ts +1 -1
- package/src/components/islands/{AskAI.astro → Assistant.astro} +10 -10
- package/src/components/islands/{ask-ai.tsx → assistant.tsx} +23 -23
- package/src/components/islands/hooks.ts +14 -12
- package/src/components/layout/Header.astro +10 -10
- package/src/components/layout/PageLayout.astro +6 -6
- package/src/components/layout/Pagination.astro +7 -7
- package/src/components/layout/ReferenceLayout.astro +1 -1
- package/src/components/layout/RootLayout.astro +6 -6
- package/src/components/layout/Search.astro +13 -13
- package/src/components/layout/analytics-client.ts +1 -1
- package/src/components/layout/drawer-inert.ts +1 -1
- package/src/components/openapi/description.ts +2 -2
- package/src/core/code-fences.ts +1 -1
- package/src/core/config-input.ts +19 -19
- package/src/core/config.ts +3 -3
- package/src/core/data.ts +3 -3
- package/src/core/i18n-ui.ts +35 -9
- package/src/core/request-body.ts +1 -1
- package/src/core/schema.ts +25 -20
- package/src/core/server-features.ts +2 -2
- package/src/core/ui-packs/ar.ts +4 -5
- package/src/core/ui-packs/bg.ts +4 -5
- package/src/core/ui-packs/bn.ts +4 -5
- package/src/core/ui-packs/ca.ts +4 -5
- package/src/core/ui-packs/cs.ts +4 -5
- package/src/core/ui-packs/da.ts +4 -5
- package/src/core/ui-packs/de.ts +4 -5
- package/src/core/ui-packs/el.ts +4 -5
- package/src/core/ui-packs/es.ts +4 -5
- package/src/core/ui-packs/fa.ts +4 -5
- package/src/core/ui-packs/fi.ts +4 -5
- package/src/core/ui-packs/fr.ts +4 -5
- package/src/core/ui-packs/he.ts +4 -5
- package/src/core/ui-packs/hi.ts +4 -5
- package/src/core/ui-packs/hr.ts +4 -5
- package/src/core/ui-packs/hu.ts +4 -5
- package/src/core/ui-packs/id.ts +4 -5
- package/src/core/ui-packs/it.ts +4 -5
- package/src/core/ui-packs/ja.ts +4 -5
- package/src/core/ui-packs/ko.ts +4 -5
- package/src/core/ui-packs/nl.ts +4 -5
- package/src/core/ui-packs/no.ts +4 -5
- package/src/core/ui-packs/pl.ts +4 -5
- package/src/core/ui-packs/pt-br.ts +4 -5
- package/src/core/ui-packs/pt.ts +4 -5
- package/src/core/ui-packs/ro.ts +4 -5
- package/src/core/ui-packs/ru.ts +4 -5
- package/src/core/ui-packs/sk.ts +4 -5
- package/src/core/ui-packs/sr.ts +4 -5
- package/src/core/ui-packs/sv.ts +4 -5
- package/src/core/ui-packs/th.ts +4 -5
- package/src/core/ui-packs/tr.ts +4 -5
- package/src/core/ui-packs/uk.ts +4 -5
- package/src/core/ui-packs/vi.ts +4 -5
- package/src/core/ui-packs/zh-tw.ts +4 -5
- package/src/core/ui-packs/zh.ts +4 -5
- package/src/core/unrecognized-keys.ts +1 -1
- package/src/registry/eject.ts +19 -18
- package/src/search/documents.ts +2 -2
- package/src/search/orama-index.ts +1 -1
- package/src/translate/report.ts +1 -1
- package/src/upgrade/upgrade.ts +1 -1
- package/dist/cli/chunk-mnqj32sj.js.map +0 -12
- package/dist/cli/chunk-mwt1k8n7.js.map +0 -10
- /package/dist/cli/{chunk-f7t03s3g.js.map → chunk-27g6wdth.js.map} +0 -0
- /package/dist/cli/{chunk-by2290sx.js.map → chunk-5shv93fd.js.map} +0 -0
- /package/dist/cli/{chunk-nk3ts2xk.js.map → chunk-82bbrxdn.js.map} +0 -0
- /package/dist/cli/{chunk-zxccj738.js.map → chunk-ce574jw2.js.map} +0 -0
- /package/dist/cli/{chunk-y3e45rc8.js.map → chunk-ch6g3ar0.js.map} +0 -0
- /package/dist/cli/{chunk-1w8dp3qb.js.map → chunk-epjnccmv.js.map} +0 -0
- /package/dist/cli/{chunk-ernrthtr.js.map → chunk-f2z5v128.js.map} +0 -0
- /package/dist/cli/{chunk-zg2gtj10.js.map → chunk-fs23ddbb.js.map} +0 -0
- /package/dist/cli/{chunk-7ez8ny0t.js.map → chunk-fxypxtvm.js.map} +0 -0
- /package/dist/cli/{chunk-tzne8qfq.js.map → chunk-fz5wtpmh.js.map} +0 -0
- /package/dist/cli/{chunk-b5aj94ah.js.map → chunk-hdpx1tax.js.map} +0 -0
- /package/dist/cli/{chunk-fh5hj5jt.js.map → chunk-kdp5q7ke.js.map} +0 -0
- /package/dist/cli/{chunk-bctazmbk.js.map → chunk-mb2919y2.js.map} +0 -0
- /package/dist/cli/{chunk-79njf86q.js.map → chunk-q5163e60.js.map} +0 -0
- /package/dist/cli/{chunk-sqn5t4q0.js.map → chunk-qs4q5p4e.js.map} +0 -0
- /package/dist/cli/{chunk-bw22s759.js.map → chunk-qwsrynx5.js.map} +0 -0
- /package/dist/cli/{chunk-z01ze5c1.js.map → chunk-s1p84fyh.js.map} +0 -0
- /package/dist/cli/{chunk-f2972sbt.js.map → chunk-vtk4a6dg.js.map} +0 -0
- /package/dist/cli/{chunk-d1tadaw7.js.map → chunk-yt5n7ppj.js.map} +0 -0
- /package/dist/cli/{chunk-88cpgt6h.js.map → chunk-zxcczpyx.js.map} +0 -0
- /package/dist/cli/{chunk-41za066z.js.map → chunk-zxh4d9vy.js.map} +0 -0
package/dist/types/ai/ask.d.ts
CHANGED
|
@@ -5,17 +5,17 @@ import type { AdapterDescriptor, JsonValue } from "../core/adapter.ts";
|
|
|
5
5
|
* `reasoning` values minus `provider-default`, which is what omitting the
|
|
6
6
|
* option means.
|
|
7
7
|
*/
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const assistantReasoningLevels: readonly ["none", "minimal", "low", "medium", "high", "xhigh"];
|
|
9
9
|
/** How much the model reasons before answering (an adapter's `reasoning`). */
|
|
10
|
-
export type
|
|
10
|
+
export type AssistantReasoning = (typeof assistantReasoningLevels)[number];
|
|
11
11
|
/**
|
|
12
12
|
* The AI SDK's `providerOptions` shape, forwarded to `streamText` verbatim:
|
|
13
13
|
* `{ [provider]: { [option]: value } }`. The escape hatch for model controls
|
|
14
14
|
* Blume doesn't name, so a new provider knob never needs a Blume field.
|
|
15
15
|
*/
|
|
16
|
-
export type
|
|
17
|
-
/** The options every
|
|
18
|
-
export interface
|
|
16
|
+
export type AssistantProviderOptions = Record<string, Record<string, JsonValue>>;
|
|
17
|
+
/** The options every assistant adapter accepts. */
|
|
18
|
+
export interface AssistantAdapterOptions {
|
|
19
19
|
/**
|
|
20
20
|
* Name of the env var holding the provider's API key. Each adapter has its
|
|
21
21
|
* own default; set this only to point at a different variable.
|
|
@@ -32,10 +32,10 @@ export interface AskAdapterOptions {
|
|
|
32
32
|
* Options passed to `streamText` as its `providerOptions`, untouched, in the
|
|
33
33
|
* AI SDK's own shape (`{ openai: { textVerbosity: "low" } }`, say).
|
|
34
34
|
*/
|
|
35
|
-
providerOptions?:
|
|
35
|
+
providerOptions?: AssistantProviderOptions;
|
|
36
36
|
}
|
|
37
37
|
/** Options for {@link gateway}. */
|
|
38
|
-
export interface
|
|
38
|
+
export interface AssistantGatewayOptions extends AssistantAdapterOptions {
|
|
39
39
|
/** A `provider/model` id routed by the gateway. Defaults to `openai/gpt-5.5`. */
|
|
40
40
|
model?: string;
|
|
41
41
|
/**
|
|
@@ -44,9 +44,9 @@ export interface AskGatewayOptions extends AskAdapterOptions {
|
|
|
44
44
|
* control (OpenAI's `reasoning_effort`, for example); the model has to
|
|
45
45
|
* offer the level you pick. Omitted keeps the model's default.
|
|
46
46
|
*/
|
|
47
|
-
reasoning?:
|
|
47
|
+
reasoning?: AssistantReasoning;
|
|
48
48
|
}
|
|
49
|
-
export type
|
|
49
|
+
export type AssistantGatewayAdapter = AdapterDescriptor<"gateway", AssistantGatewayOptions>;
|
|
50
50
|
export declare const gatewayAdapterSchema: z.ZodObject<{
|
|
51
51
|
kind: z.ZodLiteral<"gateway">;
|
|
52
52
|
options: z.ZodObject<{
|
|
@@ -67,14 +67,14 @@ export declare const gatewayAdapterSchema: z.ZodObject<{
|
|
|
67
67
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
68
68
|
}, z.core.$strict>;
|
|
69
69
|
/**
|
|
70
|
-
* Route
|
|
70
|
+
* Route the assistant through the Vercel AI Gateway (the default). `model` is a
|
|
71
71
|
* `provider/model` string; the key is `AI_GATEWAY_API_KEY`, or Vercel's OIDC
|
|
72
72
|
* token when deployed there. Needs no provider SDK beyond the `ai` package
|
|
73
73
|
* Blume ships.
|
|
74
74
|
*/
|
|
75
|
-
export declare const gateway: (options?:
|
|
75
|
+
export declare const gateway: (options?: AssistantGatewayOptions) => AssistantGatewayAdapter;
|
|
76
76
|
/** Options for {@link openrouter}. */
|
|
77
|
-
export interface
|
|
77
|
+
export interface AssistantOpenRouterOptions extends AssistantAdapterOptions {
|
|
78
78
|
/** The OpenRouter model id (`anthropic/claude-sonnet-4-5`). */
|
|
79
79
|
model: string;
|
|
80
80
|
/**
|
|
@@ -82,9 +82,9 @@ export interface AskOpenRouterOptions extends AskAdapterOptions {
|
|
|
82
82
|
* OpenRouter's `reasoning.effort`, because its provider ignores the AI
|
|
83
83
|
* SDK's call-level option. Omitted keeps the model's default.
|
|
84
84
|
*/
|
|
85
|
-
reasoning?:
|
|
85
|
+
reasoning?: AssistantReasoning;
|
|
86
86
|
}
|
|
87
|
-
export type
|
|
87
|
+
export type AssistantOpenRouterAdapter = AdapterDescriptor<"openrouter", AssistantOpenRouterOptions>;
|
|
88
88
|
export declare const openrouterAdapterSchema: z.ZodObject<{
|
|
89
89
|
kind: z.ZodLiteral<"openrouter">;
|
|
90
90
|
options: z.ZodObject<{
|
|
@@ -105,12 +105,12 @@ export declare const openrouterAdapterSchema: z.ZodObject<{
|
|
|
105
105
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
106
106
|
}, z.core.$strict>;
|
|
107
107
|
/**
|
|
108
|
-
* Route
|
|
108
|
+
* Route the assistant through OpenRouter. Reads `OPENROUTER_API_KEY` and needs
|
|
109
109
|
* `@openrouter/ai-sdk-provider` installed in the project.
|
|
110
110
|
*/
|
|
111
|
-
export declare const openrouter: (options:
|
|
111
|
+
export declare const openrouter: (options: AssistantOpenRouterOptions) => AssistantOpenRouterAdapter;
|
|
112
112
|
/** Options for {@link llmgateway}. */
|
|
113
|
-
export interface
|
|
113
|
+
export interface AssistantLlmGatewayOptions extends AssistantAdapterOptions {
|
|
114
114
|
/** Overrides the preset endpoint (`https://api.llmgateway.io/v1`). */
|
|
115
115
|
baseUrl?: string;
|
|
116
116
|
/** The model id LLMGateway serves. */
|
|
@@ -119,9 +119,9 @@ export interface AskLlmGatewayOptions extends AskAdapterOptions {
|
|
|
119
119
|
* How much the model reasons before answering, sent in the request as
|
|
120
120
|
* `reasoning_effort`. Omitted keeps the model's default.
|
|
121
121
|
*/
|
|
122
|
-
reasoning?:
|
|
122
|
+
reasoning?: AssistantReasoning;
|
|
123
123
|
}
|
|
124
|
-
export type
|
|
124
|
+
export type AssistantLlmGatewayAdapter = AdapterDescriptor<"llmgateway", AssistantLlmGatewayOptions>;
|
|
125
125
|
export declare const llmgatewayAdapterSchema: z.ZodObject<{
|
|
126
126
|
kind: z.ZodLiteral<"llmgateway">;
|
|
127
127
|
options: z.ZodObject<{
|
|
@@ -143,21 +143,21 @@ export declare const llmgatewayAdapterSchema: z.ZodObject<{
|
|
|
143
143
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
144
144
|
}, z.core.$strict>;
|
|
145
145
|
/**
|
|
146
|
-
* Route
|
|
146
|
+
* Route the assistant through LLMGateway's OpenAI-compatible endpoint. Reads
|
|
147
147
|
* `LLMGATEWAY_API_KEY` and needs `@ai-sdk/openai-compatible` installed.
|
|
148
148
|
*/
|
|
149
|
-
export declare const llmgateway: (options:
|
|
149
|
+
export declare const llmgateway: (options: AssistantLlmGatewayOptions) => AssistantLlmGatewayAdapter;
|
|
150
150
|
/**
|
|
151
151
|
* Options for {@link inkeep}. No `reasoning`: Inkeep runs its own QA pipeline
|
|
152
152
|
* behind an OpenAI-compatible endpoint with no reasoning control.
|
|
153
153
|
*/
|
|
154
|
-
export interface
|
|
154
|
+
export interface AssistantInkeepOptions extends AssistantAdapterOptions {
|
|
155
155
|
/** Overrides the preset endpoint (`https://api.inkeep.com/v1`). */
|
|
156
156
|
baseUrl?: string;
|
|
157
157
|
/** The Inkeep QA model id. */
|
|
158
158
|
model: string;
|
|
159
159
|
}
|
|
160
|
-
export type
|
|
160
|
+
export type AssistantInkeepAdapter = AdapterDescriptor<"inkeep", AssistantInkeepOptions>;
|
|
161
161
|
export declare const inkeepAdapterSchema: z.ZodObject<{
|
|
162
162
|
kind: z.ZodLiteral<"inkeep">;
|
|
163
163
|
options: z.ZodObject<{
|
|
@@ -175,9 +175,9 @@ export declare const inkeepAdapterSchema: z.ZodObject<{
|
|
|
175
175
|
* dashboard, so Blume leaves it ungrounded and it takes no `reasoning`.
|
|
176
176
|
* Reads `INKEEP_API_KEY` and needs `@ai-sdk/openai-compatible` installed.
|
|
177
177
|
*/
|
|
178
|
-
export declare const inkeep: (options:
|
|
178
|
+
export declare const inkeep: (options: AssistantInkeepOptions) => AssistantInkeepAdapter;
|
|
179
179
|
/** Options for {@link openaiCompatible}. */
|
|
180
|
-
export interface
|
|
180
|
+
export interface AssistantOpenAICompatibleOptions extends AssistantAdapterOptions {
|
|
181
181
|
/** Name of the env var holding the endpoint's API key. */
|
|
182
182
|
apiKeyEnv: string;
|
|
183
183
|
/** The endpoint's base URL (`https://my-gateway.example.com/v1`). */
|
|
@@ -191,9 +191,9 @@ export interface AskOpenAICompatibleOptions extends AskAdapterOptions {
|
|
|
191
191
|
* `reasoning_effort`, so the endpoint has to accept that parameter.
|
|
192
192
|
* Omitted keeps the model's default.
|
|
193
193
|
*/
|
|
194
|
-
reasoning?:
|
|
194
|
+
reasoning?: AssistantReasoning;
|
|
195
195
|
}
|
|
196
|
-
export type
|
|
196
|
+
export type AssistantOpenAICompatibleAdapter = AdapterDescriptor<"openai-compatible", AssistantOpenAICompatibleOptions>;
|
|
197
197
|
export declare const openaiCompatibleAdapterSchema: z.ZodObject<{
|
|
198
198
|
kind: z.ZodLiteral<"openai-compatible">;
|
|
199
199
|
options: z.ZodObject<{
|
|
@@ -216,28 +216,28 @@ export declare const openaiCompatibleAdapterSchema: z.ZodObject<{
|
|
|
216
216
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
217
217
|
}, z.core.$strict>;
|
|
218
218
|
/**
|
|
219
|
-
* Route
|
|
219
|
+
* Route the assistant through any OpenAI-compatible endpoint: supply its `baseUrl`,
|
|
220
220
|
* the `model` it serves, and the env var holding its key. Needs
|
|
221
221
|
* `@ai-sdk/openai-compatible` installed.
|
|
222
222
|
*/
|
|
223
|
-
export declare const openaiCompatible: (options:
|
|
224
|
-
/** Which backend answers
|
|
225
|
-
export type
|
|
223
|
+
export declare const openaiCompatible: (options: AssistantOpenAICompatibleOptions) => AssistantOpenAICompatibleAdapter;
|
|
224
|
+
/** Which backend answers the assistant: the value of `gateway()`, `openrouter()`, … */
|
|
225
|
+
export type AssistantAdapter = AssistantGatewayAdapter | AssistantOpenRouterAdapter | AssistantLlmGatewayAdapter | AssistantInkeepAdapter | AssistantOpenAICompatibleAdapter;
|
|
226
226
|
/**
|
|
227
|
-
* Error params for `ai.
|
|
227
|
+
* Error params for `ai.assistant`: a 1.x flat provider field (`model`, `apiKeyEnv`,
|
|
228
228
|
* `baseUrl`, `headers`, `reasoning`) names the adapter call it moves into —
|
|
229
229
|
* the one the object's `provider` picks, 1.x string or descriptor — instead
|
|
230
230
|
* of Zod's bare "Unrecognized key"; any other unknown key keeps its wording.
|
|
231
231
|
*/
|
|
232
|
-
export declare const
|
|
232
|
+
export declare const assistantMovedFieldsHint: {
|
|
233
233
|
error: (issue: z.core.$ZodRawIssue) => string | undefined;
|
|
234
234
|
};
|
|
235
235
|
/**
|
|
236
|
-
* `ai.
|
|
236
|
+
* `ai.assistant.provider`: the descriptor an adapter factory returned, validated
|
|
237
237
|
* against that adapter's own option schema. A value that isn't a descriptor
|
|
238
238
|
* at all (a 1.x provider name) names the factory that replaced it.
|
|
239
239
|
*/
|
|
240
|
-
export declare const
|
|
240
|
+
export declare const assistantAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
241
241
|
kind: z.ZodLiteral<"gateway">;
|
|
242
242
|
options: z.ZodObject<{
|
|
243
243
|
model: z.ZodDefault<z.ZodString>;
|
|
@@ -324,11 +324,11 @@ export declare const askAdapterSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
324
324
|
requiredSecrets: z.ZodArray<z.ZodString>;
|
|
325
325
|
runtimeDeps: z.ZodArray<z.ZodString>;
|
|
326
326
|
}, z.core.$strict>], "kind">;
|
|
327
|
-
/** A resolved (post-defaults) `ai.
|
|
328
|
-
export type
|
|
329
|
-
export type
|
|
330
|
-
/** The provider when `ai.
|
|
331
|
-
export declare const
|
|
327
|
+
/** A resolved (post-defaults) `ai.assistant.provider` descriptor. */
|
|
328
|
+
export type AssistantAdapterConfig = z.output<typeof assistantAdapterSchema>;
|
|
329
|
+
export type AssistantAdapterKind = AssistantAdapterConfig["kind"];
|
|
330
|
+
/** The provider when `ai.assistant.provider` is unset: the gateway with its defaults. */
|
|
331
|
+
export declare const DEFAULT_ASSISTANT_PROVIDER: AssistantAdapter;
|
|
332
332
|
/** The route fragments an adapter contributes to `askEndpointTemplate`. */
|
|
333
333
|
export interface AskBackendTemplate {
|
|
334
334
|
/**
|
|
@@ -357,12 +357,12 @@ export interface AskBackendTemplate {
|
|
|
357
357
|
export interface AskBackend {
|
|
358
358
|
/** Whether Blume grounds answers in the docs (Inkeep retrieves itself). */
|
|
359
359
|
grounded: boolean;
|
|
360
|
-
kind:
|
|
360
|
+
kind: AssistantAdapterKind;
|
|
361
361
|
/** Human-readable adapter name for diagnostics ("AI Gateway"). */
|
|
362
362
|
label: string;
|
|
363
363
|
/** Appended to the missing-secret warning (an alternative credential, say). */
|
|
364
364
|
secretNote?: string;
|
|
365
365
|
template: AskBackendTemplate;
|
|
366
366
|
}
|
|
367
|
-
/** Resolve a parsed `ai.
|
|
368
|
-
export declare const resolveAskBackend: (provider?:
|
|
367
|
+
/** Resolve a parsed `ai.assistant.provider` descriptor into its backend. */
|
|
368
|
+
export declare const resolveAskBackend: (provider?: AssistantAdapterConfig) => AskBackend;
|
package/dist/types/ai/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Assistant provider adapters for `blume.config.ts`:
|
|
3
3
|
*
|
|
4
4
|
* ```ts
|
|
5
5
|
* import { defineConfig } from "blume";
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* export default defineConfig({
|
|
9
9
|
* ai: {
|
|
10
|
-
*
|
|
10
|
+
* assistant: {
|
|
11
11
|
* enabled: true,
|
|
12
12
|
* provider: openrouter({ model: "anthropic/claude-sonnet-4-5" }),
|
|
13
13
|
* },
|
|
@@ -20,5 +20,5 @@
|
|
|
20
20
|
* nothing here runs at request time.
|
|
21
21
|
*/
|
|
22
22
|
export { gateway, inkeep, llmgateway, openaiCompatible, openrouter, } from "./ask.ts";
|
|
23
|
-
export type {
|
|
23
|
+
export type { AssistantAdapter, AssistantAdapterOptions, AssistantGatewayAdapter, AssistantGatewayOptions, AssistantInkeepAdapter, AssistantInkeepOptions, AssistantLlmGatewayAdapter, AssistantLlmGatewayOptions, AssistantOpenAICompatibleAdapter, AssistantOpenAICompatibleOptions, AssistantOpenRouterAdapter, AssistantOpenRouterOptions, AssistantProviderOptions, AssistantReasoning, } from "./ask.ts";
|
|
24
24
|
export type { AdapterDescriptor } from "../core/adapter.ts";
|
|
@@ -7,7 +7,7 @@ import type { OpenApiData } from "../openapi/model.ts";
|
|
|
7
7
|
* the body plus one of these components, deliberately: the structured UI is the
|
|
8
8
|
* component's job, and the prose stays Markdown so it indexes. That split is
|
|
9
9
|
* right for the rendered page and lossy everywhere else — `<route>.md`,
|
|
10
|
-
* llms-full.txt, MCP `get_page` and the
|
|
10
|
+
* llms-full.txt, MCP `get_page` and the assistant corpus all downlevel components
|
|
11
11
|
* to Markdown, and these three had no serializer, so an operation page reached
|
|
12
12
|
* an agent as its description followed by a bare tag. On a site whose reference
|
|
13
13
|
* is most of the corpus, that is most of the corpus: measured on one 449-page
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { BlumeProject } from "../core/project-graph.ts";
|
|
2
2
|
/**
|
|
3
3
|
* Every serializer a project brings to a downlevel pass, layered once for all
|
|
4
|
-
* the agent surfaces (`<route>.md`, llms-full.txt, the search and
|
|
4
|
+
* the agent surfaces (`<route>.md`, llms-full.txt, the search and assistant
|
|
5
5
|
* corpora): the built-in families that read project data — examples, then the
|
|
6
6
|
* API reference — under the user's `agents.markdownComponents`, which is spread
|
|
7
7
|
* last so an entry of the same name still wins. One layering, so a new family
|
|
@@ -11,7 +11,7 @@ export type VisibilityAudience = "agents" | "web";
|
|
|
11
11
|
export declare const applyAudienceVisibility: (markdown: string, audience: VisibilityAudience) => string;
|
|
12
12
|
/**
|
|
13
13
|
* Resolve `<Visibility>` blocks for agent-facing Markdown (llms-full.txt, the
|
|
14
|
-
* `.md`/`.mdx` mirrors, MCP tools,
|
|
14
|
+
* `.md`/`.mdx` mirrors, MCP tools, assistant grounding): `for="web"` content is
|
|
15
15
|
* removed and `for="agents"` content is unwrapped.
|
|
16
16
|
*/
|
|
17
17
|
export declare const applyAgentVisibility: (markdown: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AstroIntegration } from "astro";
|
|
2
|
-
import type {
|
|
2
|
+
import type { AssistantAdapter } from "../ai/ask.ts";
|
|
3
3
|
import type { ComponentMarkdown } from "../ai/component-markdown.ts";
|
|
4
4
|
import type { AnalyticsAdapter } from "../analytics/schema.ts";
|
|
5
5
|
import type { DeploymentInput } from "../deploy/adapters/registry.ts";
|
|
@@ -420,15 +420,15 @@ export interface SearchOptions {
|
|
|
420
420
|
* links and `indexing` settings.
|
|
421
421
|
*/
|
|
422
422
|
export type SearchConfig = SearchProviderConfig | SearchOptions;
|
|
423
|
-
/** An empty-state prompt shown before the first
|
|
424
|
-
export interface
|
|
423
|
+
/** An empty-state prompt shown before the first question to the assistant. */
|
|
424
|
+
export interface AssistantSuggestion {
|
|
425
425
|
/** Lucide icon name shown beside the suggestion. */
|
|
426
426
|
icon?: string;
|
|
427
427
|
/** The clickable suggestion text. */
|
|
428
428
|
label: string;
|
|
429
429
|
}
|
|
430
|
-
/** How much retrieved documentation each
|
|
431
|
-
export interface
|
|
430
|
+
/** How much retrieved documentation each question to the assistant carries. */
|
|
431
|
+
export interface AssistantRetrievalConfig {
|
|
432
432
|
/**
|
|
433
433
|
* Total injected documentation characters, across all excerpts. Defaults to
|
|
434
434
|
* `10000`. The single biggest lever on time-to-first-token — the model reads
|
|
@@ -448,8 +448,8 @@ export interface AskRetrievalConfig {
|
|
|
448
448
|
*/
|
|
449
449
|
maxResults?: number;
|
|
450
450
|
}
|
|
451
|
-
/** The
|
|
452
|
-
export interface
|
|
451
|
+
/** The chat assistant. */
|
|
452
|
+
export interface AssistantConfig {
|
|
453
453
|
/**
|
|
454
454
|
* Origins allowed to call the generated endpoint from another site — a
|
|
455
455
|
* marketing page that embeds an ask box, for example — or `"*"` to allow
|
|
@@ -462,10 +462,10 @@ export interface AskConfig {
|
|
|
462
462
|
* combined with it.
|
|
463
463
|
*/
|
|
464
464
|
cors?: string[];
|
|
465
|
-
/** Turn
|
|
465
|
+
/** Turn the assistant on. Defaults to `false`. */
|
|
466
466
|
enabled?: boolean;
|
|
467
467
|
/**
|
|
468
|
-
* Existing
|
|
468
|
+
* Existing assistant endpoint to call instead of generating one. This keeps a
|
|
469
469
|
* Blume site static while an API backend owns retrieval, model access, rate
|
|
470
470
|
* limiting, and streaming. Accepts an absolute URL or root-relative path.
|
|
471
471
|
*/
|
|
@@ -485,15 +485,15 @@ export interface AskConfig {
|
|
|
485
485
|
* mapping, and `providerOptions` passthrough. Defaults to
|
|
486
486
|
* `gateway({ model: "openai/gpt-5.5" })`.
|
|
487
487
|
*/
|
|
488
|
-
provider?:
|
|
488
|
+
provider?: AssistantAdapter;
|
|
489
489
|
/**
|
|
490
490
|
* How much documentation each question carries into the model's prompt.
|
|
491
491
|
* Lower values cut time-to-first-token — which dominates on a self-hosted
|
|
492
492
|
* backend — at the cost of recall. Defaults keep the built-in behavior.
|
|
493
493
|
*/
|
|
494
|
-
retrieval?:
|
|
494
|
+
retrieval?: AssistantRetrievalConfig;
|
|
495
495
|
/** Starter prompts shown before the first question. */
|
|
496
|
-
suggestions?:
|
|
496
|
+
suggestions?: AssistantSuggestion[];
|
|
497
497
|
}
|
|
498
498
|
/** What the AI Catalog (ARD) manifest carries. */
|
|
499
499
|
export interface AiCatalogConfig {
|
|
@@ -557,10 +557,10 @@ export interface McpConfig {
|
|
|
557
557
|
/** Route the server mounts at. Defaults to `/mcp`. */
|
|
558
558
|
route?: string;
|
|
559
559
|
}
|
|
560
|
-
/** Model-facing features: the
|
|
560
|
+
/** Model-facing features: the assistant and the "Open in chat" action. */
|
|
561
561
|
export interface AiConfig {
|
|
562
|
-
/** The
|
|
563
|
-
|
|
562
|
+
/** The chat assistant. */
|
|
563
|
+
assistant?: AssistantConfig;
|
|
564
564
|
/**
|
|
565
565
|
* The "Open in chat" page action, which opens the current page in an AI
|
|
566
566
|
* assistant pre-filled with a prompt pointing at its raw Markdown.
|
|
@@ -728,7 +728,7 @@ export type ContentSignalsConfig = boolean | {
|
|
|
728
728
|
/**
|
|
729
729
|
* The machine-readable surface agents consume: the JSON API, `llms.txt`, the
|
|
730
730
|
* MCP server, published skills, discovery manifests, and the robots.txt usage
|
|
731
|
-
* policy. The reader-facing model features (
|
|
731
|
+
* policy. The reader-facing model features (the assistant, Open in chat) live under
|
|
732
732
|
* `ai`.
|
|
733
733
|
*/
|
|
734
734
|
export interface AgentsConfig {
|
|
@@ -1184,7 +1184,7 @@ export type TocConfig = boolean | {
|
|
|
1184
1184
|
export interface BlumeConfig {
|
|
1185
1185
|
/** The machine-readable surface for agents: JSON API, `llms.txt`, MCP, skills, discovery. */
|
|
1186
1186
|
agents?: AgentsConfig;
|
|
1187
|
-
/** Model-facing features: the
|
|
1187
|
+
/** Model-facing features: the assistant and the "Open in chat" action. */
|
|
1188
1188
|
ai?: AiConfig;
|
|
1189
1189
|
/**
|
|
1190
1190
|
* Analytics adapters from `blume/analytics`, emitted into `<head>` of every
|
|
@@ -74,7 +74,7 @@ import type { Diagnostic } from "./types.ts";
|
|
|
74
74
|
* `flexsearch()`, `pagefind()`, `algolia({…})`, `oramaCloud({…})`,
|
|
75
75
|
* `typesense({…})`, `mixedbread({…})`, or `false`), or `{ provider,
|
|
76
76
|
* popular, indexing }` to add curated links and indexing settings.
|
|
77
|
-
* - `ai` — what faces a model at read time: `
|
|
77
|
+
* - `ai` — what faces a model at read time: `assistant` (the chat assistant, with
|
|
78
78
|
* a provider adapter from `blume/ai` such as `gateway()` or `openrouter()`)
|
|
79
79
|
* and `openInChat` (the "Open in chat" page action).
|
|
80
80
|
* - `agents` — the machine-readable surface: `llmsTxt`, the JSON `api`, the
|
|
@@ -133,7 +133,7 @@ import type { Diagnostic } from "./types.ts";
|
|
|
133
133
|
* });
|
|
134
134
|
* ```
|
|
135
135
|
*
|
|
136
|
-
* @example An OpenAPI reference with the
|
|
136
|
+
* @example An OpenAPI reference with the assistant enabled.
|
|
137
137
|
* ```ts
|
|
138
138
|
* import { openapi } from "blume/reference";
|
|
139
139
|
*
|
|
@@ -146,7 +146,7 @@ import type { Diagnostic } from "./types.ts";
|
|
|
146
146
|
* }),
|
|
147
147
|
* ],
|
|
148
148
|
* agents: { llmsTxt: true },
|
|
149
|
-
* ai: {
|
|
149
|
+
* ai: { assistant: { enabled: true } },
|
|
150
150
|
* });
|
|
151
151
|
* ```
|
|
152
152
|
*
|
|
@@ -125,10 +125,10 @@ export interface BlumeDataConfig {
|
|
|
125
125
|
analytics: ResolvedConfig["analytics"];
|
|
126
126
|
/** Apple touch icon, or `null` when none is configured/detected. */
|
|
127
127
|
appleIcon: BlumeFavicon | null;
|
|
128
|
-
/**
|
|
129
|
-
|
|
128
|
+
/** The assistant's empty-state suggestions, or `null` when the assistant is off. */
|
|
129
|
+
assistant: {
|
|
130
130
|
endpoint: string | null;
|
|
131
|
-
suggestions: NonNullable<ResolvedConfig["ai"]["
|
|
131
|
+
suggestions: NonNullable<ResolvedConfig["ai"]["assistant"]>["suggestions"];
|
|
132
132
|
} | null;
|
|
133
133
|
banner: BlumeBanner | null;
|
|
134
134
|
/** Site-wide route mount point, normalized to `""` or `/seg` (see config). */
|
|
@@ -11,7 +11,6 @@ declare const uiStringsObject: z.ZodObject<{
|
|
|
11
11
|
actions: z.ZodPrefault<z.ZodObject<{
|
|
12
12
|
addToCursor: z.ZodDefault<z.ZodString>;
|
|
13
13
|
addToVscode: z.ZodDefault<z.ZodString>;
|
|
14
|
-
askAI: z.ZodDefault<z.ZodString>;
|
|
15
14
|
connectMcp: z.ZodDefault<z.ZodString>;
|
|
16
15
|
copied: z.ZodDefault<z.ZodString>;
|
|
17
16
|
copyClaudeCode: z.ZodDefault<z.ZodString>;
|
|
@@ -30,7 +29,7 @@ declare const uiStringsObject: z.ZodObject<{
|
|
|
30
29
|
openInChatPrompt: z.ZodDefault<z.ZodString>;
|
|
31
30
|
scrollToTop: z.ZodDefault<z.ZodString>;
|
|
32
31
|
}, z.core.$strip>>;
|
|
33
|
-
|
|
32
|
+
assistant: z.ZodPrefault<z.ZodObject<{
|
|
34
33
|
ai: z.ZodDefault<z.ZodString>;
|
|
35
34
|
clear: z.ZodDefault<z.ZodString>;
|
|
36
35
|
close: z.ZodDefault<z.ZodString>;
|
|
@@ -100,8 +99,8 @@ declare const uiStringsObject: z.ZodObject<{
|
|
|
100
99
|
all: z.ZodDefault<z.ZodString>;
|
|
101
100
|
allLanguages: z.ZodDefault<z.ZodString>;
|
|
102
101
|
allVersions: z.ZodDefault<z.ZodString>;
|
|
103
|
-
|
|
104
|
-
|
|
102
|
+
assistant: z.ZodDefault<z.ZodString>;
|
|
103
|
+
assistantHint: z.ZodDefault<z.ZodString>;
|
|
105
104
|
button: z.ZodDefault<z.ZodString>;
|
|
106
105
|
devOnly: z.ZodDefault<z.ZodString>;
|
|
107
106
|
error: z.ZodDefault<z.ZodString>;
|
|
@@ -127,7 +126,6 @@ export declare const uiStringsSchema: z.ZodPrefault<z.ZodObject<{
|
|
|
127
126
|
actions: z.ZodPrefault<z.ZodObject<{
|
|
128
127
|
addToCursor: z.ZodDefault<z.ZodString>;
|
|
129
128
|
addToVscode: z.ZodDefault<z.ZodString>;
|
|
130
|
-
askAI: z.ZodDefault<z.ZodString>;
|
|
131
129
|
connectMcp: z.ZodDefault<z.ZodString>;
|
|
132
130
|
copied: z.ZodDefault<z.ZodString>;
|
|
133
131
|
copyClaudeCode: z.ZodDefault<z.ZodString>;
|
|
@@ -146,7 +144,7 @@ export declare const uiStringsSchema: z.ZodPrefault<z.ZodObject<{
|
|
|
146
144
|
openInChatPrompt: z.ZodDefault<z.ZodString>;
|
|
147
145
|
scrollToTop: z.ZodDefault<z.ZodString>;
|
|
148
146
|
}, z.core.$strip>>;
|
|
149
|
-
|
|
147
|
+
assistant: z.ZodPrefault<z.ZodObject<{
|
|
150
148
|
ai: z.ZodDefault<z.ZodString>;
|
|
151
149
|
clear: z.ZodDefault<z.ZodString>;
|
|
152
150
|
close: z.ZodDefault<z.ZodString>;
|
|
@@ -216,8 +214,8 @@ export declare const uiStringsSchema: z.ZodPrefault<z.ZodObject<{
|
|
|
216
214
|
all: z.ZodDefault<z.ZodString>;
|
|
217
215
|
allLanguages: z.ZodDefault<z.ZodString>;
|
|
218
216
|
allVersions: z.ZodDefault<z.ZodString>;
|
|
219
|
-
|
|
220
|
-
|
|
217
|
+
assistant: z.ZodDefault<z.ZodString>;
|
|
218
|
+
assistantHint: z.ZodDefault<z.ZodString>;
|
|
221
219
|
button: z.ZodDefault<z.ZodString>;
|
|
222
220
|
devOnly: z.ZodDefault<z.ZodString>;
|
|
223
221
|
error: z.ZodDefault<z.ZodString>;
|
|
@@ -471,7 +471,7 @@ type SearchOptionsInput = z.input<typeof searchOptionsSchema>;
|
|
|
471
471
|
/** What `search` accepts: an adapter (or `false`) directly, or the object form. */
|
|
472
472
|
type SearchConfigInput = false | SearchAdapterInput | SearchOptionsInput;
|
|
473
473
|
declare const aiConfigSchema: z.ZodObject<{
|
|
474
|
-
|
|
474
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
475
475
|
cors: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodPipe<z.ZodURL, z.ZodTransform<string, string>>]>>>;
|
|
476
476
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
477
477
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -582,9 +582,9 @@ declare const aiConfigSchema: z.ZodObject<{
|
|
|
582
582
|
cursor: "cursor";
|
|
583
583
|
}>>]>>, z.ZodTransform<("v0" | "chatgpt" | "claude" | "t3" | "scira" | "cursor")[], boolean | ("v0" | "chatgpt" | "claude" | "t3" | "scira" | "cursor")[]>>;
|
|
584
584
|
}, z.core.$strict>;
|
|
585
|
-
export {
|
|
586
|
-
export type {
|
|
587
|
-
export type
|
|
585
|
+
export { assistantReasoningLevels } from "../ai/ask.ts";
|
|
586
|
+
export type { AssistantReasoning } from "../ai/ask.ts";
|
|
587
|
+
export type AssistantConfig = NonNullable<z.infer<typeof aiConfigSchema>["assistant"]>;
|
|
588
588
|
export { openInChatProviders } from "./open-in-chat.ts";
|
|
589
589
|
export type { OpenInChatProvider } from "./open-in-chat.ts";
|
|
590
590
|
/** A configured locale: ISO-ish code plus display metadata for the switcher. */
|
|
@@ -785,7 +785,7 @@ export declare const blumeConfigSchema: z.ZodObject<{
|
|
|
785
785
|
webmcp: z.ZodDefault<z.ZodBoolean>;
|
|
786
786
|
}, z.core.$strict>>;
|
|
787
787
|
ai: z.ZodPrefault<z.ZodObject<{
|
|
788
|
-
|
|
788
|
+
assistant: z.ZodOptional<z.ZodObject<{
|
|
789
789
|
cors: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodLiteral<"*">, z.ZodPipe<z.ZodURL, z.ZodTransform<string, string>>]>>>;
|
|
790
790
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
791
791
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
* Zod's own wording for unknown keys no removed-key hint covers, appended to
|
|
3
3
|
* a hint so an unrelated typo isn't silently dropped from the diagnostic
|
|
4
4
|
* beside it. Shared by every config object that names a removed field's
|
|
5
|
-
* replacement (the root config, `ai.
|
|
5
|
+
* replacement (the root config, `ai.assistant`, `openapi()`/`asyncapi()`, …).
|
|
6
6
|
*/
|
|
7
7
|
export declare const unrecognizedKeysMessage: (keys: string[]) => string;
|
|
@@ -62,7 +62,7 @@ interface BuildOptions {
|
|
|
62
62
|
*
|
|
63
63
|
* `content` selects the extraction: `"plain"` (default) strips Markdown to bare
|
|
64
64
|
* searchable text; `"markdown"` keeps the body's Markdown — code blocks, lists,
|
|
65
|
-
* headings — for
|
|
65
|
+
* headings — for assistant grounding, where fenced examples are often the answer
|
|
66
66
|
* and stripping them makes the model unable to cite content the docs do contain.
|
|
67
67
|
* The `"markdown"` body is agent-facing, so components are downleveled with the
|
|
68
68
|
* same serializers the `.md` mirror, llms-full.txt and MCP `get_page` use: a
|
|
@@ -27,7 +27,7 @@ export interface OramaDoc {
|
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* Build an in-memory Orama full-text index from search documents. Shared by the
|
|
30
|
-
* Orama client loader (browser), the MCP server, and
|
|
30
|
+
* Orama client loader (browser), the MCP server, and assistant grounding (Node),
|
|
31
31
|
* so ranking is identical wherever docs are queried. `locale` — the site's
|
|
32
32
|
* `i18n.defaultLocale` — swaps in a word-segmenting tokenizer for every
|
|
33
33
|
* non-Latin script, all of which Orama's default tokenizer reduces to zero
|
package/docs/02-deployment.mdx
CHANGED
|
@@ -81,7 +81,7 @@ This is a distinct concept from the two paths above:
|
|
|
81
81
|
|
|
82
82
|
## Server rendering
|
|
83
83
|
|
|
84
|
-
Static output covers most docs. Switch to server output when you need request-time features — most notably the [
|
|
84
|
+
Static output covers most docs. Switch to server output when you need request-time features — most notably the [assistant](/docs/configuration/assistant) endpoint and the [MCP server](/docs/discoverability/mcp). You do that by naming the host: `deployment` takes an adapter imported from `blume/deploy`.
|
|
85
85
|
|
|
86
86
|
```ts blume.config.ts lineNumbers
|
|
87
87
|
import { defineConfig } from "blume";
|
|
@@ -128,7 +128,7 @@ On Vercel and Cloudflare, a server build also turns on [`Accept: text/markdown`
|
|
|
128
128
|
:::
|
|
129
129
|
|
|
130
130
|
:::note
|
|
131
|
-
Server features have their own configuration — for example,
|
|
131
|
+
Server features have their own configuration — for example, the assistant needs a model API key. See the [assistant guide](/docs/configuration/assistant) for setup.
|
|
132
132
|
:::
|
|
133
133
|
|
|
134
134
|
## Redirects
|
|
@@ -159,8 +159,8 @@ When a feature needs a runtime secret, Blume warns at `blume dev`/`build` if it'
|
|
|
159
159
|
|
|
160
160
|
| Feature | Variable |
|
|
161
161
|
| --- | --- |
|
|
162
|
-
|
|
|
163
|
-
|
|
|
162
|
+
| Assistant (AI Gateway) | `AI_GATEWAY_API_KEY` (or Vercel OIDC) |
|
|
163
|
+
| Assistant (other adapters) | the adapter's default key env var (`OPENROUTER_API_KEY`, `LLMGATEWAY_API_KEY`, `INKEEP_API_KEY`), or the `apiKeyEnv` you passed it |
|
|
164
164
|
| Mixedbread search | `MIXEDBREAD_API_KEY` |
|
|
165
165
|
|
|
166
166
|
Set them in `.env.local` for local dev and in your host's environment for production. Build-time secrets for search-index sync (Algolia, Orama Cloud, Typesense) are warned about separately during the sync step.
|