@klickd/core 4.0.1 → 4.0.3

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.
@@ -1,95 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://klickd.app/schema/v4-preview/klickd.schema.json",
4
- "title": "klickd v4 Preview — Unified (PERMISSIVE, NON-NORMATIVE)",
5
- "description": "PREVIEW unified schema for .klickd v4, targeting v4.0.0-preview.1. This schema is INTENTIONALLY PERMISSIVE: it validates the top-level shape of a v4-preview file (envelope + optional preview hooks) without enforcing strict v4 semantics. additionalProperties is true so unknown fields round-trip verbatim. Use this for single-pass acceptance of draft v4 documents. For pre-/post-decrypt validation, see schemas/klickd-payload-v4-preview.schema.json. The normative production schemas remain schema/klickd-v3.4.schema.json (unified) and schemas/klickd-envelope-v3.schema.json + schemas/klickd-payload-v3.schema.json (split). See SPEC.md §33.",
6
- "type": "object",
7
- "additionalProperties": true,
8
- "required": ["klickd_version", "created_at", "encrypted"],
9
- "properties": {
10
- "klickd_version": {
11
- "type": "string",
12
- "description": "Wire / envelope version. PERMISSIVE in this preview — any MAJOR.MINOR string is accepted. Preview producers SHOULD emit '4.0' and pair it with a 'preview' field. v3.x producers MUST continue to emit '3.x' and MUST NOT emit a 'preview' field.",
13
- "pattern": "^\\d+\\.\\d+(\\.[0-9A-Za-z-.]+)?$"
14
- },
15
- "preview": {
16
- "type": "string",
17
- "description": "Marks a file as belonging to a specific preview iteration. Recommended value for files written against this schema: 'v4.0.0-preview.1'. Absent in v3.x and in a future GA v4.0."
18
- },
19
- "created_at": {
20
- "type": "string",
21
- "description": "RFC 3339 UTC timestamp of file creation. Same contract as v3.x.",
22
- "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$",
23
- "format": "date-time"
24
- },
25
- "encrypted": {
26
- "type": "boolean",
27
- "description": "Whether the payload is AES-256-GCM encrypted. Envelope cryptography is unchanged from v3.x in this preview."
28
- },
29
- "domain": {
30
- "type": "string",
31
- "description": "Semantic category of the context. Same surface as v3.x; custom strings remain permitted."
32
- },
33
- "profile_kind": {
34
- "type": "string",
35
- "description": "Top-level discriminator for the profile shape. Common values: 'learner', 'agent', 'team', 'robot'. Custom strings are permitted."
36
- },
37
- "ciphertext": {
38
- "type": "string",
39
- "description": "AES-256-GCM ciphertext when encrypted is true. Same contract as v3.x.",
40
- "contentEncoding": "base64"
41
- },
42
- "iv": {
43
- "type": "string",
44
- "contentEncoding": "base64"
45
- },
46
- "kdf_salt": {
47
- "type": "string",
48
- "contentEncoding": "base64"
49
- },
50
- "kdf": {
51
- "type": "object",
52
- "additionalProperties": true,
53
- "description": "Structured KDF block as in envelope-v3. Unchanged in this preview."
54
- },
55
- "cipher": {
56
- "type": "object",
57
- "additionalProperties": true,
58
- "description": "Structured cipher block as in envelope-v3. Unchanged in this preview."
59
- },
60
- "media_profile": {
61
- "description": "RFC-001 (preview hook). PERMISSIVE — see schemas/klickd-payload-v4-preview.schema.json.",
62
- "type": ["object", "array", "null"],
63
- "additionalProperties": true
64
- },
65
- "verification_gates": {
66
- "description": "RFC-002 (preview hook). PERMISSIVE.",
67
- "type": ["object", "array", "null"],
68
- "additionalProperties": true
69
- },
70
- "human_veto_policy": {
71
- "description": "RFC-002 (preview hook). PERMISSIVE.",
72
- "type": ["object", "null"],
73
- "additionalProperties": true
74
- },
75
- "claim_sources": {
76
- "description": "RFC-002 (preview hook). PERMISSIVE.",
77
- "type": ["object", "null"],
78
- "additionalProperties": true
79
- },
80
- "verification_artifacts": {
81
- "description": "RFC-002 §8b.8 (preview hook). PERMISSIVE — pointer ledger, not a payload sink.",
82
- "type": ["array", "null"]
83
- },
84
- "migration": {
85
- "description": "RFC-004 (preview hook). Audit-only in v4.0.0-preview.1.",
86
- "type": ["object", "null"],
87
- "additionalProperties": true
88
- },
89
- "context_cost": {
90
- "description": "Research/benchmark track (preview hook). No normative semantics.",
91
- "type": ["object", "null"],
92
- "additionalProperties": true
93
- }
94
- }
95
- }
@@ -1,129 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://klickd.app/schema/v4/klickd.schema.json",
4
- "title": "klickd v4 — Unified (Strict GA candidate, normative)",
5
- "description": "Strict unified JSON Schema for a .klickd v4 document (envelope + optional inline payload). This schema is the GA strict equivalent of the permissive klickd-v4-preview.schema.json. It validates the envelope shape strictly (mirroring the v3 envelope contract — Argon2id + AES-256-GCM is unchanged in v4 per SPEC.md §33.10 #2) and, for unencrypted files, validates the inline payload against the strict v4 payload schema (klickd-payload-v4.schema.json). Top-level additionalProperties is TRUE to preserve unknown fields verbatim (SPEC.md §33.7 forward-compatibility invariant). Does NOT supersede the permissive preview schema (klickd-v4-preview.schema.json) — both coexist.",
6
- "type": "object",
7
- "additionalProperties": true,
8
- "required": ["klickd_version", "created_at", "encrypted"],
9
- "properties": {
10
- "klickd_version": {
11
- "type": "string",
12
- "description": "Wire / envelope version. Strict v4 GA producers SHOULD emit '4.0'. v3.x values are also accepted because the v3 envelope contract is unchanged (§33.10 #2) and a v3.x file remains readable by a v4 reader.",
13
- "pattern": "^(3|4)\\.\\d+(\\.[0-9A-Za-z-.]+)?$"
14
- },
15
- "preview": {
16
- "type": "string",
17
- "description": "OPTIONAL preview marker. Absent on GA strict files. If present, this file was written against a preview iteration (e.g. 'v4.0.0-preview.1')."
18
- },
19
- "created_at": {
20
- "type": "string",
21
- "description": "RFC 3339 UTC timestamp of file creation. Z-suffix only, no fractional seconds (matches v3 envelope strict contract).",
22
- "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
23
- },
24
- "encrypted": {
25
- "type": "boolean"
26
- },
27
- "domain": {
28
- "type": "string",
29
- "minLength": 1,
30
- "description": "Semantic category. Registered values follow v3 (education, work, finance, legal, creative, health, research, robotics, gaming, creator). Custom non-empty strings are permitted."
31
- },
32
- "profile_kind": {
33
- "type": "string",
34
- "description": "Top-level discriminator for the profile shape. Reserved canonical values: 'learner', 'agent', 'team', 'robot', 'creator'."
35
- },
36
- "domain_schema_version": {
37
- "type": "string",
38
- "pattern": "^([a-z][a-z0-9_-]*-\\d+\\.\\d+|\\d+\\.\\d+(\\.\\d+)?)$"
39
- },
40
- "kdf": {
41
- "type": "object",
42
- "description": "Structured KDF block — same contract as envelope-v3 §15.",
43
- "required": ["name", "params", "salt"],
44
- "additionalProperties": false,
45
- "properties": {
46
- "name": {"type": "string", "enum": ["argon2id", "pbkdf2-sha256"]},
47
- "params": {
48
- "oneOf": [
49
- {
50
- "type": "object",
51
- "required": ["m", "t", "p"],
52
- "additionalProperties": false,
53
- "properties": {
54
- "m": {"type": "integer", "minimum": 65536},
55
- "t": {"type": "integer", "minimum": 1},
56
- "p": {"type": "integer", "minimum": 1}
57
- }
58
- },
59
- {
60
- "type": "object",
61
- "required": ["iterations"],
62
- "additionalProperties": false,
63
- "properties": {
64
- "iterations": {"type": "integer", "minimum": 600000}
65
- }
66
- }
67
- ]
68
- },
69
- "salt": {"type": "string"}
70
- }
71
- },
72
- "cipher": {
73
- "type": "object",
74
- "description": "Structured cipher block — same contract as envelope-v3 §16. v4 does not introduce a new cipher.",
75
- "required": ["name", "iv"],
76
- "additionalProperties": false,
77
- "properties": {
78
- "name": {"type": "string", "const": "AES-256-GCM"},
79
- "iv": {"type": "string"}
80
- }
81
- },
82
- "ciphertext": {
83
- "type": "string",
84
- "description": "AES-256-GCM ciphertext (base64 padded). Required when encrypted=true."
85
- },
86
- "iv": {
87
- "type": "string",
88
- "description": "Legacy top-level IV mirror, retained for v3.0 round-trip parity. New producers SHOULD place IV inside the structured cipher block."
89
- },
90
- "kdf_salt": {
91
- "type": "string",
92
- "description": "Legacy top-level salt mirror, retained for v3.0 round-trip parity."
93
- },
94
- "payload_schema_version": {
95
- "type": "string",
96
- "description": "Payload schema version when the payload is inline (encrypted=false). Strict v4 GA value: '4.0'. Preview '4.0.0-preview.1' accepted for round-trip.",
97
- "enum": ["4.0", "4.0.0-preview.1"]
98
- },
99
- "media_profile": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/media_profile"},
100
- "verification_gates": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/verification_gates"},
101
- "human_veto_policy": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/human_veto_policy"},
102
- "claim_sources": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/claim_sources"},
103
- "verification_artifacts": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/verification_artifacts"},
104
- "contract_tests": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/contract_tests"},
105
- "success_criteria": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/success_criteria"},
106
- "reversibility": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/reversibility"},
107
- "blast_radius": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/blast_radius"},
108
- "risk_thresholds": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/risk_thresholds"},
109
- "preflight_checks": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/preflight_checks"},
110
- "error_journal": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/error_journal"},
111
- "migration": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/migration"},
112
- "context_cost": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/context_cost"},
113
- "gaming_profile": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/gaming_profile"},
114
- "deprecated_fields": {"$ref": "https://klickd.app/schemas/v4/klickd-payload.schema.json#/properties/deprecated_fields"}
115
- },
116
- "allOf": [
117
- {
118
- "if": {
119
- "type": "object",
120
- "properties": {"encrypted": {"const": true}},
121
- "required": ["encrypted"]
122
- },
123
- "then": {
124
- "required": ["kdf", "cipher", "ciphertext"],
125
- "description": "Encrypted v4 file MUST carry kdf + cipher + ciphertext (envelope-v3 contract retained)."
126
- }
127
- }
128
- ]
129
- }