@webspire/mcp 0.8.0 → 0.8.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/README.md +22 -9
- package/css/webspire-components.css +176 -0
- package/data/registry.json +20001 -729
- package/dist/registration.d.ts +2 -2
- package/dist/registration.js +376 -285
- package/dist/search.d.ts +43 -1
- package/dist/search.js +778 -38
- package/dist/types.d.ts +15 -3
- package/package.json +5 -2
package/dist/search.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SnippetEntry } from
|
|
1
|
+
import type { PatternEntry, SnippetEntry } from "./types.js";
|
|
2
2
|
export interface SnippetSearchOptions {
|
|
3
3
|
query: string;
|
|
4
4
|
category?: string;
|
|
@@ -10,3 +10,45 @@ export interface SnippetSearchOptions {
|
|
|
10
10
|
export declare function stem(word: string): string;
|
|
11
11
|
export declare function scoreSnippet(snippet: SnippetEntry, queryStems: string[], expandedTerms: string[]): number;
|
|
12
12
|
export declare function searchSnippets(snippets: SnippetEntry[], options: SnippetSearchOptions): SnippetEntry[];
|
|
13
|
+
export interface PatternSearchOptions {
|
|
14
|
+
query: string;
|
|
15
|
+
family?: string;
|
|
16
|
+
tier?: "base" | "enhanced";
|
|
17
|
+
domain?: string;
|
|
18
|
+
tone?: string;
|
|
19
|
+
uxGoal?: string;
|
|
20
|
+
limit?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function scorePattern(pattern: PatternEntry, queryStems: string[], expandedTerms: string[], options: PatternSearchOptions): number;
|
|
23
|
+
export declare function searchPatterns(patterns: PatternEntry[], options: PatternSearchOptions): PatternEntry[];
|
|
24
|
+
export declare const DOMAIN_KEYS: readonly ["legal", "healthcare", "education", "finance", "saas", "ecommerce", "agency", "consulting", "nonprofit", "gastronomy", "realestate", "personal"];
|
|
25
|
+
export type Domain = (typeof DOMAIN_KEYS)[number];
|
|
26
|
+
export declare const DOMAIN_LABEL: string;
|
|
27
|
+
export declare const TONE_KEYS: readonly ["serious", "premium", "modern", "friendly", "approachable", "approachable_professional", "technical", "editorial", "playful", "institutional", "industrial", "casual"];
|
|
28
|
+
export type Tone = (typeof TONE_KEYS)[number];
|
|
29
|
+
export declare const TONE_LABEL: string;
|
|
30
|
+
export declare const UX_GOAL_KEYS: readonly ["build_trust", "drive_contact", "drive_signup", "drive_purchase", "explain_offer", "highlight_expertise", "showcase_work", "reduce_friction", "provide_overview", "structure_learning", "guide_stepwise", "tell_story", "demonstrate_value"];
|
|
31
|
+
export type UxGoal = (typeof UX_GOAL_KEYS)[number];
|
|
32
|
+
export declare const UX_GOAL_LABEL: string;
|
|
33
|
+
export declare const CONTENT_NEED_KEYS: readonly ["about", "article", "blog", "careers", "case_study", "comparison", "contact", "conversion", "faq", "gallery", "integrations", "legal", "newsletter", "portfolio", "pricing", "product", "related_content", "resume", "support", "team", "testimonials", "trust"];
|
|
34
|
+
export type ContentNeed = (typeof CONTENT_NEED_KEYS)[number];
|
|
35
|
+
export declare const CONTENT_NEED_LABEL: string;
|
|
36
|
+
export declare function normalizeContentNeed(need: string): ContentNeed | null;
|
|
37
|
+
export interface ComposePageOptions {
|
|
38
|
+
domain: Domain;
|
|
39
|
+
tone: Tone;
|
|
40
|
+
uxGoals: UxGoal[];
|
|
41
|
+
contentNeeds?: ContentNeed[];
|
|
42
|
+
maxSections?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface RecommendedSnippet {
|
|
45
|
+
snippet: SnippetEntry;
|
|
46
|
+
reason: string;
|
|
47
|
+
}
|
|
48
|
+
export interface ComposedPage {
|
|
49
|
+
patterns: PatternEntry[];
|
|
50
|
+
snippets: RecommendedSnippet[];
|
|
51
|
+
reasoning: string[];
|
|
52
|
+
warnings: string[];
|
|
53
|
+
}
|
|
54
|
+
export declare function composePage(patterns: PatternEntry[], snippets: SnippetEntry[], options: ComposePageOptions): ComposedPage;
|