@promptframe/contracts 0.1.7 → 0.1.9
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 +12 -0
- package/dist/index.d.ts +273 -60
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +342 -0
- package/dist/index.js.map +1 -1
- package/dist/security-policy-evaluator.d.ts +36 -0
- package/dist/security-policy-evaluator.d.ts.map +1 -0
- package/dist/security-policy-evaluator.js +253 -0
- package/dist/security-policy-evaluator.js.map +1 -0
- package/dist/security-policy-fingerprint.d.ts +4 -0
- package/dist/security-policy-fingerprint.d.ts.map +1 -0
- package/dist/security-policy-fingerprint.js +37 -0
- package/dist/security-policy-fingerprint.js.map +1 -0
- package/package.json +6 -4
package/README.md
CHANGED
|
@@ -10,3 +10,15 @@ 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
|
+
- `PROMPTFRAME_PUBLIC_SECURITY_POLICY_DIGEST`: deterministic release-cohort fingerprint for the public security policy.
|
|
14
|
+
- `@promptframe/contracts/security-evaluator`: AST-aware evaluator for JS / TS / TSX source diagnostics.
|
|
15
|
+
|
|
16
|
+
## Public Security Policy
|
|
17
|
+
|
|
18
|
+
`PROMPTFRAME_PUBLIC_SECURITY_POLICY` is the public author-facing rule catalog used by CLI diagnostics. It intentionally describes the behavior an external component author must avoid, not PromptFrame platform internals.
|
|
19
|
+
|
|
20
|
+
High-risk browser/runtime capabilities are rejected locally when they are statically visible, including BroadcastChannel, WebRTC / RTCPeerConnection, Notification, Service Worker, clipboard access, navigator.locks, AudioContext / AudioWorklet, CSS.registerProperty, DOM Observer APIs, Remotion delayRender, and dynamic import.
|
|
21
|
+
|
|
22
|
+
Each public rule exposes a stable `id`, severity, category, action, pattern set, optional AST matcher metadata, human reason, recommendation, and documentation path so local CLI output, GitHub annotations, and platform admission can refer to the same author-facing diagnostic family.
|
|
23
|
+
|
|
24
|
+
The security evaluator subpath parses JS / TS / TSX source with the TypeScript compiler API, so comments, strings, and harmless local identifiers do not trigger the same diagnostics as real browser capability access. Regex patterns remain as compatibility and metadata fallback, not the preferred source-code admission path.
|