@aikdna/kdna-cli 0.25.0 → 0.26.0
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 +95 -174
- package/package.json +2 -2
- package/src/cli.js +36 -1
- package/src/publish.js +2 -2
- package/templates/standard-domain/USAGE.md +4 -7
package/README.md
CHANGED
|
@@ -2,203 +2,123 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.npmjs.com/package/@aikdna/kdna-cli) [](https://github.com/aikdna/kdna-cli/actions/workflows/ci.yml) [](LICENSE)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The official command-line runtime for KDNA Core v1 judgment assets.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
KDNA CLI inspects, validates, packs, unpacks, and loads `.kdna` files. It is
|
|
8
|
+
the consumer/runtime side of the official KDNA toolchain. Formal authoring is
|
|
9
|
+
handled by KDNA Studio CLI and Studio Core.
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
KDNA Core v1 does not require a public registry, marketplace, quality badge, or
|
|
12
|
+
signature system. The current first-run path uses local `.kdna` files.
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
The CLI is how a `.kdna` judgment asset becomes usable by agents. It inspects, validates, packs, unpacks, and loads KDNA assets, and records traces for audit.
|
|
16
|
-
|
|
17
|
-
KDNA CLI 让一个领域判断资产真正被 Agent 使用。它负责安装 KDNA、验证结构与信任信息、把 KDNA 转换成 Agent 可加载的形式、对比加载前后的判断路径,并记录可审计的使用痕迹。
|
|
18
|
-
|
|
19
|
-
A `.kdna` asset is not created by writing JSON files. It is compiled by a
|
|
20
|
-
Studio-compatible authoring pipeline that performs human confirmation,
|
|
21
|
-
validation, canonicalization, identity generation, digest computation, signing,
|
|
22
|
-
optional encryption, and provenance recording. kdna-cli verifies and publishes
|
|
23
|
-
existing assets; it does not author trusted KDNA.
|
|
24
|
-
|
|
25
|
-
Part of the [KDNA](https://github.com/aikdna/kdna) ecosystem.
|
|
14
|
+
Authorization and runtime-load decisions are defined in `aikdna/kdna`, not in
|
|
15
|
+
this repository. `kdna plan-load` is the CLI diagnostic surface for that
|
|
16
|
+
contract and MUST call the LoadPlan API from `@aikdna/kdna-core` instead of
|
|
17
|
+
deriving authorization state directly from manifest fields.
|
|
26
18
|
|
|
27
19
|
## Install
|
|
28
20
|
|
|
29
21
|
```bash
|
|
30
22
|
npm install -g @aikdna/kdna-cli
|
|
31
|
-
kdna setup
|
|
32
23
|
```
|
|
33
24
|
|
|
34
|
-
##
|
|
25
|
+
## 5-Minute Path
|
|
35
26
|
|
|
36
27
|
```bash
|
|
37
|
-
|
|
38
|
-
kdna
|
|
39
|
-
kdna
|
|
40
|
-
kdna
|
|
41
|
-
kdna
|
|
42
|
-
kdna
|
|
28
|
+
kdna demo minimal ./minimal
|
|
29
|
+
kdna inspect ./minimal
|
|
30
|
+
kdna validate ./minimal
|
|
31
|
+
kdna plan-load ./minimal --json
|
|
32
|
+
kdna pack ./minimal ./minimal.kdna
|
|
33
|
+
kdna validate ./minimal.kdna
|
|
34
|
+
kdna load ./minimal.kdna --profile=compact --as=prompt
|
|
43
35
|
```
|
|
44
36
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### Dev Source Utilities
|
|
59
|
-
|
|
60
|
-
| Command | Status | Description |
|
|
61
|
-
| ---------------------------------- | ------------ | --------------------------------------------------------------------------- |
|
|
62
|
-
| `kdna init <name>` | Deprecated | Alias for `kdna dev scaffold`; creates a non-canonical dev source workspace |
|
|
63
|
-
| `kdna dev scaffold <name>` | Beta | Scaffold a non-canonical dev source workspace |
|
|
64
|
-
| `kdna dev validate <path>` | Stable | Validate a non-canonical dev source directory |
|
|
65
|
-
| `kdna dev pack <path>` | Beta | Build a dev-only non-trusted `.kdna` bundle |
|
|
66
|
-
| `kdna dev unpack <file>` | Beta | Unpack .kdna into a dev source directory |
|
|
67
|
-
| `kdna dev inspect <path>` | Beta | Inspect a non-canonical dev source directory |
|
|
68
|
-
| `kdna dev card <path>` | Beta | Display KDNA Card from a dev source directory |
|
|
69
|
-
| `kdna inspect <file.kdna>` | Beta | Inspect a .kdna asset |
|
|
70
|
-
| `kdna publish <file.kdna>` | Experimental | Publish an existing Studio-compiled `.kdna` asset |
|
|
71
|
-
| `kdna publish --check <path>` | Experimental | Dev source readiness check only; does not publish |
|
|
72
|
-
| `kdna version bump <level> [path]` | Beta | Bump domain version |
|
|
73
|
-
|
|
74
|
-
### Agent Runtime
|
|
75
|
-
|
|
76
|
-
| Command | Status | Description |
|
|
77
|
-
| ------------------------------------------------------ | ------ | --------------------------------------- |
|
|
78
|
-
| `kdna available [--json]` | Beta | List installed domains with v2.1 fields |
|
|
79
|
-
| `kdna match "<task>" [--json]` | Beta | Signal matching — find relevant domains |
|
|
80
|
-
| `kdna load <name\|file.kdna> [--as=prompt\|json\|raw]` | Beta | Emit asset in agent-ready format |
|
|
81
|
-
| `kdna postvalidate <name> --output <file>` | Beta | Post-generation judgment check |
|
|
82
|
-
|
|
83
|
-
### Testing & Verification
|
|
84
|
-
|
|
85
|
-
| Command | Status | Description |
|
|
86
|
-
| ------------------------------------------------------------ | ------ | ------------------------------------- |
|
|
87
|
-
| `kdna verify <name\|file.kdna>` | Beta | 3-layer: structure + trust + judgment |
|
|
88
|
-
| `kdna compare <name\|file.kdna> --input "..."` | Beta | With/without KDNA reasoning diff |
|
|
89
|
-
| `kdna compare <name\|file.kdna> --input "..." --report-md` | Beta | Markdown report with scoring |
|
|
90
|
-
| `kdna compare <name\|file.kdna> --input "..." --report-json` | Beta | JSON report with scoring |
|
|
91
|
-
| `kdna diff <name>@<v1> <name>@<v2>` | Beta | Judgment-level diff between versions |
|
|
92
|
-
|
|
93
|
-
### Diagnostics & Trace
|
|
94
|
-
|
|
95
|
-
| Command | Status | Description |
|
|
96
|
-
| --------------------------------- | ------------ | ------------------------------------------------------------- |
|
|
97
|
-
| `kdna doctor` | Beta | System health check |
|
|
98
|
-
| `kdna doctor --agents` | Beta | Agent integration check (Codex/Claude/OpenCode/Cursor/Gemini) |
|
|
99
|
-
| `kdna doctor --json` | Beta | Machine-readable health report |
|
|
100
|
-
| `kdna trace` | Experimental | View recent load/postvalidate traces |
|
|
101
|
-
| `kdna trace --json` | Experimental | Machine-readable trace output |
|
|
102
|
-
| `kdna trace --export <file>` | Experimental | Export traces for audit |
|
|
103
|
-
| `kdna trace --since 7d\|30d\|90d` | Experimental | Filter by time range |
|
|
104
|
-
| `kdna history` | Experimental | Recent domain usage (last 20) |
|
|
105
|
-
| `kdna history --stats` | Experimental | Aggregate by domain and agent |
|
|
106
|
-
| `kdna history --domain <name>` | Experimental | Filter by domain |
|
|
107
|
-
|
|
108
|
-
### License & Authorization
|
|
109
|
-
|
|
110
|
-
Licensed asset loading (`kdna install`, `kdna load`, `kdna verify`) requires a
|
|
111
|
-
valid local activation. Full RFC-0008 conformance across JS Core, Swift Core,
|
|
112
|
-
and CLI is tracked via cross-language test vectors in the
|
|
113
|
-
[kdna](https://github.com/aikdna/kdna) conformance suite.
|
|
114
|
-
|
|
115
|
-
| Command | Status | Description |
|
|
116
|
-
| ----------------------------------------------------------- | ------------ | -------------------------------------------------------------- |
|
|
117
|
-
| `kdna license generate <domain> --to <email>` | Experimental | Generate signed license |
|
|
118
|
-
| `kdna license install <license.json>` | Experimental | Register license for auto-decrypt |
|
|
119
|
-
| `kdna license activate <domain> --key <key> --server <url>` | Experimental | Activate a license from entitlement source |
|
|
120
|
-
| `kdna license sync [domain] [--server <url>]` | Experimental | Refresh entitlement and revocation status |
|
|
121
|
-
| `kdna license verify <license.json>` | Experimental | Verify license signature and validity |
|
|
122
|
-
| `kdna license bind <license.json>` | Experimental | Bind license to this machine |
|
|
123
|
-
| `kdna license show <license.json>` | Experimental | Display license details |
|
|
124
|
-
| `kdna license status [domain] [--json]` | Experimental | Show installed license activation status without exposing keys |
|
|
125
|
-
|
|
126
|
-
### Cluster Composition
|
|
127
|
-
|
|
128
|
-
| Command | Status | Description |
|
|
129
|
-
| -------------------------- | ------- | ------------------------- |
|
|
130
|
-
| `kdna cluster lint <path>` | Planned | Validate cluster manifest |
|
|
131
|
-
|
|
132
|
-
### Registry & Distribution
|
|
133
|
-
|
|
134
|
-
| Command | Status | Description |
|
|
135
|
-
| ------------------------- | ------ | ------------------------------------- |
|
|
136
|
-
| `kdna install <name>` | Beta | Install domain from registry |
|
|
137
|
-
| `kdna install file.kdna` | Beta | Install from local .kdna asset |
|
|
138
|
-
| `kdna remove <name>` | Beta | Uninstall a domain |
|
|
139
|
-
| `kdna update <name>` | Beta | Update installed domain |
|
|
140
|
-
| `kdna info <name>` | Beta | Show domain metadata and trust status |
|
|
141
|
-
| `kdna list [--available]` | Beta | List installed or available domains |
|
|
142
|
-
| `kdna search <keyword>` | Beta | Search registry |
|
|
143
|
-
| `kdna registry refresh` | Beta | Refresh registry cache |
|
|
144
|
-
|
|
145
|
-
### Identity & Signing
|
|
146
|
-
|
|
147
|
-
| Command | Status | Description |
|
|
148
|
-
| ------------------------------ | ------------ | ------------------------------- |
|
|
149
|
-
| `kdna identity init` | Experimental | Generate Ed25519 signing key |
|
|
150
|
-
| `kdna identity show` | Experimental | Display public key and buyer ID |
|
|
151
|
-
| `kdna identity export [--out]` | Experimental | Backup private key (encrypted) |
|
|
152
|
-
| `kdna identity import <file>` | Experimental | Restore identity from backup |
|
|
153
|
-
|
|
154
|
-
### Setup
|
|
155
|
-
|
|
156
|
-
| Command | Status | Description |
|
|
157
|
-
| ------------ | ------ | ------------------------------------------ |
|
|
158
|
-
| `kdna setup` | Beta | One-command setup: CLI + skill + data root |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## SPEC Compatibility
|
|
163
|
-
|
|
164
|
-
KDNA CLI follows the canonical KDNA Container format defined in [`aikdna/kdna`](https://github.com/aikdna/kdna).
|
|
165
|
-
|
|
166
|
-
A valid KDNA asset is a `.kdna` container with:
|
|
167
|
-
- `kdna.json` — public manifest and metadata (no judgment content)
|
|
168
|
-
- `payload.kdnab` — CBOR-encoded judgment payload
|
|
169
|
-
- `signature.kdsig` — Ed25519 signature
|
|
37
|
+
Successful validation returns:
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"format_valid": true,
|
|
42
|
+
"schema_valid": true,
|
|
43
|
+
"payload_valid": true,
|
|
44
|
+
"checksums_valid": true,
|
|
45
|
+
"load_contract_valid": true,
|
|
46
|
+
"overall_valid": true,
|
|
47
|
+
"problems": []
|
|
48
|
+
}
|
|
49
|
+
```
|
|
170
50
|
|
|
171
|
-
|
|
51
|
+
## Core Commands
|
|
172
52
|
|
|
173
|
-
|
|
53
|
+
| Command | Purpose |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `kdna demo minimal <dir>` | Create a minimal v1 source directory |
|
|
56
|
+
| `kdna inspect <path>` | Inspect a v1 source dir or `.kdna` container |
|
|
57
|
+
| `kdna validate <path>` | Validate format, schema, payload, checksums, and load contract |
|
|
58
|
+
| `kdna plan-load <path> --json` | Return the Core LoadPlan before runtime load |
|
|
59
|
+
| `kdna plan-load <path> --json --has-password` | Diagnose password-authorized load state |
|
|
60
|
+
| `kdna plan-load <path> --json --entitlement-status active` | Diagnose receipt/entitlement load state |
|
|
61
|
+
| `kdna pack <source-dir> <output.kdna>` | Pack a v1 source directory |
|
|
62
|
+
| `kdna unpack <input.kdna> <output-dir>` | Unpack a v1 container |
|
|
63
|
+
| `kdna load <path> --profile=<index|compact|scenario|full> --as=<json|prompt>` | Render judgment context for agents or tools |
|
|
64
|
+
| `kdna setup` | Install the `kdna-loader` skill for supported agents |
|
|
65
|
+
| `kdna doctor --agents` | Check agent loader installation |
|
|
174
66
|
|
|
175
|
-
|
|
67
|
+
## Producer Path
|
|
176
68
|
|
|
177
|
-
|
|
69
|
+
Use Studio CLI to create formal v1 `.kdna` assets:
|
|
178
70
|
|
|
179
|
-
|
|
71
|
+
```bash
|
|
72
|
+
npm install -g @aikdna/kdna-studio-cli
|
|
73
|
+
kdna-studio create my_domain --name @yourscope/my_domain
|
|
74
|
+
kdna-studio migrate ./my_domain --format v1 --out ./my_domain.kdna
|
|
75
|
+
kdna validate ./my_domain.kdna
|
|
76
|
+
kdna load ./my_domain.kdna --profile=compact --as=prompt
|
|
77
|
+
```
|
|
180
78
|
|
|
181
|
-
|
|
79
|
+
## Legacy Compatibility
|
|
182
80
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
81
|
+
Older CLI commands for registry install, compare, trace, licensing, identity, or
|
|
82
|
+
pre-v1 dev source workflows may still exist for backward compatibility. They
|
|
83
|
+
are not the KDNA Core v1 launch path.
|
|
84
|
+
|
|
85
|
+
New integrations should use the v1 Core route:
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
source or Studio project
|
|
89
|
+
→ v1 .kdna container
|
|
90
|
+
→ kdna validate
|
|
91
|
+
→ kdna plan-load
|
|
92
|
+
→ kdna load
|
|
93
|
+
→ agent/runtime context
|
|
188
94
|
```
|
|
189
95
|
|
|
190
|
-
|
|
96
|
+
## Runtime Authorization Contract
|
|
97
|
+
|
|
98
|
+
The source of truth is `aikdna/kdna`:
|
|
191
99
|
|
|
192
|
-
|
|
100
|
+
- `specs/kdna-authorization-contract.md`
|
|
101
|
+
- `schema/load-plan.schema.json`
|
|
102
|
+
- `conformance/authorization/cases.json`
|
|
103
|
+
- `conformance/authorization/goldens/*.loadplan.json`
|
|
193
104
|
|
|
194
|
-
|
|
105
|
+
This CLI is a diagnostic control plane. It may display, validate, and transport
|
|
106
|
+
LoadPlan results, but it must not define access modes, entitlement profiles,
|
|
107
|
+
issue codes, crypto profiles, or fail-closed policy independently.
|
|
108
|
+
|
|
109
|
+
Current local authorization path:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
kdna validate ./asset.kdna --json
|
|
113
|
+
kdna plan-load ./asset.kdna --json
|
|
114
|
+
kdna plan-load ./asset.kdna --json --has-password
|
|
115
|
+
kdna plan-load ./asset.kdna --json --entitlement-status active
|
|
116
|
+
kdna load ./asset.kdna --profile=compact --as=prompt
|
|
117
|
+
```
|
|
195
118
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
| Core Library | @aikdna/kdna-core | Official loader SDK |
|
|
200
|
-
| Runtime | @aikdna/kdna-cli | Official CLI: inspect, validate, pack, unpack, load |
|
|
201
|
-
| Authoring | KDNA Studio Core | Official authoring kernel |
|
|
119
|
+
`plan-load` requires a version of `@aikdna/kdna-core` that exports the LoadPlan
|
|
120
|
+
v1 API. Until that dependency is released and installed, the command fails with
|
|
121
|
+
a version-gate error instead of falling back to duplicated CLI-side parsing.
|
|
202
122
|
|
|
203
123
|
## Development
|
|
204
124
|
|
|
@@ -211,9 +131,10 @@ npm test
|
|
|
211
131
|
|
|
212
132
|
## Related
|
|
213
133
|
|
|
214
|
-
- [
|
|
215
|
-
- [KDNA
|
|
216
|
-
- [
|
|
134
|
+
- [KDNA Core](https://github.com/aikdna/kdna/tree/main/packages/kdna-core)
|
|
135
|
+
- [KDNA Studio CLI](https://github.com/aikdna/kdna-studio-cli)
|
|
136
|
+
- [KDNA Skills](https://github.com/aikdna/kdna-skills)
|
|
137
|
+
- [aikdna.com](https://aikdna.com)
|
|
217
138
|
|
|
218
139
|
## License
|
|
219
140
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aikdna/kdna-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "KDNA CLI — runtime control plane for verifying, installing, loading, comparing, publishing, and auditing existing .kdna assets.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"bin": {
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"node": ">=18"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@aikdna/kdna-core": "^0.
|
|
58
|
+
"@aikdna/kdna-core": "^0.12.0"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
61
|
"ajv": "^8.20.0",
|
package/src/cli.js
CHANGED
|
@@ -61,6 +61,10 @@ if (!args.length || args[0] === '--help' || args[0] === '-h') {
|
|
|
61
61
|
showHelp();
|
|
62
62
|
process.exit(0);
|
|
63
63
|
}
|
|
64
|
+
if (args[0] === '--version' || args[0] === '-v') {
|
|
65
|
+
console.log(require('../package.json').version);
|
|
66
|
+
process.exit(0);
|
|
67
|
+
}
|
|
64
68
|
if (args[0] === 'help') {
|
|
65
69
|
const sub = args[1];
|
|
66
70
|
if (sub === 'advanced' || sub === 'legacy') {
|
|
@@ -85,6 +89,8 @@ Start here:
|
|
|
85
89
|
Core v1:
|
|
86
90
|
inspect <path> Inspect v1 source dir or .kdna container
|
|
87
91
|
validate <path> Validate v1 source dir or .kdna container
|
|
92
|
+
plan-load <path> Return a LoadPlan before runtime load
|
|
93
|
+
Add --has-password or --entitlement-status for diagnostics
|
|
88
94
|
pack <src> <out> Deterministic pack into .kdna container
|
|
89
95
|
unpack <in> <out> Extract .kdna container
|
|
90
96
|
|
|
@@ -105,6 +111,8 @@ function showHelpAdvanced() {
|
|
|
105
111
|
Core v1:
|
|
106
112
|
inspect <path> Inspect v1 source dir or .kdna container
|
|
107
113
|
validate <path> Validate v1 source dir or .kdna container
|
|
114
|
+
plan-load <path> [--has-password] [--entitlement-status <status>]
|
|
115
|
+
Return a LoadPlan before runtime load
|
|
108
116
|
pack <src> <out> Deterministic pack into .kdna container
|
|
109
117
|
unpack <in> <out> Extract .kdna container
|
|
110
118
|
demo minimal <dir> [--force] Create a minimal v1 fixture
|
|
@@ -138,7 +146,7 @@ function showHelpLegacy() {
|
|
|
138
146
|
Not part of the current KDNA Core v1 first-run path. Preserved for
|
|
139
147
|
backward compatibility. These commands may change or be removed.
|
|
140
148
|
|
|
141
|
-
Registry (legacy —
|
|
149
|
+
Registry (legacy compatibility — not a Core v1 public path):
|
|
142
150
|
install <name> Install domain from legacy registry
|
|
143
151
|
remove <name> Uninstall a domain
|
|
144
152
|
update <name> Update installed domain
|
|
@@ -267,6 +275,33 @@ switch (cmd) {
|
|
|
267
275
|
);
|
|
268
276
|
break;
|
|
269
277
|
}
|
|
278
|
+
case 'plan-load': {
|
|
279
|
+
const v1Target = args.filter((a) => !a.startsWith('--'))[1];
|
|
280
|
+
if (!v1Target) error('Usage: kdna plan-load <path> [--json] [--has-password] [--entitlement-status <status>]', EXIT.INPUT_ERROR);
|
|
281
|
+
const core = require('@aikdna/kdna-core');
|
|
282
|
+
const abs = require('node:path').resolve(v1Target);
|
|
283
|
+
if (!(core.isV1SourceDir(abs) || core.detectContainerFormat(abs) === 'v1')) {
|
|
284
|
+
error('plan-load requires a KDNA Core v1 source dir or .kdna container', EXIT.INPUT_ERROR);
|
|
285
|
+
}
|
|
286
|
+
if (typeof core.planLoad !== 'function') {
|
|
287
|
+
error(
|
|
288
|
+
'kdna plan-load requires @aikdna/kdna-core with the LoadPlan v1 API. Update @aikdna/kdna-core before enabling runtime authorization diagnostics.',
|
|
289
|
+
EXIT.PROVIDER_ERROR,
|
|
290
|
+
);
|
|
291
|
+
}
|
|
292
|
+
const entitlementStatusIndex = args.indexOf('--entitlement-status');
|
|
293
|
+
const entitlementStatus = entitlementStatusIndex >= 0 ? args[entitlementStatusIndex + 1] : null;
|
|
294
|
+
const allowedEntitlementStatuses = new Set(['active', 'expired', 'revoked', 'offline_grace']);
|
|
295
|
+
if (entitlementStatusIndex >= 0 && !allowedEntitlementStatuses.has(entitlementStatus)) {
|
|
296
|
+
error('Invalid --entitlement-status. Use active, expired, revoked, or offline_grace.', EXIT.INPUT_ERROR);
|
|
297
|
+
}
|
|
298
|
+
const plan = core.planLoad(v1Target, {
|
|
299
|
+
hasPassword: args.includes('--has-password'),
|
|
300
|
+
entitlement: entitlementStatus ? { status: entitlementStatus } : undefined,
|
|
301
|
+
});
|
|
302
|
+
console.log(JSON.stringify(plan, null, 2));
|
|
303
|
+
process.exit(plan.state === 'invalid' ? 1 : 0);
|
|
304
|
+
}
|
|
270
305
|
case 'pack': {
|
|
271
306
|
const v1Target = args.filter((a) => !a.startsWith('--'))[1];
|
|
272
307
|
if (v1Target) {
|
package/src/publish.js
CHANGED
|
@@ -689,12 +689,12 @@ function cmdPublish(assetPath, args = []) {
|
|
|
689
689
|
|
|
690
690
|
console.log('');
|
|
691
691
|
console.log('─'.repeat(60));
|
|
692
|
-
console.log('
|
|
692
|
+
console.log('Legacy registry patch (historical compatibility only):');
|
|
693
693
|
console.log('─'.repeat(60));
|
|
694
694
|
console.log(JSON.stringify(patch, null, 2));
|
|
695
695
|
console.log('');
|
|
696
696
|
console.log(
|
|
697
|
-
`Next: open a PR
|
|
697
|
+
`Next: do not open a public registry PR. Core v1 publishes local .kdna files through validate/load evidence, not a central registry.`,
|
|
698
698
|
);
|
|
699
699
|
}
|
|
700
700
|
|
|
@@ -43,18 +43,15 @@ kdna identity init
|
|
|
43
43
|
# 6. Verify quality
|
|
44
44
|
kdna verify ./.
|
|
45
45
|
|
|
46
|
-
# 7.
|
|
46
|
+
# 7. Export and verify the local v1 asset
|
|
47
47
|
KDNA_IDENTITY_DIR=~/.kdna/identity-official \
|
|
48
|
-
|
|
49
|
-
kdna publish ./dist/your-domain.kdna \
|
|
50
|
-
--release-tag v0.1.0 \
|
|
51
|
-
--repo yourname/kdna-<your_domain_id>
|
|
48
|
+
kdna validate ./dist/your-domain.kdna
|
|
52
49
|
|
|
53
|
-
|
|
50
|
+
kdna load ./dist/your-domain.kdna --profile=compact --as=prompt
|
|
54
51
|
```
|
|
55
52
|
|
|
56
53
|
## Standard vs minimal-domain
|
|
57
54
|
|
|
58
55
|
`minimal-domain/` is the **bare-minimum** template — 2 files, no v2.1 fields, no evals. Use it only for fast experimentation or learning.
|
|
59
56
|
|
|
60
|
-
`standard-domain/` is the
|
|
57
|
+
`standard-domain/` is the richer authoring template for domains that need evidence, limitations, and repeatable validation. Core v1 distribution is local `.kdna` export plus `kdna validate` / `kdna load` evidence, not a central registry submission.
|