@decantr/registry 1.1.0 → 2.1.0

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.
@@ -41,7 +41,7 @@ interface Pattern {
41
41
  ambient?: Record<string, string>;
42
42
  };
43
43
  /**
44
- * v2.1 Tier C1. Declared runtime interactions this pattern MUST implement.
44
+ * Declared runtime interactions this pattern MUST implement.
45
45
  * Surfaced as a checkbox checklist in the per-page execution pack; enforced
46
46
  * by `decantr check --strict` (C5 guard rule). Each value maps to a
47
47
  * canonical implementation (treatment class + handler pattern) — see the
@@ -162,6 +162,31 @@ type ComposeEntry = string | {
162
162
  prefix: string;
163
163
  role?: ArchetypeRole;
164
164
  };
165
+ declare const BLUEPRINT_PORTFOLIO_VISIBILITIES: readonly ["featured", "public", "labs", "hidden"];
166
+ type BlueprintPortfolioVisibility = (typeof BLUEPRINT_PORTFOLIO_VISIBILITIES)[number];
167
+ declare const BLUEPRINT_PORTFOLIO_MATURITIES: readonly ["certified-flagship", "supported-contract", "experimental", "fold-candidate", "legacy-hidden"];
168
+ type BlueprintPortfolioMaturity = (typeof BLUEPRINT_PORTFOLIO_MATURITIES)[number];
169
+ declare const BLUEPRINT_ARTIFACT_STATUSES: readonly ["none", "planned", "candidate", "certified"];
170
+ type BlueprintArtifactStatus = (typeof BLUEPRINT_ARTIFACT_STATUSES)[number];
171
+ declare const PUBLIC_BLUEPRINT_SETS: readonly ["all", "featured", "certified", "labs"];
172
+ type PublicBlueprintSet = (typeof PUBLIC_BLUEPRINT_SETS)[number];
173
+ interface BlueprintPortfolioArtifact {
174
+ status: BlueprintArtifactStatus;
175
+ showcase?: string;
176
+ notes?: string;
177
+ }
178
+ interface BlueprintPortfolioMetadata {
179
+ visibility: BlueprintPortfolioVisibility;
180
+ maturity: BlueprintPortfolioMaturity;
181
+ rationale: string;
182
+ recommended_alternative?: string;
183
+ artifact: BlueprintPortfolioArtifact;
184
+ }
185
+ declare function isBlueprintPortfolioVisibility(value: unknown): value is BlueprintPortfolioVisibility;
186
+ declare function isBlueprintPortfolioMaturity(value: unknown): value is BlueprintPortfolioMaturity;
187
+ declare function isBlueprintArtifactStatus(value: unknown): value is BlueprintArtifactStatus;
188
+ declare function isPublicBlueprintSet(value: unknown): value is PublicBlueprintSet;
189
+ declare function getBlueprintPortfolioMetadata(value: unknown): BlueprintPortfolioMetadata | null;
165
190
  interface BlueprintRoute {
166
191
  shell?: string;
167
192
  archetype?: string;
@@ -189,6 +214,7 @@ interface Blueprint {
189
214
  decantr_compat?: string;
190
215
  name: string;
191
216
  description?: string;
217
+ blueprint_portfolio?: BlueprintPortfolioMetadata;
192
218
  tags?: string[];
193
219
  archetype?: string;
194
220
  compose?: ComposeEntry[];
@@ -434,6 +460,7 @@ interface PublicContentSummary {
434
460
  owner_name?: string | null;
435
461
  owner_username?: string | null;
436
462
  thumbnail_url?: string | null;
463
+ blueprint_portfolio?: BlueprintPortfolioMetadata | null;
437
464
  intelligence?: ContentIntelligenceMetadata | null;
438
465
  }
439
466
  interface PublicContentRecord<TData = Record<string, unknown>> {
@@ -493,6 +520,8 @@ interface SearchParams {
493
520
  sort?: string;
494
521
  recommended?: boolean;
495
522
  intelligenceSource?: ContentIntelligenceSource;
523
+ blueprintSet?: PublicBlueprintSet;
524
+ labs?: boolean;
496
525
  limit?: number;
497
526
  offset?: number;
498
527
  }
@@ -972,4 +1001,4 @@ interface ProjectAuditReport {
972
1001
  summary: ProjectAuditSummary;
973
1002
  }
974
1003
 
975
- export { type HostedFileCritiqueRequest as $, type Archetype as A, type Blueprint as B, type ContentType as C, type ContentHealthStatus as D, type ContentHealthTypeSummary as E, type ContentIntelligenceMetadata as F, type ContentIntelligenceSource as G, type ContentItem as H, type ContentListResponse as I, type ContentVerificationStatus as J, type CvdMode as K, type ExecutionPackAntiPattern as L, type ExecutionPackBase as M, type ExecutionPackBundleResponse as N, type ExecutionPackExample as O, type PatternPreset as P, type ExecutionPackManifest as Q, type ResolvedContent as R, type Shell as S, type Theme as T, type ExecutionPackScope as U, type ExecutionPackSuccessCheck as V, type ExecutionPackTarget as W, type ExecutionPackTokenBudget as X, type ExecutionPackType as Y, type FileCritiqueReport as Z, type HostedDistSnapshot as _, type Pattern as a, type HostedProjectAuditRequest as a0, type LayoutGroup as a1, type LayoutItem as a2, type MutationExecutionPack as a3, type OwnedContentSummary as a4, PUBLIC_CONTENT_SOURCES as a5, type PackManifestEntry as a6, type PackManifestMutationEntry as a7, type PackManifestPageEntry as a8, type PackManifestSectionEntry as a9, type ShowcaseVerificationEntry as aA, type ThemeEffects as aB, type ThemeShell as aC, type ThemeSpatial as aD, type ThemeTokens as aE, type UserProfile as aF, type VerificationFinding as aG, type VerificationScore as aH, type VerificationSeverity as aI, isApiContentType as aJ, isContentIntelligenceSource as aK, isContentType as aL, isPublicContentSource as aM, type HostedSelectedExecutionPackRequest as aN, type SelectedExecutionPackResponse as aO, type PageExecutionPack as aa, type PatternCodeSpec as ab, type PatternLayoutSpec as ac, type PatternReference as ad, type PatternReferenceObject as ae, type ProjectAuditReport as af, type ProjectAuditRuntimeAudit as ag, type ProjectAuditSummary as ah, type PublicContentRecord as ai, type PublicContentSource as aj, type PublicContentSummary as ak, type PublicUserProfile as al, type PublishPayload as am, type PublishResponse as an, type RegistryIntelligenceSummaryBucket as ao, type RegistryIntelligenceSummaryResponse as ap, type ReviewExecutionPack as aq, type ScaffoldExecutionPack as ar, type SearchParams as as, type SearchResponse as at, type SectionExecutionPack as au, type ShowcaseManifestEntry as av, type ShowcaseManifestResponse as aw, type ShowcaseShortlistReport as ax, type ShowcaseShortlistResponse as ay, type ShowcaseShortlistSummary as az, type PatternIO as b, API_CONTENT_TYPES as c, API_CONTENT_TYPE_TO_CONTENT_TYPE as d, type ApiContentType as e, type ArchetypeHeroCustomization as f, type ArchetypePage as g, type ArchetypeRole as h, type ArchetypeSuggestedTheme as i, type BlueprintNavigation as j, type BlueprintNavigationHotkey as k, type BlueprintOverrides as l, type BlueprintRoute as m, CONTENT_INTELLIGENCE_SOURCES as n, CONTENT_TYPES as o, CONTENT_TYPE_TO_API_CONTENT_TYPE as p, type ComposeEntry as q, type ContentBenchmarkConfidence as r, type ContentDependencies as s, type ContentGoldenUsage as t, type ContentHealthFinding as u, type ContentHealthFindingSource as v, type ContentHealthQualitySummary as w, type ContentHealthReferenceSummary as x, type ContentHealthRemediation as y, type ContentHealthReport as z };
1004
+ export { type ExecutionPackManifest as $, type Archetype as A, type Blueprint as B, type ContentType as C, type ContentDependencies as D, type ContentGoldenUsage as E, type ContentHealthFinding as F, type ContentHealthFindingSource as G, type ContentHealthQualitySummary as H, type ContentHealthReferenceSummary as I, type ContentHealthRemediation as J, type ContentHealthReport as K, type ContentHealthStatus as L, type ContentHealthTypeSummary as M, type ContentIntelligenceMetadata as N, type ContentIntelligenceSource as O, type PatternPreset as P, type ContentItem as Q, type ResolvedContent as R, type Shell as S, type Theme as T, type ContentListResponse as U, type ContentVerificationStatus as V, type CvdMode as W, type ExecutionPackAntiPattern as X, type ExecutionPackBase as Y, type ExecutionPackBundleResponse as Z, type ExecutionPackExample as _, type Pattern as a, isPublicContentSource as a$, type ExecutionPackScope as a0, type ExecutionPackSuccessCheck as a1, type ExecutionPackTarget as a2, type ExecutionPackTokenBudget as a3, type ExecutionPackType as a4, type FileCritiqueReport as a5, type HostedDistSnapshot as a6, type HostedFileCritiqueRequest as a7, type HostedProjectAuditRequest as a8, type LayoutGroup as a9, type ReviewExecutionPack as aA, type ScaffoldExecutionPack as aB, type SearchParams as aC, type SearchResponse as aD, type SectionExecutionPack as aE, type ShowcaseManifestEntry as aF, type ShowcaseManifestResponse as aG, type ShowcaseShortlistReport as aH, type ShowcaseShortlistResponse as aI, type ShowcaseShortlistSummary as aJ, type ShowcaseVerificationEntry as aK, type ThemeEffects as aL, type ThemeShell as aM, type ThemeSpatial as aN, type ThemeTokens as aO, type UserProfile as aP, type VerificationFinding as aQ, type VerificationScore as aR, type VerificationSeverity as aS, getBlueprintPortfolioMetadata as aT, isApiContentType as aU, isBlueprintArtifactStatus as aV, isBlueprintPortfolioMaturity as aW, isBlueprintPortfolioVisibility as aX, isContentIntelligenceSource as aY, isContentType as aZ, isPublicBlueprintSet as a_, type LayoutItem as aa, type MutationExecutionPack as ab, type OwnedContentSummary as ac, PUBLIC_BLUEPRINT_SETS as ad, PUBLIC_CONTENT_SOURCES as ae, type PackManifestEntry as af, type PackManifestMutationEntry as ag, type PackManifestPageEntry as ah, type PackManifestSectionEntry as ai, type PageExecutionPack as aj, type PatternCodeSpec as ak, type PatternLayoutSpec as al, type PatternReference as am, type PatternReferenceObject as an, type ProjectAuditReport as ao, type ProjectAuditRuntimeAudit as ap, type ProjectAuditSummary as aq, type PublicBlueprintSet as ar, type PublicContentRecord as as, type PublicContentSource as at, type PublicContentSummary as au, type PublicUserProfile as av, type PublishPayload as aw, type PublishResponse as ax, type RegistryIntelligenceSummaryBucket as ay, type RegistryIntelligenceSummaryResponse as az, type PatternIO as b, type HostedSelectedExecutionPackRequest as b0, type SelectedExecutionPackResponse as b1, API_CONTENT_TYPES as c, API_CONTENT_TYPE_TO_CONTENT_TYPE as d, type ApiContentType as e, type ArchetypeHeroCustomization as f, type ArchetypePage as g, type ArchetypeRole as h, type ArchetypeSuggestedTheme as i, BLUEPRINT_ARTIFACT_STATUSES as j, BLUEPRINT_PORTFOLIO_MATURITIES as k, BLUEPRINT_PORTFOLIO_VISIBILITIES as l, type BlueprintArtifactStatus as m, type BlueprintNavigation as n, type BlueprintNavigationHotkey as o, type BlueprintOverrides as p, type BlueprintPortfolioArtifact as q, type BlueprintPortfolioMaturity as r, type BlueprintPortfolioMetadata as s, type BlueprintPortfolioVisibility as t, type BlueprintRoute as u, CONTENT_INTELLIGENCE_SOURCES as v, CONTENT_TYPES as w, CONTENT_TYPE_TO_API_CONTENT_TYPE as x, type ComposeEntry as y, type ContentBenchmarkConfidence as z };
@@ -1,2 +1,2 @@
1
- export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, e as ApiContentType, o as CONTENT_TYPES, p as CONTENT_TYPE_TO_API_CONTENT_TYPE, C as ContentType, aJ as isApiContentType, aL as isContentType } from './content-types-GxXVWkrY.js';
1
+ export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, e as ApiContentType, w as CONTENT_TYPES, x as CONTENT_TYPE_TO_API_CONTENT_TYPE, C as ContentType, aU as isApiContentType, aZ as isContentType } from './content-types-Ce7Eolmj.js';
2
2
  import '@decantr/essence-spec';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EssenceFile } from '@decantr/essence-spec';\n\n// --- Pattern ---\nexport interface PatternLayoutSpec {\n layout: string;\n atoms: string;\n slots?: Record<string, string>;\n}\n\nexport interface PatternCodeSpec {\n imports?: string;\n example?: string;\n}\n\nexport interface PatternPreset {\n description: string;\n components?: string[];\n layout: PatternLayoutSpec;\n code?: PatternCodeSpec;\n}\n\nexport interface PatternIO {\n produces?: string[];\n consumes?: string[];\n actions?: string[];\n}\n\nexport interface Pattern {\n id: string;\n version: string;\n name: string;\n description: string;\n tags: string[];\n components: string[];\n default_preset: string;\n presets: Record<string, PatternPreset>;\n contained?: boolean;\n io?: PatternIO;\n code?: PatternCodeSpec;\n default_layout?: PatternLayoutSpec;\n visual_brief?: string;\n composition?: Record<string, string>;\n motion?: {\n micro?: Record<string, string>;\n transitions?: Record<string, string>;\n ambient?: Record<string, string>;\n };\n /**\n * v2.1 Tier C1. Declared runtime interactions this pattern MUST implement.\n * Surfaced as a checkbox checklist in the per-page execution pack; enforced\n * by `decantr check --strict` (C5 guard rule). Each value maps to a\n * canonical implementation (treatment class + handler pattern) — see the\n * Interaction Requirements table in scaffolded DECANTR.md. Before this\n * field, motion/interactivity lived only as prose philosophy that cold\n * LLMs routinely categorized as \"nice to have\" and skipped.\n */\n interactions?: string[];\n responsive?: {\n mobile?: string;\n tablet?: string;\n desktop?: string;\n };\n accessibility?: {\n role?: string;\n 'aria-label'?: string;\n keyboard?: string[];\n announcements?: string[];\n focus_management?: string;\n };\n layout_hints?: Record<string, string>;\n category?: string;\n}\n\n// --- Archetype ---\nexport type ArchetypeRole = 'primary' | 'gateway' | 'public' | 'auxiliary';\n\nexport interface PatternReferenceObject {\n pattern: string;\n preset?: string;\n as?: string;\n}\n\nexport type PatternReference = string | PatternReferenceObject;\n\nexport interface LayoutGroup {\n cols: PatternReference[];\n at?: string;\n span?: Record<string, number>;\n}\n\nexport type LayoutItem = PatternReference | LayoutGroup;\n\nexport interface ContentDependencies {\n [kind: string]: Record<string, string>;\n}\n\nexport interface ArchetypePage {\n id: string;\n default_layout: LayoutItem[];\n shell: string;\n description?: string;\n patterns?: PatternReference[];\n}\n\nexport interface SeoHints {\n schema_org?: string[];\n meta_priorities?: string[];\n}\n\nexport interface ArchetypeSuggestedTheme {\n ids?: string[];\n modes?: string[];\n shapes?: string[];\n}\n\nexport interface ArchetypeHeroCustomization {\n style?: string;\n elements?: string[];\n background?: string;\n [key: string]: unknown;\n}\n\nexport interface Archetype {\n $schema?: string;\n id: string;\n version: string;\n decantr_compat?: string;\n name: string;\n description: string;\n tags: string[];\n role: ArchetypeRole;\n pages: ArchetypePage[];\n features: string[];\n dependencies?: ContentDependencies;\n seo_hints?: SeoHints;\n classification?: {\n triggers: { primary: string[]; secondary: string[]; negative: string[] };\n implies: string[];\n weight: number;\n tier: string;\n };\n page_briefs?: Record<string, string>;\n suggested_theme?: ArchetypeSuggestedTheme;\n shells?: Record<string, string>;\n personality?: string[];\n hero_customization?: ArchetypeHeroCustomization;\n}\n\n// --- Theme substructures (absorbed from former Recipe type) ---\nexport interface ThemeSpatial {\n density_bias: number;\n content_gap_shift: number;\n section_padding: string;\n card_wrapping: 'always' | 'minimal' | 'none';\n surface_override: string | null;\n}\n\nexport interface ThemeEffects {\n enabled: boolean;\n intensity: 'subtle' | 'moderate' | 'bold';\n type_mapping: Record<string, string[]>;\n component_fallback: Record<string, string>;\n intensity_values?: Record<string, Record<string, string>>;\n}\n\nexport interface ThemeShell {\n preferred: string[];\n nav_style: string;\n root?: string;\n nav?: string;\n header?: string;\n dimensions?: { navWidth?: string; headerHeight?: string };\n}\n\n// --- Blueprint ---\nexport type ComposeEntry = string | { archetype: string; prefix: string; role?: ArchetypeRole };\n\nexport interface BlueprintRoute {\n shell?: string;\n archetype?: string;\n page?: string;\n}\n\nexport interface BlueprintNavigationHotkey {\n key: string;\n route?: string;\n label?: string;\n}\n\nexport interface BlueprintNavigation {\n command_palette?: boolean;\n hotkeys?: BlueprintNavigationHotkey[];\n}\n\nexport interface BlueprintOverrides {\n features_add?: string[];\n features_remove?: string[];\n pages_remove?: string[];\n pages?: Record<string, Record<string, unknown>>;\n}\n\nexport interface Blueprint {\n $schema?: string;\n id: string;\n version?: string;\n decantr_compat?: string;\n name: string;\n description?: string;\n tags?: string[];\n archetype?: string;\n compose?: ComposeEntry[];\n theme: { id: string; mode?: string; shape?: string };\n personality?: string | string[];\n features?: string[];\n routes?: Record<string, BlueprintRoute>;\n overrides?: BlueprintOverrides;\n seo_hints?: SeoHints;\n navigation?: BlueprintNavigation;\n dependencies?: ContentDependencies;\n suggested_themes?: string[];\n design_constraints?: Record<string, unknown>;\n voice?: {\n tone?: string;\n cta_verbs?: string[];\n avoid?: string[];\n empty_states?: string;\n errors?: string;\n loading?: string;\n metrics_format?: string;\n };\n responsive_strategy?: {\n breakpoints?: string[];\n navigation?: Record<string, string>;\n data_display?: Record<string, string>;\n };\n}\n\n// --- Shell ---\nexport interface Shell {\n id: string;\n name: string;\n description?: string;\n root?: string;\n nav?: string;\n header?: string;\n nav_style?: string;\n dimensions?: {\n navWidth?: string;\n headerHeight?: string;\n };\n internal_layout?: Record<string, unknown>;\n layout?: string;\n atoms?: string;\n config?: Record<string, unknown>;\n guidance?: Record<string, string>;\n code?: { imports?: string; example?: string };\n}\n\n// --- Content Resolution ---\nexport const CONTENT_TYPES = ['pattern', 'theme', 'blueprint', 'archetype', 'shell'] as const;\n\nexport type ContentType = (typeof CONTENT_TYPES)[number];\n\nexport const API_CONTENT_TYPES = [\n 'patterns',\n 'themes',\n 'blueprints',\n 'archetypes',\n 'shells',\n] as const;\n\nexport type ApiContentType = (typeof API_CONTENT_TYPES)[number];\n\nexport const CONTENT_TYPE_TO_API_CONTENT_TYPE: Record<ContentType, ApiContentType> = {\n pattern: 'patterns',\n theme: 'themes',\n blueprint: 'blueprints',\n archetype: 'archetypes',\n shell: 'shells',\n};\n\nexport const API_CONTENT_TYPE_TO_CONTENT_TYPE: Record<ApiContentType, ContentType> = {\n patterns: 'pattern',\n themes: 'theme',\n blueprints: 'blueprint',\n archetypes: 'archetype',\n shells: 'shell',\n};\n\nexport function isContentType(value: string): value is ContentType {\n return CONTENT_TYPES.includes(value as ContentType);\n}\n\nexport function isApiContentType(value: string): value is ApiContentType {\n return API_CONTENT_TYPES.includes(value as ApiContentType);\n}\n\nexport interface ResolvedContent<T> {\n item: T;\n source: 'local' | 'core';\n path: string;\n}\n\n// --- Content Health ---\n\nexport type ContentHealthStatus = 'healthy' | 'warning' | 'error';\nexport type ContentHealthFindingSource =\n | 'schema'\n | 'reference'\n | 'quality'\n | 'coverage'\n | 'content';\n\nexport interface ContentHealthRemediation {\n summary: string;\n prompt: string;\n commands: string[];\n}\n\nexport interface ContentHealthFinding {\n id: string;\n source: ContentHealthFindingSource;\n category: string;\n severity: VerificationSeverity;\n message: string;\n evidence: string[];\n file?: string;\n type?: ContentType;\n itemId?: string;\n rule?: string;\n suggestedFix?: string;\n remediation: ContentHealthRemediation;\n}\n\nexport interface ContentHealthTypeSummary {\n type: ContentType;\n directory: ApiContentType;\n itemCount: number;\n validCount: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n ignoredCount: number;\n}\n\nexport interface ContentHealthReferenceSummary {\n checked: number;\n missing: number;\n missingByType: Record<ContentType, number>;\n}\n\nexport interface ContentHealthQualitySummary {\n patternVisualBriefCoverage: number;\n patternInteractionCoverage: number;\n themeDecoratorCoverage: number;\n blueprintPersonalityCoverage: number;\n blueprintVoiceCoverage: number;\n archetypePageBriefCoverage: number;\n}\n\nexport interface ContentHealthReport {\n $schema: string;\n generatedAt: string;\n contentRoot: string;\n status: ContentHealthStatus;\n score: number;\n summary: {\n itemCount: number;\n validCount: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n findingCount: number;\n ignoredCount: number;\n contentDirectoryCount: number;\n };\n content: ContentHealthTypeSummary[];\n references: ContentHealthReferenceSummary;\n quality: ContentHealthQualitySummary;\n ci: {\n recommendedCommand: string;\n failOn: 'error' | 'warn' | 'none';\n };\n findings: ContentHealthFinding[];\n}\n\n// --- Theme ---\n\nexport type CvdMode = 'deuteranopia' | 'protanopia' | 'tritanopia' | 'achromatopsia';\n\nexport interface ThemeTokens {\n base?: Record<string, string>;\n cvd?: Partial<Record<CvdMode, Record<string, string>>>;\n}\n\nexport interface Theme {\n id: string;\n name: string;\n description?: string;\n tags?: string[];\n personality?: string;\n seed?: Record<string, string>;\n palette?: Record<string, Record<string, string>>;\n modes?: string[];\n shapes?: string[];\n cvd_support?: CvdMode[];\n tokens?: ThemeTokens;\n decantr_compat?: string;\n source?: string;\n // Absorbed from former Recipe type\n decorators?: Record<string, string>;\n treatments?: Record<string, Record<string, string>>;\n spatial?: ThemeSpatial;\n shell?: ThemeShell;\n effects?: ThemeEffects;\n motion?: {\n preference?: string;\n reduce_motion?: boolean;\n entrance?: string;\n timing?: string;\n durations?: Record<string, string>;\n };\n typography?: { scale?: string; heading_weight?: number; body_weight?: number; mono?: string };\n radius?: { philosophy?: string; base?: number };\n compositions?: Record<string, { shell: string; description: string; effects?: string[] }>;\n pattern_preferences?: {\n prefer: string[];\n avoid: string[];\n default_presets?: Record<string, string>;\n };\n decorator_definitions?: Record<\n string,\n {\n description: string;\n intent: string;\n suggested_properties?: Record<string, string>;\n pairs_with?: string[];\n usage?: string[];\n }\n >;\n}\n\n// --- API Client Types ---\n\nexport interface ContentListResponse<T = Record<string, unknown>> {\n items: T[];\n total: number;\n limit?: number;\n offset?: number;\n}\n\nexport type ContentVerificationStatus =\n | 'unknown'\n | 'pending'\n | 'build-green'\n | 'build-red'\n | 'smoke-green'\n | 'smoke-red';\n\nexport type ContentBenchmarkConfidence = 'none' | 'low' | 'medium' | 'high';\nexport type ContentConfidenceTier = 'low' | 'medium' | 'high' | 'verified';\n\nexport type ContentGoldenUsage = 'none' | 'showcase' | 'shortlisted';\nexport const PUBLIC_CONTENT_SOURCES = ['official', 'community', 'organization'] as const;\n\nexport type PublicContentSource = (typeof PUBLIC_CONTENT_SOURCES)[number];\n\nexport function isPublicContentSource(value: string): value is PublicContentSource {\n return PUBLIC_CONTENT_SOURCES.includes(value as PublicContentSource);\n}\n\nexport const CONTENT_INTELLIGENCE_SOURCES = ['authored', 'benchmark', 'hybrid'] as const;\n\nexport type ContentIntelligenceSource = 'authored' | 'benchmark' | 'hybrid';\n\nexport function isContentIntelligenceSource(value: string): value is ContentIntelligenceSource {\n return CONTENT_INTELLIGENCE_SOURCES.includes(value as ContentIntelligenceSource);\n}\n\nexport interface ContentIntelligenceMetadata {\n source: ContentIntelligenceSource;\n verification_status: ContentVerificationStatus;\n last_verified_at?: string | null;\n target_coverage: string[];\n benchmark_confidence: ContentBenchmarkConfidence;\n confidence_tier: ContentConfidenceTier;\n golden_usage: ContentGoldenUsage;\n quality_score: number | null;\n confidence_score: number | null;\n recommended: boolean;\n evidence: string[];\n recommendation_reasons: string[];\n recommendation_blockers: string[];\n benchmark?: {\n classification?: ShowcaseVerificationEntry['classification'];\n target?: string | null;\n drift_signal?: ShowcaseVerificationEntry['drift']['signal'];\n build_passed?: boolean | null;\n smoke_passed?: boolean | null;\n };\n}\n\nexport interface PublicContentSummary {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n version?: string;\n name?: string;\n description?: string;\n published_at?: string;\n owner_name?: string | null;\n owner_username?: string | null;\n thumbnail_url?: string | null;\n intelligence?: ContentIntelligenceMetadata | null;\n}\n\nexport interface PublicContentRecord<TData = Record<string, unknown>> {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n version: string;\n data: TData;\n visibility: 'public' | 'private';\n status: 'pending' | 'approved' | 'rejected' | 'published';\n created_at: string;\n updated_at: string;\n published_at?: string;\n owner_name?: string | null;\n owner_username?: string | null;\n thumbnail_url?: string | null;\n intelligence?: ContentIntelligenceMetadata | null;\n}\n\nexport interface ContentItem extends PublicContentRecord<Record<string, unknown>> {}\n\nexport interface OwnedContentSummary extends PublicContentSummary {\n visibility: 'public' | 'private';\n status: 'pending' | 'approved' | 'rejected' | 'published';\n created_at: string;\n updated_at: string;\n}\n\nexport interface PublicUserProfile {\n username: string;\n display_name: string | null;\n reputation_score: number;\n tier: 'free' | 'pro' | 'team' | 'enterprise';\n created_at: string;\n content_count: number;\n content_counts: Record<string, number>;\n}\n\nexport interface PublishPayload {\n type: ApiContentType;\n slug: string;\n namespace: string;\n version: string;\n data: Record<string, unknown>;\n visibility?: 'public' | 'private';\n}\n\nexport interface PublishResponse {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n status: string;\n}\n\nexport interface SearchParams {\n q: string;\n type?: string;\n namespace?: string;\n source?: PublicContentSource;\n sort?: string;\n recommended?: boolean;\n intelligenceSource?: ContentIntelligenceSource;\n limit?: number;\n offset?: number;\n}\n\nexport interface SearchResponse {\n results: PublicContentSummary[];\n total: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface RegistryIntelligenceSummaryBucket {\n total_public_items: number;\n with_intelligence: number;\n recommended: number;\n authored: number;\n benchmark: number;\n hybrid: number;\n missing_source: number;\n smoke_green: number;\n build_green: number;\n high_confidence: number;\n verified_confidence: number;\n}\n\nexport interface RegistryIntelligenceSummaryResponse {\n $schema: string;\n generated_at: string;\n namespace: string | null;\n totals: RegistryIntelligenceSummaryBucket;\n by_type: Record<ContentType, RegistryIntelligenceSummaryBucket>;\n}\n\nexport interface UserProfile {\n id: string;\n email: string;\n tier: 'free' | 'pro' | 'team' | 'enterprise';\n reputation_score: number;\n trusted: boolean;\n}\n\nexport interface ShowcaseVerificationEntry {\n slug: string;\n target: string | null;\n classification: 'pending' | 'A' | 'B' | 'C' | 'D';\n verificationStatus: 'pending' | 'build-green' | 'build-red' | 'smoke-green' | 'smoke-red';\n build: {\n passed: boolean | null;\n durationMs: number;\n };\n smoke: {\n passed: boolean | null;\n durationMs: number;\n rootDocumentOk: boolean;\n titleOk: boolean;\n langOk: boolean;\n viewportOk: boolean;\n charsetOk: boolean;\n cspSignalOk: boolean;\n inlineScriptCount: number;\n inlineEventHandlerCount: number;\n externalScriptsWithoutIntegrityCount: number;\n externalScriptsWithIntegrityMissingCrossoriginCount: number;\n externalStylesheetsWithoutIntegrityCount: number;\n externalStylesheetsWithIntegrityMissingCrossoriginCount: number;\n externalScriptsWithInsecureTransportCount: number;\n externalStylesheetsWithInsecureTransportCount: number;\n externalMediaSourcesWithInsecureTransportCount: number;\n externalBlankLinksWithoutRelCount: number;\n externalIframesWithoutSandboxCount: number;\n externalIframesWithInsecureTransportCount: number;\n jsEvalSignalCount: number;\n jsHtmlInjectionSignalCount: number;\n jsInsecureTransportSignalCount: number;\n jsSecretSignalCount: number;\n assetCount: number;\n assetsPassed: number;\n routeHintsChecked: string[];\n routeHintsMatched: number;\n routeHintsCoverageOk: boolean;\n routeDocumentsChecked: number;\n routeDocumentsPassed: number;\n routeDocumentsHardenedCount: number;\n routeDocumentsCoverageOk: boolean;\n routeDocumentsHardeningOk: boolean;\n fullRouteCoverageOk: boolean;\n totalAssetBytes: number;\n jsAssetBytes: number;\n cssAssetBytes: number;\n largestAssetPath: string | null;\n largestAssetBytes: number;\n failures: string[];\n };\n drift: {\n signal: 'lower' | 'moderate' | 'elevated';\n penalty: number;\n inlineStyleCount: number;\n hardcodedColorCount: number;\n utilityLeakageCount: number;\n decantrTreatmentCount: number;\n hasPackManifest: boolean;\n hasDist: boolean;\n };\n}\n\nexport interface ShowcaseShortlistSummary {\n appCount: number;\n passedBuilds: number;\n failedBuilds: number;\n averageDurationMs: number;\n passedSmokes: number;\n failedSmokes: number;\n averageSmokeDurationMs: number;\n appsWithTitleOkCount: number;\n appsWithLangOkCount: number;\n appsWithViewportOkCount: number;\n appsWithCharsetOkCount: number;\n appsWithoutInlineScriptsCount: number;\n appsWithCspSignalCount: number;\n appsWithExternalScriptIntegrityCount: number;\n appsWithExternalScriptCrossoriginCount: number;\n appsWithExternalStylesheetIntegrityCount: number;\n appsWithExternalStylesheetCrossoriginCount: number;\n appsWithRouteCoverageCount: number;\n appsWithFullRouteCoverageCount: number;\n averageTotalAssetBytes: number;\n averageJsAssetBytes: number;\n averageCssAssetBytes: number;\n lowerDriftCount: number;\n moderateDriftCount: number;\n elevatedDriftCount: number;\n withPackManifestCount: number;\n}\n\nexport interface ShowcaseManifestEntry {\n slug: string;\n status: string;\n classification: string;\n origin?: string | null;\n target?: string | null;\n goldenCandidate?: string | boolean;\n notes?: string | null;\n thumbnail?: {\n src: string;\n alt: string;\n width?: number;\n height?: number;\n } | null;\n url?: string | null;\n verification?: ShowcaseVerificationEntry | null;\n}\n\nexport interface ShowcaseManifestResponse {\n total: number;\n shortlisted: number;\n apps: ShowcaseManifestEntry[];\n}\n\nexport interface ShowcaseShortlistResponse {\n generatedAt: string | null;\n summary: ShowcaseShortlistSummary | null;\n apps: ShowcaseManifestEntry[];\n}\n\nexport interface ShowcaseShortlistReport {\n $schema: string;\n generatedAt: string;\n dryRun: boolean;\n summary: ShowcaseShortlistSummary;\n results: ShowcaseVerificationEntry[];\n}\n\nexport interface HostedFileCritiqueRequest {\n essence: EssenceFile;\n code: string;\n filePath?: string;\n treatmentsCss?: string;\n}\n\nexport interface HostedDistSnapshot {\n indexHtml: string;\n assets?: Record<string, string>;\n}\n\nexport interface HostedSourceSnapshot {\n files: Record<string, string>;\n}\n\nexport interface HostedProjectAuditRequest {\n essence: EssenceFile;\n dist?: HostedDistSnapshot;\n sources?: HostedSourceSnapshot;\n}\n\nexport type ExecutionPackType = 'scaffold' | 'section' | 'page' | 'mutation' | 'review';\n\nexport interface ExecutionPackTarget {\n platform: 'web';\n framework: string | null;\n runtime: string | null;\n adapter: string;\n}\n\nexport interface ExecutionPackScope {\n appId: string;\n pageIds: string[];\n patternIds: string[];\n}\n\nexport interface ExecutionPackExample {\n id: string;\n label: string;\n language: string;\n snippet: string;\n}\n\nexport interface ExecutionPackAntiPattern {\n id: string;\n summary: string;\n guidance: string;\n}\n\nexport interface ExecutionPackSuccessCheck {\n id: string;\n label: string;\n severity: 'error' | 'warn' | 'info';\n}\n\nexport interface ExecutionPackTokenBudget {\n target: number;\n max: number;\n strategy: string[];\n}\n\nexport interface ExecutionPackBase<TData = Record<string, unknown>> {\n $schema: string;\n packVersion: '1.0.0';\n packType: ExecutionPackType;\n objective: string;\n target: ExecutionPackTarget;\n preset: string | null;\n scope: ExecutionPackScope;\n requiredSetup: string[];\n allowedVocabulary: string[];\n examples: ExecutionPackExample[];\n antiPatterns: ExecutionPackAntiPattern[];\n successChecks: ExecutionPackSuccessCheck[];\n tokenBudget: ExecutionPackTokenBudget;\n data: TData;\n renderedMarkdown: string;\n}\n\nexport interface PackManifestEntry {\n id: string;\n markdown: string;\n json: string;\n}\n\nexport interface PackManifestSectionEntry extends PackManifestEntry {\n pageIds: string[];\n}\n\nexport interface PackManifestPageEntry extends PackManifestEntry {\n sectionId: string | null;\n sectionRole: string | null;\n}\n\nexport interface PackManifestMutationEntry extends PackManifestEntry {\n mutationType: 'add-page' | 'modify';\n}\n\nexport interface ExecutionPackManifest {\n $schema: string;\n version: '1.0.0';\n generatedAt: string;\n scaffold: PackManifestEntry | null;\n review: PackManifestEntry | null;\n sections: PackManifestSectionEntry[];\n pages: PackManifestPageEntry[];\n mutations: PackManifestMutationEntry[];\n}\n\nexport interface ScaffoldExecutionPack\n extends ExecutionPackBase<{\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n }> {\n packType: 'scaffold';\n}\n\nexport interface ReviewExecutionPack\n extends ExecutionPackBase<{\n reviewType: 'app';\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n focusAreas: string[];\n workflow: string[];\n }> {\n packType: 'review';\n}\n\nexport interface SectionExecutionPack\n extends ExecutionPackBase<{\n sectionId: string;\n role: string;\n shell: string;\n description: string;\n features: string[];\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n }> {\n packType: 'section';\n}\n\nexport interface PageExecutionPack\n extends ExecutionPackBase<{\n pageId: string;\n path: string;\n shell: string;\n sectionId: string | null;\n sectionRole: string | null;\n features: string[];\n surface: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n wiringSignals: string[];\n patterns: Array<{\n id: string;\n alias: string;\n preset: string;\n layout: string;\n }>;\n }> {\n packType: 'page';\n}\n\nexport interface MutationExecutionPack\n extends ExecutionPackBase<{\n mutationType: 'add-page' | 'modify';\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n workflow: string[];\n }> {\n packType: 'mutation';\n}\n\nexport interface ExecutionPackBundleResponse {\n $schema: string;\n generatedAt: string;\n sourceEssenceVersion: string;\n manifest: ExecutionPackManifest;\n scaffold: ScaffoldExecutionPack;\n review: ReviewExecutionPack;\n sections: SectionExecutionPack[];\n pages: PageExecutionPack[];\n mutations: MutationExecutionPack[];\n}\n\nexport interface HostedSelectedExecutionPackRequest {\n essence: EssenceFile;\n pack_type: ExecutionPackType;\n id?: string;\n}\n\nexport interface SelectedExecutionPackResponse {\n $schema: string;\n generatedAt: string;\n sourceEssenceVersion: string;\n manifest: ExecutionPackManifest;\n selector: {\n packType: ExecutionPackType;\n id: string | null;\n };\n pack:\n | ScaffoldExecutionPack\n | ReviewExecutionPack\n | SectionExecutionPack\n | PageExecutionPack\n | MutationExecutionPack;\n}\n\nexport type VerificationSeverity = 'error' | 'warn' | 'info';\n\nexport interface VerificationFinding {\n id: string;\n category: string;\n severity: VerificationSeverity;\n message: string;\n evidence: string[];\n target?: string;\n file?: string;\n rule?: string;\n suggestedFix?: string;\n}\n\nexport interface VerificationScore {\n category: string;\n focusArea: string;\n score: number;\n details: string;\n suggestions: string[];\n}\n\nexport interface FileCritiqueReport {\n $schema: string;\n file: string;\n overall: number;\n scores: VerificationScore[];\n findings: VerificationFinding[];\n focusAreas: string[];\n reviewPack: ReviewExecutionPack | null;\n}\n\nexport interface ProjectAuditRuntimeAudit {\n distPresent: boolean;\n indexPresent: boolean;\n checked: boolean;\n passed: boolean | null;\n rootDocumentOk: boolean;\n titleOk: boolean;\n langOk: boolean;\n viewportOk: boolean;\n charsetOk: boolean;\n cspSignalOk: boolean;\n inlineScriptCount: number;\n inlineEventHandlerCount: number;\n externalScriptsWithoutIntegrityCount: number;\n externalScriptsWithIntegrityMissingCrossoriginCount: number;\n externalStylesheetsWithoutIntegrityCount: number;\n externalStylesheetsWithIntegrityMissingCrossoriginCount: number;\n externalScriptsWithInsecureTransportCount: number;\n externalStylesheetsWithInsecureTransportCount: number;\n externalMediaSourcesWithInsecureTransportCount: number;\n externalBlankLinksWithoutRelCount: number;\n externalIframesWithoutSandboxCount: number;\n externalIframesWithInsecureTransportCount: number;\n jsEvalSignalCount: number;\n jsHtmlInjectionSignalCount: number;\n jsInsecureTransportSignalCount: number;\n jsSecretSignalCount: number;\n assetCount: number;\n assetsPassed: number;\n routeHintsChecked: string[];\n routeHintsMatched: number;\n routeHintsCoverageOk: boolean;\n routeDocumentsChecked: number;\n routeDocumentsPassed: number;\n routeDocumentsHardenedCount: number;\n routeDocumentsCoverageOk: boolean;\n routeDocumentsHardeningOk: boolean;\n fullRouteCoverageOk: boolean;\n totalAssetBytes: number;\n jsAssetBytes: number;\n cssAssetBytes: number;\n largestAssetPath: string | null;\n largestAssetBytes: number;\n failures: string[];\n}\n\nexport interface ProjectAuditSummary {\n errorCount: number;\n warnCount: number;\n infoCount: number;\n essenceVersion: string | null;\n reviewPackPresent: boolean;\n packManifestPresent: boolean;\n runtimeAuditChecked: boolean;\n runtimePassed: boolean | null;\n pageCount: number;\n}\n\nexport interface ProjectAuditReport {\n $schema: string;\n projectRoot: string;\n valid: boolean;\n essence: EssenceFile | null;\n reviewPack: ReviewExecutionPack | null;\n packManifest: ExecutionPackManifest | null;\n runtimeAudit: ProjectAuditRuntimeAudit;\n findings: VerificationFinding[];\n summary: ProjectAuditSummary;\n}\n"],"mappings":";AAmQO,IAAM,gBAAgB,CAAC,WAAW,SAAS,aAAa,aAAa,OAAO;AAI5E,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,IAAM,mCAAwE;AAAA,EACnF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AACT;AAEO,IAAM,mCAAwE;AAAA,EACnF,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,QAAQ;AACV;AAEO,SAAS,cAAc,OAAqC;AACjE,SAAO,cAAc,SAAS,KAAoB;AACpD;AAEO,SAAS,iBAAiB,OAAwC;AACvE,SAAO,kBAAkB,SAAS,KAAuB;AAC3D;","names":[]}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { EssenceFile } from '@decantr/essence-spec';\n\n// --- Pattern ---\nexport interface PatternLayoutSpec {\n layout: string;\n atoms: string;\n slots?: Record<string, string>;\n}\n\nexport interface PatternCodeSpec {\n imports?: string;\n example?: string;\n}\n\nexport interface PatternPreset {\n description: string;\n components?: string[];\n layout: PatternLayoutSpec;\n code?: PatternCodeSpec;\n}\n\nexport interface PatternIO {\n produces?: string[];\n consumes?: string[];\n actions?: string[];\n}\n\nexport interface Pattern {\n id: string;\n version: string;\n name: string;\n description: string;\n tags: string[];\n components: string[];\n default_preset: string;\n presets: Record<string, PatternPreset>;\n contained?: boolean;\n io?: PatternIO;\n code?: PatternCodeSpec;\n default_layout?: PatternLayoutSpec;\n visual_brief?: string;\n composition?: Record<string, string>;\n motion?: {\n micro?: Record<string, string>;\n transitions?: Record<string, string>;\n ambient?: Record<string, string>;\n };\n /**\n * Declared runtime interactions this pattern MUST implement.\n * Surfaced as a checkbox checklist in the per-page execution pack; enforced\n * by `decantr check --strict` (C5 guard rule). Each value maps to a\n * canonical implementation (treatment class + handler pattern) — see the\n * Interaction Requirements table in scaffolded DECANTR.md. Before this\n * field, motion/interactivity lived only as prose philosophy that cold\n * LLMs routinely categorized as \"nice to have\" and skipped.\n */\n interactions?: string[];\n responsive?: {\n mobile?: string;\n tablet?: string;\n desktop?: string;\n };\n accessibility?: {\n role?: string;\n 'aria-label'?: string;\n keyboard?: string[];\n announcements?: string[];\n focus_management?: string;\n };\n layout_hints?: Record<string, string>;\n category?: string;\n}\n\n// --- Archetype ---\nexport type ArchetypeRole = 'primary' | 'gateway' | 'public' | 'auxiliary';\n\nexport interface PatternReferenceObject {\n pattern: string;\n preset?: string;\n as?: string;\n}\n\nexport type PatternReference = string | PatternReferenceObject;\n\nexport interface LayoutGroup {\n cols: PatternReference[];\n at?: string;\n span?: Record<string, number>;\n}\n\nexport type LayoutItem = PatternReference | LayoutGroup;\n\nexport interface ContentDependencies {\n [kind: string]: Record<string, string>;\n}\n\nexport interface ArchetypePage {\n id: string;\n default_layout: LayoutItem[];\n shell: string;\n description?: string;\n patterns?: PatternReference[];\n}\n\nexport interface SeoHints {\n schema_org?: string[];\n meta_priorities?: string[];\n}\n\nexport interface ArchetypeSuggestedTheme {\n ids?: string[];\n modes?: string[];\n shapes?: string[];\n}\n\nexport interface ArchetypeHeroCustomization {\n style?: string;\n elements?: string[];\n background?: string;\n [key: string]: unknown;\n}\n\nexport interface Archetype {\n $schema?: string;\n id: string;\n version: string;\n decantr_compat?: string;\n name: string;\n description: string;\n tags: string[];\n role: ArchetypeRole;\n pages: ArchetypePage[];\n features: string[];\n dependencies?: ContentDependencies;\n seo_hints?: SeoHints;\n classification?: {\n triggers: { primary: string[]; secondary: string[]; negative: string[] };\n implies: string[];\n weight: number;\n tier: string;\n };\n page_briefs?: Record<string, string>;\n suggested_theme?: ArchetypeSuggestedTheme;\n shells?: Record<string, string>;\n personality?: string[];\n hero_customization?: ArchetypeHeroCustomization;\n}\n\n// --- Theme substructures (absorbed from former Recipe type) ---\nexport interface ThemeSpatial {\n density_bias: number;\n content_gap_shift: number;\n section_padding: string;\n card_wrapping: 'always' | 'minimal' | 'none';\n surface_override: string | null;\n}\n\nexport interface ThemeEffects {\n enabled: boolean;\n intensity: 'subtle' | 'moderate' | 'bold';\n type_mapping: Record<string, string[]>;\n component_fallback: Record<string, string>;\n intensity_values?: Record<string, Record<string, string>>;\n}\n\nexport interface ThemeShell {\n preferred: string[];\n nav_style: string;\n root?: string;\n nav?: string;\n header?: string;\n dimensions?: { navWidth?: string; headerHeight?: string };\n}\n\n// --- Blueprint ---\nexport type ComposeEntry = string | { archetype: string; prefix: string; role?: ArchetypeRole };\n\nexport const BLUEPRINT_PORTFOLIO_VISIBILITIES = [\n 'featured',\n 'public',\n 'labs',\n 'hidden',\n] as const;\nexport type BlueprintPortfolioVisibility = (typeof BLUEPRINT_PORTFOLIO_VISIBILITIES)[number];\n\nexport const BLUEPRINT_PORTFOLIO_MATURITIES = [\n 'certified-flagship',\n 'supported-contract',\n 'experimental',\n 'fold-candidate',\n 'legacy-hidden',\n] as const;\nexport type BlueprintPortfolioMaturity = (typeof BLUEPRINT_PORTFOLIO_MATURITIES)[number];\n\nexport const BLUEPRINT_ARTIFACT_STATUSES = ['none', 'planned', 'candidate', 'certified'] as const;\nexport type BlueprintArtifactStatus = (typeof BLUEPRINT_ARTIFACT_STATUSES)[number];\n\nexport const PUBLIC_BLUEPRINT_SETS = ['all', 'featured', 'certified', 'labs'] as const;\nexport type PublicBlueprintSet = (typeof PUBLIC_BLUEPRINT_SETS)[number];\n\nexport interface BlueprintPortfolioArtifact {\n status: BlueprintArtifactStatus;\n showcase?: string;\n notes?: string;\n}\n\nexport interface BlueprintPortfolioMetadata {\n visibility: BlueprintPortfolioVisibility;\n maturity: BlueprintPortfolioMaturity;\n rationale: string;\n recommended_alternative?: string;\n artifact: BlueprintPortfolioArtifact;\n}\n\nexport function isBlueprintPortfolioVisibility(\n value: unknown,\n): value is BlueprintPortfolioVisibility {\n return BLUEPRINT_PORTFOLIO_VISIBILITIES.includes(value as BlueprintPortfolioVisibility);\n}\n\nexport function isBlueprintPortfolioMaturity(value: unknown): value is BlueprintPortfolioMaturity {\n return BLUEPRINT_PORTFOLIO_MATURITIES.includes(value as BlueprintPortfolioMaturity);\n}\n\nexport function isBlueprintArtifactStatus(value: unknown): value is BlueprintArtifactStatus {\n return BLUEPRINT_ARTIFACT_STATUSES.includes(value as BlueprintArtifactStatus);\n}\n\nexport function isPublicBlueprintSet(value: unknown): value is PublicBlueprintSet {\n return PUBLIC_BLUEPRINT_SETS.includes(value as PublicBlueprintSet);\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nexport function getBlueprintPortfolioMetadata(\n value: unknown,\n): BlueprintPortfolioMetadata | null {\n const candidate = isRecord(value) && isRecord(value.blueprint_portfolio)\n ? value.blueprint_portfolio\n : value;\n if (!isRecord(candidate)) {\n return null;\n }\n\n const artifact = candidate.artifact;\n if (\n !isBlueprintPortfolioVisibility(candidate.visibility) ||\n !isBlueprintPortfolioMaturity(candidate.maturity) ||\n typeof candidate.rationale !== 'string' ||\n !isRecord(artifact) ||\n !isBlueprintArtifactStatus(artifact.status)\n ) {\n return null;\n }\n\n return {\n visibility: candidate.visibility,\n maturity: candidate.maturity,\n rationale: candidate.rationale,\n recommended_alternative:\n typeof candidate.recommended_alternative === 'string'\n ? candidate.recommended_alternative\n : undefined,\n artifact: {\n status: artifact.status,\n showcase: typeof artifact.showcase === 'string' ? artifact.showcase : undefined,\n notes: typeof artifact.notes === 'string' ? artifact.notes : undefined,\n },\n };\n}\n\nexport interface BlueprintRoute {\n shell?: string;\n archetype?: string;\n page?: string;\n}\n\nexport interface BlueprintNavigationHotkey {\n key: string;\n route?: string;\n label?: string;\n}\n\nexport interface BlueprintNavigation {\n command_palette?: boolean;\n hotkeys?: BlueprintNavigationHotkey[];\n}\n\nexport interface BlueprintOverrides {\n features_add?: string[];\n features_remove?: string[];\n pages_remove?: string[];\n pages?: Record<string, Record<string, unknown>>;\n}\n\nexport interface Blueprint {\n $schema?: string;\n id: string;\n version?: string;\n decantr_compat?: string;\n name: string;\n description?: string;\n blueprint_portfolio?: BlueprintPortfolioMetadata;\n tags?: string[];\n archetype?: string;\n compose?: ComposeEntry[];\n theme: { id: string; mode?: string; shape?: string };\n personality?: string | string[];\n features?: string[];\n routes?: Record<string, BlueprintRoute>;\n overrides?: BlueprintOverrides;\n seo_hints?: SeoHints;\n navigation?: BlueprintNavigation;\n dependencies?: ContentDependencies;\n suggested_themes?: string[];\n design_constraints?: Record<string, unknown>;\n voice?: {\n tone?: string;\n cta_verbs?: string[];\n avoid?: string[];\n empty_states?: string;\n errors?: string;\n loading?: string;\n metrics_format?: string;\n };\n responsive_strategy?: {\n breakpoints?: string[];\n navigation?: Record<string, string>;\n data_display?: Record<string, string>;\n };\n}\n\n// --- Shell ---\nexport interface Shell {\n id: string;\n name: string;\n description?: string;\n root?: string;\n nav?: string;\n header?: string;\n nav_style?: string;\n dimensions?: {\n navWidth?: string;\n headerHeight?: string;\n };\n internal_layout?: Record<string, unknown>;\n layout?: string;\n atoms?: string;\n config?: Record<string, unknown>;\n guidance?: Record<string, string>;\n code?: { imports?: string; example?: string };\n}\n\n// --- Content Resolution ---\nexport const CONTENT_TYPES = ['pattern', 'theme', 'blueprint', 'archetype', 'shell'] as const;\n\nexport type ContentType = (typeof CONTENT_TYPES)[number];\n\nexport const API_CONTENT_TYPES = [\n 'patterns',\n 'themes',\n 'blueprints',\n 'archetypes',\n 'shells',\n] as const;\n\nexport type ApiContentType = (typeof API_CONTENT_TYPES)[number];\n\nexport const CONTENT_TYPE_TO_API_CONTENT_TYPE: Record<ContentType, ApiContentType> = {\n pattern: 'patterns',\n theme: 'themes',\n blueprint: 'blueprints',\n archetype: 'archetypes',\n shell: 'shells',\n};\n\nexport const API_CONTENT_TYPE_TO_CONTENT_TYPE: Record<ApiContentType, ContentType> = {\n patterns: 'pattern',\n themes: 'theme',\n blueprints: 'blueprint',\n archetypes: 'archetype',\n shells: 'shell',\n};\n\nexport function isContentType(value: string): value is ContentType {\n return CONTENT_TYPES.includes(value as ContentType);\n}\n\nexport function isApiContentType(value: string): value is ApiContentType {\n return API_CONTENT_TYPES.includes(value as ApiContentType);\n}\n\nexport interface ResolvedContent<T> {\n item: T;\n source: 'local' | 'core';\n path: string;\n}\n\n// --- Content Health ---\n\nexport type ContentHealthStatus = 'healthy' | 'warning' | 'error';\nexport type ContentHealthFindingSource =\n | 'schema'\n | 'reference'\n | 'quality'\n | 'coverage'\n | 'content';\n\nexport interface ContentHealthRemediation {\n summary: string;\n prompt: string;\n commands: string[];\n}\n\nexport interface ContentHealthFinding {\n id: string;\n source: ContentHealthFindingSource;\n category: string;\n severity: VerificationSeverity;\n message: string;\n evidence: string[];\n file?: string;\n type?: ContentType;\n itemId?: string;\n rule?: string;\n suggestedFix?: string;\n remediation: ContentHealthRemediation;\n}\n\nexport interface ContentHealthTypeSummary {\n type: ContentType;\n directory: ApiContentType;\n itemCount: number;\n validCount: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n ignoredCount: number;\n}\n\nexport interface ContentHealthReferenceSummary {\n checked: number;\n missing: number;\n missingByType: Record<ContentType, number>;\n}\n\nexport interface ContentHealthQualitySummary {\n patternVisualBriefCoverage: number;\n patternInteractionCoverage: number;\n themeDecoratorCoverage: number;\n blueprintPersonalityCoverage: number;\n blueprintVoiceCoverage: number;\n archetypePageBriefCoverage: number;\n}\n\nexport interface ContentHealthReport {\n $schema: string;\n generatedAt: string;\n contentRoot: string;\n status: ContentHealthStatus;\n score: number;\n summary: {\n itemCount: number;\n validCount: number;\n errorCount: number;\n warnCount: number;\n infoCount: number;\n findingCount: number;\n ignoredCount: number;\n contentDirectoryCount: number;\n };\n content: ContentHealthTypeSummary[];\n references: ContentHealthReferenceSummary;\n quality: ContentHealthQualitySummary;\n ci: {\n recommendedCommand: string;\n failOn: 'error' | 'warn' | 'none';\n };\n findings: ContentHealthFinding[];\n}\n\n// --- Theme ---\n\nexport type CvdMode = 'deuteranopia' | 'protanopia' | 'tritanopia' | 'achromatopsia';\n\nexport interface ThemeTokens {\n base?: Record<string, string>;\n cvd?: Partial<Record<CvdMode, Record<string, string>>>;\n}\n\nexport interface Theme {\n id: string;\n name: string;\n description?: string;\n tags?: string[];\n personality?: string;\n seed?: Record<string, string>;\n palette?: Record<string, Record<string, string>>;\n modes?: string[];\n shapes?: string[];\n cvd_support?: CvdMode[];\n tokens?: ThemeTokens;\n decantr_compat?: string;\n source?: string;\n // Absorbed from former Recipe type\n decorators?: Record<string, string>;\n treatments?: Record<string, Record<string, string>>;\n spatial?: ThemeSpatial;\n shell?: ThemeShell;\n effects?: ThemeEffects;\n motion?: {\n preference?: string;\n reduce_motion?: boolean;\n entrance?: string;\n timing?: string;\n durations?: Record<string, string>;\n };\n typography?: { scale?: string; heading_weight?: number; body_weight?: number; mono?: string };\n radius?: { philosophy?: string; base?: number };\n compositions?: Record<string, { shell: string; description: string; effects?: string[] }>;\n pattern_preferences?: {\n prefer: string[];\n avoid: string[];\n default_presets?: Record<string, string>;\n };\n decorator_definitions?: Record<\n string,\n {\n description: string;\n intent: string;\n suggested_properties?: Record<string, string>;\n pairs_with?: string[];\n usage?: string[];\n }\n >;\n}\n\n// --- API Client Types ---\n\nexport interface ContentListResponse<T = Record<string, unknown>> {\n items: T[];\n total: number;\n limit?: number;\n offset?: number;\n}\n\nexport type ContentVerificationStatus =\n | 'unknown'\n | 'pending'\n | 'build-green'\n | 'build-red'\n | 'smoke-green'\n | 'smoke-red';\n\nexport type ContentBenchmarkConfidence = 'none' | 'low' | 'medium' | 'high';\nexport type ContentConfidenceTier = 'low' | 'medium' | 'high' | 'verified';\n\nexport type ContentGoldenUsage = 'none' | 'showcase' | 'shortlisted';\nexport const PUBLIC_CONTENT_SOURCES = ['official', 'community', 'organization'] as const;\n\nexport type PublicContentSource = (typeof PUBLIC_CONTENT_SOURCES)[number];\n\nexport function isPublicContentSource(value: string): value is PublicContentSource {\n return PUBLIC_CONTENT_SOURCES.includes(value as PublicContentSource);\n}\n\nexport const CONTENT_INTELLIGENCE_SOURCES = ['authored', 'benchmark', 'hybrid'] as const;\n\nexport type ContentIntelligenceSource = 'authored' | 'benchmark' | 'hybrid';\n\nexport function isContentIntelligenceSource(value: string): value is ContentIntelligenceSource {\n return CONTENT_INTELLIGENCE_SOURCES.includes(value as ContentIntelligenceSource);\n}\n\nexport interface ContentIntelligenceMetadata {\n source: ContentIntelligenceSource;\n verification_status: ContentVerificationStatus;\n last_verified_at?: string | null;\n target_coverage: string[];\n benchmark_confidence: ContentBenchmarkConfidence;\n confidence_tier: ContentConfidenceTier;\n golden_usage: ContentGoldenUsage;\n quality_score: number | null;\n confidence_score: number | null;\n recommended: boolean;\n evidence: string[];\n recommendation_reasons: string[];\n recommendation_blockers: string[];\n benchmark?: {\n classification?: ShowcaseVerificationEntry['classification'];\n target?: string | null;\n drift_signal?: ShowcaseVerificationEntry['drift']['signal'];\n build_passed?: boolean | null;\n smoke_passed?: boolean | null;\n };\n}\n\nexport interface PublicContentSummary {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n version?: string;\n name?: string;\n description?: string;\n published_at?: string;\n owner_name?: string | null;\n owner_username?: string | null;\n thumbnail_url?: string | null;\n blueprint_portfolio?: BlueprintPortfolioMetadata | null;\n intelligence?: ContentIntelligenceMetadata | null;\n}\n\nexport interface PublicContentRecord<TData = Record<string, unknown>> {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n version: string;\n data: TData;\n visibility: 'public' | 'private';\n status: 'pending' | 'approved' | 'rejected' | 'published';\n created_at: string;\n updated_at: string;\n published_at?: string;\n owner_name?: string | null;\n owner_username?: string | null;\n thumbnail_url?: string | null;\n intelligence?: ContentIntelligenceMetadata | null;\n}\n\nexport interface ContentItem extends PublicContentRecord<Record<string, unknown>> {}\n\nexport interface OwnedContentSummary extends PublicContentSummary {\n visibility: 'public' | 'private';\n status: 'pending' | 'approved' | 'rejected' | 'published';\n created_at: string;\n updated_at: string;\n}\n\nexport interface PublicUserProfile {\n username: string;\n display_name: string | null;\n reputation_score: number;\n tier: 'free' | 'pro' | 'team' | 'enterprise';\n created_at: string;\n content_count: number;\n content_counts: Record<string, number>;\n}\n\nexport interface PublishPayload {\n type: ApiContentType;\n slug: string;\n namespace: string;\n version: string;\n data: Record<string, unknown>;\n visibility?: 'public' | 'private';\n}\n\nexport interface PublishResponse {\n id: string;\n slug: string;\n namespace: string;\n type: string;\n status: string;\n}\n\nexport interface SearchParams {\n q: string;\n type?: string;\n namespace?: string;\n source?: PublicContentSource;\n sort?: string;\n recommended?: boolean;\n intelligenceSource?: ContentIntelligenceSource;\n blueprintSet?: PublicBlueprintSet;\n labs?: boolean;\n limit?: number;\n offset?: number;\n}\n\nexport interface SearchResponse {\n results: PublicContentSummary[];\n total: number;\n limit?: number;\n offset?: number;\n}\n\nexport interface RegistryIntelligenceSummaryBucket {\n total_public_items: number;\n with_intelligence: number;\n recommended: number;\n authored: number;\n benchmark: number;\n hybrid: number;\n missing_source: number;\n smoke_green: number;\n build_green: number;\n high_confidence: number;\n verified_confidence: number;\n}\n\nexport interface RegistryIntelligenceSummaryResponse {\n $schema: string;\n generated_at: string;\n namespace: string | null;\n totals: RegistryIntelligenceSummaryBucket;\n by_type: Record<ContentType, RegistryIntelligenceSummaryBucket>;\n}\n\nexport interface UserProfile {\n id: string;\n email: string;\n tier: 'free' | 'pro' | 'team' | 'enterprise';\n reputation_score: number;\n trusted: boolean;\n}\n\nexport interface ShowcaseVerificationEntry {\n slug: string;\n target: string | null;\n classification: 'pending' | 'A' | 'B' | 'C' | 'D';\n verificationStatus: 'pending' | 'build-green' | 'build-red' | 'smoke-green' | 'smoke-red';\n build: {\n passed: boolean | null;\n durationMs: number;\n };\n smoke: {\n passed: boolean | null;\n durationMs: number;\n rootDocumentOk: boolean;\n titleOk: boolean;\n langOk: boolean;\n viewportOk: boolean;\n charsetOk: boolean;\n cspSignalOk: boolean;\n inlineScriptCount: number;\n inlineEventHandlerCount: number;\n externalScriptsWithoutIntegrityCount: number;\n externalScriptsWithIntegrityMissingCrossoriginCount: number;\n externalStylesheetsWithoutIntegrityCount: number;\n externalStylesheetsWithIntegrityMissingCrossoriginCount: number;\n externalScriptsWithInsecureTransportCount: number;\n externalStylesheetsWithInsecureTransportCount: number;\n externalMediaSourcesWithInsecureTransportCount: number;\n externalBlankLinksWithoutRelCount: number;\n externalIframesWithoutSandboxCount: number;\n externalIframesWithInsecureTransportCount: number;\n jsEvalSignalCount: number;\n jsHtmlInjectionSignalCount: number;\n jsInsecureTransportSignalCount: number;\n jsSecretSignalCount: number;\n assetCount: number;\n assetsPassed: number;\n routeHintsChecked: string[];\n routeHintsMatched: number;\n routeHintsCoverageOk: boolean;\n routeDocumentsChecked: number;\n routeDocumentsPassed: number;\n routeDocumentsHardenedCount: number;\n routeDocumentsCoverageOk: boolean;\n routeDocumentsHardeningOk: boolean;\n fullRouteCoverageOk: boolean;\n totalAssetBytes: number;\n jsAssetBytes: number;\n cssAssetBytes: number;\n largestAssetPath: string | null;\n largestAssetBytes: number;\n failures: string[];\n };\n drift: {\n signal: 'lower' | 'moderate' | 'elevated';\n penalty: number;\n inlineStyleCount: number;\n hardcodedColorCount: number;\n utilityLeakageCount: number;\n decantrTreatmentCount: number;\n hasPackManifest: boolean;\n hasDist: boolean;\n };\n}\n\nexport interface ShowcaseShortlistSummary {\n appCount: number;\n passedBuilds: number;\n failedBuilds: number;\n averageDurationMs: number;\n passedSmokes: number;\n failedSmokes: number;\n averageSmokeDurationMs: number;\n appsWithTitleOkCount: number;\n appsWithLangOkCount: number;\n appsWithViewportOkCount: number;\n appsWithCharsetOkCount: number;\n appsWithoutInlineScriptsCount: number;\n appsWithCspSignalCount: number;\n appsWithExternalScriptIntegrityCount: number;\n appsWithExternalScriptCrossoriginCount: number;\n appsWithExternalStylesheetIntegrityCount: number;\n appsWithExternalStylesheetCrossoriginCount: number;\n appsWithRouteCoverageCount: number;\n appsWithFullRouteCoverageCount: number;\n averageTotalAssetBytes: number;\n averageJsAssetBytes: number;\n averageCssAssetBytes: number;\n lowerDriftCount: number;\n moderateDriftCount: number;\n elevatedDriftCount: number;\n withPackManifestCount: number;\n}\n\nexport interface ShowcaseManifestEntry {\n slug: string;\n status: string;\n classification: string;\n origin?: string | null;\n target?: string | null;\n goldenCandidate?: string | boolean;\n notes?: string | null;\n thumbnail?: {\n src: string;\n alt: string;\n width?: number;\n height?: number;\n } | null;\n url?: string | null;\n verification?: ShowcaseVerificationEntry | null;\n}\n\nexport interface ShowcaseManifestResponse {\n total: number;\n shortlisted: number;\n apps: ShowcaseManifestEntry[];\n}\n\nexport interface ShowcaseShortlistResponse {\n generatedAt: string | null;\n summary: ShowcaseShortlistSummary | null;\n apps: ShowcaseManifestEntry[];\n}\n\nexport interface ShowcaseShortlistReport {\n $schema: string;\n generatedAt: string;\n dryRun: boolean;\n summary: ShowcaseShortlistSummary;\n results: ShowcaseVerificationEntry[];\n}\n\nexport interface HostedFileCritiqueRequest {\n essence: EssenceFile;\n code: string;\n filePath?: string;\n treatmentsCss?: string;\n}\n\nexport interface HostedDistSnapshot {\n indexHtml: string;\n assets?: Record<string, string>;\n}\n\nexport interface HostedSourceSnapshot {\n files: Record<string, string>;\n}\n\nexport interface HostedProjectAuditRequest {\n essence: EssenceFile;\n dist?: HostedDistSnapshot;\n sources?: HostedSourceSnapshot;\n}\n\nexport type ExecutionPackType = 'scaffold' | 'section' | 'page' | 'mutation' | 'review';\n\nexport interface ExecutionPackTarget {\n platform: 'web';\n framework: string | null;\n runtime: string | null;\n adapter: string;\n}\n\nexport interface ExecutionPackScope {\n appId: string;\n pageIds: string[];\n patternIds: string[];\n}\n\nexport interface ExecutionPackExample {\n id: string;\n label: string;\n language: string;\n snippet: string;\n}\n\nexport interface ExecutionPackAntiPattern {\n id: string;\n summary: string;\n guidance: string;\n}\n\nexport interface ExecutionPackSuccessCheck {\n id: string;\n label: string;\n severity: 'error' | 'warn' | 'info';\n}\n\nexport interface ExecutionPackTokenBudget {\n target: number;\n max: number;\n strategy: string[];\n}\n\nexport interface ExecutionPackBase<TData = Record<string, unknown>> {\n $schema: string;\n packVersion: '1.0.0';\n packType: ExecutionPackType;\n objective: string;\n target: ExecutionPackTarget;\n preset: string | null;\n scope: ExecutionPackScope;\n requiredSetup: string[];\n allowedVocabulary: string[];\n examples: ExecutionPackExample[];\n antiPatterns: ExecutionPackAntiPattern[];\n successChecks: ExecutionPackSuccessCheck[];\n tokenBudget: ExecutionPackTokenBudget;\n data: TData;\n renderedMarkdown: string;\n}\n\nexport interface PackManifestEntry {\n id: string;\n markdown: string;\n json: string;\n}\n\nexport interface PackManifestSectionEntry extends PackManifestEntry {\n pageIds: string[];\n}\n\nexport interface PackManifestPageEntry extends PackManifestEntry {\n sectionId: string | null;\n sectionRole: string | null;\n}\n\nexport interface PackManifestMutationEntry extends PackManifestEntry {\n mutationType: 'add-page' | 'modify';\n}\n\nexport interface ExecutionPackManifest {\n $schema: string;\n version: '1.0.0';\n generatedAt: string;\n scaffold: PackManifestEntry | null;\n review: PackManifestEntry | null;\n sections: PackManifestSectionEntry[];\n pages: PackManifestPageEntry[];\n mutations: PackManifestMutationEntry[];\n}\n\nexport interface ScaffoldExecutionPack\n extends ExecutionPackBase<{\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n }> {\n packType: 'scaffold';\n}\n\nexport interface ReviewExecutionPack\n extends ExecutionPackBase<{\n reviewType: 'app';\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n focusAreas: string[];\n workflow: string[];\n }> {\n packType: 'review';\n}\n\nexport interface SectionExecutionPack\n extends ExecutionPackBase<{\n sectionId: string;\n role: string;\n shell: string;\n description: string;\n features: string[];\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n }> {\n packType: 'section';\n}\n\nexport interface PageExecutionPack\n extends ExecutionPackBase<{\n pageId: string;\n path: string;\n shell: string;\n sectionId: string | null;\n sectionRole: string | null;\n features: string[];\n surface: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n wiringSignals: string[];\n patterns: Array<{\n id: string;\n alias: string;\n preset: string;\n layout: string;\n }>;\n }> {\n packType: 'page';\n}\n\nexport interface MutationExecutionPack\n extends ExecutionPackBase<{\n mutationType: 'add-page' | 'modify';\n shell: string;\n theme: {\n id: string;\n mode: string;\n shape: string | null;\n };\n routing: 'hash' | 'history' | 'pathname';\n features: string[];\n routes: Array<{\n pageId: string;\n path: string;\n shell?: string;\n patternIds: string[];\n }>;\n workflow: string[];\n }> {\n packType: 'mutation';\n}\n\nexport interface ExecutionPackBundleResponse {\n $schema: string;\n generatedAt: string;\n sourceEssenceVersion: string;\n manifest: ExecutionPackManifest;\n scaffold: ScaffoldExecutionPack;\n review: ReviewExecutionPack;\n sections: SectionExecutionPack[];\n pages: PageExecutionPack[];\n mutations: MutationExecutionPack[];\n}\n\nexport interface HostedSelectedExecutionPackRequest {\n essence: EssenceFile;\n pack_type: ExecutionPackType;\n id?: string;\n}\n\nexport interface SelectedExecutionPackResponse {\n $schema: string;\n generatedAt: string;\n sourceEssenceVersion: string;\n manifest: ExecutionPackManifest;\n selector: {\n packType: ExecutionPackType;\n id: string | null;\n };\n pack:\n | ScaffoldExecutionPack\n | ReviewExecutionPack\n | SectionExecutionPack\n | PageExecutionPack\n | MutationExecutionPack;\n}\n\nexport type VerificationSeverity = 'error' | 'warn' | 'info';\n\nexport interface VerificationFinding {\n id: string;\n category: string;\n severity: VerificationSeverity;\n message: string;\n evidence: string[];\n target?: string;\n file?: string;\n rule?: string;\n suggestedFix?: string;\n}\n\nexport interface VerificationScore {\n category: string;\n focusArea: string;\n score: number;\n details: string;\n suggestions: string[];\n}\n\nexport interface FileCritiqueReport {\n $schema: string;\n file: string;\n overall: number;\n scores: VerificationScore[];\n findings: VerificationFinding[];\n focusAreas: string[];\n reviewPack: ReviewExecutionPack | null;\n}\n\nexport interface ProjectAuditRuntimeAudit {\n distPresent: boolean;\n indexPresent: boolean;\n checked: boolean;\n passed: boolean | null;\n rootDocumentOk: boolean;\n titleOk: boolean;\n langOk: boolean;\n viewportOk: boolean;\n charsetOk: boolean;\n cspSignalOk: boolean;\n inlineScriptCount: number;\n inlineEventHandlerCount: number;\n externalScriptsWithoutIntegrityCount: number;\n externalScriptsWithIntegrityMissingCrossoriginCount: number;\n externalStylesheetsWithoutIntegrityCount: number;\n externalStylesheetsWithIntegrityMissingCrossoriginCount: number;\n externalScriptsWithInsecureTransportCount: number;\n externalStylesheetsWithInsecureTransportCount: number;\n externalMediaSourcesWithInsecureTransportCount: number;\n externalBlankLinksWithoutRelCount: number;\n externalIframesWithoutSandboxCount: number;\n externalIframesWithInsecureTransportCount: number;\n jsEvalSignalCount: number;\n jsHtmlInjectionSignalCount: number;\n jsInsecureTransportSignalCount: number;\n jsSecretSignalCount: number;\n assetCount: number;\n assetsPassed: number;\n routeHintsChecked: string[];\n routeHintsMatched: number;\n routeHintsCoverageOk: boolean;\n routeDocumentsChecked: number;\n routeDocumentsPassed: number;\n routeDocumentsHardenedCount: number;\n routeDocumentsCoverageOk: boolean;\n routeDocumentsHardeningOk: boolean;\n fullRouteCoverageOk: boolean;\n totalAssetBytes: number;\n jsAssetBytes: number;\n cssAssetBytes: number;\n largestAssetPath: string | null;\n largestAssetBytes: number;\n failures: string[];\n}\n\nexport interface ProjectAuditSummary {\n errorCount: number;\n warnCount: number;\n infoCount: number;\n essenceVersion: string | null;\n reviewPackPresent: boolean;\n packManifestPresent: boolean;\n runtimeAuditChecked: boolean;\n runtimePassed: boolean | null;\n pageCount: number;\n}\n\nexport interface ProjectAuditReport {\n $schema: string;\n projectRoot: string;\n valid: boolean;\n essence: EssenceFile | null;\n reviewPack: ReviewExecutionPack | null;\n packManifest: ExecutionPackManifest | null;\n runtimeAudit: ProjectAuditRuntimeAudit;\n findings: VerificationFinding[];\n summary: ProjectAuditSummary;\n}\n"],"mappings":";AAoWO,IAAM,gBAAgB,CAAC,WAAW,SAAS,aAAa,aAAa,OAAO;AAI5E,IAAM,oBAAoB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,IAAM,mCAAwE;AAAA,EACnF,SAAS;AAAA,EACT,OAAO;AAAA,EACP,WAAW;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AACT;AAEO,IAAM,mCAAwE;AAAA,EACnF,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,QAAQ;AACV;AAEO,SAAS,cAAc,OAAqC;AACjE,SAAO,cAAc,SAAS,KAAoB;AACpD;AAEO,SAAS,iBAAiB,OAAwC;AACvE,SAAO,kBAAkB,SAAS,KAAuB;AAC3D;","names":[]}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { PublicContentSort, RegistryAPIClient, RegistryAPIClientOptions, RegistryAPIError, RegistryClient, RegistryClientOptions, SearchResult, comparePublicContent, createRegistryClient, normalizePublicContentSort, sortPublicContent } from './client.js';
