@kontextmind/kxm 0.7.22 → 0.7.24
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/.claude-plugin/marketplace.json +1 -1
- package/package.json +1 -1
- package/plugins/kxm/.claude-plugin/plugin.json +1 -1
- package/plugins/kxm/dist/cli.js +55 -13
- package/plugins/kxm/dist/mcp-server.js +104 -32
- package/plugins/kxm/dist/runtime.js +307 -7
- package/plugins/kxm/dist/vnext-runtime-supervisor.js +300 -6
- package/plugins/kxm/package.json +1 -1
- package/plugins/kxm/src/cli/hub.ts +2 -1
- package/plugins/kxm/src/cli/vnext.ts +46 -3
- package/plugins/kxm/src/cli.ts +3 -13
- package/plugins/kxm/src/database.ts +3 -1
- package/plugins/kxm/src/hub-env.ts +15 -0
- package/plugins/kxm/src/mcp-server.ts +5 -7
- package/plugins/kxm/src/vnext-config.ts +31 -0
- package/plugins/kxm/src/vnext-engine-fold.ts +24 -0
- package/plugins/kxm/src/vnext-engine.ts +172 -2
- package/plugins/kxm/src/vnext-runtime-owner.ts +1 -0
- package/plugins/kxm/src/vnext-runtime-store.ts +151 -2
- package/plugins/kxm/src/vnext-runtime-supervisor.ts +23 -2
- package/schemas/vnext/common.schema.json +1 -0
- package/schemas/vnext/drive-receipt.schema.json +79 -0
- package/schemas/vnext/run-event.schema.json +10 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://schemas.kxm.dev/vnext/drive-receipt.schema.json",
|
|
4
|
+
"title": "KXM vNext drive session receipt",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"schema",
|
|
8
|
+
"driveId",
|
|
9
|
+
"runId",
|
|
10
|
+
"projectId",
|
|
11
|
+
"homeRuntimeId",
|
|
12
|
+
"mode",
|
|
13
|
+
"openedAt",
|
|
14
|
+
"openedSequence",
|
|
15
|
+
"closedAt",
|
|
16
|
+
"lastSequence",
|
|
17
|
+
"logHash",
|
|
18
|
+
"settlement",
|
|
19
|
+
"budget",
|
|
20
|
+
"producer"
|
|
21
|
+
],
|
|
22
|
+
"properties": {
|
|
23
|
+
"schema": { "const": "kxm.drive-receipt.v1" },
|
|
24
|
+
"driveId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
25
|
+
"runId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
26
|
+
"projectId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
27
|
+
"homeRuntimeId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
28
|
+
"mode": { "enum": ["simulated", "live"] },
|
|
29
|
+
"openedAt": { "$ref": "common.schema.json#/$defs/timestamp" },
|
|
30
|
+
"openedSequence": { "type": "integer", "minimum": 1 },
|
|
31
|
+
"closedAt": { "$ref": "common.schema.json#/$defs/timestamp" },
|
|
32
|
+
"lastSequence": { "type": "integer", "minimum": 1 },
|
|
33
|
+
"logHash": { "$ref": "common.schema.json#/$defs/sha256" },
|
|
34
|
+
"settlement": { "$ref": "#/$defs/settlement" },
|
|
35
|
+
"budget": { "type": "null" },
|
|
36
|
+
"producer": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["id", "closed"],
|
|
39
|
+
"properties": {
|
|
40
|
+
"id": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
41
|
+
"closed": { "type": "boolean" }
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"additionalProperties": false,
|
|
47
|
+
"$defs": {
|
|
48
|
+
"settlement": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"required": ["kind", "status", "reason"],
|
|
51
|
+
"properties": {
|
|
52
|
+
"kind": { "enum": ["terminal", "handoff", "unsettled"] },
|
|
53
|
+
"status": { "$ref": "common.schema.json#/$defs/lifecycleStatus" },
|
|
54
|
+
"reason": { "type": "string", "maxLength": 4000 },
|
|
55
|
+
"handoff": { "$ref": "#/$defs/handoff" },
|
|
56
|
+
"error": { "$ref": "common.schema.json#/$defs/errorSummary" }
|
|
57
|
+
},
|
|
58
|
+
"additionalProperties": false,
|
|
59
|
+
"allOf": [
|
|
60
|
+
{
|
|
61
|
+
"if": { "properties": { "kind": { "const": "handoff" } }, "required": ["kind"] },
|
|
62
|
+
"then": { "required": ["handoff"] },
|
|
63
|
+
"else": { "not": { "required": ["handoff"] } }
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"handoff": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"required": ["reason", "detail"],
|
|
70
|
+
"properties": {
|
|
71
|
+
"reason": { "type": "string", "minLength": 1, "maxLength": 80 },
|
|
72
|
+
"field": { "type": "string", "minLength": 1, "maxLength": 128 },
|
|
73
|
+
"stepId": { "$ref": "common.schema.json#/$defs/identifier" },
|
|
74
|
+
"detail": { "type": "string", "minLength": 1, "maxLength": 4000 }
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -278,6 +278,14 @@
|
|
|
278
278
|
"payload": { "type": "object", "required": ["routing"] }
|
|
279
279
|
}
|
|
280
280
|
}
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"if": { "properties": { "eventType": { "const": "run.drive_opened" } }, "required": ["eventType"] },
|
|
284
|
+
"then": {
|
|
285
|
+
"properties": {
|
|
286
|
+
"payload": { "type": "object", "required": ["driveId", "mode"] }
|
|
287
|
+
}
|
|
288
|
+
}
|
|
281
289
|
}
|
|
282
290
|
],
|
|
283
291
|
"additionalProperties": false,
|
|
@@ -394,6 +402,8 @@
|
|
|
394
402
|
"maxItems": 64
|
|
395
403
|
},
|
|
396
404
|
"lease": { "$ref": "common.schema.json#/$defs/lease" },
|
|
405
|
+
"driveId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
406
|
+
"mode": { "enum": ["simulated", "live"] },
|
|
397
407
|
"candidateId": { "$ref": "common.schema.json#/$defs/opaqueId" },
|
|
398
408
|
"counts": {
|
|
399
409
|
"type": "object",
|