blume 1.7.1 → 1.7.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/CHANGELOG.md +8 -0
- package/dist/cli/{chunk-mfm4sjwx.js → chunk-12dxjqk7.js} +32 -43
- package/dist/cli/{chunk-mfm4sjwx.js.map → chunk-12dxjqk7.js.map} +2 -2
- package/dist/cli/{chunk-vyqj481z.js → chunk-196vjxp9.js} +64 -64
- package/dist/cli/chunk-196vjxp9.js.map +13 -0
- package/dist/cli/{chunk-27gtm2ym.js → chunk-2mzebbbz.js} +1 -1
- package/dist/cli/{chunk-s5e5jt53.js → chunk-2z47ypj8.js} +1 -1
- package/dist/cli/{chunk-52cwcqvp.js → chunk-30e87n55.js} +15 -24
- package/dist/cli/{chunk-52cwcqvp.js.map → chunk-30e87n55.js.map} +2 -2
- package/dist/cli/{chunk-4trphnvy.js → chunk-3w7b2vcx.js} +10 -13
- package/dist/cli/{chunk-4trphnvy.js.map → chunk-3w7b2vcx.js.map} +2 -2
- package/dist/cli/{chunk-kmx2mydj.js → chunk-450a7rcr.js} +8 -8
- package/dist/cli/{chunk-kmx2mydj.js.map → chunk-450a7rcr.js.map} +1 -1
- package/dist/cli/{chunk-x1wvw7a8.js → chunk-5n7t497w.js} +129 -131
- package/dist/cli/{chunk-x1wvw7a8.js.map → chunk-5n7t497w.js.map} +4 -4
- package/dist/cli/{chunk-r99hynxh.js → chunk-61j18dwk.js} +36 -9
- package/dist/cli/{chunk-r99hynxh.js.map → chunk-61j18dwk.js.map} +3 -3
- package/dist/cli/{chunk-3r94j3tc.js → chunk-688e0dde.js} +2 -2
- package/dist/cli/{chunk-vxv4x1n8.js → chunk-88by27n5.js} +2 -2
- package/dist/cli/{chunk-h9ekmtz7.js → chunk-8cd8tj54.js} +28 -35
- package/dist/cli/{chunk-h9ekmtz7.js.map → chunk-8cd8tj54.js.map} +2 -2
- package/dist/cli/{chunk-8gnpdsn1.js → chunk-9bkjd11x.js} +2 -2
- package/dist/cli/{chunk-k0v1f8bb.js → chunk-9he6crym.js} +21 -28
- package/dist/cli/{chunk-k0v1f8bb.js.map → chunk-9he6crym.js.map} +2 -2
- package/dist/cli/{chunk-aqjvpd03.js → chunk-aztttvb3.js} +27 -33
- package/dist/cli/{chunk-aqjvpd03.js.map → chunk-aztttvb3.js.map} +2 -2
- package/dist/cli/{chunk-6mq7qkve.js → chunk-cvky9gb2.js} +18 -24
- package/dist/cli/{chunk-6mq7qkve.js.map → chunk-cvky9gb2.js.map} +2 -2
- package/dist/cli/{chunk-90pdhkpm.js → chunk-eevwt1sc.js} +23 -32
- package/dist/cli/{chunk-90pdhkpm.js.map → chunk-eevwt1sc.js.map} +2 -2
- package/dist/cli/{chunk-4ae4f395.js → chunk-ejjx8znq.js} +53 -34
- package/dist/cli/chunk-ejjx8znq.js.map +15 -0
- package/dist/cli/{chunk-8p3xe5jv.js → chunk-exeeb35e.js} +3 -3
- package/dist/cli/{chunk-q56730e0.js → chunk-fmceyezb.js} +41 -50
- package/dist/cli/{chunk-q56730e0.js.map → chunk-fmceyezb.js.map} +2 -2
- package/dist/cli/{chunk-12dzsn9b.js → chunk-hdm2dkd2.js} +72 -77
- package/dist/cli/{chunk-12dzsn9b.js.map → chunk-hdm2dkd2.js.map} +2 -2
- package/dist/cli/{chunk-j5f2wrj5.js → chunk-hs3gbh8p.js} +10 -15
- package/dist/cli/{chunk-j5f2wrj5.js.map → chunk-hs3gbh8p.js.map} +2 -2
- package/dist/cli/{chunk-ywn7t0pb.js → chunk-jbj4qhfw.js} +3 -3
- package/dist/cli/{chunk-ev67ycx0.js → chunk-jq5n4avg.js} +1 -1
- package/dist/cli/{chunk-he2zfgah.js → chunk-mqb2ka8m.js} +22 -30
- package/dist/cli/{chunk-he2zfgah.js.map → chunk-mqb2ka8m.js.map} +2 -2
- package/dist/cli/{chunk-5gfw0q4j.js → chunk-mt76t7dj.js} +26 -34
- package/dist/cli/{chunk-5gfw0q4j.js.map → chunk-mt76t7dj.js.map} +2 -2
- package/dist/cli/{chunk-jtb45atp.js → chunk-n9sra6sy.js} +13 -13
- package/dist/cli/{chunk-jtb45atp.js.map → chunk-n9sra6sy.js.map} +1 -1
- package/dist/cli/{chunk-x66c5yjn.js → chunk-ppfvdcd4.js} +2 -2
- package/dist/cli/{chunk-wd27zjcz.js → chunk-q4rae3bg.js} +1 -1
- package/dist/cli/{chunk-pxj10x8y.js → chunk-ra1v2nc2.js} +1 -1
- package/dist/cli/{chunk-np8dmfb0.js → chunk-t3tj0dgr.js} +26 -33
- package/dist/cli/{chunk-np8dmfb0.js.map → chunk-t3tj0dgr.js.map} +2 -2
- package/dist/cli/{chunk-qvvpnwaz.js → chunk-tqa1s0k8.js} +4 -4
- package/dist/cli/{chunk-cbjnx4s8.js → chunk-vh9w1sgp.js} +1 -1
- package/dist/cli/{chunk-82atea4k.js → chunk-vkrsvbr5.js} +13 -17
- package/dist/cli/{chunk-82atea4k.js.map → chunk-vkrsvbr5.js.map} +2 -2
- package/dist/cli/{chunk-sbdqrjbb.js → chunk-vrfp10qk.js} +1 -1
- package/dist/cli/{chunk-ka5k7cz9.js → chunk-wjt80jps.js} +27 -27
- package/dist/cli/{chunk-ka5k7cz9.js.map → chunk-wjt80jps.js.map} +2 -2
- package/dist/cli/{chunk-pdwg3q9g.js → chunk-xhtpx3ff.js} +21 -30
- package/dist/cli/{chunk-pdwg3q9g.js.map → chunk-xhtpx3ff.js.map} +2 -2
- package/dist/cli/{chunk-5hs6gb7n.js → chunk-yzhm0j9q.js} +1 -1
- package/dist/cli/index.js +397 -34
- package/dist/cli/index.js.map +12 -4
- package/dist/types/core/config-input.d.ts +26 -0
- package/dist/types/core/schema.d.ts +27 -3
- package/docs/configuration/ask-ai.mdx +47 -0
- package/package.json +1 -1
- package/src/ai/cors.ts +87 -0
- package/src/astro/generate.ts +2 -0
- package/src/astro/templates.ts +88 -23
- package/src/components/layout/NavTree.astro +75 -66
- package/src/components/layout/RootLayout.astro +4 -1
- package/src/components/layout/nav-utils.ts +17 -3
- package/src/core/adapter.ts +61 -0
- package/src/core/config-input.ts +26 -0
- package/src/core/schema.ts +56 -0
- package/src/registry/eject.ts +2 -0
- package/dist/cli/chunk-2aj8ddew.js +0 -72
- package/dist/cli/chunk-2aj8ddew.js.map +0 -10
- package/dist/cli/chunk-4ae4f395.js.map +0 -15
- package/dist/cli/chunk-4xyggvgf.js +0 -21
- package/dist/cli/chunk-4xyggvgf.js.map +0 -10
- package/dist/cli/chunk-6kzzpsx8.js +0 -26
- package/dist/cli/chunk-6kzzpsx8.js.map +0 -10
- package/dist/cli/chunk-bcy492zc.js +0 -16
- package/dist/cli/chunk-bcy492zc.js.map +0 -10
- package/dist/cli/chunk-btfr9yvw.js +0 -41
- package/dist/cli/chunk-btfr9yvw.js.map +0 -10
- package/dist/cli/chunk-ey89bjj1.js +0 -209
- package/dist/cli/chunk-ey89bjj1.js.map +0 -11
- package/dist/cli/chunk-vt8fgygt.js +0 -23
- package/dist/cli/chunk-vt8fgygt.js.map +0 -10
- package/dist/cli/chunk-vyqj481z.js.map +0 -13
- /package/dist/cli/{chunk-27gtm2ym.js.map → chunk-2mzebbbz.js.map} +0 -0
- /package/dist/cli/{chunk-s5e5jt53.js.map → chunk-2z47ypj8.js.map} +0 -0
- /package/dist/cli/{chunk-3r94j3tc.js.map → chunk-688e0dde.js.map} +0 -0
- /package/dist/cli/{chunk-vxv4x1n8.js.map → chunk-88by27n5.js.map} +0 -0
- /package/dist/cli/{chunk-8gnpdsn1.js.map → chunk-9bkjd11x.js.map} +0 -0
- /package/dist/cli/{chunk-8p3xe5jv.js.map → chunk-exeeb35e.js.map} +0 -0
- /package/dist/cli/{chunk-ywn7t0pb.js.map → chunk-jbj4qhfw.js.map} +0 -0
- /package/dist/cli/{chunk-ev67ycx0.js.map → chunk-jq5n4avg.js.map} +0 -0
- /package/dist/cli/{chunk-x66c5yjn.js.map → chunk-ppfvdcd4.js.map} +0 -0
- /package/dist/cli/{chunk-wd27zjcz.js.map → chunk-q4rae3bg.js.map} +0 -0
- /package/dist/cli/{chunk-pxj10x8y.js.map → chunk-ra1v2nc2.js.map} +0 -0
- /package/dist/cli/{chunk-qvvpnwaz.js.map → chunk-tqa1s0k8.js.map} +0 -0
- /package/dist/cli/{chunk-cbjnx4s8.js.map → chunk-vh9w1sgp.js.map} +0 -0
- /package/dist/cli/{chunk-sbdqrjbb.js.map → chunk-vrfp10qk.js.map} +0 -0
- /package/dist/cli/{chunk-5hs6gb7n.js.map → chunk-yzhm0j9q.js.map} +0 -0
|
@@ -151,6 +151,15 @@ const isTabSection = (node: NavNode, tabPaths: Set<string>): boolean => {
|
|
|
151
151
|
* instead of duplicating each tab as a sidebar group. A container left empty by
|
|
152
152
|
* this pruning is dropped too, so no bare heading is stranded. The root tab
|
|
153
153
|
* spans everything, so it never removes anything.
|
|
154
|
+
*
|
|
155
|
+
* A group with no tab section anywhere beneath it is kept as the same object:
|
|
156
|
+
* the stable group ids (`navGroupIds`) and the build-time subtree cache are
|
|
157
|
+
* both keyed by node identity, so a copy would lose its id — its collapsed
|
|
158
|
+
* fragment was then requested by a positional name no route serves — and
|
|
159
|
+
* re-render on every page. A container that did lose a section is rebuilt,
|
|
160
|
+
* so it has no id: the deferred fragments render from the full tree, which
|
|
161
|
+
* would put the section back, so `NavTree` renders such a container in full
|
|
162
|
+
* instead (its untouched children still defer by their own ids).
|
|
154
163
|
*/
|
|
155
164
|
const withoutTabSections = (
|
|
156
165
|
nodes: NavNode[],
|
|
@@ -173,10 +182,15 @@ const withoutTabSections = (
|
|
|
173
182
|
continue;
|
|
174
183
|
}
|
|
175
184
|
if (item.kind === "group") {
|
|
176
|
-
// A container left empty by pruning is dropped, so no bare heading is
|
|
177
|
-
// stranded.
|
|
178
185
|
const children = prune(item.children);
|
|
179
|
-
if (
|
|
186
|
+
if (
|
|
187
|
+
children.length === item.children.length &&
|
|
188
|
+
children.every((child, index) => child === item.children[index])
|
|
189
|
+
) {
|
|
190
|
+
kept.push(item);
|
|
191
|
+
} else if (children.length > 0) {
|
|
192
|
+
// A container left empty by pruning is dropped, so no bare heading
|
|
193
|
+
// is stranded.
|
|
180
194
|
kept.push({ ...item, children });
|
|
181
195
|
}
|
|
182
196
|
} else {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The serializable descriptor an integration factory returns — `posthog({ key })`,
|
|
5
|
+
* `vercel()`, `script({ src })` and their siblings. A descriptor is plain data:
|
|
6
|
+
* the CLI evaluates `blume.config.ts` once, validates what came back, and
|
|
7
|
+
* writes it into the generated project's data snapshot as a JSON literal. That
|
|
8
|
+
* is where the runtime reads it — nothing generated imports the config at
|
|
9
|
+
* request time — so a descriptor can't carry functions, class instances, or
|
|
10
|
+
* anything else JSON drops.
|
|
11
|
+
*
|
|
12
|
+
* Every consumer reads the descriptor instead of switching on a provider name:
|
|
13
|
+
* the head emitter and `blume doctor` branch on `kind`, the generated
|
|
14
|
+
* `.blume/package.json` declares `runtimeDeps`, and the secrets check warns
|
|
15
|
+
* when an entry of `requiredSecrets` is unset.
|
|
16
|
+
*
|
|
17
|
+
* An adapter's verbatim option passthrough is typed as {@link JsonValue} and
|
|
18
|
+
* validated with `z.json()`, so a function, `undefined`, a bigint, or a
|
|
19
|
+
* non-finite number fails config validation with a path instead of vanishing
|
|
20
|
+
* (or throwing) when the snapshot is serialized.
|
|
21
|
+
*/
|
|
22
|
+
export interface AdapterDescriptor<Kind extends string, Options> {
|
|
23
|
+
/** Which integration this is. */
|
|
24
|
+
kind: Kind;
|
|
25
|
+
/** The options the factory was called with, verbatim. */
|
|
26
|
+
options: Options;
|
|
27
|
+
/** Env vars the integration reads at runtime; `blume dev`/`build` warn when one is unset. */
|
|
28
|
+
requiredSecrets: string[];
|
|
29
|
+
/** Extra packages the generated `.blume/package.json` must declare. */
|
|
30
|
+
runtimeDeps: string[];
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* A value JSON can carry unchanged — what an adapter's passthrough options are
|
|
35
|
+
* typed as. Structurally identical to what `z.json()` accepts.
|
|
36
|
+
*/
|
|
37
|
+
export type JsonValue =
|
|
38
|
+
| string
|
|
39
|
+
| number
|
|
40
|
+
| boolean
|
|
41
|
+
| null
|
|
42
|
+
| JsonValue[]
|
|
43
|
+
| { [key: string]: JsonValue };
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The schema for one descriptor `kind`, validating its `options` with the
|
|
47
|
+
* adapter's own option schema. Members of a `z.discriminatedUnion("kind", …)`.
|
|
48
|
+
*/
|
|
49
|
+
export const adapterDescriptorSchema = <
|
|
50
|
+
Kind extends string,
|
|
51
|
+
Options extends z.ZodType,
|
|
52
|
+
>(
|
|
53
|
+
kind: Kind,
|
|
54
|
+
options: Options
|
|
55
|
+
) =>
|
|
56
|
+
z.strictObject({
|
|
57
|
+
kind: z.literal(kind),
|
|
58
|
+
options,
|
|
59
|
+
requiredSecrets: z.array(z.string()),
|
|
60
|
+
runtimeDeps: z.array(z.string()),
|
|
61
|
+
});
|
package/src/core/config-input.ts
CHANGED
|
@@ -681,6 +681,8 @@ export interface AskSuggestion {
|
|
|
681
681
|
/** Backends that can route an Ask AI request. */
|
|
682
682
|
type AskProviderGateway = "gateway" | "openrouter" | "llmgateway";
|
|
683
683
|
type AskProvider = AskProviderGateway | "inkeep" | "openai-compatible";
|
|
684
|
+
/** How much the model reasons before answering (`ai.ask.reasoning`). */
|
|
685
|
+
type AskReasoning = "none" | "minimal" | "low" | "medium" | "high" | "xhigh";
|
|
684
686
|
|
|
685
687
|
/** How much retrieved documentation each Ask AI question carries. */
|
|
686
688
|
export interface AskRetrievalConfig {
|
|
@@ -715,6 +717,18 @@ export interface AskConfig {
|
|
|
715
717
|
* overrides the built-in preset.
|
|
716
718
|
*/
|
|
717
719
|
baseUrl?: string;
|
|
720
|
+
/**
|
|
721
|
+
* Origins allowed to call the generated endpoint from another site — a
|
|
722
|
+
* marketing page that embeds an ask box, for example — or `"*"` to allow
|
|
723
|
+
* every origin. The route answers preflight requests and names a listed
|
|
724
|
+
* origin on every response, errors included; every other origin stays
|
|
725
|
+
* subject to the browser's same-origin rule. Callers must send the body as
|
|
726
|
+
* JSON with a `content-type: application/json` header, or Astro's cross-site
|
|
727
|
+
* request check rejects the `POST` before the route runs. Only the generated
|
|
728
|
+
* route reads this; an external `endpoint` handles its own CORS and can't be
|
|
729
|
+
* combined with it.
|
|
730
|
+
*/
|
|
731
|
+
cors?: string[];
|
|
718
732
|
/** Turn Ask AI on. Defaults to `false`. */
|
|
719
733
|
enabled?: boolean;
|
|
720
734
|
/**
|
|
@@ -740,6 +754,18 @@ export interface AskConfig {
|
|
|
740
754
|
model?: string;
|
|
741
755
|
/** Which backend routes the request. Defaults to `gateway`. */
|
|
742
756
|
provider?: AskProvider;
|
|
757
|
+
/**
|
|
758
|
+
* How much the model reasons before answering, from `"none"` to `"xhigh"`.
|
|
759
|
+
* Sent as the backend's own reasoning-effort control: the AI SDK's
|
|
760
|
+
* `reasoning` option on the gateway, `reasoning.effort` on OpenRouter, and
|
|
761
|
+
* `reasoning_effort` on OpenAI-compatible endpoints. The model has to
|
|
762
|
+
* support the level — OpenAI rejects one a model doesn't offer — and the
|
|
763
|
+
* endpoint has to accept the parameter; Inkeep has no reasoning control,
|
|
764
|
+
* so the field is rejected there. Omitted keeps the model's default.
|
|
765
|
+
* `"none"` is the fastest and cheapest for grounded docs Q&A, where the
|
|
766
|
+
* retrieved excerpts carry the answer.
|
|
767
|
+
*/
|
|
768
|
+
reasoning?: AskReasoning;
|
|
743
769
|
/**
|
|
744
770
|
* How much documentation each question carries into the model's prompt.
|
|
745
771
|
* Lower values cut time-to-first-token — which dominates on a self-hosted
|
package/src/core/schema.ts
CHANGED
|
@@ -767,6 +767,19 @@ const searchConfigSchema = z
|
|
|
767
767
|
}
|
|
768
768
|
});
|
|
769
769
|
|
|
770
|
+
/**
|
|
771
|
+
* The `ai.ask.reasoning` levels: the AI SDK's top-level `reasoning` values
|
|
772
|
+
* minus `provider-default`, which is what omitting the field means.
|
|
773
|
+
*/
|
|
774
|
+
export const askReasoningLevels = [
|
|
775
|
+
"none",
|
|
776
|
+
"minimal",
|
|
777
|
+
"low",
|
|
778
|
+
"medium",
|
|
779
|
+
"high",
|
|
780
|
+
"xhigh",
|
|
781
|
+
] as const;
|
|
782
|
+
|
|
770
783
|
/** Ask AI backends. `gateway` (default) routes through the Vercel AI Gateway. */
|
|
771
784
|
export const askAiProviders = [
|
|
772
785
|
"gateway",
|
|
@@ -872,6 +885,21 @@ const aiConfigSchema = z.strictObject({
|
|
|
872
885
|
// Base URL of the backend. Required for `openai-compatible` only when no
|
|
873
886
|
// external endpoint is supplied; for named providers it overrides the preset.
|
|
874
887
|
baseUrl: z.url().optional(),
|
|
888
|
+
// Origins allowed to call the generated `/api/ask` from another site (a
|
|
889
|
+
// marketing page that embeds an ask box, say), or `"*"` for every
|
|
890
|
+
// origin. Each URL is reduced to its origin so a trailing slash or path
|
|
891
|
+
// can't defeat the exact match the route performs. Read by the
|
|
892
|
+
// generated route only; an external `endpoint` owns its own CORS.
|
|
893
|
+
cors: z
|
|
894
|
+
.array(
|
|
895
|
+
z.union([
|
|
896
|
+
z.literal("*"),
|
|
897
|
+
z
|
|
898
|
+
.url({ protocol: /^https?$/u })
|
|
899
|
+
.transform((value) => new URL(value).origin),
|
|
900
|
+
])
|
|
901
|
+
)
|
|
902
|
+
.optional(),
|
|
875
903
|
enabled: z.boolean().default(false),
|
|
876
904
|
// Optional external endpoint for projects that keep their docs static
|
|
877
905
|
// and host Ask AI in an existing backend. Absolute URLs and root-relative
|
|
@@ -888,6 +916,12 @@ const aiConfigSchema = z.strictObject({
|
|
|
888
916
|
instructions: z.string().trim().min(1).optional(),
|
|
889
917
|
model: z.string().default("openai/gpt-5.5"),
|
|
890
918
|
provider: z.enum(askAiProviders).default("gateway"),
|
|
919
|
+
// How much the model reasons before answering, sent as the backend's
|
|
920
|
+
// own reasoning-effort control (see `askEndpointTemplate`). Omitted
|
|
921
|
+
// keeps the provider's default; `none` is the fastest and cheapest for
|
|
922
|
+
// grounded docs Q&A, where the excerpts carry the answer. Not for
|
|
923
|
+
// Inkeep, which has no such control (refined below).
|
|
924
|
+
reasoning: z.enum(askReasoningLevels).optional(),
|
|
891
925
|
// How much documentation each question carries. Injected characters are
|
|
892
926
|
// the dominant term in time-to-first-token on a self-hosted backend, so
|
|
893
927
|
// these trade recall for latency. No zod defaults here: only what the
|
|
@@ -926,6 +960,27 @@ const aiConfigSchema = z.strictObject({
|
|
|
926
960
|
path: ["baseUrl"],
|
|
927
961
|
});
|
|
928
962
|
}
|
|
963
|
+
// `cors` configures the generated route, which an external `endpoint`
|
|
964
|
+
// replaces; accepting both would silently do nothing.
|
|
965
|
+
if (value.cors && value.endpoint) {
|
|
966
|
+
ctx.addIssue({
|
|
967
|
+
code: z.ZodIssueCode.custom,
|
|
968
|
+
message:
|
|
969
|
+
"ai.ask.cors only applies to the generated route; with ai.ask.endpoint, CORS is that backend's job.",
|
|
970
|
+
path: ["cors"],
|
|
971
|
+
});
|
|
972
|
+
}
|
|
973
|
+
// Inkeep runs its own QA pipeline behind an OpenAI-compatible endpoint
|
|
974
|
+
// with no reasoning control; a level would only reach it as an
|
|
975
|
+
// unsupported `reasoning_effort`, so refuse it up front.
|
|
976
|
+
if (value.provider === "inkeep" && value.reasoning) {
|
|
977
|
+
ctx.addIssue({
|
|
978
|
+
code: z.ZodIssueCode.custom,
|
|
979
|
+
message:
|
|
980
|
+
'ai.ask.reasoning is not supported when provider is "inkeep".',
|
|
981
|
+
path: ["reasoning"],
|
|
982
|
+
});
|
|
983
|
+
}
|
|
929
984
|
})
|
|
930
985
|
.optional(),
|
|
931
986
|
/**
|
|
@@ -1078,6 +1133,7 @@ const navigationConfigSchema = z.strictObject({
|
|
|
1078
1133
|
});
|
|
1079
1134
|
|
|
1080
1135
|
export type AskAiProvider = (typeof askAiProviders)[number];
|
|
1136
|
+
export type AskReasoning = (typeof askReasoningLevels)[number];
|
|
1081
1137
|
export type AskAiConfig = NonNullable<z.infer<typeof aiConfigSchema>["ask"]>;
|
|
1082
1138
|
export { openInChatProviders } from "./open-in-chat.ts";
|
|
1083
1139
|
export type { OpenInChatProvider } from "./open-in-chat.ts";
|
package/src/registry/eject.ts
CHANGED
|
@@ -137,7 +137,9 @@ const askFiles = async (
|
|
|
137
137
|
const files = [
|
|
138
138
|
{
|
|
139
139
|
content: askEndpointTemplate(resolveAskBackend(ask), grounded, {
|
|
140
|
+
cors: ask.cors,
|
|
140
141
|
instructions: ask.instructions,
|
|
142
|
+
reasoning: ask.reasoning,
|
|
141
143
|
retrieval: ask.retrieval,
|
|
142
144
|
}),
|
|
143
145
|
path: join(srcDir, "pages", "api", "ask.ts"),
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire } from "node:module";
|
|
3
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
4
|
-
|
|
5
|
-
// src/cli/command-meta.ts
|
|
6
|
-
var commandMeta = {
|
|
7
|
-
add: {
|
|
8
|
-
description: "Install a source component or template from the registry.",
|
|
9
|
-
name: "add"
|
|
10
|
-
},
|
|
11
|
-
audit: {
|
|
12
|
-
description: "Audit the built site for SEO and site-health issues.",
|
|
13
|
-
name: "audit"
|
|
14
|
-
},
|
|
15
|
-
build: {
|
|
16
|
-
description: "Build the docs site for production.",
|
|
17
|
-
name: "build"
|
|
18
|
-
},
|
|
19
|
-
check: {
|
|
20
|
-
description: "Type-check the docs site with astro check.",
|
|
21
|
-
name: "check"
|
|
22
|
-
},
|
|
23
|
-
dev: {
|
|
24
|
-
description: "Start the Blume development server.",
|
|
25
|
-
name: "dev"
|
|
26
|
-
},
|
|
27
|
-
doctor: {
|
|
28
|
-
description: "Diagnose common configuration and content problems.",
|
|
29
|
-
name: "doctor"
|
|
30
|
-
},
|
|
31
|
-
eject: {
|
|
32
|
-
description: "Promote the generated runtime into an owned Astro project.",
|
|
33
|
-
name: "eject"
|
|
34
|
-
},
|
|
35
|
-
eval: {
|
|
36
|
-
description: "Test the docs: an agent answers your questions using only the documentation.",
|
|
37
|
-
name: "eval"
|
|
38
|
-
},
|
|
39
|
-
init: {
|
|
40
|
-
description: "Scaffold a minimal Blume project.",
|
|
41
|
-
name: "init"
|
|
42
|
-
},
|
|
43
|
-
"mcp-stdio": {
|
|
44
|
-
description: "Serve an MCP data snapshot over stdio (internal, used by `blume eval`).",
|
|
45
|
-
name: "mcp-stdio"
|
|
46
|
-
},
|
|
47
|
-
preview: {
|
|
48
|
-
description: "Preview the last production build.",
|
|
49
|
-
name: "preview"
|
|
50
|
-
},
|
|
51
|
-
sync: {
|
|
52
|
-
description: "Re-fetch remote content sources and regenerate the runtime.",
|
|
53
|
-
name: "sync"
|
|
54
|
-
},
|
|
55
|
-
translate: {
|
|
56
|
-
description: "Translate docs into the configured locales with a local agent CLI.",
|
|
57
|
-
name: "translate"
|
|
58
|
-
},
|
|
59
|
-
validate: {
|
|
60
|
-
description: "Validate internal, anchor, asset, and external links.",
|
|
61
|
-
name: "validate"
|
|
62
|
-
},
|
|
63
|
-
version: {
|
|
64
|
-
description: "Freeze the current docs as an archived version.",
|
|
65
|
-
name: "version"
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export { __require, commandMeta };
|
|
70
|
-
|
|
71
|
-
//# debugId=3DF60EB79641093164756E2164756E21
|
|
72
|
-
//# sourceMappingURL=chunk-2aj8ddew.js.map
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/cli/command-meta.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { CommandMeta } from \"citty\";\n\n/**\n * Every command's `meta`, held apart from the command modules themselves.\n *\n * The CLI entry loads each command lazily (see `lazy-command.ts`), but citty\n * still reads every subcommand's `meta` to render `blume --help` and to match\n * an unknown name against aliases. Keeping that table here lets those paths\n * run without importing a single command module — `dev` alone drags in Astro,\n * `mcp-stdio` the MCP SDK. The command modules read their `meta` from this\n * table too, so the entry and the command can't drift.\n */\nexport const commandMeta = {\n add: {\n description: \"Install a source component or template from the registry.\",\n name: \"add\",\n },\n audit: {\n description: \"Audit the built site for SEO and site-health issues.\",\n name: \"audit\",\n },\n build: {\n description: \"Build the docs site for production.\",\n name: \"build\",\n },\n check: {\n description: \"Type-check the docs site with astro check.\",\n name: \"check\",\n },\n dev: {\n description: \"Start the Blume development server.\",\n name: \"dev\",\n },\n doctor: {\n description: \"Diagnose common configuration and content problems.\",\n name: \"doctor\",\n },\n eject: {\n description: \"Promote the generated runtime into an owned Astro project.\",\n name: \"eject\",\n },\n eval: {\n description:\n \"Test the docs: an agent answers your questions using only the documentation.\",\n name: \"eval\",\n },\n init: {\n description: \"Scaffold a minimal Blume project.\",\n name: \"init\",\n },\n \"mcp-stdio\": {\n description:\n \"Serve an MCP data snapshot over stdio (internal, used by `blume eval`).\",\n name: \"mcp-stdio\",\n },\n preview: {\n description: \"Preview the last production build.\",\n name: \"preview\",\n },\n sync: {\n description: \"Re-fetch remote content sources and regenerate the runtime.\",\n name: \"sync\",\n },\n translate: {\n description:\n \"Translate docs into the configured locales with a local agent CLI.\",\n name: \"translate\",\n },\n validate: {\n description: \"Validate internal, anchor, asset, and external links.\",\n name: \"validate\",\n },\n version: {\n description: \"Freeze the current docs as an archived version.\",\n name: \"version\",\n },\n} satisfies Record<string, CommandMeta>;\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": ";;;;;AAYO,IAAM,cAAc;AAAA,EACzB,KAAK;AAAA,IACH,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,KAAK;AAAA,IACH,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,IACN,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,aACE;AAAA,IACF,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,aAAa;AAAA,IACX,aACE;AAAA,IACF,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,WAAW;AAAA,IACT,aACE;AAAA,IACF,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,EACR;AACF;",
|
|
8
|
-
"debugId": "3DF60EB79641093164756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|