2
- import { P as PatternPreset, a as Pattern, C as ContentType, R as ResolvedContent, A as Archetype, T as Theme, B as Blueprint, S as Shell, b as PatternIO } from './content-types-GxXVWkrY.js';
3
- export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, e as ApiContentType, f as ArchetypeHeroCustomization, g as ArchetypePage, h as ArchetypeRole, i as ArchetypeSuggestedTheme, j as BlueprintNavigation, k as BlueprintNavigationHotkey, l as BlueprintOverrides, m as BlueprintRoute, n as CONTENT_INTELLIGENCE_SOURCES, o as CONTENT_TYPES, p as CONTENT_TYPE_TO_API_CONTENT_TYPE, q as ComposeEntry, r as ContentBenchmarkConfidence, s as ContentDependencies, t as ContentGoldenUsage, u as ContentHealthFinding, v as ContentHealthFindingSource, w as ContentHealthQualitySummary, x as ContentHealthReferenceSummary, y as ContentHealthRemediation, z as ContentHealthReport, D as ContentHealthStatus, E as ContentHealthTypeSummary, F as ContentIntelligenceMetadata, G as ContentIntelligenceSource, H as ContentItem, I as ContentListResponse, J as ContentVerificationStatus, K as CvdMode, L as ExecutionPackAntiPattern, M as ExecutionPackBase, N as ExecutionPackBundleResponse, O as ExecutionPackExample, Q as ExecutionPackManifest, U as ExecutionPackScope, V as ExecutionPackSuccessCheck, W as ExecutionPackTarget, X as ExecutionPackTokenBudget, Y as ExecutionPackType, Z as FileCritiqueReport, _ as HostedDistSnapshot, $ as HostedFileCritiqueRequest, a0 as HostedProjectAuditRequest, a1 as LayoutGroup, a2 as LayoutItem, a3 as MutationExecutionPack, a4 as OwnedContentSummary, a5 as PUBLIC_CONTENT_SOURCES, a6 as PackManifestEntry, a7 as PackManifestMutationEntry, a8 as PackManifestPageEntry, a9 as PackManifestSectionEntry, aa as PageExecutionPack, ab as PatternCodeSpec, ac as PatternLayoutSpec, ad as PatternReference, ae as PatternReferenceObject, af as ProjectAuditReport, ag as ProjectAuditRuntimeAudit, ah as ProjectAuditSummary, ai as PublicContentRecord, aj as PublicContentSource, ak as PublicContentSummary, al as PublicUserProfile, am as PublishPayload, an as PublishResponse, ao as RegistryIntelligenceSummaryBucket, ap as RegistryIntelligenceSummaryResponse, aq as ReviewExecutionPack, ar as ScaffoldExecutionPack, as as SearchParams, at as SearchResponse, au as SectionExecutionPack, av as ShowcaseManifestEntry, aw as ShowcaseManifestResponse, ax as ShowcaseShortlistReport, ay as ShowcaseShortlistResponse, az as ShowcaseShortlistSummary, aA as ShowcaseVerificationEntry, aB as ThemeEffects, aC as ThemeShell, aD as ThemeSpatial, aE as ThemeTokens, aF as UserProfile, aG as VerificationFinding, aH as VerificationScore, aI as VerificationSeverity, aJ as isApiContentType, aK as isContentIntelligenceSource, aL as isContentType, aM as isPublicContentSource } from './content-types-GxXVWkrY.js';
2
+ import { P as PatternPreset, a as Pattern, C as ContentType, R as ResolvedContent, A as Archetype, T as Theme, B as Blueprint, S as Shell, b as PatternIO } from './content-types-Ce7Eolmj.js';
3
+ export { c as API_CONTENT_TYPES, d as API_CONTENT_TYPE_TO_CONTENT_TYPE, e as ApiContentType, f as ArchetypeHeroCustomization, g as ArchetypePage, h as ArchetypeRole, i as ArchetypeSuggestedTheme, j as BLUEPRINT_ARTIFACT_STATUSES, k as BLUEPRINT_PORTFOLIO_MATURITIES, l as BLUEPRINT_PORTFOLIO_VISIBILITIES, m as BlueprintArtifactStatus, n as BlueprintNavigation, o as BlueprintNavigationHotkey, p as BlueprintOverrides, q as BlueprintPortfolioArtifact, r as BlueprintPortfolioMaturity, s as BlueprintPortfolioMetadata, t as BlueprintPortfolioVisibility, u as BlueprintRoute, v as CONTENT_INTELLIGENCE_SOURCES, w as CONTENT_TYPES, x as CONTENT_TYPE_TO_API_CONTENT_TYPE, y as ComposeEntry, z as ContentBenchmarkConfidence, D as ContentDependencies, E as ContentGoldenUsage, F as ContentHealthFinding, G as ContentHealthFindingSource, H as ContentHealthQualitySummary, I as ContentHealthReferenceSummary, J as ContentHealthRemediation, K as ContentHealthReport, L as ContentHealthStatus, M as ContentHealthTypeSummary, N as ContentIntelligenceMetadata, O as ContentIntelligenceSource, Q as ContentItem, U as ContentListResponse, V as ContentVerificationStatus, W as CvdMode, X as ExecutionPackAntiPattern, Y as ExecutionPackBase, Z as ExecutionPackBundleResponse, _ as ExecutionPackExample, $ as ExecutionPackManifest, a0 as ExecutionPackScope, a1 as ExecutionPackSuccessCheck, a2 as ExecutionPackTarget, a3 as ExecutionPackTokenBudget, a4 as ExecutionPackType, a5 as FileCritiqueReport, a6 as HostedDistSnapshot, a7 as HostedFileCritiqueRequest, a8 as HostedProjectAuditRequest, a9 as LayoutGroup, aa as LayoutItem, ab as MutationExecutionPack, ac as OwnedContentSummary, ad as PUBLIC_BLUEPRINT_SETS, ae as PUBLIC_CONTENT_SOURCES, af as PackManifestEntry, ag as PackManifestMutationEntry, ah as PackManifestPageEntry, ai as PackManifestSectionEntry, aj as PageExecutionPack, ak as PatternCodeSpec, al as PatternLayoutSpec, am as PatternReference, an as PatternReferenceObject, ao as ProjectAuditReport, ap as ProjectAuditRuntimeAudit, aq as ProjectAuditSummary, ar as PublicBlueprintSet, as as PublicContentRecord, at as PublicContentSource, au as PublicContentSummary, av as PublicUserProfile, aw as PublishPayload, ax as PublishResponse, ay as RegistryIntelligenceSummaryBucket, az as RegistryIntelligenceSummaryResponse, aA as ReviewExecutionPack, aB as ScaffoldExecutionPack, aC as SearchParams, aD as SearchResponse, aE as SectionExecutionPack, aF as ShowcaseManifestEntry, aG as ShowcaseManifestResponse, aH as ShowcaseShortlistReport, aI as ShowcaseShortlistResponse, aJ as ShowcaseShortlistSummary, aK as ShowcaseVerificationEntry, aL as ThemeEffects, aM as ThemeShell, aN as ThemeSpatial, aO as ThemeTokens, aP as UserProfile, aQ as VerificationFinding, aR as VerificationScore, aS as VerificationSeverity, aT as getBlueprintPortfolioMetadata, aU as isApiContentType, aV as isBlueprintArtifactStatus, aW as isBlueprintPortfolioMaturity, aX as isBlueprintPortfolioVisibility, aY as isContentIntelligenceSource, aZ as isContentType, a_ as isPublicBlueprintSet, a$ as isPublicContentSource } from './content-types-Ce7Eolmj.js';
4
4
  import { LayoutItem } from '@decantr/essence-spec';
