@aikdna/kdna-studio-core 1.5.1 → 1.5.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aikdna/kdna-studio-core",
3
- "version": "1.5.1",
4
- "description": "Studio-compatible authoring kernel for Human Lock, compile, and export of trusted .kdna assets.",
3
+ "version": "1.5.3",
4
+ "description": "Official KDNA Studio Core SDK for authoring, locking, compiling, and exporting .kdna judgment assets through the KDNA toolchain.",
5
5
  "type": "commonjs",
6
6
  "main": "src/index.js",
7
7
  "files": [
@@ -24,7 +24,7 @@
24
24
  "validate"
25
25
  ],
26
26
  "dependencies": {
27
- "@aikdna/kdna-core": "^0.9.1",
27
+ "@aikdna/kdna-core": "^0.11.1",
28
28
  "cbor-x": "^1.6.4"
29
29
  },
30
30
  "engines": {
@@ -36,6 +36,6 @@
36
36
  "test:all": "npm run lint && npm test"
37
37
  },
38
38
  "devDependencies": {
39
- "@aikdna/kdna-cli": "^0.19.3"
39
+ "@aikdna/kdna-cli": "^0.25.0"
40
40
  }
41
41
  }
@@ -472,7 +472,14 @@ function compileDomain(project, options = {}) {
472
472
  throw err;
473
473
  }
474
474
 
475
- const files = {};
475
+ const files = {
476
+ 'KDNA_Core.json': JSON.stringify(core, null, 2),
477
+ 'KDNA_Patterns.json': JSON.stringify(patterns, null, 2),
478
+ };
479
+ if (scenarios) files['KDNA_Scenarios.json'] = JSON.stringify(scenarios, null, 2);
480
+ if (cases) files['KDNA_Cases.json'] = JSON.stringify(cases, null, 2);
481
+ if (reasoning) files['KDNA_Reasoning.json'] = JSON.stringify(reasoning, null, 2);
482
+ if (evolution) files['KDNA_Evolution.json'] = JSON.stringify(evolution, null, 2);
476
483
 
477
484
  // Encode judgment as CBOR payload
478
485
  const payload = {
@@ -10,6 +10,7 @@
10
10
 
11
11
  const crypto = require('crypto');
12
12
  const projectSchema = require('../../schemas/studio.project.schema.json');
13
+ const { CARD_TYPES } = require('../cards');
13
14
  const { JUDGMENT_CARD_TYPES, cardJudgmentFingerprint } = require('../judgment-fields');
14
15
 
15
16
  function createProject(name, type = 'domain', options = {}) {
@@ -152,8 +153,7 @@ function validateProject(project) {
152
153
  if (!(req in card)) issues.push('cards[' + i + ']: missing required field "' + req + '"');
153
154
  }
154
155
  if (card.type !== undefined) {
155
- const validTypes = ['axiom', 'ontology', 'misunderstanding', 'boundary', 'self_check', 'risk', 'aesthetic', 'scenario', 'case'];
156
- if (!validTypes.includes(card.type)) issues.push('cards[' + i + ']: invalid type "' + card.type + '"');
156
+ if (!CARD_TYPES.includes(card.type)) issues.push('cards[' + i + ']: invalid type "' + card.type + '"');
157
157
  }
158
158
  if (card.status !== undefined) {
159
159
  const validStates = ['draft', 'revised', 'locked', 'tested', 'published', 'deprecated'];