@promptframe/contracts 0.1.11 → 0.1.14
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 +2 -0
- package/dist/index.d.ts +377 -37
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +231 -10
- package/dist/index.js.map +1 -1
- package/dist/security-policy-evaluator.d.ts.map +1 -1
- package/dist/security-policy-evaluator.js +52 -1
- package/dist/security-policy-evaluator.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ Key public exports:
|
|
|
10
10
|
- `authoringStandardFreshnessDecisionSchema`: shared shape for local tooling and platform admission to explain whether an authoring package is current, warning-only, upload-blocking, or security-breaking.
|
|
11
11
|
- `authoringUploadTargetSchema`: public upload lanes for `marketplace_authoring` and `project_private_generation`.
|
|
12
12
|
- `componentReusabilityScoreSchema`: shared shape for deterministic component reuse diagnostics emitted by local CLI checks and platform admission.
|
|
13
|
+
- `componentPublicResourceManifestSchema` and `componentRuntimeResourceManifestSchema`: public `public/` resource manifest and runtime URL shapes for component-bundled images, audio, video, fonts, JSON, and text.
|
|
14
|
+
- `PROMPTFRAME_PUBLIC_RESOURCE_POLICY`: conservative path/type/size/SVG policy used by authoring tools before platform admission.
|
|
13
15
|
- `PROMPTFRAME_PUBLIC_SECURITY_POLICY_DIGEST`: deterministic release-cohort fingerprint for the public security policy.
|
|
14
16
|
- `@promptframe/contracts/security-evaluator`: AST-aware evaluator for JS / TS / TSX source diagnostics.
|
|
15
17
|
|
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,47 @@ export declare const PROMPTFRAME_STYLE_CONTRACT_VERSION: "promptframe-style.v0.1
|
|
|
13
13
|
export declare const AUTHORING_STANDARD_RELEASE_VERSION: "authoring-standard-release.v0.1.0";
|
|
14
14
|
export declare const COMPONENT_REUSABILITY_CONTRACT_VERSION: "component-reusability.v0.1.0";
|
|
15
15
|
export declare const COMPONENT_DEPENDENCY_POLICY_VERSION: "component-dependency-policy.v0.1.0";
|
|
16
|
+
export declare const COMPONENT_PUBLIC_RESOURCES_CONTRACT_VERSION: "component-public-resources.v0.1.0";
|
|
17
|
+
export declare const COMPONENT_PUBLIC_RESOURCE_POLICY_VERSION: "component-public-resource-policy.v0.1.0";
|
|
18
|
+
export declare const PROMPTFRAME_PUBLIC_RESOURCE_LIMITS: {
|
|
19
|
+
readonly maxFiles: 64;
|
|
20
|
+
readonly maxFileBytes: number;
|
|
21
|
+
readonly maxTotalBytes: number;
|
|
22
|
+
};
|
|
23
|
+
export declare const PROMPTFRAME_PUBLIC_RESOURCE_ALLOWED_EXTENSIONS: {
|
|
24
|
+
readonly image: readonly [".png", ".jpg", ".jpeg", ".webp", ".gif", ".svg"];
|
|
25
|
+
readonly audio: readonly [".mp3", ".wav", ".m4a", ".ogg"];
|
|
26
|
+
readonly video: readonly [".mp4", ".webm"];
|
|
27
|
+
readonly font: readonly [".woff", ".woff2"];
|
|
28
|
+
readonly json: readonly [".json"];
|
|
29
|
+
readonly text: readonly [".txt", ".csv"];
|
|
30
|
+
};
|
|
31
|
+
export declare const PROMPTFRAME_PUBLIC_RESOURCE_POLICY: {
|
|
32
|
+
readonly policyVersion: "component-public-resource-policy.v0.1.0";
|
|
33
|
+
readonly contractVersion: "component-public-resources.v0.1.0";
|
|
34
|
+
readonly sourceDirectory: "public";
|
|
35
|
+
readonly limits: {
|
|
36
|
+
readonly maxFiles: 64;
|
|
37
|
+
readonly maxFileBytes: number;
|
|
38
|
+
readonly maxTotalBytes: number;
|
|
39
|
+
};
|
|
40
|
+
readonly allowedExtensions: {
|
|
41
|
+
readonly image: readonly [".png", ".jpg", ".jpeg", ".webp", ".gif", ".svg"];
|
|
42
|
+
readonly audio: readonly [".mp3", ".wav", ".m4a", ".ogg"];
|
|
43
|
+
readonly video: readonly [".mp4", ".webm"];
|
|
44
|
+
readonly font: readonly [".woff", ".woff2"];
|
|
45
|
+
readonly json: readonly [".json"];
|
|
46
|
+
readonly text: readonly [".txt", ".csv"];
|
|
47
|
+
};
|
|
48
|
+
readonly svgSafety: {
|
|
49
|
+
readonly mode: "safe_subset";
|
|
50
|
+
readonly rejectedSignals: readonly ["script", "foreignObject", "event_handler_attribute", "external_href", "javascript_url"];
|
|
51
|
+
};
|
|
52
|
+
readonly runtime: {
|
|
53
|
+
readonly injectedProp: "promptFrameResources";
|
|
54
|
+
readonly helper: "promptFramePublicResource(resourcesOrProps, publicPath, fallback?)";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
16
57
|
export declare const PROMPTFRAME_PUBLIC_STANDARD_POLICY: {
|
|
17
58
|
readonly policyVersion: "component-standard-policy.v0.1.0";
|
|
18
59
|
readonly sourceVersion: "component-standard.v0.1.0";
|
|
@@ -255,6 +296,129 @@ export declare const PROMPTFRAME_PUBLIC_SECURITY_POLICY: {
|
|
|
255
296
|
readonly reason: "Third-party components cannot observe host DOM or runtime boundaries.";
|
|
256
297
|
readonly recommendation: "Use explicit props, layout inputs, and deterministic frame data instead of Observer APIs.";
|
|
257
298
|
readonly docsPath: "/docs/component-authoring/security#browser-observer-abuse";
|
|
299
|
+
}, {
|
|
300
|
+
readonly id: "browser.image_beacon";
|
|
301
|
+
readonly label: "Image constructor network beacon";
|
|
302
|
+
readonly patterns: readonly ["\\bnew\\s+(?:(?:window|globalThis)\\.)?Image\\s*\\(|\\b(?:window|globalThis)\\.Image\\s*\\("];
|
|
303
|
+
readonly astMatchers: {
|
|
304
|
+
readonly globals: readonly ["Image"];
|
|
305
|
+
readonly memberPaths: readonly ["window.Image", "globalThis.Image"];
|
|
306
|
+
};
|
|
307
|
+
readonly action: "reject";
|
|
308
|
+
readonly category: "network_exfiltration";
|
|
309
|
+
readonly severity: "high";
|
|
310
|
+
readonly reason: "Third-party components cannot create browser Image beacons that can send unmediated network requests.";
|
|
311
|
+
readonly recommendation: "Use Remotion <Img> with platform-provided asset props or PromptFrame public resources; do not construct browser Image objects.";
|
|
312
|
+
readonly docsPath: "/docs/component-authoring/security#browser-image-beacon";
|
|
313
|
+
}, {
|
|
314
|
+
readonly id: "browser.audio_beacon";
|
|
315
|
+
readonly label: "Audio constructor network beacon";
|
|
316
|
+
readonly patterns: readonly ["\\bnew\\s+(?:(?:window|globalThis)\\.)?Audio\\s*\\(|\\b(?:window|globalThis)\\.Audio\\s*\\("];
|
|
317
|
+
readonly astMatchers: {
|
|
318
|
+
readonly globals: readonly ["Audio"];
|
|
319
|
+
readonly memberPaths: readonly ["window.Audio", "globalThis.Audio"];
|
|
320
|
+
};
|
|
321
|
+
readonly action: "reject";
|
|
322
|
+
readonly category: "network_exfiltration";
|
|
323
|
+
readonly severity: "high";
|
|
324
|
+
readonly reason: "Third-party components cannot create browser Audio objects that can fetch remote media outside the platform asset boundary.";
|
|
325
|
+
readonly recommendation: "Use platform-provided audio assets and Remotion audio primitives rather than browser Audio constructors.";
|
|
326
|
+
readonly docsPath: "/docs/component-authoring/security#browser-audio-beacon";
|
|
327
|
+
}, {
|
|
328
|
+
readonly id: "browser.worker_context";
|
|
329
|
+
readonly label: "Worker / SharedWorker execution context";
|
|
330
|
+
readonly patterns: readonly ["\\bnew\\s+(?:Worker|SharedWorker)\\b|\\b(?:Worker|SharedWorker)\\s*\\("];
|
|
331
|
+
readonly astMatchers: {
|
|
332
|
+
readonly globals: readonly ["Worker", "SharedWorker"];
|
|
333
|
+
readonly memberPaths: readonly ["window.Worker", "window.SharedWorker", "globalThis.Worker", "globalThis.SharedWorker"];
|
|
334
|
+
};
|
|
335
|
+
readonly action: "reject";
|
|
336
|
+
readonly category: "browser_capability";
|
|
337
|
+
readonly severity: "high";
|
|
338
|
+
readonly reason: "Third-party components cannot create background execution contexts outside the render sandbox.";
|
|
339
|
+
readonly recommendation: "Keep component work synchronous, bounded, and frame-driven; move heavy preparation into platform-controlled build/admission steps.";
|
|
340
|
+
readonly docsPath: "/docs/component-authoring/security#browser-worker-context";
|
|
341
|
+
}, {
|
|
342
|
+
readonly id: "browser.window_open";
|
|
343
|
+
readonly label: "window.open new browsing context";
|
|
344
|
+
readonly patterns: readonly ["(?:window|globalThis)\\.open\\s*\\(|\\bopen\\s*\\("];
|
|
345
|
+
readonly astMatchers: {
|
|
346
|
+
readonly globals: readonly ["open"];
|
|
347
|
+
readonly memberPaths: readonly ["window.open", "globalThis.open"];
|
|
348
|
+
};
|
|
349
|
+
readonly action: "reject";
|
|
350
|
+
readonly category: "browser_capability";
|
|
351
|
+
readonly severity: "high";
|
|
352
|
+
readonly reason: "Third-party components cannot open new windows or tabs from preview/render code.";
|
|
353
|
+
readonly recommendation: "Remove window.open calls and express outbound links as platform-reviewed metadata outside component execution.";
|
|
354
|
+
readonly docsPath: "/docs/component-authoring/security#browser-window-open";
|
|
355
|
+
}, {
|
|
356
|
+
readonly id: "browser.cross_context_message";
|
|
357
|
+
readonly label: "Cross-context postMessage";
|
|
358
|
+
readonly patterns: readonly ["(?:window|globalThis|parent|top|opener)\\.postMessage\\s*\\(|\\bpostMessage\\s*\\("];
|
|
359
|
+
readonly astMatchers: {
|
|
360
|
+
readonly globals: readonly ["postMessage"];
|
|
361
|
+
readonly memberPaths: readonly ["window.postMessage", "globalThis.postMessage", "parent.postMessage", "top.postMessage", "opener.postMessage"];
|
|
362
|
+
};
|
|
363
|
+
readonly action: "reject";
|
|
364
|
+
readonly category: "browser_capability";
|
|
365
|
+
readonly severity: "high";
|
|
366
|
+
readonly reason: "Third-party components cannot send messages to parent, opener, top, or other browser contexts.";
|
|
367
|
+
readonly recommendation: "Use explicit component props and platform-owned events instead of postMessage from component code.";
|
|
368
|
+
readonly docsPath: "/docs/component-authoring/security#browser-cross-context-message";
|
|
369
|
+
}, {
|
|
370
|
+
readonly id: "browser.dynamic_script";
|
|
371
|
+
readonly label: "Dynamic script element creation";
|
|
372
|
+
readonly patterns: readonly ["document\\.createElement\\s*\\(\\s*['\"`]script['\"`]"];
|
|
373
|
+
readonly astMatchers: {
|
|
374
|
+
readonly documentCreateElementTags: readonly ["script"];
|
|
375
|
+
};
|
|
376
|
+
readonly action: "reject";
|
|
377
|
+
readonly category: "dynamic_code_execution";
|
|
378
|
+
readonly severity: "high";
|
|
379
|
+
readonly reason: "Third-party components cannot create script elements at preview or render time.";
|
|
380
|
+
readonly recommendation: "Use static imports that pass the public authoring build and security checks.";
|
|
381
|
+
readonly docsPath: "/docs/component-authoring/security#browser-dynamic-script";
|
|
382
|
+
}, {
|
|
383
|
+
readonly id: "browser.iframe_escape";
|
|
384
|
+
readonly label: "iframe boundary escape";
|
|
385
|
+
readonly patterns: readonly ["<iframe\\b|document\\.createElement\\s*\\(\\s*['\"`]iframe['\"`]"];
|
|
386
|
+
readonly astMatchers: {
|
|
387
|
+
readonly documentCreateElementTags: readonly ["iframe"];
|
|
388
|
+
readonly jsxElements: readonly ["iframe"];
|
|
389
|
+
};
|
|
390
|
+
readonly action: "reject";
|
|
391
|
+
readonly category: "browser_capability";
|
|
392
|
+
readonly severity: "high";
|
|
393
|
+
readonly reason: "Third-party components cannot create nested iframe boundaries inside the platform preview/render sandbox.";
|
|
394
|
+
readonly recommendation: "Render ordinary React/Remotion content and use platform-reviewed embeds outside component code.";
|
|
395
|
+
readonly docsPath: "/docs/component-authoring/security#browser-iframe-escape";
|
|
396
|
+
}, {
|
|
397
|
+
readonly id: "browser.fingerprint";
|
|
398
|
+
readonly label: "Browser fingerprinting surface";
|
|
399
|
+
readonly patterns: readonly ["navigator\\.(?:userAgent|language|languages|hardwareConcurrency|deviceMemory)|window\\.(?:innerWidth|innerHeight)|screen\\.(?:width|height)"];
|
|
400
|
+
readonly astMatchers: {
|
|
401
|
+
readonly memberPaths: readonly ["navigator.userAgent", "navigator.language", "navigator.languages", "navigator.hardwareConcurrency", "navigator.deviceMemory", "window.innerWidth", "window.innerHeight", "globalThis.innerWidth", "globalThis.innerHeight", "screen.width", "screen.height"];
|
|
402
|
+
};
|
|
403
|
+
readonly action: "reject";
|
|
404
|
+
readonly category: "privacy_fingerprinting";
|
|
405
|
+
readonly severity: "high";
|
|
406
|
+
readonly reason: "Third-party components cannot read browser fingerprinting or viewport surfaces for profiling or exfiltration.";
|
|
407
|
+
readonly recommendation: "Use explicit props, Remotion video config, or platform-provided layout inputs instead of browser environment fingerprints.";
|
|
408
|
+
readonly docsPath: "/docs/component-authoring/security#browser-fingerprint";
|
|
409
|
+
}, {
|
|
410
|
+
readonly id: "storage.browser_storage";
|
|
411
|
+
readonly label: "Browser storage or cookie access";
|
|
412
|
+
readonly patterns: readonly ["document\\.cookie|localStorage|sessionStorage"];
|
|
413
|
+
readonly astMatchers: {
|
|
414
|
+
readonly memberPaths: readonly ["document.cookie", "localStorage", "sessionStorage", "window.localStorage", "window.sessionStorage", "globalThis.localStorage", "globalThis.sessionStorage"];
|
|
415
|
+
};
|
|
416
|
+
readonly action: "reject";
|
|
417
|
+
readonly category: "unsafe_browser_storage";
|
|
418
|
+
readonly severity: "high";
|
|
419
|
+
readonly reason: "Marketplace components must not read cookies, localStorage, or sessionStorage from the user browser.";
|
|
420
|
+
readonly recommendation: "Use platform-provided props for state and never read browser storage from component code.";
|
|
421
|
+
readonly docsPath: "/docs/component-authoring/security#storage-browser-storage";
|
|
258
422
|
}, {
|
|
259
423
|
readonly id: "remotion.delay_render";
|
|
260
424
|
readonly label: "Remotion delayRender lifecycle control";
|
|
@@ -296,11 +460,16 @@ export declare const PROMPTFRAME_PUBLIC_SECURITY_POLICY: {
|
|
|
296
460
|
readonly id: "dom.dangerous_html";
|
|
297
461
|
readonly label: "Dangerous HTML injection";
|
|
298
462
|
readonly patterns: readonly ["dangerouslySetInnerHTML|\\.innerHTML\\s*="];
|
|
463
|
+
readonly astMatchers: {
|
|
464
|
+
readonly jsxAttributes: readonly ["dangerouslySetInnerHTML"];
|
|
465
|
+
readonly memberPathSuffixes: readonly ["innerHTML"];
|
|
466
|
+
};
|
|
299
467
|
readonly action: "manual_review";
|
|
300
468
|
readonly category: "dangerous_html_injection";
|
|
301
469
|
readonly severity: "high";
|
|
302
470
|
readonly reason: "HTML injection can bypass component rendering boundaries.";
|
|
303
471
|
readonly recommendation: "Render React nodes or sanitized text structures.";
|
|
472
|
+
readonly docsPath: "/docs/component-authoring/security#dom-dangerous-html";
|
|
304
473
|
}, {
|
|
305
474
|
readonly id: "package.install_script";
|
|
306
475
|
readonly label: "Install script signal";
|
|
@@ -337,15 +506,6 @@ export declare const PROMPTFRAME_PUBLIC_SECURITY_POLICY: {
|
|
|
337
506
|
readonly severity: "medium";
|
|
338
507
|
readonly reason: "Source comments and strings cannot ask the platform to change rules, ranking, or admission.";
|
|
339
508
|
readonly recommendation: "Remove prompt-injection-like strings.";
|
|
340
|
-
}, {
|
|
341
|
-
readonly id: "storage.browser_storage";
|
|
342
|
-
readonly label: "Browser storage access";
|
|
343
|
-
readonly patterns: readonly ["document\\.cookie|localStorage|sessionStorage"];
|
|
344
|
-
readonly action: "warn";
|
|
345
|
-
readonly category: "unsafe_browser_storage";
|
|
346
|
-
readonly severity: "medium";
|
|
347
|
-
readonly reason: "Marketplace components must not read user browser storage.";
|
|
348
|
-
readonly recommendation: "Use platform-provided props for state.";
|
|
349
509
|
}, {
|
|
350
510
|
readonly id: "network.remote_url";
|
|
351
511
|
readonly label: "Hardcoded remote URL";
|
|
@@ -424,6 +584,186 @@ export declare const semverSchema: z.ZodString;
|
|
|
424
584
|
export declare const componentIdSchema: z.ZodString;
|
|
425
585
|
export declare const componentNameSchema: z.ZodString;
|
|
426
586
|
export declare const relativePathSchema: z.ZodString;
|
|
587
|
+
export declare const componentPublicResourceKindSchema: z.ZodEnum<["image", "audio", "video", "font", "json", "text"]>;
|
|
588
|
+
export type ComponentPublicResourceKind = z.infer<typeof componentPublicResourceKindSchema>;
|
|
589
|
+
export declare const componentPublicResourcePublicPathSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
590
|
+
export declare const componentPublicResourceSourcePathSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
591
|
+
export declare const componentPublicResourceArtifactPathSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
592
|
+
export declare const componentPublicResourceEntrySchema: z.ZodObject<{
|
|
593
|
+
publicPath: z.ZodEffects<z.ZodString, string, string>;
|
|
594
|
+
sourcePath: z.ZodEffects<z.ZodString, string, string>;
|
|
595
|
+
artifactPath: z.ZodEffects<z.ZodString, string, string>;
|
|
596
|
+
kind: z.ZodEnum<["image", "audio", "video", "font", "json", "text"]>;
|
|
597
|
+
contentType: z.ZodString;
|
|
598
|
+
sizeBytes: z.ZodNumber;
|
|
599
|
+
sha256: z.ZodString;
|
|
600
|
+
}, "strict", z.ZodTypeAny, {
|
|
601
|
+
publicPath: string;
|
|
602
|
+
sourcePath: string;
|
|
603
|
+
artifactPath: string;
|
|
604
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
605
|
+
contentType: string;
|
|
606
|
+
sizeBytes: number;
|
|
607
|
+
sha256: string;
|
|
608
|
+
}, {
|
|
609
|
+
publicPath: string;
|
|
610
|
+
sourcePath: string;
|
|
611
|
+
artifactPath: string;
|
|
612
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
613
|
+
contentType: string;
|
|
614
|
+
sizeBytes: number;
|
|
615
|
+
sha256: string;
|
|
616
|
+
}>;
|
|
617
|
+
export type ComponentPublicResourceEntry = z.infer<typeof componentPublicResourceEntrySchema>;
|
|
618
|
+
export declare const componentPublicResourceManifestSchema: z.ZodObject<{
|
|
619
|
+
contractVersion: z.ZodLiteral<"component-public-resources.v0.1.0">;
|
|
620
|
+
basePath: z.ZodDefault<z.ZodLiteral<"/">>;
|
|
621
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
622
|
+
publicPath: z.ZodEffects<z.ZodString, string, string>;
|
|
623
|
+
sourcePath: z.ZodEffects<z.ZodString, string, string>;
|
|
624
|
+
artifactPath: z.ZodEffects<z.ZodString, string, string>;
|
|
625
|
+
kind: z.ZodEnum<["image", "audio", "video", "font", "json", "text"]>;
|
|
626
|
+
contentType: z.ZodString;
|
|
627
|
+
sizeBytes: z.ZodNumber;
|
|
628
|
+
sha256: z.ZodString;
|
|
629
|
+
}, "strict", z.ZodTypeAny, {
|
|
630
|
+
publicPath: string;
|
|
631
|
+
sourcePath: string;
|
|
632
|
+
artifactPath: string;
|
|
633
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
634
|
+
contentType: string;
|
|
635
|
+
sizeBytes: number;
|
|
636
|
+
sha256: string;
|
|
637
|
+
}, {
|
|
638
|
+
publicPath: string;
|
|
639
|
+
sourcePath: string;
|
|
640
|
+
artifactPath: string;
|
|
641
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
642
|
+
contentType: string;
|
|
643
|
+
sizeBytes: number;
|
|
644
|
+
sha256: string;
|
|
645
|
+
}>, "many">;
|
|
646
|
+
totalBytes: z.ZodNumber;
|
|
647
|
+
generatedAt: z.ZodString;
|
|
648
|
+
}, "strict", z.ZodTypeAny, {
|
|
649
|
+
entries: {
|
|
650
|
+
publicPath: string;
|
|
651
|
+
sourcePath: string;
|
|
652
|
+
artifactPath: string;
|
|
653
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
654
|
+
contentType: string;
|
|
655
|
+
sizeBytes: number;
|
|
656
|
+
sha256: string;
|
|
657
|
+
}[];
|
|
658
|
+
contractVersion: "component-public-resources.v0.1.0";
|
|
659
|
+
basePath: "/";
|
|
660
|
+
totalBytes: number;
|
|
661
|
+
generatedAt: string;
|
|
662
|
+
}, {
|
|
663
|
+
entries: {
|
|
664
|
+
publicPath: string;
|
|
665
|
+
sourcePath: string;
|
|
666
|
+
artifactPath: string;
|
|
667
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
668
|
+
contentType: string;
|
|
669
|
+
sizeBytes: number;
|
|
670
|
+
sha256: string;
|
|
671
|
+
}[];
|
|
672
|
+
contractVersion: "component-public-resources.v0.1.0";
|
|
673
|
+
totalBytes: number;
|
|
674
|
+
generatedAt: string;
|
|
675
|
+
basePath?: "/" | undefined;
|
|
676
|
+
}>;
|
|
677
|
+
export type ComponentPublicResourceManifest = z.infer<typeof componentPublicResourceManifestSchema>;
|
|
678
|
+
export declare const componentRuntimeResourceEntrySchema: z.ZodObject<{
|
|
679
|
+
publicPath: z.ZodEffects<z.ZodString, string, string>;
|
|
680
|
+
sourcePath: z.ZodEffects<z.ZodString, string, string>;
|
|
681
|
+
artifactPath: z.ZodEffects<z.ZodString, string, string>;
|
|
682
|
+
kind: z.ZodEnum<["image", "audio", "video", "font", "json", "text"]>;
|
|
683
|
+
contentType: z.ZodString;
|
|
684
|
+
sizeBytes: z.ZodNumber;
|
|
685
|
+
sha256: z.ZodString;
|
|
686
|
+
} & {
|
|
687
|
+
url: z.ZodString;
|
|
688
|
+
}, "strict", z.ZodTypeAny, {
|
|
689
|
+
publicPath: string;
|
|
690
|
+
sourcePath: string;
|
|
691
|
+
artifactPath: string;
|
|
692
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
693
|
+
contentType: string;
|
|
694
|
+
sizeBytes: number;
|
|
695
|
+
sha256: string;
|
|
696
|
+
url: string;
|
|
697
|
+
}, {
|
|
698
|
+
publicPath: string;
|
|
699
|
+
sourcePath: string;
|
|
700
|
+
artifactPath: string;
|
|
701
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
702
|
+
contentType: string;
|
|
703
|
+
sizeBytes: number;
|
|
704
|
+
sha256: string;
|
|
705
|
+
url: string;
|
|
706
|
+
}>;
|
|
707
|
+
export declare const componentRuntimeResourceManifestSchema: z.ZodObject<{
|
|
708
|
+
contractVersion: z.ZodLiteral<"component-public-resources.v0.1.0">;
|
|
709
|
+
baseUrl: z.ZodOptional<z.ZodString>;
|
|
710
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
711
|
+
publicPath: z.ZodEffects<z.ZodString, string, string>;
|
|
712
|
+
sourcePath: z.ZodEffects<z.ZodString, string, string>;
|
|
713
|
+
artifactPath: z.ZodEffects<z.ZodString, string, string>;
|
|
714
|
+
kind: z.ZodEnum<["image", "audio", "video", "font", "json", "text"]>;
|
|
715
|
+
contentType: z.ZodString;
|
|
716
|
+
sizeBytes: z.ZodNumber;
|
|
717
|
+
sha256: z.ZodString;
|
|
718
|
+
} & {
|
|
719
|
+
url: z.ZodString;
|
|
720
|
+
}, "strict", z.ZodTypeAny, {
|
|
721
|
+
publicPath: string;
|
|
722
|
+
sourcePath: string;
|
|
723
|
+
artifactPath: string;
|
|
724
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
725
|
+
contentType: string;
|
|
726
|
+
sizeBytes: number;
|
|
727
|
+
sha256: string;
|
|
728
|
+
url: string;
|
|
729
|
+
}, {
|
|
730
|
+
publicPath: string;
|
|
731
|
+
sourcePath: string;
|
|
732
|
+
artifactPath: string;
|
|
733
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
734
|
+
contentType: string;
|
|
735
|
+
sizeBytes: number;
|
|
736
|
+
sha256: string;
|
|
737
|
+
url: string;
|
|
738
|
+
}>, "many">;
|
|
739
|
+
}, "strict", z.ZodTypeAny, {
|
|
740
|
+
entries: {
|
|
741
|
+
publicPath: string;
|
|
742
|
+
sourcePath: string;
|
|
743
|
+
artifactPath: string;
|
|
744
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
745
|
+
contentType: string;
|
|
746
|
+
sizeBytes: number;
|
|
747
|
+
sha256: string;
|
|
748
|
+
url: string;
|
|
749
|
+
}[];
|
|
750
|
+
contractVersion: "component-public-resources.v0.1.0";
|
|
751
|
+
baseUrl?: string | undefined;
|
|
752
|
+
}, {
|
|
753
|
+
entries: {
|
|
754
|
+
publicPath: string;
|
|
755
|
+
sourcePath: string;
|
|
756
|
+
artifactPath: string;
|
|
757
|
+
kind: "image" | "audio" | "video" | "font" | "json" | "text";
|
|
758
|
+
contentType: string;
|
|
759
|
+
sizeBytes: number;
|
|
760
|
+
sha256: string;
|
|
761
|
+
url: string;
|
|
762
|
+
}[];
|
|
763
|
+
contractVersion: "component-public-resources.v0.1.0";
|
|
764
|
+
baseUrl?: string | undefined;
|
|
765
|
+
}>;
|
|
766
|
+
export type ComponentRuntimeResourceManifest = z.infer<typeof componentRuntimeResourceManifestSchema>;
|
|
427
767
|
export declare const promptFrameComponentTypeSchema: z.ZodEnum<["scene_template", "contained_widget", "overlay", "transition_effect"]>;
|
|
428
768
|
export type PromptFrameComponentType = z.infer<typeof promptFrameComponentTypeSchema>;
|
|
429
769
|
export declare const promptFrameManifestLayerSchema: z.ZodEnum<["foundation", "atom", "motion", "element", "scene_template"]>;
|
|
@@ -520,14 +860,14 @@ export declare const authoringUploadTargetPolicySchema: z.ZodObject<{
|
|
|
520
860
|
}, "strict", z.ZodTypeAny, {
|
|
521
861
|
target: "marketplace_authoring" | "project_private_generation";
|
|
522
862
|
description: string;
|
|
523
|
-
allowedVisibility: ("
|
|
863
|
+
allowedVisibility: ("public" | "builtin" | "private" | "project_private" | "team")[];
|
|
524
864
|
requiresUploadTrustPipeline: boolean;
|
|
525
865
|
requiresHumanPublishApproval: boolean;
|
|
526
866
|
deterministicGateMode: "fail_closed";
|
|
527
867
|
}, {
|
|
528
868
|
target: "marketplace_authoring" | "project_private_generation";
|
|
529
869
|
description: string;
|
|
530
|
-
allowedVisibility: ("
|
|
870
|
+
allowedVisibility: ("public" | "builtin" | "private" | "project_private" | "team")[];
|
|
531
871
|
requiresUploadTrustPipeline?: boolean | undefined;
|
|
532
872
|
requiresHumanPublishApproval?: boolean | undefined;
|
|
533
873
|
deterministicGateMode?: "fail_closed" | undefined;
|
|
@@ -604,9 +944,10 @@ export declare const componentReusabilityScoreSchema: z.ZodObject<{
|
|
|
604
944
|
generatedAt: z.ZodString;
|
|
605
945
|
}, "strict", z.ZodTypeAny, {
|
|
606
946
|
contractVersion: "component-reusability.v0.1.0";
|
|
947
|
+
generatedAt: string;
|
|
607
948
|
score: number;
|
|
608
949
|
uploadTarget: "marketplace_authoring" | "project_private_generation";
|
|
609
|
-
targetVisibility: "
|
|
950
|
+
targetVisibility: "public" | "project_private" | "user_private" | "team_private";
|
|
610
951
|
recommendation: "reject" | "manual_review" | "warn" | "allow";
|
|
611
952
|
signals: {
|
|
612
953
|
severity: "error" | "info" | "warning";
|
|
@@ -615,11 +956,11 @@ export declare const componentReusabilityScoreSchema: z.ZodObject<{
|
|
|
615
956
|
weight: number;
|
|
616
957
|
reason: string;
|
|
617
958
|
}[];
|
|
618
|
-
generatedAt: string;
|
|
619
959
|
}, {
|
|
960
|
+
generatedAt: string;
|
|
620
961
|
score: number;
|
|
621
962
|
uploadTarget: "marketplace_authoring" | "project_private_generation";
|
|
622
|
-
targetVisibility: "
|
|
963
|
+
targetVisibility: "public" | "project_private" | "user_private" | "team_private";
|
|
623
964
|
recommendation: "reject" | "manual_review" | "warn" | "allow";
|
|
624
965
|
signals: {
|
|
625
966
|
id: "propsRichness" | "hardcodedContentRisk" | "dataShapeRichness" | "styleConfigurability" | "domainNeutrality" | "emptyStateSupport" | "previewCaseCoverage" | "sourceFactsReuse";
|
|
@@ -628,7 +969,6 @@ export declare const componentReusabilityScoreSchema: z.ZodObject<{
|
|
|
628
969
|
reason: string;
|
|
629
970
|
severity?: "error" | "info" | "warning" | undefined;
|
|
630
971
|
}[];
|
|
631
|
-
generatedAt: string;
|
|
632
972
|
contractVersion?: "component-reusability.v0.1.0" | undefined;
|
|
633
973
|
}>;
|
|
634
974
|
export type ComponentReusabilityScore = z.infer<typeof componentReusabilityScoreSchema>;
|
|
@@ -669,14 +1009,14 @@ export declare const authoringStandardReleaseSchema: z.ZodObject<{
|
|
|
669
1009
|
}, "strict", z.ZodTypeAny, {
|
|
670
1010
|
target: "marketplace_authoring" | "project_private_generation";
|
|
671
1011
|
description: string;
|
|
672
|
-
allowedVisibility: ("
|
|
1012
|
+
allowedVisibility: ("public" | "builtin" | "private" | "project_private" | "team")[];
|
|
673
1013
|
requiresUploadTrustPipeline: boolean;
|
|
674
1014
|
requiresHumanPublishApproval: boolean;
|
|
675
1015
|
deterministicGateMode: "fail_closed";
|
|
676
1016
|
}, {
|
|
677
1017
|
target: "marketplace_authoring" | "project_private_generation";
|
|
678
1018
|
description: string;
|
|
679
|
-
allowedVisibility: ("
|
|
1019
|
+
allowedVisibility: ("public" | "builtin" | "private" | "project_private" | "team")[];
|
|
680
1020
|
requiresUploadTrustPipeline?: boolean | undefined;
|
|
681
1021
|
requiresHumanPublishApproval?: boolean | undefined;
|
|
682
1022
|
deterministicGateMode?: "fail_closed" | undefined;
|
|
@@ -701,7 +1041,7 @@ export declare const authoringStandardReleaseSchema: z.ZodObject<{
|
|
|
701
1041
|
uploadTargets: {
|
|
702
1042
|
target: "marketplace_authoring" | "project_private_generation";
|
|
703
1043
|
description: string;
|
|
704
|
-
allowedVisibility: ("
|
|
1044
|
+
allowedVisibility: ("public" | "builtin" | "private" | "project_private" | "team")[];
|
|
705
1045
|
requiresUploadTrustPipeline: boolean;
|
|
706
1046
|
requiresHumanPublishApproval: boolean;
|
|
707
1047
|
deterministicGateMode: "fail_closed";
|
|
@@ -726,7 +1066,7 @@ export declare const authoringStandardReleaseSchema: z.ZodObject<{
|
|
|
726
1066
|
uploadTargets: {
|
|
727
1067
|
target: "marketplace_authoring" | "project_private_generation";
|
|
728
1068
|
description: string;
|
|
729
|
-
allowedVisibility: ("
|
|
1069
|
+
allowedVisibility: ("public" | "builtin" | "private" | "project_private" | "team")[];
|
|
730
1070
|
requiresUploadTrustPipeline?: boolean | undefined;
|
|
731
1071
|
requiresHumanPublishApproval?: boolean | undefined;
|
|
732
1072
|
deterministicGateMode?: "fail_closed" | undefined;
|
|
@@ -839,14 +1179,14 @@ export declare const componentRefSchema: z.ZodObject<{
|
|
|
839
1179
|
contractVersion: "component-ref.v0.1.0";
|
|
840
1180
|
componentId: string;
|
|
841
1181
|
version: string;
|
|
842
|
-
visibility: "
|
|
1182
|
+
visibility: "public" | "builtin" | "private" | "project_private" | "team";
|
|
843
1183
|
sourceHash: string;
|
|
844
1184
|
schemaHash: string;
|
|
845
1185
|
bundleHash?: string | undefined;
|
|
846
1186
|
}, {
|
|
847
1187
|
componentId: string;
|
|
848
1188
|
version: string;
|
|
849
|
-
visibility: "
|
|
1189
|
+
visibility: "public" | "builtin" | "private" | "project_private" | "team";
|
|
850
1190
|
sourceHash: string;
|
|
851
1191
|
schemaHash: string;
|
|
852
1192
|
contractVersion?: "component-ref.v0.1.0" | undefined;
|
|
@@ -977,16 +1317,16 @@ export declare const componentManifestEntrySchema: z.ZodObject<{
|
|
|
977
1317
|
schemaHash: z.ZodString;
|
|
978
1318
|
bundleHash: z.ZodOptional<z.ZodString>;
|
|
979
1319
|
}, "strip", z.ZodTypeAny, {
|
|
1320
|
+
sourcePath: string;
|
|
980
1321
|
sourceHash: string;
|
|
981
1322
|
schemaHash: string;
|
|
982
|
-
sourcePath: string;
|
|
983
1323
|
componentExport: string;
|
|
984
1324
|
propsSchemaPath: string;
|
|
985
1325
|
bundleHash?: string | undefined;
|
|
986
1326
|
}, {
|
|
1327
|
+
sourcePath: string;
|
|
987
1328
|
sourceHash: string;
|
|
988
1329
|
schemaHash: string;
|
|
989
|
-
sourcePath: string;
|
|
990
1330
|
propsSchemaPath: string;
|
|
991
1331
|
bundleHash?: string | undefined;
|
|
992
1332
|
componentExport?: string | undefined;
|
|
@@ -1118,16 +1458,16 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1118
1458
|
schemaHash: z.ZodString;
|
|
1119
1459
|
bundleHash: z.ZodOptional<z.ZodString>;
|
|
1120
1460
|
}, "strip", z.ZodTypeAny, {
|
|
1461
|
+
sourcePath: string;
|
|
1121
1462
|
sourceHash: string;
|
|
1122
1463
|
schemaHash: string;
|
|
1123
|
-
sourcePath: string;
|
|
1124
1464
|
componentExport: string;
|
|
1125
1465
|
propsSchemaPath: string;
|
|
1126
1466
|
bundleHash?: string | undefined;
|
|
1127
1467
|
}, {
|
|
1468
|
+
sourcePath: string;
|
|
1128
1469
|
sourceHash: string;
|
|
1129
1470
|
schemaHash: string;
|
|
1130
|
-
sourcePath: string;
|
|
1131
1471
|
propsSchemaPath: string;
|
|
1132
1472
|
bundleHash?: string | undefined;
|
|
1133
1473
|
componentExport?: string | undefined;
|
|
@@ -1157,9 +1497,9 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1157
1497
|
max: number;
|
|
1158
1498
|
};
|
|
1159
1499
|
entry: {
|
|
1500
|
+
sourcePath: string;
|
|
1160
1501
|
sourceHash: string;
|
|
1161
1502
|
schemaHash: string;
|
|
1162
|
-
sourcePath: string;
|
|
1163
1503
|
componentExport: string;
|
|
1164
1504
|
propsSchemaPath: string;
|
|
1165
1505
|
bundleHash?: string | undefined;
|
|
@@ -1194,7 +1534,7 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1194
1534
|
standardSourceHash?: string | undefined;
|
|
1195
1535
|
componentType?: "scene_template" | "contained_widget" | "overlay" | "transition_effect" | undefined;
|
|
1196
1536
|
layer?: "scene_template" | "foundation" | "atom" | "motion" | "element" | undefined;
|
|
1197
|
-
category?: "
|
|
1537
|
+
category?: "text" | "scene_template" | "motion" | "background" | "media" | "shape" | "card" | "layout" | "effect" | undefined;
|
|
1198
1538
|
trustLevel?: "trusted_builtin" | "trusted_private" | "trusted_marketplace" | "untrusted_temporary" | undefined;
|
|
1199
1539
|
reviewStatus?: "draft" | "pending_review" | "approved" | "rejected" | "archived" | undefined;
|
|
1200
1540
|
}, {
|
|
@@ -1215,9 +1555,9 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1215
1555
|
max: number;
|
|
1216
1556
|
};
|
|
1217
1557
|
entry: {
|
|
1558
|
+
sourcePath: string;
|
|
1218
1559
|
sourceHash: string;
|
|
1219
1560
|
schemaHash: string;
|
|
1220
|
-
sourcePath: string;
|
|
1221
1561
|
propsSchemaPath: string;
|
|
1222
1562
|
bundleHash?: string | undefined;
|
|
1223
1563
|
componentExport?: string | undefined;
|
|
@@ -1248,7 +1588,7 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1248
1588
|
standardSourceHash?: string | undefined;
|
|
1249
1589
|
componentType?: "scene_template" | "contained_widget" | "overlay" | "transition_effect" | undefined;
|
|
1250
1590
|
layer?: "scene_template" | "foundation" | "atom" | "motion" | "element" | undefined;
|
|
1251
|
-
category?: "
|
|
1591
|
+
category?: "text" | "scene_template" | "motion" | "background" | "media" | "shape" | "card" | "layout" | "effect" | undefined;
|
|
1252
1592
|
trustLevel?: "trusted_builtin" | "trusted_private" | "trusted_marketplace" | "untrusted_temporary" | undefined;
|
|
1253
1593
|
dependencies?: Record<string, string> | undefined;
|
|
1254
1594
|
peerDependencies?: Record<string, string> | undefined;
|
|
@@ -1273,9 +1613,9 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1273
1613
|
max: number;
|
|
1274
1614
|
};
|
|
1275
1615
|
entry: {
|
|
1616
|
+
sourcePath: string;
|
|
1276
1617
|
sourceHash: string;
|
|
1277
1618
|
schemaHash: string;
|
|
1278
|
-
sourcePath: string;
|
|
1279
1619
|
componentExport: string;
|
|
1280
1620
|
propsSchemaPath: string;
|
|
1281
1621
|
bundleHash?: string | undefined;
|
|
@@ -1310,7 +1650,7 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1310
1650
|
standardSourceHash?: string | undefined;
|
|
1311
1651
|
componentType?: "scene_template" | "contained_widget" | "overlay" | "transition_effect" | undefined;
|
|
1312
1652
|
layer?: "scene_template" | "foundation" | "atom" | "motion" | "element" | undefined;
|
|
1313
|
-
category?: "
|
|
1653
|
+
category?: "text" | "scene_template" | "motion" | "background" | "media" | "shape" | "card" | "layout" | "effect" | undefined;
|
|
1314
1654
|
trustLevel?: "trusted_builtin" | "trusted_private" | "trusted_marketplace" | "untrusted_temporary" | undefined;
|
|
1315
1655
|
reviewStatus?: "draft" | "pending_review" | "approved" | "rejected" | "archived" | undefined;
|
|
1316
1656
|
}, {
|
|
@@ -1331,9 +1671,9 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1331
1671
|
max: number;
|
|
1332
1672
|
};
|
|
1333
1673
|
entry: {
|
|
1674
|
+
sourcePath: string;
|
|
1334
1675
|
sourceHash: string;
|
|
1335
1676
|
schemaHash: string;
|
|
1336
|
-
sourcePath: string;
|
|
1337
1677
|
propsSchemaPath: string;
|
|
1338
1678
|
bundleHash?: string | undefined;
|
|
1339
1679
|
componentExport?: string | undefined;
|
|
@@ -1364,7 +1704,7 @@ export declare const componentManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1364
1704
|
standardSourceHash?: string | undefined;
|
|
1365
1705
|
componentType?: "scene_template" | "contained_widget" | "overlay" | "transition_effect" | undefined;
|
|
1366
1706
|
layer?: "scene_template" | "foundation" | "atom" | "motion" | "element" | undefined;
|
|
1367
|
-
category?: "
|
|
1707
|
+
category?: "text" | "scene_template" | "motion" | "background" | "media" | "shape" | "card" | "layout" | "effect" | undefined;
|
|
1368
1708
|
trustLevel?: "trusted_builtin" | "trusted_private" | "trusted_marketplace" | "untrusted_temporary" | undefined;
|
|
1369
1709
|
dependencies?: Record<string, string> | undefined;
|
|
1370
1710
|
peerDependencies?: Record<string, string> | undefined;
|
|
@@ -1387,14 +1727,14 @@ export declare const componentCapabilityCardSchema: z.ZodObject<{
|
|
|
1387
1727
|
contractVersion: "component-ref.v0.1.0";
|
|
1388
1728
|
componentId: string;
|
|
1389
1729
|
version: string;
|
|
1390
|
-
visibility: "
|
|
1730
|
+
visibility: "public" | "builtin" | "private" | "project_private" | "team";
|
|
1391
1731
|
sourceHash: string;
|
|
1392
1732
|
schemaHash: string;
|
|
1393
1733
|
bundleHash?: string | undefined;
|
|
1394
1734
|
}, {
|
|
1395
1735
|
componentId: string;
|
|
1396
1736
|
version: string;
|
|
1397
|
-
visibility: "
|
|
1737
|
+
visibility: "public" | "builtin" | "private" | "project_private" | "team";
|
|
1398
1738
|
sourceHash: string;
|
|
1399
1739
|
schemaHash: string;
|
|
1400
1740
|
contractVersion?: "component-ref.v0.1.0" | undefined;
|
|
@@ -1517,7 +1857,7 @@ export declare const componentCapabilityCardSchema: z.ZodObject<{
|
|
|
1517
1857
|
contractVersion: "component-ref.v0.1.0";
|
|
1518
1858
|
componentId: string;
|
|
1519
1859
|
version: string;
|
|
1520
|
-
visibility: "
|
|
1860
|
+
visibility: "public" | "builtin" | "private" | "project_private" | "team";
|
|
1521
1861
|
sourceHash: string;
|
|
1522
1862
|
schemaHash: string;
|
|
1523
1863
|
bundleHash?: string | undefined;
|
|
@@ -1551,7 +1891,7 @@ export declare const componentCapabilityCardSchema: z.ZodObject<{
|
|
|
1551
1891
|
componentRef: {
|
|
1552
1892
|
componentId: string;
|
|
1553
1893
|
version: string;
|
|
1554
|
-
visibility: "
|
|
1894
|
+
visibility: "public" | "builtin" | "private" | "project_private" | "team";
|
|
1555
1895
|
sourceHash: string;
|
|
1556
1896
|
schemaHash: string;
|
|
1557
1897
|
contractVersion?: "component-ref.v0.1.0" | undefined;
|