@aikdna/kdna-core 0.9.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aikdna/kdna-core",
3
- "version": "0.9.0",
4
- "description": "KDNA core library — pure logic for loading, validating, linting, and rendering KDNA domain cognition packages. Zero Node.js dependencies.",
3
+ "version": "0.9.1",
4
+ "description": "KDNA core library — load, validate, lint, and render KDNA domain judgment assets. Supports KDNA Container format (payload.kdnab via CBOR).",
5
5
  "type": "commonjs",
6
6
  "main": "src/index.js",
7
7
  "module": "src/index.mjs",
@@ -10,6 +10,24 @@ const { loadDomainFromFiles, formatContext } = require('./loader');
10
10
 
11
11
  const KDNA_MEDIA_TYPE = 'application/vnd.aikdna.kdna+zip';
12
12
 
13
+ // Standard KDNA domain data entries — kept in lockstep with loader.FILE_MAP.
14
+ // Asset reader pre-loads these so callers don't have to enumerate entry names.
15
+ // NOTE: kdna.json / manifest.json are read separately via readManifest(); do not
16
+ // add them here. KDNA_Cluster is intentionally omitted — its schema exists but
17
+ // is not yet wired into the loader contract.
18
+ const STANDARD_ENTRIES = Object.freeze([
19
+ 'KDNA_Core.json',
20
+ 'KDNA_Patterns.json',
21
+ 'KDNA_Scenarios.json',
22
+ 'KDNA_Cases.json',
23
+ 'KDNA_Reasoning.json',
24
+ 'KDNA_Evolution.json',
25
+ ]);
26
+
27
+ // Matches any entry that holds JSON content (used to canonicalize the entry
28
+ // before hashing/signing so digests are stable across re-serialization).
29
+ const JSON_ENTRY_RE = /\.json$/i;
30
+
13
31
  function sha256Hex(buf) {
14
32
  return crypto.createHash('sha256').update(buf).digest('hex');
15
33
  }
package/src/lint-pure.js CHANGED
@@ -258,7 +258,7 @@ function lintDomain(dataMap) {
258
258
  */
259
259
  const VALID_STATUS = new Set(['draft', 'experimental', 'stable', 'deprecated', 'staging']);
260
260
  const VALID_BADGE = new Set(['untested', 'tested', 'validated', 'expert_reviewed', 'production_ready']);
261
- const VALID_ACCESS = new Set(['open', 'licensed', 'runtime']);
261
+ const VALID_ACCESS = new Set(['public', 'licensed', 'remote']);
262
262
  const VALID_RISK = new Set(['R0', 'R1', 'R2', 'R3']);
263
263
  const VALID_I18N = new Set(['L0', 'L1', 'L2', 'L3']);
264
264
  const VALID_PRIVACY = new Set(['public', 'private', 'sensitive', 'regulated']);
package/src/types.d.ts CHANGED
@@ -211,7 +211,7 @@ export interface KDNAManifest {
211
211
  judgment_version: string;
212
212
  status: 'draft' | 'experimental' | 'stable' | 'deprecated' | 'staging';
213
213
  quality_badge: 'untested' | 'tested' | 'validated' | 'expert_reviewed' | 'production_ready';
214
- access: 'open' | 'licensed' | 'runtime';
214
+ access: 'public' | 'licensed' | 'remote';
215
215
  language?: string;
216
216
  default_language: string;
217
217
  languages: string[];
@@ -25,7 +25,7 @@ const WORK_PACK_SCHEMA = {
25
25
  version: { type: 'string', pattern: '^\\d+\\.\\d+\\.\\d+(-[a-zA-Z0-9.]+)?(\\+[a-zA-Z0-9.]+)?$' },
26
26
  description: { type: 'string', maxLength: 280 },
27
27
  status: { type: 'string', enum: ['draft', 'experimental', 'stable', 'deprecated'] },
28
- access: { type: 'string', enum: ['open', 'licensed', 'runtime', 'enterprise', 'partner'], default: 'open' },
28
+ access: { type: 'string', enum: ['public', 'licensed', 'remote', 'enterprise', 'partner'], default: 'public' },
29
29
  license: { type: 'string', default: 'Apache-2.0' },
30
30
  kdna: {
31
31
  type: 'object',
@@ -179,7 +179,7 @@ function inspectWorkPack(manifest, rootDir) {
179
179
  version: manifest.version,
180
180
  description: manifest.description,
181
181
  status: manifest.status,
182
- access: manifest.access || 'open',
182
+ access: manifest.access || 'public',
183
183
  license: manifest.license || 'Apache-2.0',
184
184
  format_version: manifest.format_version,
185
185
  kdna: {