@aikdna/kdna-core 0.12.2 → 0.12.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/README.md +19 -13
- package/package.json +3 -3
- package/src/types.d.ts +1 -0
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @aikdna/kdna-core
|
|
2
2
|
|
|
3
|
-
Core library for
|
|
3
|
+
Core library for local `.kdna` judgment assets.
|
|
4
4
|
|
|
5
|
-
KDNA Core v1 defines the
|
|
6
|
-
|
|
7
|
-
runtimes.
|
|
5
|
+
KDNA Core v1 defines the `.kdna` file format, schemas, secure container
|
|
6
|
+
reader, LoadPlan contract, and runtime projection helpers used by the CLI,
|
|
7
|
+
Studio export, skills, MCP integrations, and downstream agent runtimes.
|
|
8
8
|
|
|
9
9
|
## Installation
|
|
10
10
|
|
|
@@ -26,9 +26,10 @@ Use the `./v1` entrypoint for current KDNA Core v1 tooling:
|
|
|
26
26
|
const {
|
|
27
27
|
inspect,
|
|
28
28
|
validate,
|
|
29
|
+
planLoad,
|
|
30
|
+
loadAuthorized,
|
|
29
31
|
pack,
|
|
30
32
|
unpack,
|
|
31
|
-
loadV1,
|
|
32
33
|
buildChecksumsV1
|
|
33
34
|
} = require('@aikdna/kdna-core/v1');
|
|
34
35
|
|
|
@@ -37,7 +38,12 @@ if (!validation.overall_valid) {
|
|
|
37
38
|
throw new Error(validation.problems.join('\n'));
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
const
|
|
41
|
+
const plan = planLoad('./asset.kdna');
|
|
42
|
+
if (plan.can_load_now !== true) {
|
|
43
|
+
throw new Error(`Asset is not loadable yet: ${plan.required_action}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const compact = loadAuthorized('./asset.kdna', {
|
|
41
47
|
profile: 'compact',
|
|
42
48
|
as: 'prompt'
|
|
43
49
|
});
|
|
@@ -50,7 +56,8 @@ v1 source directory
|
|
|
50
56
|
→ buildChecksumsV1
|
|
51
57
|
→ pack
|
|
52
58
|
→ validate
|
|
53
|
-
→
|
|
59
|
+
→ planLoad
|
|
60
|
+
→ loadAuthorized
|
|
54
61
|
→ agent/runtime context
|
|
55
62
|
```
|
|
56
63
|
|
|
@@ -75,7 +82,7 @@ A v1 `.kdna` container is a zip package of the same files. `validate()` checks:
|
|
|
75
82
|
|
|
76
83
|
## Load Profiles
|
|
77
84
|
|
|
78
|
-
`
|
|
85
|
+
`loadAuthorized()` supports:
|
|
79
86
|
|
|
80
87
|
- `index`
|
|
81
88
|
- `compact`
|
|
@@ -89,15 +96,14 @@ Output formats:
|
|
|
89
96
|
|
|
90
97
|
## Boundary
|
|
91
98
|
|
|
92
|
-
KDNA Core v1 is content-neutral. It
|
|
93
|
-
|
|
94
|
-
encryption, licensing, and entitlement work is gated outside the current v1
|
|
95
|
-
baseline.
|
|
99
|
+
KDNA Core v1 is content-neutral. It validates file structure and loadability;
|
|
100
|
+
it does not rank judgment quality or endorse specific assets.
|
|
96
101
|
|
|
97
102
|
## Legacy API
|
|
98
103
|
|
|
99
104
|
The package root still exports compatibility APIs for older KDNA paths. New
|
|
100
|
-
tooling should prefer `@aikdna/kdna-core/v1
|
|
105
|
+
tooling should prefer `@aikdna/kdna-core/v1` and the `planLoad` /
|
|
106
|
+
`loadAuthorized` path.
|
|
101
107
|
|
|
102
108
|
## License
|
|
103
109
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikdna/kdna-core",
|
|
3
|
-
"version": "0.12.
|
|
4
|
-
"description": "KDNA
|
|
3
|
+
"version": "0.12.3",
|
|
4
|
+
"description": "KDNA Core library for validating, planning, and loading local .kdna judgment assets.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "src/index.js",
|
|
7
7
|
"module": "src/index.mjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"kdna",
|
|
36
36
|
"kdna-core",
|
|
37
37
|
"ai-agent",
|
|
38
|
-
"
|
|
38
|
+
"judgment-assets"
|
|
39
39
|
],
|
|
40
40
|
"license": "Apache-2.0",
|
|
41
41
|
"repository": {
|
package/src/types.d.ts
CHANGED
|
@@ -560,6 +560,7 @@ export function planLoad(inputPath: string, options?: { password?: string; hasPa
|
|
|
560
560
|
export function buildChecksumsV1(sourceDir: string): KDNAV1Checksums;
|
|
561
561
|
export function pack(sourceDir: string, outputPath: string): void;
|
|
562
562
|
export function unpack(inputPath: string, outputDir: string): void;
|
|
563
|
+
export function loadAuthorized(inputPath: string, options?: { profile?: 'index' | 'compact' | 'scenario' | 'full' | string; as?: 'json' | 'prompt' | string }): Record<string, any>;
|
|
563
564
|
export function loadV1(inputPath: string, options?: { profile?: 'index' | 'compact' | 'scenario' | 'full' | string; as?: 'json' | 'prompt' | string }): Record<string, any>;
|
|
564
565
|
export const FORBIDDEN_OUTPUT_TERMS: readonly string[];
|
|
565
566
|
|