5
5
 
6
6
  interface ResolvedPreset {
package/dist/index.js CHANGED
@@ -121,6 +121,8 @@ var RegistryAPIClient = class {
121
121
  if (params?.recommended) searchParams.set("recommended", "true");
122
122
  if (params?.intelligenceSource)
123
123
  searchParams.set("intelligence_source", params.intelligenceSource);
124
+ if (params?.blueprintSet) searchParams.set("blueprint_set", params.blueprintSet);
125
+ if (params?.labs) searchParams.set("labs", "true");
124
126
  if (params?.limit) searchParams.set("limit", String(params.limit));
125
127
  if (params?.offset) searchParams.set("offset", String(params.offset));
126
128
  const query = searchParams.toString();
@@ -180,6 +182,8 @@ var RegistryAPIClient = class {
180
182
  if (params.recommended) searchParams.set("recommended", "true");
181
183
  if (params.intelligenceSource)
182
184
  searchParams.set("intelligence_source", params.intelligenceSource);
185
+ if (params.blueprintSet) searchParams.set("blueprint_set", params.blueprintSet);
186
+ if (params.labs) searchParams.set("labs", "true");
183
187
  if (params.limit) searchParams.set("limit", String(params.limit));
184
188
  if (params.offset) searchParams.set("offset", String(params.offset));
185
189
  return this.request(`/search?${searchParams}`);
@@ -203,6 +207,8 @@ var RegistryAPIClient = class {
203
207
  if (params?.recommended) searchParams.set("recommended", "true");
204
208
  if (params?.intelligenceSource)
205
209
  searchParams.set("intelligence_source", params.intelligenceSource);
210
+ if (params?.blueprintSet) searchParams.set("blueprint_set", params.blueprintSet);
211
+ if (params?.labs) searchParams.set("labs", "true");
206
212
  if (params?.limit != null) searchParams.set("limit", String(params.limit));
207
213
  if (params?.offset != null) searchParams.set("offset", String(params.offset));
208
214
  const query = searchParams.toString();
@@ -239,7 +245,7 @@ var RegistryAPIClient = class {
239
245
  );
240
246
  }
241
247
  // ── Schema ──
242
- async getSchema(name = "essence.v3.json") {
248
+ async getSchema(name = "essence.v4.json") {
243
249
  return this.request(`/schema/${name}`);
244
250
  }
245
251
  // ── Showcase benchmarks ──
@@ -375,6 +381,95 @@ function resolvePatternPreset(pattern, explicitPreset, themeDefaultPresets) {
375
381
  return { preset: presetName, layout: preset.layout, code: preset.code };
376
382
  }
377
383
 
384
+ // src/types.ts
385
+ var BLUEPRINT_PORTFOLIO_VISIBILITIES = [
386
+ "featured",
387
+ "public",
388
+ "labs",
389
+ "hidden"
390
+ ];
391
+ var BLUEPRINT_PORTFOLIO_MATURITIES = [
392
+ "certified-flagship",
393
+ "supported-contract",
394
+ "experimental",
395
+ "fold-candidate",
396
+ "legacy-hidden"
397
+ ];
398
+ var BLUEPRINT_ARTIFACT_STATUSES = ["none", "planned", "candidate", "certified"];
399
+ var PUBLIC_BLUEPRINT_SETS = ["all", "featured", "certified", "labs"];
400
+ function isBlueprintPortfolioVisibility(value) {
401
+ return BLUEPRINT_PORTFOLIO_VISIBILITIES.includes(value);
402
+ }
403
+ function isBlueprintPortfolioMaturity(value) {
404
+ return BLUEPRINT_PORTFOLIO_MATURITIES.includes(value);
405
+ }
406
+ function isBlueprintArtifactStatus(value) {
407
+ return BLUEPRINT_ARTIFACT_STATUSES.includes(value);
408
+ }
409
+ function isPublicBlueprintSet(value) {
410
+ return PUBLIC_BLUEPRINT_SETS.includes(value);
411
+ }
412
+ function isRecord2(value) {
413
+ return typeof value === "object" && value !== null && !Array.isArray(value);
414
+ }
415
+ function getBlueprintPortfolioMetadata(value) {
416
+ const candidate = isRecord2(value) && isRecord2(value.blueprint_portfolio) ? value.blueprint_portfolio : value;
417
+ if (!isRecord2(candidate)) {
418
+ return null;
419
+ }
420
+ const artifact = candidate.artifact;
421
+ if (!isBlueprintPortfolioVisibility(candidate.visibility) || !isBlueprintPortfolioMaturity(candidate.maturity) || typeof candidate.rationale !== "string" || !isRecord2(artifact) || !isBlueprintArtifactStatus(artifact.status)) {
422
+ return null;
423
+ }
424
+ return {
425
+ visibility: candidate.visibility,
426
+ maturity: candidate.maturity,
427
+ rationale: candidate.rationale,
428
+ recommended_alternative: typeof candidate.recommended_alternative === "string" ? candidate.recommended_alternative : void 0,
429
+ artifact: {
430
+ status: artifact.status,
431
+ showcase: typeof artifact.showcase === "string" ? artifact.showcase : void 0,
432
+ notes: typeof artifact.notes === "string" ? artifact.notes : void 0
433
+ }
434
+ };
435
+ }
436
+ var CONTENT_TYPES = ["pattern", "theme", "blueprint", "archetype", "shell"];
437
+ var API_CONTENT_TYPES = [
438
+ "patterns",
439
+ "themes",
440
+ "blueprints",
441
+ "archetypes",
442
+ "shells"
443
+ ];
444
+ var CONTENT_TYPE_TO_API_CONTENT_TYPE = {
445
+ pattern: "patterns",
446
+ theme: "themes",
447
+ blueprint: "blueprints",
448
+ archetype: "archetypes",
449
+ shell: "shells"
450
+ };
451
+ var API_CONTENT_TYPE_TO_CONTENT_TYPE = {
452
+ patterns: "pattern",
453
+ themes: "theme",
454
+ blueprints: "blueprint",
455
+ archetypes: "archetype",
456
+ shells: "shell"
457
+ };
458
+ function isContentType(value) {
459
+ return CONTENT_TYPES.includes(value);
460
+ }
461
+ function isApiContentType(value) {
462
+ return API_CONTENT_TYPES.includes(value);
463
+ }
464
+ var PUBLIC_CONTENT_SOURCES = ["official", "community", "organization"];
465
+ function isPublicContentSource(value) {
466
+ return PUBLIC_CONTENT_SOURCES.includes(value);
467
+ }
468
+ var CONTENT_INTELLIGENCE_SOURCES = ["authored", "benchmark", "hybrid"];
469
+ function isContentIntelligenceSource(value) {
470
+ return CONTENT_INTELLIGENCE_SOURCES.includes(value);
471
+ }
472
+
378
473
  // src/ranking.ts
379
474
  function verificationScore(status) {
380
475
  switch (status) {
@@ -420,6 +515,18 @@ function confidenceTierScore(tier) {
420
515
  function getRecommendedPriority(item) {
421
516
  const intelligence = item.intelligence;
422
517
  let score = 0;
518
+ const portfolio = getBlueprintPortfolioMetadata(item.blueprint_portfolio);
519
+ if (portfolio?.visibility === "featured") {
520
+ score += 900;
521
+ }
522
+ if (portfolio?.artifact.status === "certified") {
523
+ score += 650;
524
+ } else if (portfolio?.artifact.status === "candidate") {
525
+ score += 120;
526
+ }
527
+ if (portfolio?.visibility === "labs" || portfolio?.visibility === "hidden") {
528
+ score -= 400;
529
+ }
423
530
  if (!intelligence) {
424
531
  return score;
425
532
  }
@@ -522,44 +629,6 @@ function createResolver(options) {
522
629
  };
523
630
  }
524
631
 
525
- // src/types.ts
526
- var CONTENT_TYPES = ["pattern", "theme", "blueprint", "archetype", "shell"];
527
- var API_CONTENT_TYPES = [
528
- "patterns",
529
- "themes",
530
- "blueprints",
531
- "archetypes",
532
- "shells"
533
- ];
534
- var CONTENT_TYPE_TO_API_CONTENT_TYPE = {
535
- pattern: "patterns",
536
- theme: "themes",
537
- blueprint: "blueprints",
538
- archetype: "archetypes",
539
- shell: "shells"
540
- };
541
- var API_CONTENT_TYPE_TO_CONTENT_TYPE = {
542
- patterns: "pattern",
543
- themes: "theme",
544
- blueprints: "blueprint",
545
- archetypes: "archetype",
546
- shells: "shell"
547
- };
548
- function isContentType(value) {
549
- return CONTENT_TYPES.includes(value);
550
- }
551
- function isApiContentType(value) {
552
- return API_CONTENT_TYPES.includes(value);
553
- }
554
- var PUBLIC_CONTENT_SOURCES = ["official", "community", "organization"];
555
- function isPublicContentSource(value) {
556
- return PUBLIC_CONTENT_SOURCES.includes(value);
557
- }
558
- var CONTENT_INTELLIGENCE_SOURCES = ["authored", "benchmark", "hybrid"];
559
- function isContentIntelligenceSource(value) {
560
- return CONTENT_INTELLIGENCE_SOURCES.includes(value);
561
- }
562
-
563
632
  // src/wiring.ts
564
633
  var WIRING_RULES = [
565
634
  {
@@ -702,9 +771,13 @@ function classifySignal(signal) {
702
771
  export {
703
772
  API_CONTENT_TYPES,
704
773
  API_CONTENT_TYPE_TO_CONTENT_TYPE,
774
+ BLUEPRINT_ARTIFACT_STATUSES,
775
+ BLUEPRINT_PORTFOLIO_MATURITIES,
776
+ BLUEPRINT_PORTFOLIO_VISIBILITIES,
705
777
  CONTENT_INTELLIGENCE_SOURCES,
706
778
  CONTENT_TYPES,
707
779
  CONTENT_TYPE_TO_API_CONTENT_TYPE,
780
+ PUBLIC_BLUEPRINT_SETS,
708
781
  PUBLIC_CONTENT_SOURCES,
709
782
  RegistryAPIClient,
710
783
  RegistryAPIError,
@@ -715,9 +788,14 @@ export {
715
788
  createResolver,
716
789
  deriveIOWirings,
717
790
  detectWirings,
791
+ getBlueprintPortfolioMetadata,
718
792
  isApiContentType,
793
+ isBlueprintArtifactStatus,
794
+ isBlueprintPortfolioMaturity,
795
+ isBlueprintPortfolioVisibility,
719
796
  isContentIntelligenceSource,
720
797
  isContentType,
798
+ isPublicBlueprintSet,
721
799
  isPublicContentSource,
722
800
  normalizePublicContentSort,
723
801
  resolvePatternPreset,